----- Original Message ----
From: Michael Sullivan <[EMAIL PROTECTED]>
To: php-list@yahoogroups.com
Sent: Wednesday, May 3, 2006 1:36:22 PM
Subject: Re: [php-list] Having a problem with coding from a book
On Tue, 2006-05-02 at 16:37 -0400, Ian R-P wrote:
> Hey everyone,
>
> It just won't connect, i've tried:
>
> $dbcnx = @mysql_connect('localhost','root','XXXXXX') or die('Unable to
> connect ' . mysql_error());
> $dbcnx = @mysql_connect('iansroom','root','XXXXXX') or die('Unable to
> connect ' . mysql_error());
> $dbcnx = @mysql_connect('192.168.2.59','root','XXXXXX') or die('Unable
> to
> connect ' . mysql_error());
>
> and also without the @ symbol, and everytime without the @ symbol i
> get this
> error:
>
> *Fatal error*: Call to undefined function mysql_connect() in *
> c:\ Inetpub\ wwwroot\ jokelist.php* on line *12
>
> *line 12 is the $dbcnx = @mysq.... line*
> *
This may be a stupid question, but is the mysql server running?
Given the error above, whether or not the MySQL server is running is irrelevant at this point (although you should make sure it's running nontheless). What he needs to do is edit the php.ini file to enable the MySQL extension in PHP, then restart IIS/Apache.
The pertinent lines are:
extension_dir
extension
Read here to learn how to edit these to enable MySQL on your server.
Good luck!
-Nick
[Non-text portions of this message have been removed]
Community email addresses:
Post message: php-list@yahoogroups.com
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
YAHOO! GROUPS LINKS
- Visit your group "php-list" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.