Koozali.org: home of the SME Server

EspoCRM install problem

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: EspoCRM install problem
« Reply #15 on: June 25, 2014, 09:39:08 PM »
@stephdl
...   you were right - the bug must have been me!   8)  I have canceled the above bug 8466. However in my reinstall process, I DID find a bug. I will post the link once I have reported it.

Bug 8467 Submitted - http://bugs.contribs.org/show_bug.cgi?id=8467
Incorrectly detecting installed SME OS.
   

« Last Edit: June 25, 2014, 11:35:27 PM by Charles2008 »

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: EspoCRM install problem
« Reply #16 on: June 25, 2014, 11:25:47 PM »
@mmccarn

In my second SME9.iso install I have decided to follow your instructions and install to the Primary ibay.

I have followed the installation to the point where I submit the database information.
I then get this message:
The mcrypt PHP extension was not found...

I have found a guide to installing mcrypt here:
http://forums.contribs.org/index.php/topic,50474.0.html

So I have configured Dag and Epel and then run:
Code: [Select]
yum install *mcrypt --enablerepo dag --enablerepo epel
Code: [Select]
...
Running Transaction
  Installing : libmcrypt-2.5.8-9.el6.i686                                   1/5
  Installing : libtommath-0.42.0-3.el6.i686                                 2/5
  Installing : libtomcrypt-1.17-21.el6.i686                                 3/5
  Installing : mcrypt-2.6.8-10.el6.i686                                     4/5
  Installing : php-mcrypt-5.3.3-3.el6.i686                                  5/5
  Verifying  : libtomcrypt-1.17-21.el6.i686                                 1/5
  Verifying  : libtommath-0.42.0-3.el6.i686                                 2/5
  Verifying  : mcrypt-2.6.8-10.el6.i686                                     3/5
  Verifying  : php-mcrypt-5.3.3-3.el6.i686                                  4/5
  Verifying  : libmcrypt-2.5.8-9.el6.i686                                   5/5

Installed:
  libmcrypt.i686 0:2.5.8-9.el6          libtomcrypt.i686 0:1.17-21.el6         
  mcrypt.i686 0:2.6.8-10.el6            php-mcrypt.i686 0:5.3.3-3.el6         

Dependency Installed:
  libtommath.i686 0:0.42.0-3.el6                                               

Complete!

However, Espo installer is still saying "The mcrypt PHP extension was not found..."

Any idea what I have missed?

Offline mmccarn

  • *
  • 2,626
  • +10/-0
Re: EspoCRM install problem
« Reply #17 on: June 25, 2014, 11:37:34 PM »
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 ?

I doubt that there are many who install webapps into the Primary ibay.

I do it for quick feasibility testing of webapps -- if I can get an app to work in a folder in the Primary ibay, I can get it to work in a dedicated ibay, too.  If I really want to use the app, I'll create an i-bay and either move the installed code from Primary or reinstall. If I don't like it, I delete the folder and the database and I'm done.

On a production system I would assume that sharing multiple webapps in the Primary ibay increases security exposure:
- someone who compromises one of my installed webapps may be able to compromise another by writing malicious code into the shared temp file location
- or a weakness in one webapp may expose configuration info (db credentials, for example) from another webapp. 

(If I can *imagine* these vulnerabilities, some genius somewhere can probably use them...)

Offline mmccarn

  • *
  • 2,626
  • +10/-0
Re: EspoCRM install problem
« Reply #18 on: June 25, 2014, 11:52:12 PM »
@mmccarn
... Espo installer is still saying "The mcrypt PHP extension was not found..."

Any idea what I have missed?

You may need to restart httpd-e-smith or reboot

sv t httpd-e-dmith

or

signal-event post-upgrade; signal-event reboot

I must have installed mcrypt for something else...

On my system, the command on the top line produces the output shown:
Code: [Select]
#  php -r "phpinfo();" |grep mcrypt
/etc/php.d/mcrypt.ini,
Registered Stream Filters => zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, mcrypt.*, mdecrypt.*
mcrypt
mcrypt support => enabled
mcrypt_filter support => enabled
mcrypt.algorithms_dir => no value => no value
mcrypt.modes_dir => no value => no value

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: EspoCRM install problem
« Reply #19 on: June 26, 2014, 01:14:41 AM »
@mmccarn

Thanks for the advice. It was just a reconfigure & reboot that was needed,
Code: [Select]
signal-event post-upgrade; signal-event reboot
I now have it up and running.

Thanks again.

Offline mmccarn

  • *
  • 2,626
  • +10/-0
Re: EspoCRM install problem
« Reply #20 on: June 26, 2014, 12:39:23 PM »
You're welcome.

