Post by SynysterDory » Wed Feb 12, 2020 3:12 am

OC version: 3.0.3.2
Register new users its disabled
I have 2 installations of OC, one in a local server and the other in a web server.
I added one test user in both apps using a sql query:

Code: Select all

INSERT INTO oc_customer (customer_group_id, store_id, language_id, firstname, lastname, email, telephone, fax, password, salt, cart, wishlist, newsletter, address_id, custom_field, ip, status, safe, token, code, date_added) 
VALUES (1,0, 1, 'John', 'Doe', 'john.doe@gmail.com', '', '', 'f8a75e2ae6fd35fe48588cab85d3cdcf', 'z5na4k2s6', NULL, NULL, 0, 0, '', '::1', 1, 0, '', '', NOW());
I'm not adding an address in both cases, address table is empty
Login in the web server app happens without issues but in the local server when I try to login the app display this error:

Code: Select all

Notice: Trying to access array offset on value of type bool in C:\xampp\htdocs\sasa\catalog\controller\startup\startup.php on line 166Notice: Trying to access array offset on value of type bool in C:\xampp\htdocs\sasa\catalog\controller\startup\startup.php on line 166
That line says next:

Code: Select all

$this->tax->setShippingAddress($this->session->data['shipping_address']['country_id'], $this->session->data['shipping_address']['zone_id']);
And trying to add an addres on account page doesn't work, shows the same error. To resolve this is necessary to register the address with the admin panel.

How I can solve this issue?, why this happen?

New member

Posts

Joined
Fri Nov 22, 2019 3:52 am
Location - México

Post by sw!tch » Wed Feb 12, 2020 3:55 am

My guess is your local server is on PHP 7.4, if that's the case, then try rolling back to PHP 7.3. There seems to be a lot of Notices thrown when running OC 3.0.x with PHP 7.4. Most likely due to a change in PHP 7.4 on Array-style access.

Backup and learn how to recover before you make any changes!
Full Stack Web Developer :: Contact via PM for custom work.


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm
Location - USA

Post by SynysterDory » Wed Feb 12, 2020 5:45 am

sw!tch wrote:
Wed Feb 12, 2020 3:55 am
My guess is your local server is on PHP 7.4, if that's the case, then try rolling back to PHP 7.3. There seems to be a lot of Notices thrown when running OC 3.0.x with PHP 7.4. Most likely due to a change in PHP 7.4 on Array-style access.
Seems like it works, thanks pal.
Any other possible solution?

New member

Posts

Joined
Fri Nov 22, 2019 3:52 am
Location - México

Post by sw!tch » Wed Feb 12, 2020 6:09 am

SynysterDory wrote:
Wed Feb 12, 2020 5:45 am
Seems like it works, thanks pal.
Any other possible solution?
You can check the OC Github Repo.

I haven't really messed with OC on PHP 7.4 much, But looks like some of the PHP 7.4 issues also fallback to some outdated vendor packages as well.

Backup and learn how to recover before you make any changes!
Full Stack Web Developer :: Contact via PM for custom work.


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm
Location - USA
Who is online

Users browsing this forum: No registered users and 35 guests