Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
02-22-2008, 09:36 AM #1
- Join Date
- Feb 2008
- Thanked 0 Times in 0 Posts
Working locally but not on the web server
I have an upload file html form + a PHP script that uploads videos into a folder. This works fine in my computer using localhost and after changing my php.ini (memory_limit, post_max_size, file_uploads, upload_max_filesize..).
The problem occurs when I upload the html form and the PHP script into a web server (tried several). Whenever I try to use the form, in order to upload a video, the page keeps loading for ages and finally shows nothing (no upload process status), and nothing is uploaded into the folder (that it’s been previously created).
Why? What's the reason for that? Is it something to do with the web server configuration? If so, what is what I have to ask the web server support service to do in order for it to work?
Thanks a lot in advance!!
02-22-2008, 11:12 AM #2
- Join Date
- Jan 2008
- Thanked 9 Times in 9 Posts
i think the problem may be the path where you are saving the file. the permissions of the folder where you save the file
Please de-reputate me
Its better to rule in Hell then to serve in Heaven
02-22-2008, 01:12 PM #3
- Join Date
- Oct 2006
- Denver, Colorado USA
- Thanked 319 Times in 311 Posts
A number of errors can occur with an upload. I am guessing, but your code probably does not have any error checking, error reporting, or error recovery logic to test if the up load worked or failed, to tell you why it failed, and it probably blindly continues execution when it does fail. See this link for the list of detectable errors - http://www.php.net/manual/en/feature...oad.errors.php
Short answer - if your code is not testing for possible errors and telling you why it is not working, no one if a forum will be able to tell you which one of the several possible reasons why either.
There could also be a problem with folder/file permissions and testing the value returned by the move_uploaded_file() function (or copy()...) would tell you at what point the code is failing.
Last edited by CFMaBiSmAd; 02-22-2008 at 01:14 PM.
If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.