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 |
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(); ?> |
Have you looked at the httpd logs?
/var/log/httpd/error_log |
I forgot install apache2 modules for mysql & php4-mysql package
thx a lot ;) |
Quote:
|
All times are GMT -5. The time now is 01:02 PM. |