History always repeats itself and sometimes that's good. Here's a second chance to be part of it: tmdtc.com

Wednesday 5 March 2008

webdav in Ez publish on postgresql

So you're running Ez Publish 4.0 backed by a Postgresql database, and you want to use the webdav functionality. You followed the howto, but to no avail. Your webdav client does not have access (I had the message "folder or file does not exist" with Konqueror).
Here's a good advice: enable PHP logging, and take a close look to it. I found this error message for every webdav request sent:

PHP Fatal error: Call to undefined function mysql_real_escape_string() in /var/www/ezpublish-4.0.0/lib/ezdb/classes/ezmysqldb.php on line 908



The solution is simple, just install the php-mysql package.

I hope this saves you some time :-)

2 comments:

Anonymous said...

Actually, the real solution is to fix the code. mysql_escape_string does not necessarily do the same thing as pg_escape_string, and assuming it does without checking might leave you open to an SQL injection attack.

raphinou said...

Wouter, You're right of course. This still might help you if you're looking for a quick resolution in the evaluation phase.

Will post further if I have to update the code.

Raph