Thread: PHP upload script.
Results 1 to 5 of 5
12-29-2003, 01:59 AM #1
PHP upload script.
Ok, I have a bit of a problem. I have a file named addimage.php in a directory, and it is supposed to upload files to /gallery/img in the same directory.
I get this error.
Warning: copy(): open_basedir restriction in effect. File(/ptk/gallery/img/andrea.jpg) is not within the allowed path(s): (/home/grawkin:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/grawkin/public_html/ptk/addimage.php on line 56
Warning: copy(/ptk/gallery/img/andrea.jpg): failed to open stream: Operation not permitted in /home/grawkin/public_html/ptk/addimage.php on line 56
Last edited by HTML; 01-04-2004 at 11:17 PM.
12-29-2003, 02:32 AM #2
Hi there, welcome to the forums.
It sounds like php is running in safe-mode. Try chmodding the directory to 777 just in case. If that doesn't work, put
<? phpinfo(); ?>
in a file, view it, and see if safe-mode is on.If one of our members helps you, please click the icon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?
12-29-2003, 03:55 AM #3
Safe mode is off... http://grawkin.com/ass.php
Still can't get the **** to work.
<admin>Please refrain from swearing</admin>
Last edited by QuietDean; 12-29-2003 at 01:39 PM.
12-29-2003, 08:19 AM #4Originally Posted by defekt
Look at those, they give a ton of information. The PHP manual has to be by far one of the best documentations that I have ever used!
Also, make sure you are using FULL PATHS... one thing you can do, if the folder is in the same level as the script.. ie.
// dir looks like so:
$MoveImageHere = dirname( __FILE__ ) . '/upload/';
if it does, don't forget the karma!
12-29-2003, 09:48 PM #5