ezfind installation : updatesearchindexsolr

Author Message

Kévin S.

Monday 20 September 2010 1:56:39 am

Hello !

I am trying to install ezfind on my local ezpublish. I have followed the steps of the provided documentation to do so.The step 5.1 : Updating the search index (page 9) prompts to execute this command :

php extension/ezfind/bin/php/updatesearchindexsolr.php -s <admin siteaccess> --php-exec=php --conc=2

My admin siteaccess is ezwebin_site_admin so I use this one to start the indexation :

php extension/ezfind/bin/php/updatesearchindexsolr.php -s ezwebin_site_admin --php-exec=php --conc=2

All I get is "An unexpected error has occurred. Please contact the webmaster."
This message isn't quite helpful... has anyone ever had this problem and knows how to solve it ?

Thank you !

___

Kévin

Matthieu Sévère

Monday 20 September 2010 2:07:24 am

Hello,

Try to look in your var/log/error.log you may get some more usefull information

--
eZ certified developer: http://ez.no/certification/verify/346216

Kévin S.

Monday 20 September 2010 2:38:59 am

Thank you Matthieu ! I should have this reflex !

The log tells me that this is a database connection error :

"

[ Sep 20 2010 11:32:52 ] [] eZMySQLiDB:Connection error: Couldn't connect to database. Please try again later or inform the system administrator.Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)

[ Sep 20 2010 11:32:52 ] Unexpected error, the message was : Unable to connect to the database server 'localhost' in /Applications/MAMP/htdocs/ezpublish_clean/lib/ezdb/classes/ezmysqlidb.php on line 157

"

The database connection configuration, in settings/siteaccess/ezwebin_site_admin/site.ini.append is :

[DatabaseSettings]

DatabaseImplementation=ezmysqli

Server=localhost

Port=

User=ezadmin_clean

Password=admin

Database=ezpublish_clean

Charset=

Socket=disabled

I am looking for the source of the error. If anyone knows it, don't hesitate to post !

___

Kévin

Matthieu Sévère

Monday 20 September 2010 2:47:37 am

Is your site access ezwebin_site_admin working ?

Do you have database configuration up to date in your settings/siteaccess/ezwebin_site_admin/site.ini.append.php ?

--
eZ certified developer: http://ez.no/certification/verify/346216

Kévin S.

Monday 20 September 2010 2:53:02 am

Yes, the admin siteaccess is working and its database configuration is OK :

[DatabaseSettings]

DatabaseImplementation=ezmysqli

Server=localhost

Port=

User=ezadmin_clean

Password=admin

Database=ezpublish_clean

Charset=

Socket=disabled

(Sorry, I have just edited the previous post)

I don't understand why it doesn't want to connect ... I tried to add a port number (8888 on mac os x) and a charset, no result.

Matthieu Sévère

Monday 20 September 2010 3:04:44 am

Oh you use MySQLi, I have never try with it, can't say ...

Maybe if you have a working MySQL server you can try with it, it should work better

--
eZ certified developer: http://ez.no/certification/verify/346216

Kévin S.

Monday 20 September 2010 3:09:19 am

OK, I have no choice than to try it out with mysql then... it is embarrassing though, because the prod site on which I'll have to install ezfind are working with MySQLi ...

If anyone can help me with that, don't hesitate !

Kévin S.

Monday 20 September 2010 3:31:17 am

I have just tried it out with a MySQL database. I have exactely the same problem, so it doesn't seem to be related to the DB engine.

Ivo Lukac

Monday 20 September 2010 4:08:02 am

If the admin interface is working, but the scripot is not you should check the differences between your php.ini and php-cli.ini.

Default mysql port is 3306, so if you have some custom, you should put in ini. Maybe your MAMP bundle configured the custom port in php.ini, and not in php-cli.ini (a wild guess)

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Kévin S.

Monday 20 September 2010 5:32:06 am

I can't find any php-cli.ini file. What is it supposed to do ?

Ivo Lukac

Monday 20 September 2010 5:52:06 am

"

I can't find any php-cli.ini file. What is it supposed to do ?

"

This is special php.ini for command line php command. But if you can't find it then it should use standard php.ini.

I must say that I don't have a clue what is going on... Did you clear the cache?

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Kévin S.

Monday 20 September 2010 10:08:02 am

Yes, I did it several times...

Ivo Lukac

Tuesday 21 September 2010 4:10:50 am

Did you check what php you are running with: whereis php and php -version?

Maybe you are using some other php then intended...

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Kévin S.

Tuesday 21 September 2010 9:08:49 am

The command 'whereis php' returns this :

/usr/bin/php

'php -version' gives me this :

php -versionPHP 5.2.12 (cli) (built: Feb  9 2010 00:34:23) Copyright (c) 1997-2009 The PHP GroupZend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

I think everything is OK here, no ?

What is really strange is that, ezmysql(i).php uses the same identifiers than the administration interface ... those given in settings/siteaccess/ezwebin_site_admin/site.ini.append. I really don't understand why it doesn't manage to connect to the DB !

Maybe this php scripts don't have the same rights than ezpublish ones ... but I wouldn't know why ...

Kévin S.

Tuesday 21 September 2010 9:29:58 am

I finally got this script connect to the database ! It was a problem of mysql socket. All I had to do was create a link /var/mysql/mysql.sock towards the socket /Applications/MAMP/tmp/mysql/mysql.sock

You can find more information here.

Thank you to Ivo & Matthieu for your help !

___

Kévin

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.