Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

A working torrentflux setup seems to have gone broken after upgrading PHP to 5.3 and Postrgres to 9.2beta3 on a FreeBSD 8.2 server. The login screen will show up fine, but after clicking the login button, I get an error :

Fatal error: Call to undefined function pg_escape_string() in \
/usr/home/parker/tf/html/inc/lib/adodb/drivers/adodb-postgres64.inc.php \
on line 241

Seems to be an error with PHP and the pgsql php package. The phppgsql package itself is not totally broken because I'm using it to host database driven apps on this server. This is the first and only error I'm seeing from it.

How might I go about fixing this problem?

share|improve this question

closed as too broad by Synetech, Jens Erat, Dave Rook, random Mar 14 at 4:05

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
I suggest you roll back the software until you figure out the conflict. Its more likely the beta release of your Postrgres start with that. –  Ramhound Nov 24 '12 at 5:13
    
Sounds reasonable, but I need some help with the commands to do so on FreeBSD... I never really learned how to properly manage packages. –  parker.sikand Nov 24 '12 at 5:26
    
As a heads up: the FreeBSD community generally frowns upon questions regarding stuff that is well documented on the main site and especially questions about stuff documented in the Handbook. Frankly, I understand and share this position, even though I'm not part of that community. –  Ярослав Рахматуллин Nov 25 '12 at 16:09
    
As a heads up, FreeBSD sucks and I've decided not to use it anymore. –  parker.sikand Nov 26 '12 at 8:20
add comment

2 Answers

up vote 2 down vote accepted

there is a tool called portdowngrade in the portstree which helps to deal with this issues.

If you don't want to use it, the best way would be, checkout the old version of the postgres port from SVN

share|improve this answer
    
Gave a concise answer to my question. In the end, I've decided to ditch FreeBSD. After years of using Debian for my home servers, I tried FreeBSD because I thought it would help me learn something new... all I've learned is where to buy the cheapest tylenol for the headaches –  parker.sikand Nov 26 '12 at 3:28
add comment

If you compiled the ports by hand, you have probably failed to include the PHP functionality that is required for your web application. I don't have much experience with FreeBSD or the PHP package there, but the general instructions in 5.6.3.3 Reconfiguring Ports should suffice.

What I'm saying is you need to enable PostgreSQL support in PHP and recompile or use a binary that has all the modules required by your web application.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.