Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Apr 2011
    Posts
    47
    Thanks
    7
    Thanked 0 Times in 0 Posts

    [an error occurred while processing this directive] - only happens on large form

    I have a form that contains an album of photos. The photos are pulled from the database depending on which album is selected. Each photo has a checkbox. The user selects the desired photo and then presses submit. When the user presses submit, the checked boxes are sent to another page for processing. So far this works fine for most albums, with the largest working album around 100 photos, but there is one album that has 262 photos. If a user tries to submit the form from the large album, I get this error:

    [an error occurred while processing this directive]

    Any clue what that might be, and why it only happens with the larger album? I tried searching around and I've already tried switching the ipconfig file to FastCGI, but that didn't work. I'm not sure what else to try, as I have no clue what is causing the error.

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    I assume you're not actually sending back 262 photos for a request? If so, cut it down to 1. All you need to know is the album to do anything with it, as you can seek the data you require with just that information.

    That doesn't appear to be a PHP error. That looks like a status 500 possibly from an IIS server? These typically occur before the PHP processing starts, but if its IIS I can't be sure as I've never used it with PHP before.

  • #3
    New Coder
    Join Date
    Apr 2011
    Posts
    47
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Each photo has a checkbox. Once that checkbox is checked, a div, containing numerous select menus, toggles to show. The numerous select menus are for choosing a quantity of various sized prints of that pic (e.g. 4"x6", 5"x7", etc.).

    With the way I'm processing the form now, the do/while loop is running through the photos where the album equals the album_id. It is checking each pic to see if all of the select boxes are left blank. If at least one of the select menus has been changed, it processes that info.

    Am I going about that the wrong way. Sorry if that is still vague. I've never made a form quite this extensive before.

  • #4
    New Coder
    Join Date
    Apr 2011
    Posts
    47
    Thanks
    7
    Thanked 0 Times in 0 Posts
    I also tried directing the form to a blank page just to see if maybe it's the form, itself, causing the problem, and not the processing. When sending to a blank page, I still get the error so I can only assume it's the size of the form that is causing the problem. Could there be some type of timeout or file limit that is causing it?

  • #5
    New Coder
    Join Date
    Apr 2011
    Posts
    47
    Thanks
    7
    Thanked 0 Times in 0 Posts
    I figured out the issue when I checked the error log in cpanel. It said this:

    [18-Jul-2012 11:10:27] PHP Fatal error: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0

    My form was submitting over 1000 variables. So I had to go into the max_input_vars and set it to a higher number. It works now.

    I know it probably isn't a good idea to have that many variables in a form. I probably should have used an array. That was the first time I've coding a form that involved that much content, though, so I know how to adjust it.
    Last edited by mathruD; 07-19-2012 at 12:51 AM.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •