Forum Moderators: mack

Message Too Old, No Replies

PHP on one server mySQL on another?

can i have PHP and mySQL on different servers

         

zwebby

4:50 am on Dec 11, 2004 (gmt 0)

10+ Year Member



I am rather new to PHP and mySQL and I am trying to run php scripts on one website that access the mySQL database on another site. It all seems to be working except for the admin login doesn't seem to find the admin username and password in the database.

My main question is: Is there something I need to set up to tell the server to send all the scripts to the other server before parsing them?

I'm so new to PHP that I'm not sure if I am even asking the question correctly... Any help is appreciated!

Zwebby

[edited by: mack at 1:30 pm (utc) on Dec. 11, 2004]
[edit reason] No sig's please [/edit]

mack

1:33 pm on Dec 11, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Hi there.

It could be a few things. First off make sure you are able to query the database from your other server. By default mysql only allows connections via localhost. Also make sure you point to the full ip or host name of your database server.

Mack.

zwebby

4:42 pm on Dec 11, 2004 (gmt 0)

10+ Year Member



I queried the db using the same include as i did for the login page and was able to show info from the db, so i think i am connecting properly. For some reason though i can't get the login page to work.

zwebby

5:11 pm on Dec 11, 2004 (gmt 0)

10+ Year Member



Ok... test 2... I set up an insert record page to add data to db and it works. So I know I'm connecting. It almost appears as if I am actually logging in like I want to but it is not directing the browser to the page I want after it logs in.

zwebby

5:16 pm on Dec 11, 2004 (gmt 0)

10+ Year Member



COuld all of this have something to do with setting up a session. Do you have to set up session parameters in the database?