Re: MySQL with PHP3 with no Recompilations
| From: | Johan Hanson | Date: | Sun, 20 Aug 2000 21:23:45 +0000 |
| Subject: | Re: MySQL with PHP3 with no Recompilations | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-2192@lists.php.net to get a copy of this message | ||
Pongthai Chandpoung wrote:
>
> Hi all,
> I spent long time on the net to find those informations about using
> MySQL with PHP3 , Apache 1.3.12 on Linux RedHat 6.2 my problem might be
> seen anywhere in the world :
>
> when I use mysql_connect ,this message is shown:
> Call to unsupported or undefined function mysql_connect() in
> /home/httpd/html/test.php on line 148
>
> I've looked around for days. Many places i've found said "you may have to
> recompile your PHP with Apache and with mysql support" , but I don't want to
> recompile Apache again because it was well-configured and many ppls also
> using it right now.
What these people probably meanth was that you should recompile PHP (and nothing
else)
so that *PHP* would have support for MySQL and Apache.
Look in the file INSTALL in your PHP distribution directory for how to make PHP.
Before "make":ing PHP, you need to configure it by running the script
"configure".
Run ./configure --help to get a list of options. The ones you would be
interested
in are probably "--with-mysql" and "--with-apxs" (to get PHP installed as an
Apache module).
You could get into trouble if you have compiled PHP previously without having
MySQL installed on your system. In that case, you might need to delete the file
"config.cache" before running "configure".
Hope this helps.
/ Johan
-- johan@tiq.com -- http://www.obsession.se/johan/ --