Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

edge, customers not able to create an account


Recommended Posts

Hello all.

 

I have a BS Edge shop (March 2018 version) that has recently gone live, and I am having issues with customers not being able to create an account.

 

I have created several test customers with different browsers, (from my home computer), all seems fine, but my daughter, who lives 20 miles away, had problems creating her account that we thought we narrowed down to the drop down country selection, with UK as the only option! After a bit of faffing around selecting and re-selecting UK was able to create an account.

 

However, when attempting to login with the correct u/n and p/w, was unable to login, when the continue button was pressed, the page refreshed to the same login page, with details filled in.

 

I then attempted to create an account via a tablet using another different name, address and email, but could not get passed the sign up page, it just kept refreshing when the continue button was pressed, as if there is an error on the page, but there is no displayed message what the problem is, there are also no error logs.

 

Another problem noted was that no email was sent to the new customer, emails were set up using SMPT, I have just reverted this back to sendmail, but have had no account creation so as yet do not know if the account creation email works, although I have sent and received a contact us email.

 

Within the Action Recorder there are several entries in the contact us module, these messages have not been received.

 

My site is UK based and I only offer delivery to the UK. (I have had several problems with international postage over the years, mainly through e-Bay, so now I only offer free UK delivery, my thoughts were that, as many of my products are unique, (antiques and collectables) if overseas customers wish to buy from me they can always use a UK based forwarding company).

 

Any help will be appreciated.

 

Regards Shaun

Link to comment
Share on other sites

  • Replies 73
  • Created
  • Last Reply

I think I have just successfully created an account but have yet to receive an email.

I can't log in, however - the login page just redisplays.

My first guess was that the issue is related to sessions, but then I would expect the session token hidden in the form to change with each page refresh and it doesn't.

Are you running the standard login form content module or have you changed it?

Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Link to comment
Share on other sites

Hello John and Zahid

I don't think that I have changed anything to do with forms so I must be using the standard.

Yes I see your new account, thanks for that.

When my daughter was having trouble initially creating the account the only thing we done was to keep selecting and de-selecting UK from the drop down menu, then it just worked, but this must have been a coincidence because this has nothing to do with the signing in side.

I would like to remove this drop down, as it is an unnecessary step but from what I have read it is not straight forward.

On the email side, I can't see how these could be linked.

 

Link to comment
Share on other sites

A couple of simple questions and checks.

Did the account login work before you went live?

If it did what have you changed before going live?

Simple checks, Clear your cache and sessions

Check you db make sure its in good order, In one of my early Edge sites I had imported customer accounts and it ported but with errors and customer accounts behaved very strange some could login but not others some could make new account but not other. I deleted all customer data table and made new and problem was solved!

I’m surprised you don’t have any errors being logged are you sure you have error logging turned on?

Try adding this to .htaccess

php_flag display_errors on
php_value error_reporting 7

Also if you have access to the server use your control panel and check server error logs to see if anything has been recorded.

The email issue not sure could be anything, best to check if you can send and recive emails from your server setup first as it could just be a configuration issue.

 

Link to comment
Share on other sites

Ok just made an account and worked perfectly, left ( left by closing browser! no logout available) and came back and was abel to log back in.  It was odd that it said welcome back as I dont remember having had an account before?

No email was recived.

You have no account managment available, how do customers logout? You will have people loging in and leaving without having loged out.

Pressing home icon then just gives me the index page and login or register again but I havent logged out! or have I missed something?

Also you need to check the code on breadcrumb as this should not be happening.

image.png.aa9eae5766c3fb6ba12a027cd77587d7.png

I would expect this,

image.png.d809adf2b9af720ff5494e0bb849b3e3.png

 

Link to comment
Share on other sites

Ok, so it turns out that I only can't sign in using Firefox developer edition. On everything else I tried; Chrome, Opera or regular Firefox I can sign in fine.

...so clearing the cache, it now works there too. I guess I must have been on that site before!

Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Link to comment
Share on other sites

Hello Zahid

 

Firstly may I apologise. I am no coder and my knowledge here is limited!

 

