LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   php/,mysql problem: can't query (https://www.linuxquestions.org/questions/linux-general-1/php-mysql-problem-cant-query-274737/)

JJX 01-06-2005 04:42 PM

php/,mysql problem: can't query
 
I am using debian sarge + apache2 + libapache2-mod-php4 on a laptop.

The problem is that php isnt doing queries to the db.

The whole story:
I am trying to learn php so i created a site that does some queries to mysql.

I created the user with the command:
GRANT ALL PRIVILEGES ON *.* TO 'mysite'@'localhost' IDENTIFIED BY 'mysite' WITH GRANT OPTION;

I can login as user "mysite" & query my database.[list=1][*] mysql logs doesnt show anything (no errors and no queries attemps from anywhere). So i think is a php (communication?) problem.[*] mysql_errno & mysql_error doesnt return any error to the page[*] php modules for apache are loaded and sites appear just fine.[*] Also i tried to use "mysql_fetch_array" instead of "mysql_fetch_row" but still not working
http://www.linuxquestions.org/questi...sql+cant+query[/list=1]

Is anyway to check the communication between apache2/php & mysql?

The strange is that following the same steps to my desktop pc everything works fine.


thx for your time

david_ross 01-06-2005 04:51 PM

Do you have the mysql libraries for php - create a php file with the following then access it and look for a mysql section:
<? phpinfo(); ?>

michaelk 01-06-2005 04:53 PM

Have you looked at the httpd logs?
/var/log/httpd/error_log

JJX 01-06-2005 05:10 PM

I forgot install apache2 modules for mysql & php4-mysql package
thx a lot ;)

JJX 01-06-2005 05:10 PM

Quote:

Originally posted by michaelk
Have you looked at the httpd logs?
/var/log/httpd/error_log

just for the history - nothing suspicious


All times are GMT -5. The time now is 01:02 PM.