This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Install & configuration » How to install eZ with Mamp ?
expandshrink

How to install eZ with Mamp ?

How to install eZ with Mamp ?

Monday 21 May 2012 3:51:20 pm - 17 replies

Hello to everybody,
(First excuse my poor english!)
I have a problem with eZpublish installation : I have downloaded the last EzPublish package (v4.4) and I try to use it in my computer, in local, with MAMP.
But when I run the browser, there's a white page with the message "An unexpected error has occurred. Please contact the webmaster".
And when I check the log-errors, the message :
[ May 21 2012 11:46:16 ] [127.0.0.1] eZMySQLiDB:
Connection error: Couldn't connect to database. Please try again later or inform the system administrator.
Access denied for user 'USER_VOTRE_BDD'@'localhost' (using password: YES)
[ May 21 2012 11:46:16 ] Unexpected error, the message was : Unable to connect to the database server 'localhost' in /Users/Me/Documents/Web/Sites/ezpublish/site/ezpublish-4.4.0/lib/ezdb/classes/ezmysqlidb.php on line 144
I don't know what to do, where to look at first, and I've made some research on google, it doesn't seem very easy to install eZpublish (servor configurations but I don't know anything about that cause I'm only front-end dev happy.gif Emoticon  )
Could someone help me ? I really thank you in advance !

Monday 21 May 2012 4:48:33 pm

Hi Elo, and welcome aboard the eZ Community !

Don't worry about your english-level, we can understand you very well.

I'll have to ask you a couple of questions to help you solve the issue : 

  • Have you run the installation wizard ? (typically one of the pieces of information you need to enter is the DB connection credentials happy.gif Emoticon )
  • If you are not sure about what the previous question means: do you know where eZ Publish was unpacked, and would you be ready to modify a few files ?

Let us know,
Cheers, 

Tuesday 22 May 2012 10:34:02 am

