Apache/mod_php4/mysql issue
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 ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apache/mod_php4/mysql issue
Robert Munn wrote: 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. What does it say about SQL? see below Scripts referencing mysql access fail with undefined function messages. You mentioned that already ;-) 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. Possibly your config was cached and used again; OTOH, as you were using portupgrade, and the dialog box would require TTY input, it seems more probably that you simply got a default PHP install. IIRC, there was/is an issue floating around with changes in the MySQL libraries ... or else in PHP's interface with them. One fix was to recompile PHP --with-mysql=/path/to/mysql instead of relying on native PHP support, IIRC. Please triple check this if this is a mission critical box. Here is the information returned by mysql -V and httpd -v. What I think we might need is the PHP config string instead. Good luck and good hunting... Kevin Kinsey DaleCo, S.P. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apache/mod_php4/mysql issue
On Wed, Jul 21, 2004 at 02:53:55PM -0400, Robert Munn wrote: 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 From /usr/ports/UPDATING: 20040719: AFFECTS: users of PHP AUTHOR: [EMAIL PROTECTED] The old lang/php4 and lang/php5 ports have been splitted into 'base' PHP, PEAR, and shared extensions to allow more flexibility and add new features. Upgrading your current PHP installation will result in a 'base' PHP installation (no PEAR and no extensions). PEAR can be found in the new devel/php4-pear and devel/php5-pear ports, while the set of PHP extensions to install can be choosen via the meta-ports lang/php4-extensions and lang/php5-extensions, or installing singular extensions individually. You need to install /usr/ports/databases/php4-mysql, and you'll probably need to change your extension_dir in your php.ini to point to /usr/local/lib/php/20020429 (or whichever dir you have in there). Dan ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]