Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8975817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:58:33+00:00 2026-06-15T18:58:33+00:00

I am using PHP version 5.3 and trying to use mysql_real_escape_string($unescaped_string) in my code,

  • 0

I am using PHP version 5.3 and trying to use mysql_real_escape_string($unescaped_string) in my code, but I get the error:

Fatal error: Call to undefined function mysql_real_escape_string() 
in /var/www/engine/database.php on line 38

I can still connect to the database however. Why is it not available?

I am using PHP version 5.3.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T18:58:35+00:00Added an answer on June 15, 2026 at 6:58 pm

    Update as mentioned in comment, mysql_ has been deprecated since 5.5:

    The mysql extension has been deprecated since PHP 5.5. The mysqli or PDO extension should be used instead. The deprecation has been decided in mysql_deprecation, where a discussion of the reasons behind this decision can be found.

    and removed in PHP 7.


    mysql_real_escape_string() is standard part of MySQL function “batch” and should always work if the extension is loaded correctly.

    Does any another mysql_ function work? (It should not)

    Make sure, that you have this line uncommented in your php.ini:

    extension=mysql.so
    

    Also it’d be wise to use mysqli or PDO instead (mysql_ is deprecated), they both can take care of escaping for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like to implement a multiselect function using jqGridRender (the php only version of
I'm using PHP Version 5.1.6 and trying to escape a query string from my
I'm trying to submit a page onto itself by using php echo $_SERVER['PHP_SELF']; but
I'm trying to get the code below to work..... The error: ERRORSQLSTATE[42000]: Syntax error
I am trying to create a php web service using nusoap lib. My code
I'm trying to update using mysql_query in php and it gives me this error:
I am trying to create a table in Drupal database using hook_schema function but
I am trying to insert the value to the mysql table using php. But
I'm trying to update the database using the ajax, but getting some error below
I am tryign to send email using xampplite version 1.7.7. I changed my PHP.ini

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.