Author Topic

Thiago Campos Viana

Friday 29 February 2008 1:50:30 am

Comment49148

Thx Kristof

I fixed the includes:

include_once("kernel/classes/datatypes/ezuser/ezuser.php");
include_once('lib/ezutils/classes/ezoperationhandler.php');
include_once("kernel/classes/ezcontentclass.php");
include_once("kernel/classes/ezcontentobjecttreenode.php");
include_once("kernel/classes/eznodeassignment.php");

And executed the code with php4, but I got a new error:

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /var/www/somesite/lib/ezdb/classes/ezmysqldb.php on line 131

This line is:

if ( $this->UsePersistentConnection == true )
{
$connection = mysql_pconnect( $server, $user, $password );
}
else
{
$connection = mysql_connect( $server, $user, $password, true );
}

I think the code is not getting the right ini settings for db connections because I am not executing it as an ez extensio, I am trying to execute it alone, but I will think a litle more about this problem.

Edited: I tested the code as a view on an extension and it worked!

eZ Publish Certified Developer: http://auth.ez.no/certification/verify/376924

Twitter: http://twitter.com/tcv_br