Hi,
I have the solution for this problem.
Before compiling php, edit the /ext/mysql/php_mysql.c file in the php
distribution.
Then remove all the reference to mysql_connect, mysql_create_db and
mysql_drop_db :
function_entry mysql_functions[] = {
//PHP_FE(mysql_connect,
NULL)
PHP_FE(mysql_pconnect,
NULL)
PHP_FE(mysql_close,
NULL)
PHP_FE(mysql_select_db,
NULL)
//PHP_FE(mysql_create_db,
NULL)
//PHP_FE(mysql_drop_db,
NULL)
PHP_FE(mysql_query,
NULL)
PHP_FE(mysql_unbuffered_query,
NULL)
PHP_FE(mysql_db_query,
NULL)
PHP_FE(mysql_list_dbs,
NULL)
PHP_FE(mysql_list_tables,
NULL)
PHP_FE(mysql_list_fields,
NULL)
PHP_FE(mysql_error,
NULL)
/* for downwards compatability */
PHP_FALIAS(mysql, mysql_db_query,
NULL)
PHP_FALIAS(mysql_fieldname, mysql_field_name,
NULL)
PHP_FALIAS(mysql_fieldtable, mysql_field_table, NULL)
PHP_FALIAS(mysql_fieldlen, mysql_field_len,
NULL)
PHP_FALIAS(mysql_fieldtype, mysql_field_type,
NULL)
PHP_FALIAS(mysql_fieldflags, mysql_field_flags, NULL)
PHP_FALIAS(mysql_selectdb, mysql_select_db,
NULL)
//PHP_FALIAS(mysql_createdb, mysql_create_db,
NULL)
//PHP_FALIAS(mysql_dropdb, mysql_drop_db,
NULL)
Indeed, this function are not used anymore in mysql 4.0 :
http://www.mysql.com/doc/U/p/Upgrading-from-3.23.html :
"The old C API functions mysql_drop_db, mysql_create_db and mysql_connect
are not supported anymore, unless one compiles MySQL with USE_OLD_FUNCTIONS.
Instead of doing this, one should change the client to use the new 4.0 API.
"
Best Regards,
Jocelyn Fournier
Presence-PC
----- Original Message -----
From: "Willem Scholten" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 17, 2001 9:20 PM
Subject: Mysql 4.0.0-alpha and php-4.0.6 and Apache
> After I have build Mysql-4.0.0-alpha from source on a linux 7.1 box as
well
> as PHP-4.0.6 from source, which both build with out errors and MySQL is
> definitely functioning, if I however start Apache the following error
> occurs:
>
> [root@linux}# /etc/rc.d/init.d/httpd start
> Starting httpd: Syntax error on line 260 of /etc/httpd/conf/httpd.conf:
> Cannot load /etc/httpd/modules/libphp4.so into server:
> /etc/httpd/modules/libphp
> 4.so: undefined symbol: mysql_module_entry
> [FAILED]
>
> When I do a /sbin/ldconfig -v clearly the new client libraries are there
for
> MySQL as well as when I do a ldd libphp4.so the output seems normal
(indeed
> ld.so.conf is updated and sees the latest MySQL client)
>
> ldd libphp4.so
> libpam.so.0 => /lib/libpam.so.0 (0x40113000)
> libdl.so.2 => /lib/libdl.so.2 (0x4011b000)
> libyaz.so.1 => /usr/lib/libyaz.so.1 (0x4011f000)
> libmysqlclient.so.11 => /usr/local/lib/mysql/libmysqlclient.so.11
> (0x4017b000)
> libcrypt.so.1 => /lib/libcrypt.so.1 (0x4019c000)
> libresolv.so.2 => /lib/libresolv.so.2 (0x401ca000)
> libm.so.6 => /lib/i686/libm.so.6 (0x401dd000)
> libnsl.so.1 => /lib/libnsl.so.1 (0x40202000)
> libc.so.6 => /lib/i686/libc.so.6 (0x40219000)
> libz.so.1 => /usr/lib/libz.so.1 (0x40349000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x2aaaa000)
>
> Anyone have ideas? Compile and install of the latest 3.23 version is
without
> a hitch...
>
> By the way this was on purpose on a virgin system!
>
> Thanks for your help
>
> -Willem
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php