Posts Tagged ‘server error logs’

If you are seeing something like this in your Cubecart or server logs:Cubecart ecommerce shopping cart

[Mon Mar 03 20:27:46 2008] [error] [client 69.47.58.156] PHP Warning: parse_url(/index.php?main_page=http://joioiskioeriyyskwkdwjsdfewis.land.ru/.html/body?) [<a href='function.parse-url'>function.parse-url</a>]: Unable to parse url in /var/www/vhosts/YOURSITE.com/httpdocs/includes/sslSwitch.inc.php on line 36

Here is a fix to suppress the error:

edit file includes\sslSwitch.inc.php
FIND: $url_elements = parse_url($_SERVER['REQUEST_URI']);
REPLACE WITH: $url_elements = @parse_url($_SERVER['REQUEST_URI']);
(fixed in MP not in KN)

According to cubecart support staff:

That will indeed suppress the warning, however it is not a bug…at least not in CubeCart. It is a PHP4 bug (we are using php 5.x!), but it doesn’t cause any problems, just the warning. Thanks!