Koozali.org: home of the SME Server

EspoCRM install problem

Offline Charles2008

  • *
  • 174
  • +0/-0
EspoCRM install problem
« on: June 25, 2014, 01:53:24 AM »
I have been examining EspoCRM at espocrm.com

I have tried to load it on to a SME9 test-server and have an error on install:

"API Error: EspoCRM API unavailable.
Possible problems: disabled "mod_rewrite" in Apache server or .htaccess support.

To enable .htaccess support add/edit the Server configuration settings inside your <VirtualHost> section (httpd.conf):

Code: [Select]
<Directory /PATH_TO_ESPO/>
 AllowOverride All
</Directory>

Afterwards run this command in a Terminal:
Code: [Select]
service apache2 restart
To enable "mod_rewrite" run those commands in a Terminal:"
Code: [Select]
a2enmod rewrite
service apache2 restart


Now, I am aware that EspoCRM requires the following:
PHP 5.4  with pdo, json, GD Library, mcrypt
MySQL 5.1

and SME9 has:
PHP 5.3.3-23   ...   not sure about the other 4 requirements (but I think that I recognise them)
MySQL 5.1

Apparently, the PHP requirement isn't thought to be likely to pose any operational issues (their Forum). I will find out how accurate this proves to be  :-)

BTW, for anyone interested in trying this themselves, I had to modify the value of:
Code: [Select]
'phpVersion' => '5.4', to
Code: [Select]
'phpVersion' => '5.3',  in the file /install/core/SystemHelper.php

Earlier I tried to install on SME8 and had the same error. I hunted around contribs.org and found this:
http://forums.contribs.org/index.php?topic=42071.0
Code: [Select]
db accounts setprop Primary AllowOverride All
db accounts setprop Primary FollowSymLinks enabled
signal-event ibay-modify Primary

... replacing 'Primary' for my iBay.

This didn't work and so I am wondering if anybody can point me in the right direction.
« Last Edit: June 27, 2014, 05:02:00 PM by Charles2008 »

Offline TerryF

  • grumpy old man
  • *
  • 1,826
  • +6/-0
--
qui scribit bis legit

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: EspoCRM install problem
« Reply #2 on: June 25, 2014, 07:46:38 AM »
take a look to that contribs http://wiki.contribs.org/Webhosting but only for sme9

You will have some new options to apache and PHP. Really useful
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: EspoCRM install problem
« Reply #3 on: June 25, 2014, 10:28:38 AM »
@TerryF  -   thanks for those links. The Joomla article was very instructive.

@stephdl
I have just tried installing the contrib Webhosting, and there seems to be a problem (I tried twice, just to make sure):

I initially set the stephdl repository, then:

Code: [Select]
[root@home ~]# yum --enablerepo=stephdl install smeserver-webhosting
Loaded plugins: fastestmirror, smeserver
Loading mirror speeds from cached hostfile
 * base: mirror.sov.uk.goscomb.net
 * smeaddons: mirror.absolutnet.de
 * smeextras: mirror.absolutnet.de
 * smeos: mirror.absolutnet.de
 * smeupdates: mirror.absolutnet.de
 * updates: mirror.sov.uk.goscomb.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package smeserver-webhosting.noarch 0:0.0.9-1.el6.sme will be installed
--> Processing Dependency: smeserver-mod_dav for package: smeserver-webhosting-0.0.9-1.el6.sme.noarch
--> Finished Dependency Resolution
Error: Package: smeserver-webhosting-0.0.9-1.el6.sme.noarch (stephdl)
           Requires: smeserver-mod_dav
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
[root@home ~]#
« Last Edit: June 25, 2014, 10:31:10 AM by Charles2008 »

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: EspoCRM install problem
« Reply #4 on: June 25, 2014, 10:59:23 AM »
I loaded the DAV contrib and that then allowed the Webhosting contrib to run properly. (I have modified Wiki for Webhosting)
http://wiki.contribs.org/DAV

