Warning: open_basedir restriction in effect. File is in wrong directory in /home/httpd/vhosts/skanlo.com/httpdocs/gallery/cpmfetch/cpmfetch.php on line 25
According to http://www.php.net/features.safe-mode this is something to do with what files / directories PHP is allowed to open, and from what I can tell has something to do with how your server is configured.... Although I am at a complete loss as to why it does not happen when your cftest.php runs which seems fine...
It is possible that your portal (for security reasons) turns that on, and since its not in the portal directory you get that error? I am guessing there. You could check the source for phpbb and any .htaccess files it may come with. Look for that setting, OR try moving the cpmfetch directory into the phpbb directory.
These are all guesses...
Vuud, thanks for the help. The pictures display and everything seems to work fine, but the warning is there, i was wondering if anyone knows a way to turn it off. I made several experiments with the test code from your tutorial. I made a file called example.php that had nothing but the test code. That warnings comes up everywhere but from inside the cpmfetch directory. My set up is the following:
My cpm gallery is at www.skanlo.com/gallery
the cpmfetch directory is at www.skanlo.com/gallery/cpmfetch
my portal is at
www.skanlo.com/elgymI got the warning in all of the following: placing the example.php in my portal directory, placing it on the root directory. placing it on the gallery directory.
then i put the example.php file inside the cpmfetch directory and no warning was displayed. then i moved the whole cpmfetch directory to the root directory witht the example.php and no warning was displayed. They i moved the whole cpmfetch directory again into my portal directory and no warning displayed. So i concluded that no matter where the cpmfetch directory is at, as long as the your code is inside that directory, you have no warning being displayed. Ofcourse this is not good new because i woul have put my whole portal inside the cpmfetch directory and that woul mean a lot of redirecting and recoding for a lot of stuff. Right now im looking into turning off warnings even if its just during that part of the code.
Since i get hosted on a pay shared server, i dont think i will have acces to turn off the open_basedir thing. At lest thats what i understand.
Also, i noticed that for the random picture it always shows the same picture. I was wondering if this is a bug, or if im just really unlucky and i always get the same picture. I would appreciate any insights about this.
Thanks again for your sharing your time and your knowledge.
Hec Losame