arthur1972 Posted June 2, 2006 Share Posted June 2, 2006 I think I have a couple of errors here. open_basedir may be the least of them. I think it may be trying to write the file I am trying to upload back to my own computer. any help would be much apreciated.*********************************************************************Warning: copy(): open_basedir restriction in effect. File(/home/www/scripts/software/id2_m3u.shtml 2.zip) is not within the allowed path(s): (/home/thottmod:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/thottmod/public_html/submit.php on line 216Warning: copy(/home/www/scripts/software/id2_m3u.shtml 2.zip): failed to open stream: Operation not permitted in /home/thottmod/public_html/submit.php on line 216Warning: Cannot modify header information - headers already sent by (output started at /home/thottmod/public_html/submit.php:216) in /home/thottmod/public_html/submit.php on line 292*********************************************************************this is the line of code the error message is refering to********************************************************************if (is_uploaded_file($_FILES['userfile']['tmp_name'])) { copy($_FILES['userfile']['tmp_name'], $software_upload_path.$next_script_id.$_FILES['userfile']['name']); $flddownload_url = $software_download_path.$next_script_id.$_FILES['userfile']['name']; }*********************************************************************I don't think the form has erros in it but here is the code that the above is referring*********************************************************************<td colspan="2"><font class="CommentFont">file should be some kind of archives (e.g. zip, tar.gz etc.), size of archive should be less than 200kb. we do not allow to upload any executable (exe,com etc.) files</font></td> </tr> <tr><td> </td></tr> <tr> <td width="250" class=HeaderColor><font class="TitleColor">Home Site** http://</font></td> <td><input type="text" name="site_url" maxlength="255" value="{site_url}" size="50"></td>*********************************************************************Thanks for any helpArthur Quote Link to comment https://forums.phpfreaks.com/topic/11019-up-loading-files/ Share on other sites More sharing options...
poirot Posted June 2, 2006 Share Posted June 2, 2006 To handle uploaded files, I'd use move_uploaded_file:[a href=\"http://www.php.net/move_uploaded_file\" target=\"_blank\"]http://www.php.net/move_uploaded_file[/a][code]bool move_uploaded_file ( string filename, string destination )[/code] Quote Link to comment https://forums.phpfreaks.com/topic/11019-up-loading-files/#findComment-41161 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.