My testing was done using Firefox, Chrome and MS Edge form home computer. I myself have not had any problems with signing in, except when I tried to create an account using a tablet computer from home yesterday.

 

How do I check the db’s condition? I have accessed through phpMyAdmin, nothing jumps out to me.

 

For the errors I check error_log and Admin error_log, are there any others? Do I need to turn any on?

 

When I add your code to the end of .htaccess I get an internal server error on both sides of my site, I did notice that when I checked the .htaccess file there was a red square with a white dot between the underscore and “reporting”, but when I deleted this it still had the error.

 

On checking error log in cPanel only the .htaccess error was present.

 

As for the logout I have never seen one! I did notice this before, I had a look on the forums but found nothing relevant, but thought, (or hoped) that maybe there was an auto logout.

 

OK so how do I check the breadcrumb? Obviously there is an error there somewhere for the / to be above the text.

 

Yes John, you have helped me before.

Link to comment
Share on other sites

No apology needed i’m no code wizard either 😊,

checking the db is not easy as if it's corrupted in could be any where in the tables. There is a basic check in the admin side of osC in tools/ database tables. You can also use

control panel by clicking on the “MySQL Databases” icon.

Under “Modify Databases”, and in the “Check Database” drop-down box, select the database you want to check

Then click “Check Database”.

That’s it!  when the check has been completed, you should have no errors were found.

 

It's not perfect as it did not pick up all the errors in my customer db but it's a start, John is much better with db's

 

The errors should be in your error.txt in root if the error checking is active in application_top.php check to see if you have this code in your file,

// set the level of error reporting
  error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT);

Also check with cpanel or whaterver you have on your server to see what php errors are logged on server,

In order to check the PHP error log for your application and find any warnings/errors that are being displayed, firstly you need to make sure that PHP error logging is enabled. To enable PHP error logginig, firstly go to your cPanel and navigate to "Select PHP Version", under the Software menu.

image.png.8152e040abffcd03a9e36335df97d64a.png

Once you access the "Select PHP Version", you will be displayed with the following options:

image.thumb.png.52d36becc3dffcf1966c5eca8df3e309.png

Here we will need to go to "Switch to PHP Options" from the right side on the screenshot, so we could enable PHP error logging.

image.png.6c547a433cc9620a8906830b839cef80.png

In PHP Options, you will be displayed with the following options:

image.thumb.png.ed5f692b8590a4f0b3f9b09665746378.png

You will need to click on E_ALL to change it. In this case, it is already enabled

image.thumb.png.cf5c82b7518e66cdb5ce6117200ca513.png

If you click on E_ALL, you will be displayed with a drop-down menu, from where you can enable it:

image.thumb.png.7e035861a2875e49f029d27f391481a1.png

To enable error reporting, you need to select E_ALL. Once this option is selected, simply click on the "Apply" button and "Save" from the bottom of this page. 

All new PHP errors and warnings will be written in the root folder of your application in a file named "error_log".

 

Link to comment
Share on other sites

1 hour ago, RAC said:

When I add your code to the end of .htaccess I get an internal server error on both sides of my site, I did notice that when I checked the .htaccess file there was a red square with a white dot between the underscore and “reporting”, but when I deleted this it still had the error.

 

🤨 not sure why? ok so try this, change 3rd line to your domain.

# enable PHP error logging
php_flag  log_errors on
php_value error_log  /home/path/public_html/domain/PHP_errors.log

# prevent access to PHP error log
<Files PHP_errors.log>
 Order allow,deny
 Deny from all
 Satisfy All
</Files>

You need to make the PHP_errors.log

 

Link to comment
Share on other sites

2 hours ago, RAC said:

OK so how do I check the breadcrumb? Obviously there is an error there somewhere for the / to be above the text. 

I would just replace the 3 files related to this unless you have made changes or have add-ons that make changes to this! its just a header module so go to includes/modules/header and header/template and the same in languages.

I just don't know the code that well to second guess why its doing what it is, others may. I tend to take the simple approach, replace file with a known good source before worrying too much about why.

 