I now have a new option in Server-Manager, under 'Collaboration' - I-bays Web Hosting.
I have set:
Allow directory listing (+Indexes)  - ENABLED
Follow symbolic links (FollowSymLinks) - ENABLED
Allow .htaccess policy (AllowOverride) - ENABLED

... but, the problem (and the error message above) remain unchanged.

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: EspoCRM install problem
« Reply #5 on: June 25, 2014, 01:08:36 PM »
You have enabled a .htaccess but did you make a .htaccess in the relevant ibay with content needed ?
« Last Edit: June 25, 2014, 06:18:04 PM by stephdl »
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline mmccarn

  • *
  • 2,627
  • +10/-0
Re: EspoCRM install problem
« Reply #6 on: June 25, 2014, 01:47:21 PM »
I had no trouble installing EspoCRM (with the hint from Charles2008 to change the required phpVersion).

With my Primary ibay setup like this:
Quote from: db accounts show Primary
Primary=ibay
    AllowOverride=All
    CgiBin=enabled
    FollowSymLinks=enabled
    Group=shared
    Modifiable=no
    Name=Primary i-bay
    PHPBaseDir=/home/e-smith/files/ibays/Primary/:/tmp/
    PasswordSet=no
    Passwordable=no
    PublicAccess=global
    Removable=no
    UserAccess=wr-admin-rd-group

I setup EspoCRM as follows:
Code: [Select]
#
mkdir -p ~/addons/espocrm
cd ~/addons/espocrm
RELEASE=1.2.0
wget http://downloads.sourceforge.net/project/espocrm/EspoCRM-$RELEASE.zip
unzip EspoCRM-$RELEASE.zip
mv EspoCRM-$RELEASE /home/e-smith/files/ibays/Primary/html/espo
cd /home/e-smith/files/ibays/Primary/html
chown -R www:www *
#
# create a database
mysql -e "create database espo; grant all privileges on espo.* to 'espo'@'localhost' identified by 'put-your-OWN-secure-password-here' with grant option;"
#
#
# manually edit espo/install/core/SystemHelper.php to change the required PHP version from 5.4 to 5.3.3
# Change line 28 from this:
    # 'phpVersion' => '5.4',
# to this
    #'phpVersion' => '5.3.3',
#
# browse to the espo URL and complete the setup
# http://mysmeserver.tld/espo
#
# during setup:
    # mysql port = 3303
    # mysql server = localhost
    # mysql user = espo
    # mysql password = put-your-OWN-secure-password-here
[/code

Offline mmccarn

  • *
  • 2,627
  • +10/-0
Re: EspoCRM install problem
« Reply #7 on: June 25, 2014, 01:51:20 PM »
I also modified /home/e-smith/files/ibays/Primary/html/espo/.htaccess after install to force SSL connections:

The default EspoCRM .htaccess looked like this:
Code: [Select]
DirectoryIndex index.php index.html

RedirectMatch 403 \.config$

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule reset/?$ reset.html [QSA,L]
</IfModule>

I added two lines above the closing </IfModule> tag:
Code: [Select]
DirectoryIndex index.php index.html

RedirectMatch 403 \.config$

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule reset/?$ reset.html [QSA,L]

RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: EspoCRM install problem
« Reply #8 on: June 25, 2014, 04:35:53 PM »
@stephdl
No I haven't created an .htaccess file - do I really have to do that? I have successfully uploaded and configured quite a few programmes to ibays and haven't yet (knowingly) set one up. I had a look at the Htaccess page and it is quite daunting.
http://wiki.contribs.org/Htaccess

@mmccarn
Oh excellent!
At least in my little struggles I know that there is light at the end of the tunnel - thank you.

I am trying to install to an ibay and will continue with that. You have very helpfully set out the details of how to do it to the Primary ibay, for those interested in that method.

Once I ran:
Code: [Select]
db accounts show crmIt became obvious that although I had set
WebDav = ENABLED   ...   in ibays-Web Hosting in server-manager, I still had to manually enable it at the CL
http://wiki.contribs.org/DAV
Code: [Select]
db accounts setprop ibay-name ModDav enabled
signal-event ibay-modify ibay-name

My issue now is that although I have set in server-manager
Group = Everyone, and
Public access via web or anonymous ftp = Entire Internet (no password required)
I am being asked to provide a username/password in the install process - and not the one I set in the first part of the install. This doesn't strike me as normal. I am reluctant to enter my Admin password at this stage.

mmccarn - did you have to do this? (or am I paranoid  :-?)
« Last Edit: June 25, 2014, 04:37:31 PM by Charles2008 »

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: EspoCRM install problem
« Reply #9 on: June 25, 2014, 05:05:37 PM »
Quote
It became obvious that although I had set
WebDav = ENABLED   ...   in ibays-Web Hosting in server-manager, I still had to manually enable it at the CL

then you should report it as a bug :-)

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: EspoCRM install problem
« Reply #10 on: June 25, 2014, 06:24:01 PM »
@ Stefano
Bug 8466 - http://bugs.contribs.org/show_bug.cgi?id=8466 - ibays-Web Hosting (in server-manager) NOT A BUG.

