Jump to content

Archived

This topic is now archived and is closed to further replies.

q1234ask

HTTP Error 403 - Forbidden while doing ftp upload in php

Recommended Posts

Hey,
I have a upload php page which have worked for half a year. we host on remote server. today. it does not work anymore. show me HTTP Error 403 - Forbidden .

I can access the uploadfiles folder using ftp commander(software) and also can upload a pdf to its subfolder. but why can't I(user) upload pdf file by php?

I called remote server, they don't know what to do, and I don't know how to do either.

any one have solution for this problem. please advise.


HAAAAAAAAAA I can't post the page. the phpfreaks.com have the same problem. Is it pandymic virus?

Thanks!

code here--------- I can't post my code here ---length is oK .why?

i omitted all possible cause. but I still can't post my code. OK I will post my code later___giveup now

Share this post


Link to post
Share on other sites
Have you tried doing a chmod() to your upload script? Something tells me directory Acess Control Lists may have changed on your host's server...

Share this post


Link to post
Share on other sites
[!--quoteo(post=368192:date=Apr 24 2006, 07:15 PM:name=PWD)--][div class=\'quotetop\']QUOTE(PWD @ Apr 24 2006, 07:15 PM) [snapback]368192[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Have you tried doing a chmod() to your upload script? Something tells me directory Acess Control Lists may have changed on your host's server...
[/quote]
No, I didn't do any chmod() in my upload script. should I do it? I have two directories I need to pass in order to put the pdf file in that place. Should do it to both of them?

Please reply to me ASAP. Thanks!

Share this post


Link to post
Share on other sites
[!--quoteo(post=368481:date=Apr 25 2006, 11:10 AM:name=q1234ask)--][div class=\'quotetop\']QUOTE(q1234ask @ Apr 25 2006, 11:10 AM) [snapback]368481[/snapback][/div][div class=\'quotemain\'][!--quotec--]
No, I didn't do any chmod() in my upload script. should I do it? I have two directories I need to pass in order to put the pdf file in that place. Should do it to both of them?

Please reply to me ASAP. Thanks!
[/quote]

I guess it is not my code problem now.
I setup an ftp username and password for a subfolder-uploadfiles under my public_html before and use it in php.
I deleted all the code and only leave ftp connection for testing. It still show 403 error.
So I think the access list on server may also change the permission for uploadfiles.

So I change the ftp connection to connect directly to my root using my site ftp username and password in php.
It still shows the same error.

I think my site job is done. It definitely is server's problem.
Am I right? I can't do anything to make it work. Am I right? I even can't use ftp connection in php.
-----------edit-----------
now I think it is file uploded in server now. I will check it.

Share this post


Link to post
Share on other sites
[!--quoteo(post=368524:date=Apr 25 2006, 01:06 PM:name=q1234ask)--][div class=\'quotetop\']QUOTE(q1234ask @ Apr 25 2006, 01:06 PM) [snapback]368524[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I guess it is not my code problem now.
I setup an ftp username and password for a subfolder-uploadfiles under my public_html before and use it in php.
I deleted all the code and only leave ftp connection for testing. It still show 403 error.
So I think the access list on server may also change the permission for uploadfiles.

So I change the ftp connection to connect directly to my root using my site ftp username and password in php.
It still shows the same error.

I think my site job is done. It definitely is server's problem.
Am I right? I can't do anything to make it work. Am I right? I even can't use ftp connection in php.
-----------edit-----------
now I think it is file uploded in server now. I will check it.
[/quote]
Ok, It is not ftp problem now. It is for somereason, the server do not accept upload file using html.
I guess it file uploaded to server problem. but I can not check is_uploaded_file since it always show 403 error msg.

I try to add chmod or ftp_chmod after ftp_put. it still doesnot work.
I even use chmod to change mod of the temporary file uploaded which shows mod changed in my local server. but the hosting server still show same error msg and IE don't show any my prompt.

What can I do next???? Please advise. Thanks!!! where should I change Phpinfo setting to make it work?

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.