Step 11: Warning: pg_errormessage(): 23 is not a v

I'm on step 11. When I press next, the following error comes up on the top of the page:


Warning: pg_errormessage(): 23 is not a valid PostgreSQL link resource in /usr/share/php/DB/pgsql.php on line 457



and another error comes below "Empty Database" saying:



DB Error: unknown error



I checked the postgresql log which shows that there is a connection.



I'm using Debian unstable and my postgresql version is 7.4.5. Apache version is 2.0.52 and PHP version is 4.3.9.



Thanks in advance!

Does it show that there is a valid connection? Have tables been created in the database?

Yes, the log shows a connection. Do I have to add the table myself? Won't the installer do this for me?

The installer will add the tables for you. Marcus is asking if there are any tables created within your database to see if we can work out how far the installer got with the database connection.

Yes, there is already a table in the database. It's called "cdr". I already have a php script to see the data in this table, so I know that php and pgsql work on my machine.


I also tried adding a new user and a new database, but the installer gave me the same error.

What versions of pear are you running? Can you do a pear list and paste the contents?

mikael@inspired:~$ pear list
Installed packages:

===================

Package Version State

Archive_Tar 1.2 stable

Cache 1.5.4 stable

Console_Getopt 1.2 stable

DB 1.6.8 stable

HTTP 1.3.3 stable

HTTP_Client 1.0.0 stable

HTTP_Request 1.2.3 stable

Mail 1.1.4 stable

Mail_Mime 1.2.1 stable

Net_SMTP 1.2.6 stable

Net_Socket 1.0.2 stable

Net_URL 1.0.14 stable

PEAR 1.3.3 stable

XML_HTMLSax 2.1.2 stable

XML_Parser 1.2.1 stable

XML_RPC 1.1.0 stable



My pear version is 4.3.9



I hope you can find a solution to this problem, as I'm eager to try MySource Matrix :slight_smile:

Does your pgsql log show anything else about that connection? It sounds as though the connection is failing in some way, which is giving that invalid link resource error. When you set things up, can you turn the Debug Level setting to highest? This will give a debug_backtrace when errors occur, which you can then paste here so we can see what code was being run when the error occured.

I set the debug level to "High", but I didn't get a more verbose error message. The error message is the same as earlier.

I still dont know what causes this error, but I got it trying to install Matrix on OS X 10.3.7. I was using the Entropy PHP package that installs PHP for the default OS X Apache install.


I decide to delete all the Entropy stuff and compile PostgreSQL and PHP from source manually. After doing this, everything works fine.