Jump to content

Weird problem in WAMP


Recommended Posts

Hi all,

 

I've been following some tutorials here: www.php-mysql-tutorial.com

On a couple of the tutorials now, eg. this one. The code all works, bar the download page where it doesn't display anything. I have tested this on a few computers runnig wamp with no joy.

I then uploaded it to a linux server running apache, mysql and php, and it worked fine straight away.

Have I missed a setting somewhere, in the way wamp handles certain code? Or is it a platform thing?

 

Cheers,

 

Dan

Link to comment
Share on other sites

Ok, it was the enable_short_tags option in php.ini

 

I'm having another problem however...

I'm convinced this is going to be a setting in php.ini as well...

database login

Again, same thing, it works fine on the live server, but on my test bed it doesn't work. PHP is connecting to mysql. When I enter the username and password to login, I get the error incorrect username/password.

$sql = "SELECT user_id
           FROM tbl_auth_user
           WHERE user_id = '$userId'
                 AND user_password = PASSWORD('$password')";

If I were to change the AND to OR, and enter the username into the login page it logs in. (obviously not practical).

In MySql the passwords are encrypted, I'm assuming that's why the PASSWORD bit is there.

 

So from my deductions PHP isn't encrypting the password to be the same as what is stored in MySql.

Any Ideas?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.