Directory Index forbidden by rule

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
samriya
Forum Newbie
Posts: 1
Joined: Mon May 24, 2010 1:35 am

Directory Index forbidden by rule

Post by samriya »

In my site, there's a option to upload photos. when client upload photos, sometimes it gets uploaded. sometimes the following error is displayed " undefined index 'uploadedfile' " or sometimes page is blank. From error_log file ,found the error " Directory Index forbidden by rule". but i provided the full permission in server.
Anyone help on this why sometimes Photo not gets uploaded. using apache, Linux Server.
User avatar
markusn00b
Forum Contributor
Posts: 298
Joined: Sat Oct 20, 2007 2:16 pm
Location: York, England

Re: Directory Index forbidden by rule

Post by markusn00b »

The undefined index error suggests that the $_FILES array is not being populated. From this, we can deduce that the file upload fails before the PHP populates the array. My guess is that the file you're uploading is exceeding your post_max_size php.ini value, and/or one of the related settings (see description of post_max_size) is being exceeded.

Mark.

P.S. The error in your error_log file looks to be an Apache error regarding access to directory listings. I could be wrong, though.
Post Reply