|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
PHP & MySQL no connection
I'm having a perplexing situation.
To start off, MySQL Version: URL MySQL User: URL PHP Version: URL Connection Problem: URL PHP Code with error: URL It seems that PHP isn't connecting to MySQL. It's probably as simple as just a switch or setting. I'm new at this and just installed PHP. I know that the MySQL installation is good since our programmer is using .asp and has been using MySQL for about 2 months with no problems. Any clue as to what I am doing wrong? |
|
#2
|
|||
|
|||
|
RE: PHP & MySQL no connection
$cn=mysql_connect("","","")or die (mysql_error());
$db=mysql_select_db("")or die(mysql_error()); |
|
#3
|
|||
|
|||
|
RE: RE: PHP & MySQL no connection
Quote:
So I take it, that after establishing the connection with MySQL, it has to choose the db? |
|
#4
|
||||
|
||||
|
RE: RE: RE: PHP & MySQL no connection
Quote:
|
|
#5
|
||||
|
||||
|
RE: PHP & MySQL no connection
Make sure that the php mysql lib files are installed, i believe native support was remove in php5. I think it is called Mysqli, if your using Debian/Ubuntu or Redhat/Centos it should be in the default repositories (checked this on my servers). In the repos it should be called something like php5-mysql
|
|
#6
|
|||
|
|||
|
RE: PHP & MySQL no connection
It's on Windows XP Pro 64-bit.
I am beginning to think it's just the PHP connection to MySQL that's the headache. I checked the /path via "environmental variables. Where does one get "Mysqli"? |
|
#7
|
|||
|
|||
|
RE: PHP & MySQL no connection
Anyone??
|
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Installation > PHP & MySQL no connection |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|