Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help me fix AdminLogin-0.0.5


minhtuyen

Recommended Posts

Dear,

After i'm read file readme and install it, but

error is : on admin/login.php

Notice: Use of undefined constant DIR_WS_INCLUDES -

assumed 'DIR_WS_INCLUDES' in

E:\Webserver\oscommerce\admin\login.php on line 2

 

Notice: Undefined index: admin_login_submit in

E:\Webserver\oscommerce\admin\includes\admin_login.php

on line 20

 

I do not fix it, please help me. Thanks

Link to comment
Share on other sites

  • 2 weeks later...

I have got the same problem.

 

 

Dear,

  After i'm read file readme and install it, but

error is : on admin/login.php

Notice: Use of undefined constant DIR_WS_INCLUDES -

assumed 'DIR_WS_INCLUDES' in

E:\Webserver\oscommerce\admin\login.php on line 2

 

Notice: Undefined index: admin_login_submit in

E:\Webserver\oscommerce\admin\includes\admin_login.php

on line 20

 

I do not fix it, please help me. Thanks

Link to comment
Share on other sites

  • 5 months later...

Hi,

 

I too had this issue. I didn't have the time to investigate further so there may be a 'tidier' way to resolve this.

 

As I understand it the issue is thus:

 

When submitting the form the $_POST Array contains a value for the Submit button ('admin_login_submit') on the Login form.

 

However when displaying the form initially the $_POST Array has no values so the if condition fails as there is no index in the Array with the key 'admin_login_submit'.

 

To avoid this issue I have replaced the if condition with one that simply tests whether the Array has items, this resolves the issue.

 

Here's my hack:

 

Replace the following line of code in catalog/admin/includes/admin_login.php (in my copy it's line 15):

 

if ($_POST['admin_login_submit']) {

 

with:

 

if (count($_POST) > 0) {

 

Hope this helps!

 

Paulie...

Link to comment
Share on other sites

Thank's Paul for your help

 

I didn't repair this problem, Finally I installed "Zencart" version, It runs very well :rolleyes:

 

 

Thank you

Pika

 

 

Hi,

 

I too had this issue. I didn't have the time to investigate further so there may be a 'tidier' way to resolve this.

 

As I understand it the issue is thus:

 

When submitting the form the $_POST Array contains a value for the Submit button ('admin_login_submit') on the Login form.

 

However when displaying the form initially the $_POST Array has no values so the if condition fails as there is no index in the Array with the key 'admin_login_submit'.

 

To avoid this issue I have replaced the if condition with one that simply tests whether the Array has items, this resolves the issue.

 

Here's my hack:

 

Replace the following line of code in catalog/admin/includes/admin_login.php (in my copy it's line 15):

 

if ($_POST['admin_login_submit']) {

 

with:

 

if (count($_POST) > 0) {

 

Hope this helps!

 

Paulie...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...