Jump to content


Photo

Fatal error: Call to undefined function sqlite_escape_string()


  • Please log in to reply
2 replies to this topic

#1 paparush

paparush

    Rank I Member

  • Members
  • Pip
  • 11 posts

Posted 05 March 2010 - 12:49 AM

Hello Heliohost,

Having an issue with this one PDO call to sqlite_escape_string().

All of my other CRUD operations are functioning normally.

Not seeing this on my dev machine with is running SQLITE 3_6_14 and PHP 5.2.9-2

Looks like my site (wncrunners.com) is running PHP 5.2.9.

What version of SQLITE is Heliohost running?

Thanks!



#2 Byron

Byron

    Rank X Member

  • Root Admin
  • 7,838 posts
  • Gender:Male
  • Location:USA

Posted 05 March 2010 - 01:08 AM

Make you a php page and call it info.php (or whatever.php) and add this code:

CODE
<?php phpinfo(); ?>


Here's a list of the functions we support.

http://byrondallas.h...d_functions.php

http://byrondallas.h...d_functions.txt


#3 paparush

paparush

    Rank I Member

  • Members
  • Pip
  • 11 posts

Posted 05 March 2010 - 01:55 AM

QUOTE (byron @ Mar 4 2010, 08:08 PM) <{POST_SNAPBACK}>
Make you a php page and call it info.php (or whatever.php) and add this code:

CODE
<?php phpinfo(); ?>


Here's a list of the functions we support.

http://byrondallas.h...d_functions.php

http://byrondallas.h...d_functions.txt



Thanks for the reply.

I had already done the phpinfo() here on heliohost and on my local server. Here's the result from the PDO section

LOCALLY
pdo_sqlite

PDO Driver for SQLite 3.x enabled
PECL Module version 1.0.1 $Id: pdo_sqlite.c,v 1.10.2.6.2.4 2008/12/31 11:17:42 sebastian Exp $
SQLite Library 3.3.7undefined

Heliohost
pdo_sqlite

PDO Driver for SQLite 3.x enabled
PECL Module version (bundled) 1.0.1 $Id: pdo_sqlite.c,v 1.10.2.6 2006/01/01 12:50:12 sniper Exp $
SQLite Library 3.2.8

It looks like I'm running a build from 2008, whereas HH is running a build from 2006. So, I guess I'll find another method to escape my strings before INSERT.



Ok, I think I'll just go with this approach instead:

$db= new PDO('sqlite:Escape.sqlite);
$strquote = "Why can't I insert you're escape aren't working?";
$strquote = $db->quote($strquote);

and I'm good to go.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users