PHP & mySQL

Zack yellowdog-general@lists.terrasoftsolutions.com
Sat Jun 22 22:44:01 2002


Your quick response is appreciated! I tried other forums, and noone had a remote clue...(not that I did either..but you know..)

I added those lines to php.ini & restarted httpd, and I still get the error:

Call to undefined function: mysql_connect() 

Is there something I missed?

Thanks in advance..

-Z

mysql_connect
Blake Skinner <malice@mac.com> wrote:

>The default install of PHP included with YDL does not function properly 
>when MySQL or Postgresql calls are made to it. All the problems lie in 
>the php.ini file so open this file in your favorite editor and search 
>for "extension_dir".
>Change the line to:
>    extension_dir = /usr/lib/php4
>
>Next, search for extension until you come to the following section:
>    ;;;;;;;;;;;;;;;;;;;;;;
>    ; Dynamic Extensions ;
>    ;;;;;;;;;;;;;;;;;;;;;;
>    ;
>
>insert the following:
>
>    ; Unix Extensions
>    extension=imap.so
>    extension=ldap.so
>    extension=odbc.so
>    extension=pgsql.so
>    extension=mysql.so
>
>Finally, restart httpd (service httpd restart)
>
>On Saturday, June 22, 2002, at 06:34  PM, Zack wrote:
>
>> I get an odd error message in when I attempt to use mysql_connect in a 
>> php script:
>>
>> Fatal error: Call to undefined function: mysql_connect() in 
>> /home/sherlock/public_html/newsite/blah2.php on line 16
>>
>> Here is my php code, which has worked on other servers before:
>>
>> <?php
>> // Set the variables for the database access:
>> $Host = "localhost";
>> $User = "root";
>> $Password = "<not displayed";
>> $DBName = "sherlock";
>> $TableName = "property";
>>
>> $Link = mysql_connect ($Host, $User, $Password) or die( mysql_error() );
>> $Query = "SELECT * from $TableName";
>> $Result = mysql_db_query ($DBName, $Query, $Link) or die
>> ( mysql_error() );
>> ?>
>>
>>
>> To install Apache, mySQL, & PHP, I used "apt-get install apache mysql 
>> php" which downloaded and installed the appropriate packages.
>>
>> I have enabled mysql support in both php.ini and httpd.conf.
>>
>> All other PHP functions, including writing to a text file, seem to 
>> function just fine.
>>
>> I have even reinstalled Apache, mySQL & PHP.
>>
>> Anyone have any idea why mysql_connect AND mysql_pconnect would return 
>> as an undefined function? Its as if PHP has no idea what a mysql 
>> database is, even though it has built in support for it.
>>
>> Any help is greatly appreciated, and I thank you in advance.
>>
>> And yes, this is running on Yellow Dog Linux 2.2
>>
>> Thanks,
>>
>> -Z
>>
>>
>> --
>> _____________________
>> I feel more like I do right now than I did a while ago.
>>
>>
>>
>> __________________________________________________________________
>> Your favorite stores, helpful shopping tools and great gift ideas. 
>> Experience the convenience of buying online with Shop@Netscape! 
>> http://shopnow.netscape.com/
>>
>> Get your own FREE, personal Netscape Mail account today at 
>> http://webmail.netscape.com/
>>
>> _______________________________________________
>> yellowdog-general mailing list
>> yellowdog-general@lists.terrasoftsolutions.com
>> http://lists.terrasoftsolutions.com/mailman/listinfo/yellowdog-general
>


-- 
_____________________
I feel more like I do right now than I did a while ago.



__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/