@mmccarn
Further info - current ibay settings:
Code: [Select]
db accounts show crmcrm=ibay
    AllowOverride=All
    AllowUrlfOpen=disabled
    CgiBin=enabled
    FollowSymLinks=enabled
    Gid=5001
    Group=shared
    Indexes=disabled
    MaxExecTime=disabled
    MemoryLimit=disabled
    ModDav=enabled
    Name=EspoCRM
    PHPBaseDir=/home/e-smith/files/ibays/crm/:/tmp/
    PasswordSet=no
    PostMaxSize=disabled
    PublicAccess=global
    SSL=enabled
    Uid=5001
    UpMaxFileSize=disabled
    UserAccess=wr-admin-rd-group

Now no longer getting original error message, but being asked for password in the SME style pop-up:
"A username and password are being requested by https://<my LAN server ip>. The site says: "crm""

Am I right to think this abnormal? I haven't finished the install yet (or maybe I have and I am being asked for my p/w to access the first page)
This looks odd to me.
« Last Edit: June 25, 2014, 09:40:31 PM by Charles2008 »

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: EspoCRM install problem
« Reply #11 on: June 25, 2014, 06:27:30 PM »
then you should report it as a bug :-)
It works for me.
Can you confirm that you are writing.
set an ibay
enable internet access in the ibay panel
go to web hosting panel and enable webdav

then with nautilus (i don't use window) i can reach the ibay with a sme user (using the webdav protocol) and write in the ibay if the permissions set in the ibay panel allow it.
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: EspoCRM install problem
« Reply #12 on: June 25, 2014, 06:41:28 PM »
@stephdl
That is not what I did. Moreover, I am unfamiliar with Nautilus and I have moved on with the install.

I will reload the SME9.iso from scratch and retest to confirm. I wouldn't like to report a bug that didn't exist.  :)
« Last Edit: June 25, 2014, 06:59:09 PM by Charles2008 »

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: EspoCRM install problem
« Reply #13 on: June 25, 2014, 06:49:35 PM »
In France we have an expression, the bug is often between the keyboard and the chair :)
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: EspoCRM install problem
« Reply #14 on: June 25, 2014, 07:28:49 PM »
In France we have an expression, the bug is often between the keyboard and the chair :)

On the other hand, often when other is looking or test your work, you can find some interesting food for thought.

Is there are a lot of people who use the Primary Ibay to manage websites, my reflex is to avoid to use that ibay....I say that because i do not allow to manage https or php settings  with smeserver-webhosting to this ibay, but it is possible to let the sysadmin decide.

@mmccarn ?
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!