Ubuntu - LAMP > PHP path to require_once / include_once not being found
Hello LQ'ppl,
I am running "Ubuntu Server with LAMP" which is working well bu for some reason i'm having trouble with paths being found by PHP; for instance: if(file_exists("../db/websitedb.php")) require_once("../db/websitedb.php"); returns false: file not found! if i put in an absolute path to the server in a php file like "/var/www/db/websitedb.php" it finds the file as i would hope to in the first instance. Is there a settings in the php.ini that i have changed or missed that will fix this? or is there a module that needs to be installed for it to work properly? I don't have this problem with other linux servers used for web hosting for my clients, and apache/php in windows is fine also, so it seems strange that this isn't working under Ubuntu Server using LAMP. Hoping someone can help... |
Quote:
There's nothing you need to change in php.ini...you've either got a permissions, symlink, or path problem. |
Thanks for the reply TB0ne,
Permssions on all directorys under and including 'www' are 755 drwxr-xr-x directory tree looks like: www ---db ---public_html --------------anywebsite I have no problems changing directorys from the calling scripts directory e.g from anywebsite i can 'cd ../../db' to the db directory. The 'db' directory is a physical directory |
All times are GMT -5. The time now is 06:27 AM. |