mstabrey Posted May 16, 2006 Share Posted May 16, 2006 I get the following two lines of errors when trying to upload a file to a server:Warning: copy(): open_basedir restriction in effect. File(../uploads/Muiz1.JPG) is not within the allowed path(s): (/usr/www/users/pretex:/usr/home/pretex:/tmp:/usr/local/lib/php) in /usr/www/users/pretex/uploader.php on line 4Warning: copy(../uploads/Muiz1.JPG): failed to open stream: Operation not permitted in /usr/www/users/pretex/uploader.php on line 4Could not upload fileHere is the php file:<?phpif( $_FILES['file']['name'] !=''){copy ( $_FILES['file']['tmp_name'], "../uploads/" . $_FILES['file']['name'] )or die ("Could not upload file" );}else{ die( "No file specified" );}?><html><body><h2>File upload complete</h2><ul><li>Sent: <?php echo $_FILES['file']['name']; ?><li>Size: <?php echo $_FILES['file']['size']; ?> bytes<li>Type: <?php echo $_FILES['file']['type']; ?></ul></body></html>Any ideas anyone?Mart Link to comment https://forums.phpfreaks.com/topic/9768-uploading-error-message/ Share on other sites More sharing options...
ober Posted May 16, 2006 Share Posted May 16, 2006 First things first with all uploads: have you used chmod on the folders in question to change the permissions to 777? Link to comment https://forums.phpfreaks.com/topic/9768-uploading-error-message/#findComment-36207 Share on other sites More sharing options...
mstabrey Posted May 16, 2006 Author Share Posted May 16, 2006 I have no idea what you're talking about, but I will find out from our hosters.Thanks! Link to comment https://forums.phpfreaks.com/topic/9768-uploading-error-message/#findComment-36233 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.