Link to comment
Share on other sites

2 hours ago, RAC said:

As for the logout I have never seen one! I did notice this before, I had a look on the forums but found nothing relevant, but thought, (or hoped) that maybe there was an auto logout.

Again I don't know if it has an auto logout I would not have thought so! but agin others may know better, You should simply turn on the my account navbar module.

I would have thought that with no logoff the session would just sit until it expired!

This may also explain the issue of preventing someone logging in that had left and come back or just registered as there would still be an active session for that email?

Not sure I could be wrong!

image.png.2e27d9b8c3d9a2747a2dac9364216b41.png

image.thumb.png.23ac20d48dc03c8b08250730c271de17.png

 

Link to comment
Share on other sites

The configurability of php and what directives work in .htaccess varies widely between hosts.

You can turn the display of errors on by editing includes/application_top.php and changing

  ini_set('display_errors','0'); 

to

  ini_set('display_errors','1'); 

You can also set up logging to a file instead here.

You haven't got errors in the page or included code or you'd get a white screen but you might have them in a class (eg module) that's being used

Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Link to comment
Share on other sites

Hello Zahid and John

 

My word, 5 messages!!!!

 

Sorry for the delay in responding. I leave for work at 6.50 and don’t get back until 18.00. I can run through your first email now and will try and go through the rest tomorrow morning.

 

 tools/database_tables are all OK

 

php.MyAdmin database check all OK

 

There is no error.txt under file manager search all my files.

           

In application_top.php there is only :

// Set the level of error reporting

  error_reporting(E_ALL & ~E_NOTICE);

 

My current php version is 5,5, but I can select 5.6 & 7.0.

 

As I am only on php 5.5 am I able to set this at php 7.0 without any problems? Then I should be able to follow your steps to allow error reporting.

 

Regards Shaun

Link to comment
Share on other sites

Good morning Zahid & John

 

Up bright and early!

 

John there is no

ini_set('display_errors','0');

In includes/application_top.

 

It seems that my version of edge is a little older than I thought, the installation date shows Feb 8th 2018, oh how time flies!.

 

Am I kidding myself, is it just the case of upgrading to php 7+ and adding a few files, or is there more drastic action needed?

 

I have read a lot about upgrading to the Frozen Edge, does this mean a start from scratch? Or is there another way to do this? Or is this not needed at all?

 

I have over 100 products, would these have to be redone?

 

Php 7 is nearly out-of-date, I am sure that my host will be able to move me to a server with the most current php version.

 

What are your thoughts on this? Am I being a big Jessie, is it OK to carry on with my current build? (hopefully so).

 

I await your thoughts on this.

 

Regards Shaun

Link to comment
Share on other sites

13 hours ago, RAC said:

There is no error.txt under file manager search all my files.

Sorry Shaun my mistake in osC the file is error_log.txt , If you dont have this then you probably dont have error logging turned on or set in osC, I would turn it on by adding the code John posted into application_top.php

ini_set('display_errors',1); 
error_reporting(E_ALL);

Upgrading from Edge to CE is nt too bad I did it on a number of sites. It depends on how many add-ons you have installed and if they have been updated to CE. For me I only had addons that I had updated so It was as simple as exporting db installing CE and adding the add-ons and improrting db.

If you are using specail add-ons that have not been updated to CE then it may be more complicated.

I would get error reporting sorted and find and fix the problem and then plan a controlled transition to CE

 

Link to comment
Share on other sites

Trying not to be pedantic, on my hosts server the file is actually just called "error_log". Is that why you cannot find it?

There are two instances of this, one in the store root and another in the admin folder.

Live shop Phoenix 1.0.8.4 on PHP 7.4 Working my way up the versions.

Link to comment
Share on other sites

Hi Zahid @JcMagpie

There is no error_log.txt either. Thanks for your thoughts on upgrading to frozen, I will do as you suggest and sort this problem first.

@BrockleyJohn do I need to upgrade to php 7.0? as I could not find the files you stated earlier in your instructions to turn on error reporting. What is your opinion on upgrading to frozen?

