PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 20th, 2000, 11:57 AM
munisp munisp is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2000
Posts: 4 munisp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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:WINNTphp.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

Reply With Quote
  #2  
Old April 25th, 2000, 03:22 PM
ujludwig ujludwig is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2000
Posts: 63 ujludwig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 14
Most likely, you have everything set up properly, you just haven't configured your php to communicate with mysql. Open up your php.ini file and uncomment the following line...

extension=php3_mysql.dll

Reply With Quote
  #3  
Old April 27th, 2000, 05:47 PM
deftriff deftriff is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2000
Posts: 1 deftriff User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
...you also need to make sure that the 'extensions_dir' setting in your php ini points to the directory where the phpx_mysql.dll lives.....
you do not need odbc to connect php & mysql on NT.
you can find more install help on www.webmonkey.com & www.php.net

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > Connecting PHP to mysql on Windows

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap