I have searched the newsgroups and the web trying to solve this problem
and just can't get it. Maybe someone will be able to help. I am
getting the following error when I try to view a test page in my
browser. This test page just reads a table in mysql and outputs the
results.
Fatal error: Call to undefined function: mysql_connect() in
/var/web/public/test.php on line 2
I'm using:
Apache 2
MySQL 4.1.12
PHP 4.4.0
I have tried upgrading PHP to PHP5. I went back down to PHP4. I
verified that mysql.so was being loaded. I tried using the OLD_PASSWORD
feature in mysql. Verified that the PHP module is loaded in apache.
What is weird however (at least I think) is when I run the following via
telnet:
php ./test.php
It pulls up the page, connects successfully to the database and displays
the records. No error message.
Does anyone have any suggestions for other things for me to try. Thanks
in advance for your help.
Do you have MYSQL loaded and setup to sartup in your startup init - it
is not setup automatically to do so in some distributions. I usually
get that when the service is not running.
Do you have MYSQL loaded and setup to sartup in your startup init - it is not setup automatically to do so in some distributions. I usually get that when the service is not running.
Yes, MySQL does start at boot time and is running. As I mentioned in my
post, when I run PHP from the command prompt, it connects and pulls
data. It gives me this error message when I try to load the page via a
web browser.
I'm new to php and mysql I'm working on debian woody with php 4.3 and mysql 4.0. I cant change versions since the program I'm installing requires exactly those I get this same error but when i try to exec the php scrit thru a shell this is wht it returns:
php(507): unaligned access to 0x2000000001779a2c, ip=0x4000000000297a90
What con u tell me about this. And of course the browsers dont work either.
BTW how do I load mysql.so to the apache,cgi, and cfi configs of php.ini. Is it just by adding extension=mysql.so?