Hello Martin @mhsuffolk thanks for your input, yes I know about the two error_logs, John is helping me turn on further error reporting.

 

Regards Shaun

Link to comment
Share on other sites

On 10/29/2018 at 8:33 AM, BrockleyJohn said:

You can turn the display of errors on by editing includes/application_top.php and changing


  ini_set('display_errors','0'); 

to


  ini_set('display_errors','1'); 

Hello John

I do not have this code in includes/application_top.php.

Link to comment
Share on other sites

Add this to your application_top.php ( see code below) , Then make file "error_log.txt" in your root dir. Then refresh your site in your browser and you should see this( see below) logged in the file.

If it works then Hello, errors will be shown in log file, all good now you know it works you can remove the last  test line "error_log( "Hello, errors!" );"

That's it you should now be logging all errors.

// set the level of error reporting
  error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT);
  
ini_set("log_errors", 1);
ini_set("error_log", "error_log.txt");
error_log( "Hello, errors!" );

image.png.1a4aefa206fb39567371884f8366c1ae.png

 

Link to comment
Share on other sites

Hello Zahid

 

This morning I followed your recent instructions, thank you, however this was before I checked the error_logs!

It seems that since I upgraded to php 7.0 a vast amount of error messages have been generated.

 

In shop/error_log WOW, there are 11.4MB of errors, (yes that is MB)!!!!     In shop/admin/error_log there are 90 errors, (bad enough).

 

In shop/error_log the first two entries are :

[31-Oct-2018 04:33:58 Europe/London] PHP Warning:  mysqli_connect(): (HY000/2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in ***/Shop/includes/functions/database.php on line 20

[31-Oct-2018 05:10:19 Europe/London] PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; shoppingCart has a deprecated constructor in ***/Shop/includes/classes/shopping_cart.php on line 13

 

And the other errors are similar to the second error above, each with a different file name.

 

And in Admin/error_log the first three entries are :

[03-Nov-2018 05:29:45 Europe/London] PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; logger has a deprecated constructor in ***/admin/includes/classes/logger.php on line 13

[03-Nov-2018 05:29:45 Europe/London] PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; shoppingCart has a deprecated constructor in /***admin/includes/classes/shopping_cart.php on line 13

[03-Nov-2018 05:29:45 Europe/London] PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; tableBlock has a deprecated constructor in ***/admin/includes/classes/table_block.php on line 13.

 

The following errors seem to have a similar text, just referring to different lines.

 

 

Is this to do with the upgrade to php 7.0? if so how do I solve this problem?

 

Regards Shaun

Link to comment
Share on other sites

I no longer run and Edge site so dont have the old code, Just paste the relavent code lines here.

[31-Oct-2018 04:33:58 Europe/London] PHP Warning:  mysqli_connect(): (HY000/2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in ***/Shop/includes/functions/database.php on line 20

[31-Oct-2018 05:10:19 Europe/London] PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; shoppingCart has a deprecated constructor in ***/Shop/includes/classes/shopping_cart.php on line 13

 

Link to comment
Share on other sites

Hi Zahid

 

Thanks for the quick response.

 

Line 20 is :

  $$link = mysqli_connect($server, $username, $password, $database);

 

Line 13 is :

  class shoppingCart {

 

When clicking on the small triangle next to the “13”, it seems to be suggesting there is some text and a closed bracket missing.

 

Shaun

Link to comment
Share on other sites

I would first clear all the errors by deleating them from the file. Then refresh your browser by clearing all data from it's cache. Then load your site again and check the error log to see waht fresh errors are in it.

 

 

Link to comment
Share on other sites

55 minutes ago, RAC said:

[31-Oct-2018 04:33:58 Europe/London] PHP Warning:  mysqli_connect(): (HY000/2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in ***/Shop/includes/functions/database.php on line 20

I don't think this is a osC issue, looks to be more of a issue in the way your database is set up! Talk to your host about it. The line of code is fine.

 

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...