PDA

View Full Version : If there is much in the “description” box I get an SQL message “Query Failed”.


revans
July 23rd, 2003, 07:33 PM
Hey cool cats,

First a quick background. I’ve had a bunch of problems, first with the upgrade, then my ISP changed servers and did something unspeakable to the directories and lost files longer than x characters etc. Then the SSL cert didn’t work…Anyway it’s taken a while but everything seems to working like clockwork now.

Except….
Problem. When adding a new product, or changing something on an existing product, if there is much in the “description” part I get an SQL message “Query Failed”. Now if I add a new product or update one with the “description” field BLANK it purrs happily along. I can even get away with a few characters and it will update, but not if there is a bunch of text or html code in the description box.

Now I can update that description box just fine from phpMyAdmin with text copied straight from the description box that the squirrelcart interface just choked on. Another point, it will upload the graphics, so I don’t think it’s an issue with file size restrictions.

Any ideas?

Robert

Rich
July 24th, 2003, 11:19 AM
Hi Robert,

This is probably caused by "magic_quotes_gpc" being set to "Off" in your server’s php.ini file.

Squirrelcart relies on this being set to "On" in order to function properly. We'll be making changes in future versions that will allow Squrirelcart to function without relying on such settings.

For now, you can create a .htaccess file in your squirrelcart directory (or edit the existing one if it's there) and add this line: php_value magic_quotes_gpc 1
It should override the setting in your PHP.INI file.

Regards,
Rich

revans
July 24th, 2003, 06:50 PM
I just logged on to tell you that I'd narrowed it down to submissions containing quotes or apostrophes and found your suggestion.

Popped a .htaccess file as you suggested in the squrrelcart directory and it works fine.

Thanks! Saves me a bunch of time having to go back and forth through phpMyAdmin.

BTW a word of advice from the owner of recently deceased "Niege" (an handsome white rabbit): never turn your back on that 4 eyed cat...