View Full Version : Errors in the cart...
Mbroderick
October 16th, 2003, 10:58 AM
I'm running in to 2 other issues.
1st)
When I login in to the ADMIN screen, the following error is displayed:
Wrong parameter count for htmlspecialchars() in control_panel.php on line 44
I'm able to update store info etc. But not sure what to do about the error. Is it seroius?
2nd)
I can add items to the cart and everything looks ok, but when I click CHECKOUT the following error is displayed at the bottom of the page.
Fatal error: Call to undefined function: mysql_escape_string() in D:/home/DartoidsWorld.com/squirrelcart/functions/modify_record.func on line 14
same error when I click CONTINUE...
( posted created a ticket Sunday 12th, but have not heard from anyone yet)
Thanks for your help.
Jamie
October 16th, 2003, 11:31 AM
Hi,
1st) When I login in to the ADMIN screen, the following error is displayed:
Wrong parameter count for htmlspecialchars() in control_panel.php on line 44
I'm able to update store info etc. But not sure what to do about the error. Is it seroius?
That line looks like this:
$theme_name = htmlspecialchars($theme_name, ENT_QUOTES);
The syntax is correct for the function. The second parameter is a constant, and tells the function to escape both single and double quotes. It sounds as though that constant is not set on your server for some reason. You can confirm whether or not it is set by pasting this code into a php file and bringing it up in your browser:
<?
print_r(get_defined_constants());
?>
When you bring the file up in your browser, you will need to view the source so you can see the line breaks. Then look for that constant. If it is not there, then that is why you are getting that error. I am not sure what would cause the absence of the constant. If you can't resolve it, you could remove the ", ENT_QUOTES" text from line 44, and it should go away. If you do that, just make sure you don't create a theme with a name that contains a single quote.
2nd)
I can add items to the cart and everything looks ok, but when I click CHECKOUT the following error is displayed at the bottom of the page.
Fatal error: Call to undefined function: mysql_escape_string() in D:/home/DartoidsWorld.com/squirrelcart/functions/modify_record.func on line 14
same error when I click CONTINUE...
mysql_escape_string is a common function that has been available since PHP v4.0.3. You can read about it here:
http://au2.php.net/manual/en/function.mysql-escape-string.php
If you are running PHP prior to v4.0.3, then that would definitely cause that error. If you bring up this file, you should be able to determine your PHP version:
http://YOURSITE.COM/squirrelcart/phpinfo.php
Thanks,
Jamie
Mbroderick
October 16th, 2003, 04:52 PM
I created a test page with this code.
<?
print_r(get_defined_constants());
?>
I receive the following error:
Fatal error: Call to undefined function: get_defined_constants() in d:\home\DartoidsWorld.com\test.php on line 2
So I'm guessing the problem is on the server side.
I loaded /phpinfo.php and it was infact version 4.0.2 I'm having them upgrade it know. ( Is the upgrade as simple as copying the php.exe and
php4ts.dll files to their /php directory? ) If not, I don't expect you to go in to details, I was just curious in case they tell me it's a long process and will take a few days. :)
Could the older version cause the first error?
Thanks again!
Jamie
October 16th, 2003, 05:58 PM
I am not sure exactly what is involved in upgrading. I haven't installed PHP often, and not in quiet sometime. The older version may be causing the first "line 44" error as well, but I am not positive.
Thanks,
Jamie
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.