Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

mysql_connect() undefined

0 views
Skip to first unread message

jbo

unread,
Oct 29, 2005, 4:12:23 PM10/29/05
to
When I try this in a php script :
$conn = mysql_connect("localhost", "joeuser", "joeuser");
I get this error message:
PHP Fatal error: Call to undefined function mysql_connect() in
C:\Inetpub\wwwroot\test.php on line 5
My system :
w2K Pro. running IIS 5.0,
MySQL is version is 4.4.14nt
php is 5.0.5
I can access web pages, run the mysql monitor and do sql commands and php
works I think because I can do a phpinfo() and get all the php system info.

What am I missing?


Schraalhans Keukenmeester

unread,
Oct 30, 2005, 3:13:35 PM10/30/05
to
Is PHP configured with mysql support enabled ? My phpinfo() reveals:
Configure Command './configure' '--with-mysql=/usr/local/mysql'
'--with-apache=../apache_1.3.33' '--enable-safe-mode'

Of course your box is windows, but something similar should be present I
suppose. If not sure, check www.php.net for use with mysql.

Sh

Peter Terpstra

unread,
Oct 30, 2005, 5:45:06 PM10/30/05
to
jbo wrote:

> What am I missing?

Did you enable `extension=mysql.so' in php.ini?

Greets,

Peter

--
http://k6.xs4all.nl mailto:deb...@k6.xs4all.nl

0 new messages