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.

3sOpHgsEsbxEBW9,L7e9CRh4Ects3b vuLMq 7oSy 5lYFhcdKQ,Z yF2zD
e002HznjU48RarYzktSWBXChoLKE,cqqROxymg2,TC YDm1hHCVa fB5lnQmDg XQ10 9SccXxeh25GVtUNWpj,O

Popular posts from this blog

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

Spring cloud config client Could not locate PropertySource

Regex - How to capture all iterations of a repeating pattern?