Re: DB_common escapeSimple() not found
| From: | Justin Patrin | Date: | Thu, 03 Nov 2005 23:19:20 +0000 |
| Subject: | Re: DB_common escapeSimple() not found | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-21766@lists.php.net to get a copy of this message | ||
On 11/3/05, brian <brian@zijn-digital.com> wrote:
> Justin Patrin wrote:
> > On 11/3/05, brian <brian@zijn-digital.com> wrote:
> >
> >>DB-1.7.6/DB/common.php
> >>
> >>call DB_common::quoteSmart($str) in my script (which has previously used
> >>DB methods fine):
> >>
> >>Fatal error: Call to undefined function: escapesimple() in
> >>/usr/local/php/lib/php/DB/common.php on line 434
> >>
> >>This is pretty strange. PHP refuses to recognize escapeSimple method
> >>called from quoteSmart(). This happens whether i call
> >>DB_common::quoteSmart() or DB_pgsql::quoteSmart().
> >>
> >>My only work-around was to edit the source to perform the str_replace()
> >>directly within quoteSmart() rather than passing the value to
> >>escapeSimple().
> >>
> >>Am i losing my mind? Nothing at all seems odd about the source. Can
> >>anyone reproduce this?
> >>
> >
> >
> > Sound slike you may have an upgrade/include_path problem. Use
> > get_included_files() to make sure all of the DB stuff is being
> > included from the same place.
> >
>
> That's not the problem. Look at the error again:
>
> Fatal error: Call to undefined function: escapesimple() in
> /usr/local/php/lib/php/DB/common.php on line 434
>
> The error is thrown *inside* common.php while attempting to call the
> method escapesimple() from quoteSmart(). escapeSimple() is right there
> in the source below quoteSmart(). The very same problem occurs whether i
> use common.php or pgsql.php.
>
Just try what I mentioned. In addition, you might want to check for errors.
--
Justin Patrin