Koozali.org: home of the SME Server
Obsolete Releases => SME 7.x Contribs => Topic started by: Daniel B. on June 18, 2007, 01:08:10 PM
-
Hi everyone.
You'll find here a how-to for the installation of php5 as a cgi. This way, you can run some webapps which requires php5 without upgrading your system to php5.
I've done this to run vtiger CRM 5.03 on SME and it seems to work now. I haven't tested extensivly this so if you have any feedback, it'll be appreciated.
link to the how-to: http://sme.firewall-services.com/spip.php?article46
Please, consider this how-to as beta, I've just wrote it, so try it first on a test server.
-
I have used this howto with the 5.0.3 version of vtiger. Everything installs perfectly , except for the fact that i cannot create users. Have you had any experience with this issue ? i have checked the forums at vtiger, and all leads to php versions.
I have followed your instructions to have php 5.1.2 as a cgi. so it shouldn’t be a problem, should it ?
Any links or advice would be greatly appreciated.
-
I had this problem when vtiger was executed with php4 (the default php of SME). As soon as I've installed php5-cgi and configured vtiger to be handled by php5-cgi, everything worked perfectly. You can verify if vtiger is handled by php5-cgi, just log into your server and type the command 'htop', you should see all the different process. Now, open your web browser and log into vtiger. While the page is loading, you should see the process /usr/bin/php5/php which take a lot of CPU.
Where did you install vtiger? in a ibay?
Have you change this
<Directory /home/e-smith/files/ibays/vtiger/html>
AddHandler php5-cgi .php
Action php5-cgi /php5-cgi/php
</Directory>
To match your installation?
-
Thanks for the response, i think i see where it it going wrong.
in htop i do not see the php process, as you describe
Please excuse my ignorance, but this is what i found :
if i do :
nano /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/90vtiger
it is empty, so i enter :
<Directory /home/e-smith/files/ibays/vtiger/html>
AddHandler php5-cgi .php
Action php5-cgi /php5-cgi/php
</Directory
when i save i get this :
[ Could not open file for writing: No such file or directory ]
but, if i browse to /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf and "ls -l" i see the 90vtiger file.
[root@it4-01 /]# cd /etc/e-smith/templates-custom/etc/httpd/conf
[root@it4-01 conf]# ls -l
total 4
drwxr-xr-x 2 root root 4096 Jun 21 13:01 http.conf
[root@it4-01 conf]# cd http.conf/
[root@it4-01 http.conf]# ls -l
total 8
-rw-r--r-- 1 root root 132 Jun 21 12:54 90vtiger
[root@it4-01 http.conf]#
if i nano 90vtiger i see :
<Directory /home/e-smith/files/ibays/vtiger/html>
AddHandler php5-cgi .php
Action php5-cgi /php5-cgi/php
</Directory>
I'm at a loss as to why this is happening , any ideas ?
-
Ok,
I re-installed a clean copy of sme and re installed vtiger and php5 as a cgi, BUT
When i get to the steps :
vim /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/90vtiger
and put in the following lines in this file
<Directory /home/e-smith/files/ibays/vtiger/html>
AddHandler php5-cgi .php
Action php5-cgi /php5-cgi/php
</Directory>
i get this error with vi: "/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/90vtiger" E212: Can't o
pen file for writing
and this error with nano :[ Could not open file for writing: No such file or directory ]
Can anyone see where i am going wrong ? any help would REALLY be appreciated !
-
I forgot to put in the how-to
mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
just before
vim /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/90vtiger
-
Great it is working !
Thank you.
( For the record, i did try create those folders, but i obviously screwed something up as it didnt work out. )
vtiger is now detecting php 5.1.2
Thank you so much for your time and your site http://sme.firewall-services.com rocks !
-
Hello and thank you for this work.
nb : I installed EGV1.2 on / opt by following this http://forums.contribs.org/index.php?topic=35146.0 topic, and then I follow by the update in 1.4 with that one : http://forums.contribs.org/index.php?topic=37313.0.
When i get to the steps :
vim /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/92egroupware
and put in the following lines in this file :
<Directory /opt/egroupware/html>
AddHandler php5-cgi .php
Action php5-cgi /php5-cgi/php
</Directory>
I can notice that php5 is activated for egroupware, but only the banniere is visible the applications (email, contact etc.) do not appear any more.
In brief, that does not work and I think that it is because of redirections.
Of what do you think of it?
Thank you for your comments and your help.
@+ rv
-
I had the same problem as I run egw1.4 on a server with php5-cgi. Just edit the file /etc/php5/php.ini and change the memory_limit (it's 8M by default). On my server I've put 50M, maybe you can try with less.
Once this is done, restart httpd:
svc -t /service/httpd-e-smith
Cheers
-
Hip Hip hourra !
Your analysis of the problem is correct and it works well with memory_limit at 50M.
Thks
-
Still I.
I have a supplementary question: as I read this subject http://www.egroupware.org/index.php?page_name=wiki&wikipage=SyncMLInstallHowTo it's necessary to create a template like this:
<Directory /opt/egroupware/rpc.php>
AddHandler php5-cgi .php
Action php5-cgi /php5-cgi/php
</Directory>
What do you think?
Thank you
-
If all your egroupware is handled by php5-cgi, there's no need to add this, rpc.php will also be handled by php5-cgi, the sync is working for me with funambol plugin for outlook (tested with funambol 3 and outlook 2003 and 2007)
-
This process seems to work very well for Ibays. I've just done an installation of sugar and I am very happy.
At first I tried to get this to work in a folder in the primary html area and it failed.
So I'm using an Ibay
Thanks for this solution
-
I would like to build a new rpm for eGW 1.4 with php5 as cgi module included. Playing around with your solution, I found 2 issues:
1. UTF8
The prepared database uses UTF8 to avoid errors, so it's necessary to use the mbstring.func_overload=7 value. Unfortunally there is no mbstring.mo modul in the /usr/lib/php5 extension directory. Is mbstring available as php-cgi modul and useable in hybrid mode with php4 together?
2. Pear is checked ok, but with Auth_SASL = false
How can I change Auth_SASL to true?
Rgds.,
Dietmar
-
I would like to build a new rpm for eGW 1.4 with php5 as cgi module included. Playing around with your solution, I found 2 issues:
1. UTF8
The prepared database uses UTF8 to avoid errors, so it's necessary to use the mbstring.func_overload=7 value. Unfortunally there is no mbstring.mo modul in the /usr/lib/php5 extension directory. Is mbstring available as php-cgi modul and useable in hybrid mode with php4 together?
2. Pear is checked ok, but with Auth_SASL = false
How can I change Auth_SASL to true?
Rgds.,
Dietmar
Well, for mbstring, it seems that these rpms are compiled without mbstring support. In fact, I haven't compiled it myself, I've found them here: http://www.seekbrain.com/downloads/legacy/psa/4ES/
For SASL, I don't, I haven't take the time to check this. The best would be to recompile a more recent version of php, with mbstring support and SASL. I think it should be quite simple to change the srpms from centosplus repo:
- the name of the rpm (php5 to php5-cgi)
- disabled the compilation of apache mod
I think I won't have the time to do it before some weeks at least, so if someone is interested in doing that...
-
Hello, I would need to make a php4-cgi for sme7, any hints on how to do this?
ciao, M
-
Hi. The only help I can bring is that you'll need to recompile php4, changing the name of the rpm to become something like php4-cgi (in order to install it with php5 without conflict), then disable the apache module compilation. For this, you should get the php4 srpm and change the spec file, then rebuild it.
-
With the next version of egroupware (1.6) we will need php5-pdo-mysql.
Can we just yum install it or does it need a more specific rpm?
Thanks.
-
Also, according to http://www.egroupware.org/wiki?wikipage=Dependencies we might run into problems with mysql because:
Databases for upcoming release 1.6
You must have a database, any of the following are currently supported.
* MySQL 5.0+
And: I tried running egroupware 1.4 with php5-cgi, but it is much slower than running it with php4 provided by SME-Server. So I just run the syncml-part with php5-cgi.
Seems that I will stick to 1.4 for another while.
-
I think now php can be upgraded to version 5, so php5-cgi is more or less deprecated. There's no tweaks for php5 to work on SME7, just upgrade it from centosplus repository. Of course, it's not recommended to do so, you should:
- test it first on some test server
- be sure to know what you're doing, so you can reverse if things goes bad
I've upgraded php on two production server and for now, everything is fine.