Jump to content


Photo

HTTP Error 403 - Forbidden while doing ftp upload in php


  • Please log in to reply
4 replies to this topic

#1 q1234ask

q1234ask
  • Members
  • PipPip
  • Member
  • 15 posts

Posted 24 April 2006 - 07:36 PM

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

#2 PWD

PWD
  • Members
  • PipPip
  • Member
  • 19 posts

Posted 24 April 2006 - 11:15 PM

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...
[!--fonto:Geneva--][span style="font-family:Geneva"][!--/fonto--]My Gratitude---[!--fontc--][/span][!--/fontc--]
(My gratitude in advance for helping me learn; so I may one day give as freely as you have here today)
----------
[!--sizeo:5--][span style="font-size:18pt;line-height:100%"][!--/sizeo--][!--fonto:Optima--][span style="font-family:Optima"][!--/fonto--][!--coloro:red--][span style="color:red"][!--/coloro--]PWD[!--sizec--][/span][!--/sizec--][!--colorc--][/span][!--/colorc--][!--fontc--][/span][!--/fontc--]

#3 q1234ask

q1234ask
  • Members
  • PipPip
  • Member
  • 15 posts

Posted 25 April 2006 - 03:10 PM

[!--quoteo(post=368192:date=Apr 24 2006, 07:15 PM:name=PWD)--][div class=\'quotetop\']QUOTE(PWD @ Apr 24 2006, 07:15 PM) View Post[/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!



#4 q1234ask

q1234ask
  • Members
  • PipPip
  • Member
  • 15 posts

Posted 25 April 2006 - 05:06 PM

[!--quoteo(post=368481:date=Apr 25 2006, 11:10 AM:name=q1234ask)--][div class=\'quotetop\']QUOTE(q1234ask @ Apr 25 2006, 11:10 AM) View Post[/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.



#5 q1234ask

q1234ask
  • Members
  • PipPip
  • Member
  • 15 posts

Posted 25 April 2006 - 06:25 PM

[!--quoteo(post=368524:date=Apr 25 2006, 01:06 PM:name=q1234ask)--][div class=\'quotetop\']QUOTE(q1234ask @ Apr 25 2006, 01:06 PM) View Post[/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?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users