Post by dhastoto » Mon Nov 27, 2006 11:42 am

Dear All,
I have some problems when running installed opencart in my local computer.

My opencart directory = C:\wamp\www\opencart
My opencart host  = http://localhost/opencart

I have used Wamp5 Server version 1.6.6 (PHP 5.2.0 , Apache 2.0.9, MySql Server 5.0.27)

Here was my config :



The error shown when I run opencart :

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in C:\wamp\www\opencart\include\language.php on line 75

Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\opencart\include\language.php:75) in C:\wamp\www\opencart\include\currency.php on line 47

Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in C:\wamp\www\opencart\include\language.php on line 57

Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in C:\wamp\www\opencart\include\language.php on line 57

Then I try to modify language.php :
var $data = array();

The result is the opencart successfully running.
Then I tried to register new account, and the account successfully added into database, but when i tried to login with this account, i couldn't.

I tried to add product to shopping cart, but didn't working.

The same problem arise in opencart admin.

Need advise please

Best regards,

dhastoto

Newbie

Posts

Joined
Fri Nov 24, 2006 7:46 pm

Post by Daniel » Tue Nov 28, 2006 2:43 pm

This might be a problem related to cookies.

Do you run your browser with cookies on or off?

It is the language class not finding any defined language.

Maybe the directory is not setup correctly or you have selected Germen?

Only english works.
Last edited by Daniel on Tue Nov 28, 2006 4:28 pm, edited 1 time in total.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by iteration » Fri Dec 15, 2006 2:41 am

I debugged the 0.6-FIX release and found that you need to initialize the $data field variable in the language class...

If you do not initialize it, array_merge will retrieve an unset variable (.e.g. null) as the first parameter when calling it.

Following PHP5 coding guidelines I would to:

class language {
    // ...
    private $data = array();

-- Hereby the variable is initialized properly.

I spent two hours fixing this, and I hope Daniel will care to fix this in the next release of this neat little piece of software.

My recommendation: Stick to PHP5 and drop the old PHP4 OO syntax...

Best Regards,

Anders (iteration)
mailto: aj AT itersys DOT Dk

Newbie

Posts

Joined
Fri Dec 15, 2006 2:39 am
Who is online

Users browsing this forum: No registered users and 1 guest