Hello,

I'm running PHP5 on Ubuntu, using Apache2 and MySQL 5. I have code written by someone else and I'm trying to run it. As soon as I log into the application, I get the following error:

Fatal error: Call to undefined function stripslashes_deep() in the file's name on line 56

I couldn't figure out why this is happening. Can someone point me in the right direction?

Thanks.

    well what is on that file's name on line 56?

      55: foreach($POST as $name=>$value) {
      56: $
      POST[$name] = stripslashes_deep($value);
      57: }

      crazy fool wrote:

      well what is on that file's name on line 56?

        There is no such function as stripslashes_deep(), unless you wrote it yourself, or are using some third party library that defines it.

        The latter appears to be the case, so you need to find out where in the "code written by someone else" is stripslashes_deep() defined.

          yosri wrote:

          Fatal error: Call to undefined function stripslashes_deep() in the file's name on line 56

          As the error suggest, the function named 'stripslashes_deep' doesn't exists, or it can' find it. I don't know if you know, but this isn't a function included in the PHP core.

          I guess it might have been taken from the PHP manual, in example #2 on this page: http://uk3.php.net/stripslashes

          If you have it in another file, make sure you include/require it.

            Laserlight there is look
            http://uk.php.net/manual/en/function.stripslashes.php
            actually thats a function so maybe you was right

            stripslashes() and stripslashes_deep() are two different functions.

            EDIT:
            The whole deal with stripping slashes can be done away with altogether if you change the setting of magic_quotes_gpc to Off in php.ini. I suggest that you do that.

              You're right, I found the function defined in another file in the code, and there is a require_once statement after the call to the function, i.e. it's a coding error.

              Thanks for the hint. I'll reply to this post if I run into more trouble with the same issue.

              laserlight wrote:

              There is no such function as stripslashes_deep(), unless you wrote it yourself, or are using some third party library that defines it.

              The latter appears to be the case, so you need to find out where in the "code written by someone else" is stripslashes_deep() defined.

                Write a Reply...