Unable to execute include files in PHP Application in Amazon Linux

Multi tool use
Multi tool use
The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


Unable to execute include files in PHP Application in Amazon Linux



I'm currently having problem solving why I can't execute inlclude files in my project folder. See /var/logs/httpd/error_log below:



Project folder resides at /var/www/payroll


/var/www/payroll



[Fri Jul 27 05:12:11.793208 2018] [:error] [pid 7904] [client xxx] PHP
Warning: include_once(./Controllers/Databasecon.php): failed to open stream:
No such file or directory in /var/www/payroll/Controllers/Logout.php on line
2



[Fri Jul 27 05:12:11.793238 2018] [:error] [pid 7904] [client xxx] PHP
Warning: include_once(): Failed opening './Controllers/Databasecon.php' for
inclusion (include_path='.:/usr/share/pear') in
/var/www/payroll/Controllers/Logout.php on line 2



Configured App in VirtualHost


<VirtualHost *:80>
ServerName binhimefi.com
DocumentRoot /var/www
<Directory /var/www>
DirectoryIndex index.php
AllowOverride All
</Directory>
</VirtualHost>



Can you help me pont out the problem? Thanks.





by the way. I just currently uploaded php project to this server. PHP project runs good without issues before uploading to this Linux Server
– John Titor
57 mins ago





are you using any framework?
– Kuldeep Singh
40 mins ago





Hi Kuldeep, for this project. I'm not using any framework.
– John Titor
36 mins ago





are you including file inside Logout.php file ? If yes, then just include file Databasecon.php. Do not set Controllers folder location.
– Kuldeep Singh
31 mins ago











By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

lXYMhl,Gj9y fawggfz3cTs8Q63qLsVa12tF2dD0y2wQH
Aj,2dgCOTGh8XZh6ueqG6erNoJpAT gYJ iP GNU qmkRV4WAqS4kOq lXX4KQUaaDGJEmBV sr8k18S

Popular posts from this blog

Makefile test if variable is not empty

Will Oldham

Visual Studio Code: How to configure includePath for better IntelliSense results