Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_php thread: Please Help - PHP + MySql on Windows NT 4.0 Server PHP 4.0 - connecting to databas


Message #1 by "Patrick" <patrick@e...> on Thu, 20 Apr 2000 17:30:47
I am a newbie to PHP + Mysql.  I have a development environment and I have 
been able setup php and mysql. PHP works fine when I run  non database 
script. MySql also works fine from command prompt, ( I can create table 
etc). My Problem, however is my inability to get my php script to connect 
to my mysql database. I have installed odbc drivers for mysql, that is, I 
can set a datasource that points to mysql database but I am unable (don't 
know) how to point my datasource from php.  In most other web development 
language like cold fusion, i can reference my datasource from my code. I 
have the following questions regarding Php + mysql that I'll appreciate you 
answering for me.
 
I have gone through the readme file that comes with the distribution of php 
4.0
 
1. Can you explain to me how to properly setup mysql + php. I have 
uncommented my the windows extension  for mysql "extension=php_mysql.dll" 
in my php.ini file.
 
2.  What is the correct location for php.ini file . I put  mine in the 
"C:\WINNT\php.ini"
 
3. My current environment is development for development, i am eventually 
going to move to production environment on a unix/linux machine.Will all 
the odbc connection be valid on unix? If not, is there a way making 
database connection portable across operating systems and platforms.
 
4. How do I install the php extension modules eg  "extension=php_mssql.dll" 
or "extension=php_ldap.dll" on windows?
 
5. I came across function "odbc_connect()" in php how is it different from 
"mysql_connect".
 
6 . Is Odbc the only way of connecting to mysql from PHP script  on the 
Windows NT platform.
 
thanks
I'll appreciate all your inputs
 
Patrick
 

  Return to Index