Zen Cart Logo
Forums / General Questions / Hoster upgraded from php 5.2 to 5.3

Hoster upgraded from php 5.2 to 5.3

Views: 1,217

Results 1 to 5 of 5
17 Jul 2013, 11:59 AM
#1
dre avatar

dre

New Zenner

Join Date:
Mar 2006
Location:
The Netherlands
Posts:
92
Plugin Contributions:
0

Hoster upgraded from php 5.2 to 5.3

My Hoster uopgraden from php 5.2 to 5.3 (my shop is zencart 1.39.h) and send me the file below but dont know how to fix al thes errors:

httpdocs/includes/modules/payment/linkpoint_api/class.linkpoint_api.php:97: if (!dl('liblphp.so')) httpdocs/includes/modules/payment/ideal.php:380: $ideal_description = ereg_replace("[^( ,[:alnum:])]", '*', $ideal_description); httpdocs/admin/easypopulate.php:745: $products_image_base = ereg_replace($products_image_extension . '$', '', $products_image); httpdocs/includes/application_top.php:94:if (version_compare(PHP_VERSION, 5.3, '<') && function_exists('set_magic_quotes_runtime')) set_magic_quotes_runtime(0); httpdocs/includes/classes/class.phpmailer.php:1109: if (function_exists('set_magic_quotes_runtime')) set_magic_quotes_runtime(0); httpdocs/includes/classes/class.phpmailer.php:1113: if (function_exists('set_magic_quotes_runtime')) @set_magic_quotes_runtime($magic_quotes); httpdocs/admin/includes/application_top.php:51:if (function_exists('set_magic_quotes_runtime') && version_compare(PHP_VERSION, 5.3, '<')) set_magic_quotes_runtime(0); httpdocs/sitemap/inc/classes/Crawler.class.php:341: // TODO what about http result? after 'HTTP/' => split(" " ...) => [1] httpdocs/sitemap/inc/classes/Crawler.class.php:345: $s = split(" ", $value); httpdocs/sitemap/inc/classes/Crawler.class.php:464: foreach (split('&', $url_query) as $id => $quer) { httpdocs/sitemap/inc/classes/Crawler.class.php:465: $v = split('=', $quer); httpdocs/includes/classes/db/mysql/query_factory.php:71: return mysql_escape_string($zp_string, $this->link); httpdocs/includes/application_top.php:95:if (@ini_get('magic_quotes_sybase') != 0) @ini_set('magic_quotes_sybase', 0); httpdocs/admin/includes/application_top.php:52:if (@ini_get('magic_quotes_sybase') != 0) @ini_set('magic_quotes_sybase', 0);

Thanx for any help

dre

17 Jul 2013, 12:47 PM
#2
dre avatar

dre

New Zenner

Join Date:
Mar 2006
Location:
The Netherlands
Posts:
92
Plugin Contributions:
0

Re: Hoster upgraded from php 5.2 to 5.3

New error

[17-Jul-2013 11:24:02] PHP Warning: preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Compilation failed: unmatched parentheses at offset 28 in httpdocs/includes/modules/additional_images.php on line 48

This is line 48:

if(preg_match("/" . $products_image_base . "/i", $file) == 1) {

17 Jul 2013, 4:53 PM
#4
dre avatar

dre

New Zenner

Join Date:
Mar 2006
Location:
The Netherlands
Posts:
92
Plugin Contributions:
0

Re: Hoster upgraded from php 5.2 to 5.3

Thank you for your reply.

With the link i can solve these lines i think:

httpdocs/includes/modules/payment/linkpoint_api/class.linkpoint_api.php:97: if (!dl('liblphp.so')) httpdocs/includes/modules/payment/ideal.php:380: $ideal_description = ereg_replace("[^( ,[:alnum:])]", '*', $ideal_description);
httpdocs/admin/easypopulate.php:745: $products_image_base = ereg_replace($products_image_extension . '$', '', $products_image);

But cant find how to solve these lines:

httpdocs/includes/application_top.php:94:if (version_compare(PHP_VERSION, 5.3, '<') && function_exists('set_magic_quotes_runtime')) set_magic_quotes_runtime(0);

httpdocs/includes/classes/class.phpmailer.php:1109: if (function_exists('set_magic_quotes_runtime')) set_magic_quotes_runtime(0);

httpdocs/includes/classes/class.phpmailer.php:1113: if (function_exists('set_magic_quotes_runtime')) @set_magic_quotes_runtime($magic_quotes);

httpdocs/admin/includes/application_top.php:51:if (function_exists('set_magic_quotes_runtime') && version_compare(PHP_VERSION, 5.3, '<')) set_magic_quotes_runtime(0);

httpdocs/sitemap/inc/classes/Crawler.class.php:341: // TODO what about http result? after 'HTTP/' => split(" " ...) => [1]

httpdocs/sitemap/inc/classes/Crawler.class.php:345: $s = split(" ", $value);

httpdocs/sitemap/inc/classes/Crawler.class.php:464: foreach (split('&', $url_query) as $id => $quer) { httpdocs/sitemap/inc/classes/Crawler.class.php:465: $v = split('=', $quer);

httpdocs/includes/classes/db/mysql/query_factory.php:71: return mysql_escape_string($zp_string, $this->link); httpdocs/includes/application_top.php:95:if (@ini_get('magic_quotes_sybase') != 0) @ini_set('magic_quotes_sybase', 0);

httpdocs/admin/includes/application_top.php:52:if (@ini_get('magic_quotes_sybase') != 0) @ini_set('magic_quotes_sybase', 0);

17 Jul 2013, 9:15 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Hoster upgraded from php 5.2 to 5.3

dre:

httpdocs/includes/application_top.php:94:if (version_compare(PHP_VERSION, 5.3, '<') && function_exists('set_magic_quotes_runtime')) set_magic_quotes_runtime(0);

httpdocs/includes/classes/class.phpmailer.php:1109: if (function_exists('set_magic_quotes_runtime')) set_magic_quotes_runtime(0);

httpdocs/includes/classes/class.phpmailer.php:1113: if (function_exists('set_magic_quotes_runtime')) @set_magic_quotes_runtime($magic_quotes);

httpdocs/admin/includes/application_top.php:51:if (function_exists('set_magic_quotes_runtime') && version_compare(PHP_VERSION, 5.3, '<')) set_magic_quotes_runtime(0);

httpdocs/includes/classes/db/mysql/query_factory.php:71: return mysql_escape_string($zp_string, $this->link); httpdocs/includes/application_top.php:95:if (@ini_get('magic_quotes_sybase') != 0) @ini_set('magic_quotes_sybase', 0);

httpdocs/admin/includes/application_top.php:52:if (@ini_get('magic_quotes_sybase') != 0) @ini_set('magic_quotes_sybase', 0);
All of those are already written to intelligently only fire when they will work safely. Your host has an overzealous compatibility checker that's not taking into consideration how each of those lines is written. Summary: leave them alone.

dre:

httpdocs/sitemap/inc/classes/Crawler.class.php:341: // TODO what about http result? after 'HTTP/' => split(" " ...) => [1]
httpdocs/sitemap/inc/classes/Crawler.class.php:345: $s = split(" ", $value);
httpdocs/sitemap/inc/classes/Crawler.class.php:464: foreach (split('&', $url_query) as $id => $quer) {
httpdocs/sitemap/inc/classes/Crawler.class.php:465: $v = split('=', $quer);Fixing split() is covered in the article I pointed you to. Just change it to str_replace.
And then go back to whatever plugin added that file to your site and post in its support thread that it needs to make that change for compatibility.