mysql_real_escape_string() undefined?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Aquarius2431

    mysql_real_escape_string() undefined?

    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_esca pe_string():

    ---

    Fatal error: Call to undefined function: mysql_real_esca pe_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."



    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
  • stephan beal

    #2
    Re: mysql_real_esca pe_string() undefined?

    Aquarius2431 wrote:[color=blue]
    > php-4.2.2-8.0.5[/color]
    [color=blue]
    > Any ideas,or pointers (or FAQs that I've missed)??[/color]

    Just the API docs:

    (PHP 4 >= 4.3.0)

    use mysql_escape_st ring() instead.


    --
    ----- stephan beal
    Registered Linux User #71917 http://counter.li.org
    I speak for myself, not my employer. Contents may
    be hot. Slippery when wet. Reading disclaimers makes
    you go blind. Writing them is worse. You have been Warned.

    Comment

    Working...