snorky Posted April 29, 2009 Share Posted April 29, 2009 PHP not including includes since reinstalling linux Reinstalled linux on server Reinstalled PHP 4.3.8 (upgrading is not an option) - besides, it worked before the disk crash Everything - PHP & SHTML that use include files - worked fine until I had to reinstall linux No PHP code has changed Now everything works as expected except that PHP files' includes, e.g., include("includes/abcd.inc") don't work anymore: all PHP pages that used to work, i.e., properly displayed included files, no longer display those included files. There are no error messages If I comment out include("includes/abcd.inc") and use an SHTML include, <!--#include virtual="includes/abcd.inc" --> the page displays correctly. If I comment out include("includes/abcd.inc") and paste the text of includes/abcd.inc and echo the pasted text, it displays correctly The Apache DirectoryIndex directive is correct - it reads index.php index.shtml index.htm index.html phpinfo.php displays correctly, therefore PHP is working correctly (albeit possibly misconfigured) It must be a configuration thing. Any ideas? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted April 30, 2009 Share Posted April 30, 2009 For errors to show you need to edit your php.ini so error_reporting is set to E_ALL and display_errors is to On. Also post what your include_path is set to when you run phpinfo(). Quote Link to comment Share on other sites More sharing options...
snorky Posted April 30, 2009 Author Share Posted April 30, 2009 There are 3 php.ini files, each with different content /etc/admserv/php.ini /etc/httpd/php.ini /etc/httpd/438/php.ini I strongly suspect that the last one is the operative ini file, but in each I uncommented E_ALL and set display_errors = On on each in phpinfo.php +----------------+--------------------+------------------+ | Directive | Local Value | Master Value | +----------------+--------------------+------------------+ | include_path | :/usr/lib/php | .:/usr/lib/php | +----------------+--------------------+------------------+ Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted April 30, 2009 Share Posted April 30, 2009 The phpinfo() output tells you what php.ini is being used and it would also tell you the actual values for error_reporting and display_errors. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.