{"id":647,"date":"2013-05-18T17:21:36","date_gmt":"2013-05-18T15:21:36","guid":{"rendered":"http:\/\/www.extradrm.com\/?p=647"},"modified":"2014-11-11T11:35:32","modified_gmt":"2014-11-11T09:35:32","slug":"oscommerce-issues-after-upgrade-php-5-3","status":"publish","type":"post","link":"https:\/\/www.extradrm.com\/?p=647","title":{"rendered":"Oscommerce issues after Upgrade PHP 5.3"},"content":{"rendered":"<p>After upgrading an OsCommerce site to PHP5 (5.3+ version) the follow errors occurred when using the customer part of the admin section:<\/p>\n<pre>Warning: array_merge() [function.array-merge]: Argument #1 is not an array in \/catalog\/admin\/customers.php on line 782\r\nWarning: array_merge() [function.array-merge]: Argument #2 is not an array in \/catalog\/admin\/customers.php on line 784<\/pre>\n<p>To eliminate the array_merge() errors, edit the admin\/customers.php file:<\/p>\n<p>Find these lines:<\/p>\n<pre>$customer_info = array_merge($country, $info, $reviews); \r\n$cInfo_array = array_merge($customers, $customer_info);<\/pre>\n<p>and change them to:<\/p>\n<pre>$customer_info = array_merge((array)$country, (array)$info, (array)$reviews); $cInfo_array = array_merge((array)$customers, (array)$customer_info);<\/pre>\n<h2>How tu debug in php warnings &#038; errors<\/h2>\n<p>\/\/ Set the level of error reporting<\/p>\n<pre> error_reporting(E_ALL & ~E_NOTICE);\r\n\/\/error_reporting(E_ALL);\r\n\/\/ini_set(\"display_errors\", 1);\r\n\r\n<\/pre>\n<p>see also : http:\/\/php.net\/manual\/fr\/errorfunc.configuration.php<\/p>\n<h2>PHP variables for 5.3 to use instead HTTP_ versions<\/h2>\n<pre>\r\n\/\/ >>> BEGIN REGISTER_GLOBALS\r\n  if (version_compare(phpversion(), \"4.1.0\", \">\") === true) {\r\n    $HTTP_GET_VARS = $_GET;\r\n    $HTTP_POST_VARS = $_POST;\r\n    $HTTP_SERVER_VARS = $_SERVER;\r\n    $HTTP_POST_FILES = $_FILES;\r\n    $HTTP_ENV_VARS = $_ENV;\r\n    if (isset($_COOKIE)) $HTTP_COOKIE_VARS = $_COOKIE;\r\n  }\r\n\/\/ <<< END REGISTER_GLOBALS\r\n<\/pre>\n<p>Cheers<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After upgrading an OsCommerce site to PHP5 (5.3+ version) the follow errors occurred when using the customer part of the admin section: Warning: array_merge() [function.array-merge]: Argument #1 is not an array in \/catalog\/admin\/customers.php on&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":2841,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[18],"tags":[153,154,155,315,316,317],"youtube_video":null,"_links":{"self":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/posts\/647"}],"collection":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=647"}],"version-history":[{"count":0,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/posts\/647\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/media\/2841"}],"wp:attachment":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=647"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=647"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=647"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}