Consistent error in products with 100 images (fatal error)

Whenever I add 100 images to product there is no way to save or edit it after that, resulting in

Fatal error: Cannot use string offset as an array in /var/cache/templates/admin/%%E4^E42^E4252AD1%%mainbox.tpl.php on line 55

The only walk around I found is to make all the modifications without images and force import them via csv file in the end. Though this isn’t best solution because any attempt to edit product in the future results in same fatal error. So you have to remove all images, edit description, save and import images again… :)

Anybody tried products with over 100 images?

Hello maxst,



Thank you for your message.



Please change the value of the max_input_vars PHP configuration directive to 5000 on your server and check the result.



Thank you.





Pavel Zyukin

CS-Cart Support team

Added that value. But seems it doesn't help.

[quote name='maxst' timestamp='1364416469' post='158844']

Added that value. But seems it doesn't help.

[/quote]Hi, where (in which file) did you change it?

php.ini

Hello maxst,



Thank you for your message.



The problem requires examination on your server. Please contact us via Customer Help Desk and provide temporary access to your server by clicking on the Add record link on the Access information page of your Help Desk account so that we could examine the issue.



Thank you.





Pavel Zyukin

CS-Cart Support team

[quote name='maxst' timestamp='1364466362' post='158867']

php.ini

[/quote]The php.ini file is not recursive. Updating your php.ini values in public_html/php.ini will not affect PHP files in subfolders of your public_html, such as public_html/subfolder. To correct this problem, you can make your php.ini file recursive so that it affects all sub folders.



Making your php.ini file affect all child folders as well is referred to as making the file “recursive”. To make your public_html/php.ini file recursive, edit (or create the file if it doesn't exist) your public_html/.htaccess file and add the following code:


suPHP_ConfigPath /home/username/public_html



This line you entered is specifying the directory where the php.ini is located that you want to make recursive. Be sure to replace username with your cPanel username.

This change is immediate, so you should see the update right away.



After saving the changes, be sure to create a phpinfo page in one of your subdirectories and test the results. When looking at your phpinfo page, the “Loaded Configuration File” should reflect the php.ini file that you wanted to make recursive.



A phpinfo page is simply a php page with the following code:


Can you please try in on your own server first with product over 100 images?

So it won’t be like in my last ticket that after a week of playing with my server you found out the bug with catalogues is on your side :)

Throwing a root access to server isn’t the same as just to installation folder for cs cart.

[size=4]Thank you for understanding.[/size]



[size=4]P.S. Anybody else can please do a favour and quicky test a product with 100 images as well?[/size]



[size=4]Martfox. [/size]

[size=4]1) php.ini is in a root folder not public_html.[/size]

[size=4]2) all other changes like [/size][size=4]upload_max_filesize, [/size][size=4]max_file_uploads worked fine through php.ini[/size]

Hello maxst,



Thank you for your message.



I have just tried it in my local CS-Cart installation and 100 additional images have been uploaded for a product without any problems. Could you check your PHP error logs additionally? Maybe you will find the error description there.



Thank you.





Pavel Zyukin

CS-Cart Support team

Martfox was right indeed. That value didn’t come through until [color=#000000][size=2]suPHP_ConfigPath [/size][/color][color=#666600][size=2]/[/size][/color][color=#000000][size=2]home[/size][/color][color=#666600][size=2]/[/size][/color][color=#000000][size=2]username[/size][/color][color=#666600][size=2]/[/size][/color][color=#000000][size=2]public_html [size=4]was set in .htaccess.[/size][/size][/color]

[size=4][color=#000000]Thank you for your patience. The problem seems solved now. :)[/color][/size]

I am glad to hear that you managed to resolve it. Thank you for keeping us informed.





Pavel Zyukin

CS-Cart Support team