By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,830 Members | 2,276 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,830 IT Pros & Developers. It's quick & easy.

php uploader not work in localhost

P: 123
I download several .php file(uploader, etc) from internet and it works in ftp.

however, it not work in "local host". WHy? is it because of the folder
permission?i using apache...anything need to set there?

how to set?

Sep 24 '08 #1
Share this Question
Share on Google+
9 Replies

P: 258
It might be because of permissions on the folder youre trying to upload your files in.

I can help you fix this problem with Windows XP. But if you have any other OS then check CHMOD command on

Here is what you have to do to fix the permissions on your folders (Windows XP).
1- Open My Computer
2- Go to Tools --> Folder options
3- Go to the View tab and find this option on the list : Use simple file sharing (recommended)
4- Uncheck the box and click OK
5- Now go to the folder which needs to be changed for permissions
6- Right click on the folder and go to properties.
7- Go to the Security tab .. in the top list , choose the username you are using to log in to your windows and then change permissions for the specified user in the bottom list

If you allow this user to read and write to this folder then your php uploader should work fine

Good luck
Sep 24 '08 #2

Expert 5K+
P: 5,058
however, it not work in "local host". WHy?[...]
How is it not working?
Are you getting any error messages?

There could be a lot of reasons why your server isn't doing what you want it to be doing. If you want us to be able to help, we need to know what it is you are trying to do and how it is not working.

We need details, or we are forced to guess, and we don't like guessing :)
Sep 24 '08 #3

P: 123
no error message.

for premission things, i tried already for still not working.

that php uploader..i tried in ftp and it works..

thinking i may need some extension .dll for php or change some setting for apache....any suggestion?

Sep 25 '08 #4

Expert 5K+
P: 5,058
Have you tried turning on the debug messages?

You still haven't given us enough info on the problem.
What is this supposed to be doing and how is it failing to do so?
We need details!

Showing us the code that isn't working would also be a big help.
Sep 25 '08 #5

P: 123
there are 2 files,....the upload.php..which we can upload pictures, and all the uploader.php will return a $uploaded_files which will output in upload.php, so
after pic upload...the page will add the filename to the bottom of the page.

Please see below for some code in upload.php

Expand|Select|Wrap|Line Numbers
  1. <?
  2.     include("uploader.php"); 
  3. ?>
  5. ...upload pic form here......
  8. <? 
  10. if($uploaded_files == "") echo "    
  11. <tr>
  12. <td colspan=\"2\" style=\"background: #fff; color: #000; text-align: center\"><br /><strong>There are no uploaded files.
  13. </strong><br /><br /></td>
  14. </tr>
  15. "; else echo $uploaded_files; ?>
  16. </table>
Above page works if it is run on website, however, not work in localhost(Apache
+ php5)....don;t know why...but in local host.....on always show
below the end of the page. but in only show There are no uploaded files if no file is save in folder "files"...

below 2 sentence show if run display upload.php on localhost
There are no uploaded files.

"; else echo $uploaded_files; ?>
Sep 30 '08 #6

P: 123
anyone can help?

Oct 23 '08 #7

P: 258
It might be because of (upload_max_filesize) in your PHP.INI

Try to upload files smaller than 1MB and see if it works
Oct 23 '08 #8

P: 123
not work as well............
Oct 24 '08 #9

P: 258
As Atli said before there could be alot of reasons why your code is not working.
I could come up with some reasons

1- Permissions on the specified folder
2- Having upload size limit in your PHP.INI
3- Using direct variables to uploaded file without $_files[] in a server with register_globals off

I'm sure there are more reasons I don't think of.

So, I think posting the actual code here might help. Show us your code to see what's wrong
Oct 24 '08 #10

Post your reply

Sign in to post your reply or Sign up for a free account.