PDA

View Full Version : Including PHP files problem



rogoff
06-13-2004, 05:41 AM
I'm having a bit of a problem with a PHP page that includes another PHP page. The include works fine if I put the include in the same directory as the file doing the including. However, if I put the include in the includes directory that I've specified in config files, it doesn't work.

The config settings I'm using are:

In httpd.conf (inside <VirtualHost _default_:443>):
php_value include_path ".:/www/mysite/includes"

In php.ini:
include_path = ".:/php/includes:/www/mysite/includes"

I'm referencing the include with the following:
<?php include("nav.php"); ?>

Does anyone know where I'm going wrong?

wildjokerdesign
06-13-2004, 08:55 AM
Have you tried /var/www/html/includes instead of the path that uses symlinks?

Not real sure about all this but did a google and it did return quite a bit on it http://www.google.com/search?hl=en&ie=UTF-8&q=php.ini+include_path+&btnG=Google+Search

Maybe some of the links might help if no one else comes up with anything.

rogoff
06-13-2004, 04:06 PM
Thanks for the suggestion. I tried that but unfortunately still no joy. So I've created an 'includes' directory within the site and I'm using relative paths to point to that instead. This seems to be working fine.

Thanks anyway.

jalal
06-13-2004, 04:38 PM
Did you restart Apache after changing your config files???

rogoff
06-14-2004, 12:21 PM
Yes, graceful restart but no change.
Thanks