LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-11-2004, 05:13 AM   #1
_Chow_
LQ Newbie
 
Registered: Aug 2004
Location: Sweden
Posts: 10

Rep: Reputation: 0
PHP / SQL establish connection / config


Hello, sorry - n00b I am.

Running
Redhat
Apache 2.0
PHP 4.2.2
SQL 4.0

Problem - PHP does not resolve MySql (I think)

phpinfo() states:

'--with-mysql=shared,/usr'
should this not be a full path?

phpinfo() also states:
DBX - supported databases - MySql + others

But MySql does not have it's own table listing (module?) in phpinfo()

config file is located in /etc/php.ini

Decided to run phpMyadmin to help and to assertain connectivity - received error:
Quote:
cannot load MySQL extension,
please check PHP Configuration
"Likely reason was mysql.so file not found" - which I could not find.

Installed the rpm php-mysql and I have a path to mysql.so now -
/usr/lib/php4/mysql.so

in php.ini it lists the extension_dir = /usr/lib/php4

I have uncommented and set extension=mysql.so

restarted apache ...

no go ...

created a db in mysql from the prompt, ran test php page from browser to connect to db, receive error:
Quote:
Fatal error: Call to undefined function: mysql_connect() in /home/www/html/test2.php on line 13
Could I be missing something in Apache config ?

httpd.conf states:
LoadModule php4_module modules/libphp4.so

Called php from shell prompt and receive error:
Quote:
libmysqlclient.so.10: cannot open shared object file: No such file or directory in Unknown on line 0
What is libmysqlclient.so.10 ? Could that be a determinate in PHP not finding SQL ?

currently at a loss ... Help would be sooo appreciated !!!

will gladly supply more info from phpinfo

Thx /_Chow_
 
Old 08-11-2004, 05:24 AM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
try to locate libmysqlclient.so if it exists, create a symlink accordingly
 
Old 08-11-2004, 05:30 AM   #3
_Chow_
LQ Newbie
 
Registered: Aug 2004
Location: Sweden
Posts: 10

Original Poster
Rep: Reputation: 0
Thanx,

I did try via find -name X -print and could not locate it. What is the diff between libmysqlclient.so.10 and libmysqlclient.so (which I have fould)?

Will this : --with-mysql=shared,/usr - still prove to be a problem ?

appreciate it
 
Old 08-11-2004, 05:32 AM   #4
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
try to make a symlink of libmysqlclient.so

ln -s libmysqlclient.so libmysqlclient.so.10
 
Old 08-11-2004, 05:42 AM   #5
_Chow_
LQ Newbie
 
Registered: Aug 2004
Location: Sweden
Posts: 10

Original Poster
Rep: Reputation: 0
thanx !! That I shal try (in about 6 hours must sleep before coma sets in ..
 
Old 08-11-2004, 12:39 PM   #6
_Chow_
LQ Newbie
 
Registered: Aug 2004
Location: Sweden
Posts: 10

Original Poster
Rep: Reputation: 0
Hey Cedrik,

I also had libmysqlclient.so.12 ... so I did
ln -s libmysqlclient.so.12 libmysqlclient.so.10
and everything flowed from there.

Thanx fer da help !!

_Chow
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Still can't establish a pppoe connection Andriy Slackware 17 12-06-2005 07:01 AM
unable to establish connection neerajchaudhari Linux - Software 2 09-14-2005 10:22 PM
I can't establish a connection in my router Murilo Linux - Wireless Networking 1 08-18-2005 02:04 PM
Please help me establish an internect connection AlexBell Linux - Hardware 1 05-23-2005 12:11 PM
cannot establish a connection to my internet Jjurk Linux - Newbie 7 03-05-2004 04:49 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration