Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

php5 and mysql 4.1 errors


Machinekiller

Recommended Posts

Posted

Any help would be greatly appreciated. Little background i'm trying to get running oscommerce on windows 2003 with php 5 and mysql 4.1. I used the recommended changes to get admin working and also the one reguards the problems with view orders. Both pretty well documented on here. Anyways i though all was well and started working on the site and discovered after trying to add a new user the error messages of

 

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in c:\Inetpub\wwwroot\shop\admin\customers.php on line 733

 

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in c:\Inetpub\wwwroot\shop\admin\customers.php on line 735

 

Warning: reset() [function.reset]: Passed variable is not an array or object in c:\Inetpub\wwwroot\shop\admin\includes\classes\object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in c:\Inetpub\wwwroot\shop\admin\includes\classes\object_info.php on line 18

 

i can't even delete the default user account too which is really wierd. If php5 and mysql 4.1 is the problem could anyone recommend a version of both upto date to get this great product working in a live enviroment and am needing to get a store running as soon as possible and have already spend 2 days on this.

 

Thanx hopefully in advanced

 

MK

Posted

I hav FreeBSD 5.3, Apache 2.0.54, PHP 5.0.5 with Zend Engine 2.0.5, MySQL 4.1.14.

 

Here is what I did to make BOTH the CATALOG and ADMIN function....

 

in PHP.INI

zend.ze1_compatibility_mode = On

register_globals = Off

register_long_arrays = Off

session.auto_start = 1

 

the default php.ini for PHP5 is:

zend.ze1_compatibility_mode = Off

register_globals = Off

register_long_arrays = Off

session.auto_start = 1

 

Next, in in HTTPD.CONF for the server or virtual host or directory that defines your catalog site, make sure to set

AllowOverride

to any of the following combinations:

AllowOverride All

AllowOverride Options

AllowOverride AuthConfig Options

(if you want for some reason there to be HTTP user and password to access site)

AllowOverride AuthConfig All

(if you want for some reason there to be HTTP user and password to access site)

 

Next, in your .htaccess file for your catalog directory:

php_value session.auto_start off

php_value register_long_arrays on

php_value register_globals on

 

(you do not need to replicate for admin directory IF the admin directory is directly under catalog. If you have moved the admin outside of the catalog directory, then make a .htaccess file for admin with the same information)

 

Next, make the following changes:

/catalog/includes/application_top.php around line 300, change the if PHP version line

// navigation history
 if (tep_session_is_registered('navigation')) {
 if (PHP_VERSION < 4 || PHP_VERSION >= 5) {

 

/admin/includes/classes/upload.php around line 31, after the self destruct line and before the return false line, comment out the $this->null so it looks like:

// self destruct
//          $this = null;

         return false;
       }

 

That should be it .. That is all the changes I made. Of course, RESTART APACHE since you made changes to php.ini and httpd.conf. It should work.

 

The above changes work on 3 completely different osCommerce sites that I am hosting so I know the solution works for my situation, so please don't tell me it does not work.

 

Thanks && Good Luck.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...