View Full Version : Working locally but not on the web server

02-22-2008, 09:36 AM
Dear people,

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
i think the problem may be the path where you are saving the file. the permissions of the folder where you save the file

02-22-2008, 01:12 PM
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/features.file-upload.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.