0

I have a server that only has php4 and postgresql. As far as I can tell PDO and pg_query_params don't exist in php4. What alternatives are there? Or is raw escaping the only option?

S-Man
  • 22,521
  • 7
  • 40
  • 63
user2073343
  • 473
  • 1
  • 5
  • 13
  • 1
    One alternative is updating your version of PHP – Mark Baker Sep 28 '13 at 17:43
  • 1
    PHP4 has reached EOL and is not supported anymore. It is not only irresponsible but a huge risk to have that piece of software installed on your server. Upgrade now, or if you're on shared hosting, run far away from the host. – SamT Sep 28 '13 at 17:47
  • Agreed. PHP 4 has been deprecated for years. The first priority should be not running your site on ancient, bug-ridden software. – cHao Sep 28 '13 at 17:50

1 Answers1

0

PEAR DB started out in PHP 4; you can probably still find a version somewhere that supports it. I used to use it before switching to PHP 5 and PDO; it's pretty decent if you're stuck with PHP 4.

Really, though, your priority should be to get as far away from PHP 4 as possible. It hasn't been supported for years, sucks at handling objects, and is wretchedly slow compared to PHP 5. Plus, PHP 5 has PDO.

cHao
  • 84,970
  • 20
  • 145
  • 172