Jump to content

Option Attributes Limit


fantastichearts

Recommended Posts

Hi,

 

We use a lot of option attributes and it seems we have reached a limit of 1000?

 

I just want I need to check where and what we need to do to increase this.

 

Thanks.

----------

Script Version 5.2.4 PHP Version 5.3.27 MySQL Version 50535

_____________________________________________________________________________________________________

 

Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0

Warning: Cannot modify header information - headers already sent in /home/tainbrae/public_html/admin.php on line 8

Warning: Cannot modify header information - headers already sent in /home/tainbrae/public_html/admin.php on line 9

Warning: Cannot modify header information - headers already sent in /home/tainbrae/public_html/admin.php on line 10

Warning: Cannot modify header information - headers already sent in /home/tainbrae/public_html/admin.php on line 11

Warning: Cannot modify header information - headers already sent in /home/tainbrae/public_html/admin.php on line 12

Warning: ini_set() [ref.outcontrol]: Cannot change zlib.output_compression - headers already sent in /home/tainbrae/public_html/ini.inc.php on line 41

 

 

 

Link to comment
Share on other sites

Of the above errors, all but the first is a consequence of the first. So, fix the first, the others won't happen.

 

This is a PHP error, not a CubeCart error. This error is thrown when more than the default 1000 form elements are returned to PHP. (There are other limits imposed by PHP and the web server, so watch out for that. These limits relate to the total amount of bytes being sent through the web server and processed by PHP, and it's a fairly large amount.)

 

This setting, max_input_vars, cannot be changed with a command in CubeCart's code. It can be changed in PHP's:

* overall php.ini configuration file

* a web site's .htaccess file

* the web server's httpd.conf file

* a specific directory containing a .user.ini file

 

Your web host provider will be able to advise you as to which method(s) is available to you.

 

Regardless of what you have available, let's try adding a file named .user.ini to the main folder of CubeCart, with these contents:

max_input_vars = 5000

When creating this file, you may have difficulty creating a filename that starts with a period. Create the file with the filename of user.ini. Then after you FTP the file to your site, tell the FTP program to rename it as .user.ini.

 

Let us know how that goes.

Link to comment
Share on other sites

Your web host provider will be able to advise you as to which method(s) is available to you to make changes to PHP's configuration.
 
I should have taken notice in your signature that you are running PHP 5.2. The availability of the file .user.ini started with PHP 5.3 CGI/FastCGI.
 
Let's try creating or editing the .htaccess file. Place this line at the very beginning or at the very end:

php_value max_input_vars 5000
Link to comment
Share on other sites

Hi Sorry I had not update my signature I am running Script Version 5.2.4 PHP Version 5.3.27 MySQL Version 50535.

 

Anyway contacted my host  (heart Internet) and they did the following:

 

" I have added a php.ini and the line  max_input_vars = 3000"

 

However still get the same issue. I have tested and it is only on the option attributes.

Link to comment
Share on other sites

In admin, Server Info (or PHP Info), the list of PHP settings will be displayed.

 

In the Core section, find max_input_vars. The middle column will have the Local value, the right column will have the Master value.

 

If the Local value is still 1000, the efforts of the hosting provider wasn't effective.

 

In some cases, if PHP is running as something other than CGI, the web server needs to be rebooted. (In some hosting environments, this can be done by the user in the hosting Control Panel.)

 

Please let us know what product we can view that will show the large number of options.

Link to comment
Share on other sites

From that product page, I see that your attribute_id numbers are up in the 6000 range.

 

If all 6000+ attributes are getting listed in admin, Product Options, Option Attributes tab, then we need to really rethink on how to Get CubeCart to approach this.

 

The problem is that the Option Groups and Option Attributes tables allow for drag-n-drop sorting. If you can live without the attribute arbitrary sort capability, relying on the default alpha-numeric sort, we can avoid this PHP limitation.

Link to comment
Share on other sites

We will leave the ability to arbitrary sort the Groups as is. Or do you have upwards near 1000 Groups of options?

 

In the admin skin template products.options.php, line 63, make this edit:

Was:
<div class="reorder-list">
Now:
<div><!--<div class="reorder-list">-->

On lines 66-68, make this edit (only the line beginnings shown):

Was:
    <span><a ....
    <input type= ....
    </span>
Now:
    <!-- <span><a ....
    <input type= ....
    </span> -->

In Maintenance, Rebuild tab, clear the cache.

 

Also, in the admin skin layout.css file, line 353, for div.tab_content div, change the 3px to 4px.

 

Try this and if no error, then we have worked around the limitation.

Link to comment
Share on other sites

You may "assume', but not 'presume'.

 

Devellion may counter-argue that 6000+ attributes is mind-boggling.

 

This begs the question, how did you ever get past the 1000 attribute count? Do you actually have that many attributes, or have you, over time, deleted several thousand? (The attribute_id numbers are never reused, so they just keep getting higher.)

 

Deleting obsolete attributes will have to be my guess. Otherwise you would have hit that 1000 limit a long time ago.

Link to comment
Share on other sites

Not sure about the numbers  or how we got to this. We do have about 50 different options and  then some of these have different attributes. If you look at the example I  showed you in terms the bracelet then you can see the different attributes and then we have about 50-75 of these products I would say.

 

I am happy for Devellion to have a look as I can give them access if they want me to raise a ticket on this.

 

Thanks for your help again.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...