Jump to content

PHP not including includes since reinstalling linux


Recommended Posts

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?

Link to comment
Share on other sites

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 |

+----------------+--------------------+------------------+

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.