Hello Nicolas, Thank you for your reaction,
I haven't run the installation wizzard, I see on many website there must be one.
("installation wizzard" = you're talking about a windows which help you to install everything ?)
Indeed, I guess I should have to give some details about the database (I'm very used to work with wordpress).
Not sure to understand correctly "where eZ Publish was unpacked" > I have downloaded the pack (v4.4), unzipped in a folder that MAMP can reach (?).
And of course I'm ready to modify few files ! Ready to "put the hands under the car hood", as we say in french blunk.gif Emoticon

Tuesday 22 May 2012 11:06:24 am

The first question is:

  • Is mysql running?
  • Can you get to it from the command line using the username and password supplied?
  • when in the mysql cli, can you then 'use <your databasename>' as the final test that you really have all the pieces in place?

If no to the above, see where some user rights may not be correct.

However, if the above works for you, then it could be a bit of confusion with the MySQL socket location. Reason: on Mac and Linux, the default connection to MySQL is by way of a socket. This 'file' can live in a few places depending on install - and there can be a misconfiguration where this socket is located.

Possible solution

On the database install screen (username, password, host, etc)

change localhost  to 127.0.0.1

Why?  in the mysql API, an IP address forces it to connect via TCP/IP and makes a connection to port 3306 instead of the socket file.
-David

Tuesday 22 May 2012 11:41:42 am

To complement what David said : you can force the eZ Publish installation wizard to run again. To do so, navigate to where you have unzipped the eZ Publish tarball/zip, enter the unzipped folder, and edit one of those two files (the first existing):

  • settings/override/site.ini.append.php
  • settings/site.ini

Add, at the top : 

[SiteAccessSettings]
CheckValidity=true

You will then need to clear the caches: open a Terminal window (it will be ok blunk.gif Emoticon), and navigate to the place where eZ Publish was unzipped, then enter the folder. You can navigate using the following commands:

  • 'cd' to change directory. Example : cd 'opt/myfolder' to enter the 'myfolder' folder located under '/opt/
  • 'ls' to see what is contained in the folder you are currently in. Example: run 'cd /opt/myfolder/' then 'ls'

Once in the eZ Publish directory, run the following command : 

php bin/php/ezcache.php --clear-all 

Once this is done, get back to your browser and point to the local URL where eZ Publish was unzipped. The installation wizard should start from scratch again, prompting you for various installation options, amongst them : the database connection. Entering the right values here should help you fix the database connection issue. 

Warning : running the installation wizard from scratch again will delete any priori work done on this eZ Publish installation. But as DB connection could even not be established, i believe not much was done. You can safely go ahead happy.gif Emoticon

Let us know how things go,
Cheers, 

Modified on Tuesday 22 May 2012 11:44:07 am by Nicolas Pastorino

Tuesday 22 May 2012 1:05:07 pm

First obstacles at the beginning for me :
Is mysql running?
I think yes ? Mamp is running, and others websites in my computer needing mamp are also running (?)
Can you get to it from the command line using the username and password supplied?
I'm not sure I understand correctly : you're talking about manipulations in the PhpMyAdmin ? (cause I only know how to import and export databases) I'm sorry, I don't know how and where to get it ?
So I cannot answer the third question :/

Tuesday 22 May 2012 1:46:41 pm

Quote from Elo Be :

First obstacles at the beginning for me :
Is mysql running?
I think yes ? Mamp is running, and others websites in my computer needing mamp are also running (?)
Can you get to it from the command line using the username and password supplied?
I'm not sure I understand correctly : you're talking about manipulations in the PhpMyAdmin ? (cause I only know how to import and export databases) I'm sorry, I don't know how and where to get it ?
So I cannot answer the third question :/

OK.. So use phpMyAdmin and log into it with the username and password that you set up for ezPublish:

  • Log out of phpMyAdmin(if logged in)
  • Log in with the username and password you intend to use with eZPublish
  • On the Left side of the interface, select the intended ezPublish database from the dropdown(if it is not already selected)

This will effectively check the username/password/database combination.  This has to work for you here before you go further.

If that does not work, then you have some permission problem with the database you created.  If that does work, try the directions related to using 127.0.0.1 instead of localhost (As above)

Tuesday 22 May 2012 2:28:13 pm

In fact for all databases, I'm already connected with "localhost / root / root"
I don't have any problem to consult my (empty) database in Mamp-PhpMyAdmin.
I also tryed to use "127.0.0.1" instead of "localhost" in the path, but it dœsn't change anything.
I hope I correctly reply to your questions, I guess they are very very simple points...

Tuesday 22 May 2012 2:38:51 pm

Ok. Then I recommend to follow the steps described in my previous post, and once you land on the installation wizard step concerning Database connection, enter root as username, root as password. 

Let us know how things go,
Cheers, 

Tuesday 22 May 2012 3:05:47 pm

Ok, to resume your previous post :
I modify the files :
"settings/override/site.ini.append.php" :
<?php /* #?ini charset="utf-8"?
[SiteAccessSettings]
CheckValidity=true
etc. .... . ... ...
and "settings/site.ini" :
[SiteAccessSettings]
CheckValidity=true
#?ini charset="iso-8859-1"?
# eZ Publish configuration file.
etc. .... . ... ...
I open my terminal (I never use this of course..),
And then, you ask me to navigate FROM the terminal ?
If I type "/Applications/" in the termninal, it tells me "-bash: /Applications/: is a directory"
But error happen with "ls"
Probably my questions will seem a little stupid but I'm blocked here

Tuesday 22 May 2012 4:12:12 pm

Quote from Elo Be :

Ok, to resume your previous post :
I modify the files :
"settings/override/site.ini.append.php" :
<?php /* #?ini charset="utf-8"?
[SiteAccessSettings]
CheckValidity=true
etc. .... . ... ...
and "settings/site.ini" :
[SiteAccessSettings]
CheckValidity=true
#?ini charset="iso-8859-1"?
# eZ Publish configuration file.
etc. .... . ... ...
I open my terminal (I never use this of course..),
And then, you ask me to navigate FROM the terminal ?
If I type "/Applications/" in the termninal, it tells me "-bash: /Applications/: is a directory"
But error happen with "ls"
Probably my questions will seem a little stupid but I'm blocked here

Hi.

I understand how Nicolaswas trying to get you to reconfigure the install process to start over.  I use the command line all day and can hardly use a file browser happy.gif Emoticon However, in this case, there is no benefit in you trying to learn other steps.  Although some day the command line stuff will be of importance, I say just start over for now.

____________________________________________________________

So, in whatever manner you navigate your filesystem, remove or rename the files you unzipped from the install package and unzip a fresh copy.  Take a breath and start the process over again with the following guideline:

  • on the database screen:
    • use 127.0.0.1 as the host (my original suggestion)
    • use root as (suggestion as above from Nicolas)
    • use the password for root that you know works (as you use in phpMyAdmin)

Please note:  you mention that you connected in phpMyAdmin using the user root - but the error in your first post clearly states that ezPublish tried to connect with a user called USER_VOTRE_BDD.  This is a fundamental point of confusion: you are telling us you use the user root and the ezPublish install was told to use another user.  I believe the issue is simple and Nicolas' suggestion of using root should work if it is a simple issue of user/password confusion.

Tuesday 22 May 2012 4:26:23 pm

Thanks, you are very couragous for all these explanations !
Indeed ! There's a place where the db logins are wrong !
Ok so I give up with the terminal.
Anyway, if I have understood correctly : To launch the Wizzard window :
Once I have added the code Nicolas gave me, at the top of the 2 files, then I need to clear eZ cash, and it should launch the wizzard window ? Is it what is recommanded ?
 
If it is, I don't succeed in clearing the eZ cache with the terminal-manipulation Nicolas told me. An other way to do it ?
Or else there's something else I haven't understand again, and you are ging to become crazy with me ! happy.gif Emoticon

Tuesday 22 May 2012 4:51:21 pm

Quote from Elo Be :

Thanks, you are very couragous for all these explanations !
Indeed ! There's a place where the db logins are wrong !
Ok so I give up with the terminal.
Anyway, if I have understood correctly : To launch the Wizzard window :
Once I have added the code Nicolas gave me, at the top of the 2 files, then I need to clear eZ cash, and it should launch the wizzard window ? Is it what is recommanded ?
 
If it is, I don't succeed in clearing the eZ cache with the terminal-manipulation Nicolas told me. An other way to do it ?
Or else there's something else I haven't understand again, and you are ging to become crazy with me ! happy.gif Emoticon

Oh yeah - there is an easy way to do it FROM the file browser - just dont't go doing it on a production machine happy.gif Emoticon
Using your fle browser:

  • in your install, navigate to the var directory within ezPublish
    • Go into the cache directory and remove the files (leave the directory).  These are the settings cache files
    • Try that and see if it works after that.
    •  If not, then under <EZPROOT>/var, you will see other directories as well depending on your install choice(admin, ezwebin_site, plain_site, plain_site_admin, etc) and how far the process got. in each of those, you will find another cache directory. empty the content of those as well as re-empty the main <ezproot>/var/cache directory as well.

 

[or just unzip the intstall file again and start over]

Regards,

David

Modified on Tuesday 22 May 2012 4:53:10 pm by David Ennis

Tuesday 22 May 2012 5:09:45 pm

Ok, so I erased :

- var/cache/ini/all_the_files

- var/active_extensions_etc.......php

but it dœsn't work.

 

But where is "<EZPROOT>/var" ? ^^

Tuesday 22 May 2012 10:22:49 pm

Quote from Elo Be :

Ok, so I erased :

- var/cache/ini/all_the_files

- var/active_extensions_etc.......php

but it dœsn't work.

 

But where is "<EZPROOT>/var" ? ^^

Hi.

ezproot only referred to your root directory of ezpublish.
Did you also remember to make the changes to the files as Nicolas had suggested.?

Lets go back to the core issue here:  You now see the cause of the impass (wrong username provided to the installer). The key is simply to get beyond that..   There will be enough new stuff to learn after you get a successful install without further un-necessary steps now. Re-starting the install process by way of modifications and cache clearing  vs just unzipping the original download has no benefit. As mentioned before, since this is just a new install, It is probably just easier to unzip the original download again and start over.  Thats what I would do.

Regards,

David

Wednesday 23 May 2012 10:49:54 am

Hello,
Finaly, that's what I did : I installed again everything AND I downloaded the english version (http://share.ez.no/downloads/down...ez-publish-community-project-2012.4), while I was using a version downloaded from a french eZpublish website.

And the english version works, the site is installed !
I need eZ for a very ponctual use, so I'm not ready to understand exactly why it was not working before, but now everything is ok.
I just thank you very much for all the time spent to help me, you were very patient !  happy.gif Emoticon

Wednesday 23 May 2012 11:15:31 am

Excellent news !

And well done David for the support !

I love that,
Cheers, 

Wednesday 23 May 2012 11:35:28 am

Hi.

I am glad it worked for you.

Kind Regards,

David

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from