Results 1 to 6 of 6
Hello,
I have installed on my OpenVz VPS:
Ubuntu-8.04-i386-minimal and
Webmin 1.490
I have installed Apache and PHP in standard directory.
My web root is /var/www
Here is my problem:
...
- 10-14-2009 #1Just Joined!
- Join Date
- Oct 2009
- Posts
- 10
How can PHP scripts "include" a no standard directory?
Hello,
I have installed on my OpenVz VPS:
Ubuntu-8.04-i386-minimal and
Webmin 1.490
I have installed Apache and PHP in standard directory.
My web root is /var/www
Here is my problem:
I have a PHP library and I do not want to put it inside my web root.
I mean I have to put my library in the directory: /temp/lib
How Can I make that PHP scripts can "include" them (/temp/lib)?
BTW, I am a newbie in Linux
Thanks
Peace5
- 10-14-2009 #2Linux Newbie
- Join Date
- Nov 2007
- Location
- Planet Earth
- Posts
- 152
First, be sure that your dir has read access for every users.
Then, modify in your php.ini file the 'include path' variable to add your directory.
Finally, restart the apache daemon.
HugoEOF
- 10-15-2009 #3Just Joined!
- Join Date
- Oct 2009
- Posts
- 10
Thanks for your reply
How can I do this "your dir has read access for every users"?
Thanks again
Peace5
- 10-16-2009 #4Linux Newbie
- Join Date
- Nov 2007
- Location
- Planet Earth
- Posts
- 152
From your file manager, check the properties of the dir, and verify that read permission for all users is activated (I'm not sure which file manager you use, but normally is pretty easy to verify the permission on the any GUI)
JFYI, permissions in linux are on 3 levels: owner, group and others, and each level has read, write, execute flags.
HugoEOF
- 10-16-2009 #5
First of all you need to make sure that the user that runs the apache process can access the folder. This is typically www-data in Ubuntu.
chown: -R www-data: /path/to/your/files
Then you need to include the files in your PHP scriptsIf we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
- 10-16-2009 #6Just Joined!
- Join Date
- Oct 2009
- Posts
- 10
Hello,
The Lib cannot start
I did this:
Path: /temp/lib
Step #1
modify in your php.ini file the 'include path' variable to add your directory.
Finally, restart the apache daemon.
Step #2
From your file manager, check the properties of the dir,
and verify that read permission for all users is activated
Step #3
First of all you need to make sure that the user that runs the apache process can access the folder. This is typically www-data in Ubuntu.
chown: -R www-data: /path/to/your/files
Then you need to include the files in your PHP scripts
Any suggestions are welcome!


Reply With Quote