Apache/mod_php4/mysql issue

Robert Munn munn at pcp243550pcs.howard01.md.comcast.net
Wed Jul 21 11:53:57 PDT 2004


I recently upgraded apache2 and mod_php4 using portupgrade.  Now all my scripts that
reference mysql fail with the error message:

PHP Fatal error:  Call to undefined function:  mysql_connect() in /usr/users/munn/public_html/Testing/MySQL.php

I re-built Apache and mod_php4

with the following commands

cd /usr/ports/www/apache2
make install
cd ../mod_php4
make install WITH_APACHE2=1

and the script <?php phpinfo(); ?>
runs correctly.  Scripts referencing mysql access fail with undefined function messages.

When I built the files before I vaguely remember being presented with a dialog box that offered various
options one of which involved mysql. I no longer get any options choice.

Here is the information returned by mysql -V and httpd -v.

Any help would be appreciated.


mysql  Ver 12.22 Distrib 4.0.20, for portbld-freebsd4.9 (i386)

Server version: Apache/2.0.50
Server built:   Jul 21 2004 10:26:41
Server's Module Magic Number: 20020903:8
Architecture:   32-bit
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_FLOCK_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D HTTPD_ROOT="/usr/local"
-D SUEXEC_BIN="/usr/local/bin/suexec"
-D DEFAULT_PIDLOG="/var/run/httpd.pid"
-D DEFAULT_SCOREBOARD="/var/run/apache_runtime_status"
-D DEFAULT_LOCKFILE="/var/run/accept.lock"
-D DEFAULT_ERRORLOG="/var/log/httpd-error.log"
-D AP_TYPES_CONFIG_FILE="etc/apache2/mime.types"
-D SERVER_CONFIG_FILE="etc/apache2/httpd.conf"




More information about the freebsd-questions mailing list