LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-09-2009, 10:56 AM   #1
mehdi1973
LQ Newbie
 
Registered: Jun 2009
Posts: 12

Rep: Reputation: 0
php log file that traces php to mysql connections troubles !


Hi to all,


i'am looking for the file on my redhat (v5) machine that have both php v5 and mysql v5.1.35, that traces the troubles for php while accessing mysql, any one can help ?

thanx a lot
 
Old 07-09-2009, 02:10 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You can enable and configure php logging from php.ini

Regards
 
Old 07-10-2009, 12:44 AM   #3
mehdi1973
LQ Newbie
 
Registered: Jun 2009
Posts: 12

Original Poster
Rep: Reputation: 0
i looked up for that in php.ini and found many lines related to mysql, but did not find the one i was looking for, i also changed the "mysql.connect.timeout" setting it to -1 instead of 60, but the problem is somewhere else !
 
Old 07-10-2009, 01:51 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You didn't say what the problem is.
You can use tcpdump to see what's happening when php tries to connect to mysql.
 
Old 07-13-2009, 01:11 AM   #5
mehdi1973
LQ Newbie
 
Registered: Jun 2009
Posts: 12

Original Poster
Rep: Reputation: 0
It seems that PHP can't connect to my sql DB even after installing manualy the "my sql Connector" files( i mean copying the files of the downloaded packets since we can't do it using "yum" on that RedHat machine ! )

What we are actually doing is "to clone" an "ubuntu" machine on a redhat machine, taking tools we need to move and installing software we need ( not making a ".tar" files like we deed for other tools, for exemple when installing "mysql" and "php" ) and finally, regarding the DB, i made a dump for each and every DB and it works ! )
 
Old 07-13-2009, 02:13 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Why can't you d/l and install the native rhel mysql, php, php-mysql packages and then import the sql dumps into mysql? Using a different distro's packages is most likely not going to work.
Anyway you can try the following commands to see if you miss something for mysql support in php:
Code:
ldd `which php`
php -i|grep mysql
 
Old 07-13-2009, 03:24 AM   #7
mehdi1973
LQ Newbie
 
Registered: Jun 2009
Posts: 12

Original Poster
Rep: Reputation: 0
it takes much time, just to connect to an internet page from the RedHat machine, this is why i answer now !

here are the results of those commends :

-[root@patrasso ~]# ldd `which php`
linux-gate.so.1 => (0x00f34000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x0481d000)
libresolv.so.2 => /lib/libresolv.so.2 (0x009ef000)
librt.so.1 => /lib/librt.so.1 (0x0057f000)
libm.so.6 => /lib/libm.so.6 (0x00522000)
libdl.so.2 => /lib/libdl.so.2 (0x0054b000)
libnsl.so.1 => /lib/libnsl.so.1 (0x007f0000)
libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00b46000)
libz.so.1 => /usr/lib/libz.so.1 (0x0056a000)
libc.so.6 => /lib/libc.so.6 (0x003e0000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00551000)
/lib/ld-linux.so.2 (0x003c3000)
[root@patrasso ~]# php -i|grep mysql
[root@patrasso ~]#

====> it seems to me that there no packeges installed for mysql under php and this confirm that is a problem of connection between php and mysql !

Further more, since php is installed and it works and mysql too ( since i can connect to DB and make quarries ) it is either missing files that allows communication between php and mysql but we copied the files of the package "php-mysql5.1.6-23.2.el5_3asp121.386.rpm" manually since with "yum" it did not work ! or it shoul be installed somewhere else !!!!

please help cause i spent a lot of time over this pbm.

thanx so much

Last edited by mehdi1973; 07-13-2009 at 03:34 AM.
 
Old 07-13-2009, 04:19 AM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
If yum doesn't work, you have to download all 3: php, mysql and php-mysql packages in your server and use "rpm -ivh package-name" to install them. Of course you have to uninstall first the previous php and mysql.
 
Old 07-13-2009, 04:32 AM   #9
mehdi1973
LQ Newbie
 
Registered: Jun 2009
Posts: 12

Original Poster
Rep: Reputation: 0
Already done the whole install !
 
Old 07-13-2009, 04:50 AM   #10
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Copying the files from the rpm manually in their locations should work, but it's better allow rpm to do its job.
According to this, you need also the libmysqlclient.so.15 library.
 
Old 07-13-2009, 09:33 AM   #11
mehdi1973
LQ Newbie
 
Registered: Jun 2009
Posts: 12

Original Poster
Rep: Reputation: 0
we found the way to solve the problem :

To use a php (V5.3), compiled with mysql ( v5.1.35 )and apache V2.2 ( the version we have ! )

where can i download it from, since we're facing problems, just to download each single packet, before compiling than !

Thanx

PS : we just downloaded almost all of them for the build but we do miss "aspx" source file for "apache", anyone knows where to find it ?!

Last edited by mehdi1973; 07-13-2009 at 10:04 AM.
 
Old 07-13-2009, 11:47 AM   #12
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You mean that you're going to compile php from source?
If that's the case you can get the latest 5.3.0 version from www.php.net. To compile php you'll need also the devel packages for apache (it contains apxs) and mysql. Look for httpd-devel and mysql-devel in your repository.

Regards
 
Old 07-14-2009, 01:50 AM   #13
mehdi1973
LQ Newbie
 
Registered: Jun 2009
Posts: 12

Original Poster
Rep: Reputation: 0
Thank you so much for help, but at the moment, the problem will be frozen, since that RedHat machine is not the target machine, i mean the one that will be used at the end, and we'll probably do all directly on the final one that have an active Licence and on which "yum" will work fine, and if we'll have the same problem on it, we'll do what you actually proposed to fix this kind of problem the way you suggested.

Regards

=======================================

we went back to this problem once again this morning, and we found this site "http://hulan.info/item/compile-apache-with-ssl-php-5-and-mysql-on-linux" that describes the entire process to compile PHP and all the related Software such as MySQL and Apache, in way to allow PHP connect properly to my DB !!!.

Do any one knows where i can download a compiled PHP version, that takes into account MySQL (while compiling ) so that i can finally resolve this problem JUST DOWNLOADING IT AND NOT SPENDING MUCH TIME ON COMPLING PROCESS ?!

THANK YOU SO MUCH, IT WILL BE VERY HELPFULL SINCE IT SEEMS TO ME THAT THIS PROBLEM HAS NO END

Last edited by mehdi1973; 07-15-2009 at 03:59 AM.
 
  


Reply



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
No traces for sftp connetion in shell.log file !!!! sponarun Linux - Newbie 1 05-29-2009 03:51 PM
Troubles with PHP/MySQl in SuSE 9.1 n5k Linux - Newbie 9 09-08-2004 12:40 PM
Apache, PHP and Mysql - persistent connections madsjakob Linux - Software 0 08-23-2004 05:44 AM
PHP.ini Troubles on conf file Gerardoj Linux - General 3 03-24-2004 08:03 PM
PHP log file question. hct224 Linux - Newbie 2 11-11-2003 03:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:48 PM.

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