|  | Posted by Jerry Stuckle on 06/17/05 06:09 
Bruce A. Julseth wrote:> "Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
 > news:e-adnew4de1JUizfRVn-gA@comcast.com...
 >
 >>Bruce A. Julseth wrote:
 >>
 >>>I have:
 >>>
 >>>    MySQL 4.1
 >>>    PHP 5.0.4 (I think. The News.txt says 31 Mar 2005, PHP 5.0.4)
 >>>    Apache 2.0.50
 >>>
 >>>When I try to connect to MySQL, via PHP, with
 >>>
 >>>    $db = mysql_pconnect('localhost', 'user', 'pw');
 >>>
 >>>I get
 >>>
 >>>    Fatal error: Call to undefined function mysql_pconnect() in
 >>>C:\Inetpub\wwwroot\MySqlTest\Default.php on line 4
 >>>
 >>>What is my problem?
 >>>
 >>>Thanks..
 >>>
 >>>Bruce
 >>
 >>Bruce,
 >>
 >>You probably don't have the mysql extensions enabled in php.  Look in your
 >>php.ini file for the line
 >>
 >>;extension=php_mysql.dll
 >>
 >>Remove the ";" from the first line to load the extension.  Also, ensure
 >>the extension_dir is set, i.e.
 >>
 >>  extension_dir = "c:/php/ext/"
 >>
 >>(or wherever you placed php).
 >>
 >>Also, with MySQL 4.1, you'll probably want to use the "new and improved"
 >>mysql interface, mysqli_xxx.  To use these, add the following line:
 >>
 >>extension=php_mysqli.dll
 >>
 >>You'll also need to ensure libmysql.dll is accessible; the best way to
 >>ensure this is to set your PATH statement to point to the directory
 >>containing it.
 >>
 >>One other thing - is your host also running PHP 5.0.4 and MySQL 4.1? I've
 >>found it easier to test if I'm running the same version as my host.
 >>
 >>--
 >>==================
 >>Remove the "x" from my email address
 >>Jerry Stuckle
 >>JDS Computer Training Corp.
 >>jstucklex@attglobal.net
 >>==================
 >
 >
 > Thanks for the response. I'll check on what you have suggested. One thing.
 > PHP files are being handled. I can code:
 >
 > <?
 > $mess = "My Message";
 > ?>
 >
 > Then in my html I can have
 >
 > <?
 > echo $mess;
 >
 > ?>
 >
 > and $mess is displayed..
 >
 > As such, I think the php extension is enabled.  But, as I said, I will check
 > out what you have said.
 >
 > Thanks....
 >
 >
 
 Bruce,
 
 All that shows is that PHP is working.  As you found, you still need to
 load the appropriate PHP extensions (in this case the MySQL extension to
 PHP).
 
 --
 ==================
 Remove the "x" from my email address
 Jerry Stuckle
 JDS Computer Training Corp.
 jstucklex@attglobal.net
 ==================
  Navigation: [Reply to this message] |