legohead6 Posted January 24, 2008 Share Posted January 24, 2008 ok, i have a weird issue, my uploader is so simple, yet it deosnt like to upload anything other then text and pics, ive tried vids, music, pdf's and nothing works.. text(.txt,.doc) and all kinds of pics work, any know why? if(isset($_POST['upload'])){ $photon = str_replace(" ","_", $_FILES['ph']['name']); if (copy($_FILES['ph']['tmp_name'],"members/$user2/".$photon)) { @unlink($_FILES['ph']['tmp_name']); $uploader= "Upload Successfull!"; } else { unlink($_FILES['ph']['tmp_name']); $uploader= "There was an error uploading your file. Please try again"; } }else{ $uploader= "<p align=center><form enctype=multipart/form-data method=post>File:<input type=file name=ph><input type=submit name=upload value=Upload></form></p>"; }[code] [/code] Link to comment https://forums.phpfreaks.com/topic/87476-uploading-anything-other-then-textpics/ Share on other sites More sharing options...
legohead6 Posted January 24, 2008 Author Share Posted January 24, 2008 anyone? this is really frustrating Link to comment https://forums.phpfreaks.com/topic/87476-uploading-anything-other-then-textpics/#findComment-447456 Share on other sites More sharing options...
cooldude832 Posted January 24, 2008 Share Posted January 24, 2008 replace all that with <?php print_R($_FILES); ?> and see what it says Link to comment https://forums.phpfreaks.com/topic/87476-uploading-anything-other-then-textpics/#findComment-447457 Share on other sites More sharing options...
legohead6 Posted January 24, 2008 Author Share Posted January 24, 2008 Array ( [ph] => Array ( [name] => 01 All Around The World.mp3 [type] => [tmp_name] => [error] => 1 => 0 ) ) is what i get Link to comment https://forums.phpfreaks.com/topic/87476-uploading-anything-other-then-textpics/#findComment-447462 Share on other sites More sharing options...
cooldude832 Posted January 24, 2008 Share Posted January 24, 2008 http://us2.php.net/manual/en/features.file-upload.errors.php take a look at error = 1 your upload is exceeding your max upload size Now you said you could upload txt files i'm assuming small, make sure its smaller than your size if it is your host might be restricting uploads for security Link to comment https://forums.phpfreaks.com/topic/87476-uploading-anything-other-then-textpics/#findComment-447463 Share on other sites More sharing options...
legohead6 Posted January 24, 2008 Author Share Posted January 24, 2008 how do i change that, i have no php conditions too change max size yet.. Link to comment https://forums.phpfreaks.com/topic/87476-uploading-anything-other-then-textpics/#findComment-447464 Share on other sites More sharing options...
cooldude832 Posted January 24, 2008 Share Posted January 24, 2008 you do if you can edit php.ini or .htaccess make a file <?php phpinfo(); ?> and find max upload size in there Link to comment https://forums.phpfreaks.com/topic/87476-uploading-anything-other-then-textpics/#findComment-447466 Share on other sites More sharing options...
legohead6 Posted January 24, 2008 Author Share Posted January 24, 2008 http://www.filepile.ca/phpinfo.php Link to comment https://forums.phpfreaks.com/topic/87476-uploading-anything-other-then-textpics/#findComment-447470 Share on other sites More sharing options...
cooldude832 Posted January 24, 2008 Share Posted January 24, 2008 your post size max is 8mb so my only conclusion is your uploading over that or something else is happening (apache will have some to do with this and you might be restricted as I stated earlier.) Link to comment https://forums.phpfreaks.com/topic/87476-uploading-anything-other-then-textpics/#findComment-447472 Share on other sites More sharing options...
legohead6 Posted January 24, 2008 Author Share Posted January 24, 2008 ok well in php.in i get this, i guess i should contact my host and have them lift that size register_globals = Off zend_extension="/usr/local/IonCube/ioncube_loader_lin_4.4.so" zend_extension_ts="/usr/local/IonCube/ioncube_loader_lin_4.4_ts.so" [Zend] zend_optimizer.optimization_level=15 zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.0 zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.0 zend_optimizer.version=3.3.0 zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so Link to comment https://forums.phpfreaks.com/topic/87476-uploading-anything-other-then-textpics/#findComment-447476 Share on other sites More sharing options...
cooldude832 Posted January 24, 2008 Share Posted January 24, 2008 well the message is saying max file size is too big which suggest your over uploading, but small file sizes shouldn't error like this. Link to comment https://forums.phpfreaks.com/topic/87476-uploading-anything-other-then-textpics/#findComment-447478 Share on other sites More sharing options...
legohead6 Posted January 24, 2008 Author Share Posted January 24, 2008 no small ones dont, its only like music and max_upload_size is only 2m.. i just emailed my host and asked them to raise it.. Link to comment https://forums.phpfreaks.com/topic/87476-uploading-anything-other-then-textpics/#findComment-447485 Share on other sites More sharing options...
cooldude832 Posted January 24, 2008 Share Posted January 24, 2008 your upload is (this is generic uploads) but post upload is 8mb so technically yes 2mb but if say that 2 was 10 you be at 8 confused? Link to comment https://forums.phpfreaks.com/topic/87476-uploading-anything-other-then-textpics/#findComment-447488 Share on other sites More sharing options...
legohead6 Posted January 24, 2008 Author Share Posted January 24, 2008 i emailed the host and asked them to allow large uploads..... whats funny though is i went to cpanel and in file manager i can upload the same file and it works...wouldnt that php.ini control that too? Link to comment https://forums.phpfreaks.com/topic/87476-uploading-anything-other-then-textpics/#findComment-447491 Share on other sites More sharing options...
cooldude832 Posted January 24, 2008 Share Posted January 24, 2008 not technically your c-panel might work on a ftp basis which would be outside the scope of php's control Link to comment https://forums.phpfreaks.com/topic/87476-uploading-anything-other-then-textpics/#findComment-447492 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.