Hi!,
I am using PHP/MySQL on RH Linux 8.0 with these RPMs installed:
php-4.2.2-8.0.5
asp2php-0.76.2-3
php-pgsql-4.2.2-8.0.5
php-dbg-server-2.10pl3-6
php-ldap-4.2.2-8.0.5
php-dbg-base-2.10-4
php-mysql-4.2.2-8.0.5
php-devel-4.2.2-8.0.5
php-snmp-4.2.2-8.0.5
php-dbg-client-2.10-6
php-imap-4.2.2-8.0.5
php-odbc-4.2.2-8.0.5
I get this error from a PHP script calling mysql_real_escape_string():
---
Fatal error: Call to undefined function: mysql_real_escape_string() in
/var/www/thenewagesite/jjdewey/archives/insert.php on line 26
---
On first looking around the web I thought perhaps I needed to compile
PHP to use MySQL, but per the PHP documentation (see URL below):
"As of PHP 4, --with-mysql is enabled by default so to disable MySQL
support you must use --without-mysql."
http://www.php.net/manual/en/ref.mysql.php
From the installed RPM's above it looks like I shouldn't have to
compile? Also in my script I call other mysql functions before calling
this and those don't fail, for example I call mysql_connect() which
doesn't return an error. Also the same code works fine when I run it
using PHP/MySQL on Windows. This is only failing on RH Linux 8.0 (a
new install).
Any ideas,or pointers (or FAQs that I've missed)??
Thanks!,
Lawrence Kennon