If you use EspoCRM long term, consider creating a wiki page to document the install process (and the other lessons you're bound to learn...).

If your install is working, please change the title of this thread to '[SOLVED] EspoCRM install problem'


Offline Charles2008

  • *
  • 174
  • +0/-0
Re: EspoCRM install problem [SOLVED]
« Reply #21 on: June 27, 2014, 04:53:13 PM »
Ok, I am struggling with loading EspoCRM into a normal ibay. I am hugely encouraged having been able to get it up-and-running in the Primary ibay (thanks mmccarn) but the normal ibay seems to need something more.

I am assuming that this has got to do with this software using an .htaccess file. I am presuming that as I am now installing to a regular Ibay (and not Primary) I will need to create a 'custom template fragment' to modify my  htttpd.conf. Is this right, or am I barking up the wrong tree?

So I have created ibay, created database, chown and chmod the ibay, run the installer and get (as per my opening post):

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 restartTo enable "mod_rewrite" run those commands in a Terminal:"
Code: [Select]
a2enmod rewrite
service apache2 restart



When I run:
Code: [Select]
db accounts show crmI get
Code: [Select]
crm=ibay
    AllowOverride=All
    AllowUrlfOpen=disabled
    CgiBin=enabled
    FollowSymLinks=enabled
    Gid=5000
    Group=shared
    Indexes=enabled
    MaxExecTime=disabled
    MemoryLimit=disabled
    ModDav=enabled
    Name=CRM
    PHPBaseDir=/home/e-smith/files/ibays/crm/:/tmp/
    PasswordSet=no
    PostMaxSize=disabled
    PublicAccess=local
    SSL=enabled
    Uid=5000
    UpMaxFileSize=disabled
    UserAccess=wr-admin-rd-group


I assume the settings listed immediately above relate to the ibay overall and not to specific files and directories (.htaccess application). Are these settings applied via the httpd.conf also (like a 'custom template fragment'?).

I have no doubt that I can follow the instructions in http://wiki.contribs.org/Htaccess but I don't really UNDERSTAND what I am doing?

Can anyone
(1) confirm that I need a 'custom template fragment' and that I am not simply doing something else simple wrong, and
(2) explain how the httpd.conf and the .htaccess access file are supposed to work together (or not).

Currently there is no .htaccess file present in /api/v1/<.htaccess not present> - I presume because the installer hasn't been able to create one.
« Last Edit: June 27, 2014, 05:10:14 PM by Charles2008 »

Offline mmccarn

  • *
  • 2,626
  • +10/-0
Re: EspoCRM install problem
« Reply #22 on: June 27, 2014, 06:43:27 PM »
I'll put it into an ibay and post the steps later today or tomorrow.

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: EspoCRM install problem
« Reply #23 on: June 27, 2014, 07:51:02 PM »
Thank you   ....   I think that I'm going to name my first ibay after you  :D

Further info. I am pretty sure that the the path to ,htaccess file is supposed to be:
/api/v1/.htaccess

and the contents are supposed to be:
Code: [Select]
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]

I don't know if this is any help, but were going to my cunning next steps.

Offline mmccarn

  • *
  • 2,626
  • +10/-0
Re: EspoCRM install problem
« Reply #24 on: June 27, 2014, 08:20:40 PM »
It seems that EspoCRM insists on using a url in the root of your domain named "/home", and that some detail of the SME ibay setup causes Espo to look for that location in the Primary ibay.

I created an ibay named "espocrm", and got everything (almost) working at http://mysmeserver.tld/espocrm -- except I was getting the error you've been seeing, and /var/log/httpd/error_log was complaining about a non-existent "/home/e-smith/files/ibays/Primary/html/home".

I created a new domain in server-manager (espo.mysmeserver.tld) and configured it to serve content from the "EspoCRM" ibay I created earlier.

Hey presto - Espo at http://espo.mysmeserver.tld

It still doesn't work at http://mysmeserver.tld/espo

(If you follow the new domain approach, you'll need to setup an external DNS server to let folks get to your espo server by name)

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: EspoCRM install problem
« Reply #25 on: June 27, 2014, 09:50:10 PM »
I would never have gotten that.

Quote
I created a new domain in server-manager  (espo.mysmeserver.tld) and configured it to serve content from the "EspoCRM" ibay

How is this configured in server-manager?
How is it configured to 'serve content'?

Quote
Hey presto - Espo at http://espo.mysmeserver.tld

Will this work on an internal network? e.g.
https://espo.192.xxx.xx.xxx

So, no 'custom template fragment' to modify my  htttpd.conf?

Also, I am assuming that the .htaccess was auto-created upon install, or did you have to do it manually?

Thank you for you help.
« Last Edit: June 27, 2014, 09:53:15 PM by Charles2008 »

Offline mmccarn

  • *
  • 2,626
  • +10/-0
Re: EspoCRM install problem
« Reply #26 on: June 28, 2014, 01:34:39 AM »
Quote
How is this configured in server-manager?
How is it configured to 'serve content'?
On the domain create/edit screen near the middle there is a field "i-bay" -- select the ibay that you installed EspoCRM into.

Quote
Will this work on an internal network? e.g.
https://espo.192.xxx.xx.xxx
No - use the domain you create, which should be a full domain name since you will need to create an external dns entry with the same name in order to access espo from off-site.

Quote
So, no 'custom template fragment' to modify my  htttpd.conf?

Also, I am assuming that the .htaccess was auto-created upon install, or did you have to do it manually?

Thank you for you help.
Right - no custom template fragments are needed, and .htaccess is either created during the install or is extracted from the source files.

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: EspoCRM install problem
« Reply #27 on: June 28, 2014, 09:00:43 AM »
@mmccarn
Thank you for the details.

I am thinking now that perhaps the Primary ibay was a better home for this app. Particularly if I was planning on local access only.

guest22

Re: EspoCRM install problem
« Reply #28 on: June 28, 2014, 11:52:23 AM »

Offline mmccarn

  • *
  • 2,626
  • +10/-0
Re: EspoCRM install problem
« Reply #29 on: June 28, 2014, 12:49:48 PM »
@mmccarn
... Particularly if I was planning on local access only.

If your SME server is providing DNS to your LAN, any domain you create will work locally -- you just need to use the domain name instead of the IP address.

I've just tested this with a domain named "espocrm.tld" (literally).  "espocrm" by itself and "espocrm.local" did not work.

You may need to edit .../data/config.php to correct the setting of "siteURL" (near the bottom of the file) to avoid reinstalling.