Koozali.org: home of the SME Server
Obsolete Releases => SME 7.x Contribs => Topic started by: kb-ohnemus on February 23, 2007, 09:54:55 PM
-
Edit: I changed a few things. The new Howto is below in the fourth posting
Hi,
after installing egroupware by using this great HOWTO http://forums.contribs.org/index.php?topic=35146.0 (thanks)
I noticed I was not able to use SyncML because there is only PHP4 and updating SME to PHP5 seems not to be an easy task.
So, here http://www.egroupware.org/index.php?page_name=sync&wikipage=SyncMLInstallHowto I found something about using php5-cgi.
I took php5-fastcgi and php5-mysql from SuSE10. Because of some failed dependencies I couldn't install the rpms directly so I extracted them and copied the files to the system directly. I collected all the files in this tgz:
http://kb-ohnemus.de/div/files.tgz
Extract it somewhere and do the following:
mkdir /etc/php5
mkdir /etc/php5/conf.d
cp mysql.ini /etc/php5/conf.d
mkdir /etc/php5/fastcgi
cp php.ini /etc/php5/fastcgi
mkdir /usr/lib/php5
mkdir /usr/lib/php5/extensions
cp mysql /usr/lib/php5/extensions
cp php5 /home/e-smith/files/ibays/Primary/cgi-bin
This one tells rpc.php to use php5-fastcgi instead of php4:
cp 99php5 /etc/e-smith/templates/etc/httpd/conf/httpd.conf
expand-template /etc/httpd/conf/httpd.conf
service httpd-e-smith restart
SyncML had some problems finding PEAR.php, so I changed:
vim /opt/egroupware/html/phpgwapi/inc/horde/lib/core.php
on line 27:
include_once '/usr/share/pear/PEAR.php';
vim /opt/egroupware/html/phpgwapi/inc/horde/Horde.php
on line 3:
include_once '/usr/share/pear-addons/Log.php';
vim /opt/egroupware/html/phpgwapi/inc/horde/Horde/iCalendar.php
on line 155:
require_once '/usr/share/pear/PEAR.php';
I guess there are better ways than "hardcoding" the paths, but so far I didn't figure out.
That's it. Point any Browser to https://your-server/egroupware/rpc.php
It should only say: You should access this URL only with a SyncML enabled device.
So, backup your egroupware-database in case something goes wrong.
Point your SyncML-device to https://your-server/egroupware/rpc.php
Username and Password are the same as for logging into egroupware of course.
Server-Paths:
./contacts
./calendar
./tasks
./notes
Then do a "reload device" for each of the four. You will loose all the devices previous data, but this is important for having consistent data. I had no success merging differing server and device data. This will take a while.
If reloading the device stops somewhere in between
vim /etc/php5/fastcgi/php.ini
and set memory_limit on line 300 to something reasonable, for me it worked with 80M.
After reloading the device you should be able to use "normal" sync.
This works without any problems on my palm-powered gsl xplore m68 using Synthesis-SyncML-Client-Software over GPRS or Bluetooth.
If I have missed anything, tell me.
Happy syncing...
Manuel
-
Editing egroupware files would have to be done after every update?
Could it be possible to use this kind of code:
ibayname="egroupware"
db accounts setprop $ibayname PHPBaseDir /home/e-smith/files/ibays/$ibayname:/usr/share/pear-addons:/usr/share/pear
-
If I call:
https://192.168.201.100/egroupware/rpc.php
my Webbrowser show this message:
Fatal Error: It appears that you have not created the database tables for eGroupWare. Click here to run setup.
My status from the setup is OK and my database is working with egroupware. The Logfile show this messages:
Feb 25 23:07:03 smeserver php5: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php4/mysql.so' - /usr/lib/php4/mysql.so: undefined symbol: OnUpdateInt in Unknown on line 0
Feb 25 23:07:03 smeserver php5: PHP Warning: dl() [<a href='function.dl'>function.dl</a>]: Unable to load dynamic library '/usr/lib/php4/mysql.so' - /usr/lib/php4/mysql.so: undefined symbol: OnUpdateInt in /opt/egroupware/html/phpgwapi/inc/class.egw_db.inc.php on line 261
Feb 25 23:07:03 smeserver php5: PHP Warning: dl() [<a href='function.dl'>function.dl</a>]: Unable to load dynamic library '/usr/lib/php4/mysql.so' - /usr/lib/php4/mysql.so: undefined symbol: OnUpdateInt in /opt/egroupware/html/phpgwapi/inc/class.egw_db.inc.php on line 261
Feb 25 23:07:03 smeserver php5: PHP Warning: dl() [<a href='function.dl'>function.dl</a>]: Unable to load dynamic library '/usr/lib/php4/mysql.so' - /usr/lib/php4/mysql.so: undefined symbol: OnUpdateInt in /opt/egroupware/html/phpgwapi/inc/class.egw_db.inc.php on line 261
Can you help me?
-
@soprom: I added the paths for Pear and Pear-log to /etc/php5/fastcgi/php.ini. So no changes to /opt/egroupware are necessary.
@yythoss: php5-fastcgi can't find /usr/lib/php5/extensions/mysql. Line 511 in /etc/php5/fastcgi/php.ini should be: extension_dir = /usr/lib/php5/extensions
This is the actual Howto. Use the new files from my website.
1. Install egroupware using this Howto.
http://forums.contribs.org/index.php?topic=35146.0
2. Download the files needed for php5-fastcgi and extract them somewhere:
http://kb-ohnemus.de/div/php5-fastcgi_for_SME7.1.tgz
3. Then do the following:
mkdir /etc/php5
mkdir /etc/php5/conf.d
cp mysql.ini /etc/php5/conf.d
mkdir /etc/php5/fastcgi
cp php.ini /etc/php5/fastcgi
mkdir /usr/lib/php5
mkdir /usr/lib/php5/extensions
cp mysql /usr/lib/php5/extensions
cp php5 /home/e-smith/files/ibays/Primary/cgi-bin
cp 99php5 /etc/e-smith/templates/etc/httpd/conf/httpd.conf
expand-template /etc/httpd/conf/httpd.conf
service httpd-e-smith restart
4. For testing point any Browser to https://your-server/egroupware/rpc.php
It should only say: You should access this URL only with a SyncML enabled device.
5. Backup your egroupware-database in case something goes wrong.
6. Sync:
Point your SyncML-device to https://your-server/egroupware/rpc.php
Username and Password are the same as for logging into egroupware of course.
Server-Paths:
./contacts
./calendar
./tasks
./notes
Then do a "reload device" for each of the four. You will loose all the devices previous data, but this is important for having consistent data. I had no success merging differing server and device data. This will take a while.
After reloading the device you should be able to use "normal" sync.
Note: If something doesn't work as expected have a look at /var/log/httpd/error_log and /tmp/egroupware_syncml.log. SyncML produces quite usable error-messages.
Note: This will only work if SQL-authetication enabled.
Meanwhile I use Mail-authentication (egroupware uses the Imap-server to authenticate, so egroupware-users are created automatically). This requires some further work for syncing. I'll desribe later.
-
First, many thanks for these instructions! This solution is just great!
I had to create an ibay to manage the default domain cgi since Primary is owned admin:shared.
I installed egw with utf-8 character set
Note:
Using Funambol (Sync4j), the recommended folders are :
* Contact Name: ./sifcontacts
* Calendar Name: ./sifcalendar
* Task Name: ./siftasks
* Note Name: ./sifnotes (? it looks that its not yet implemented)
Also, a note about editing egroupware source code:
This would have to be done after updates and would not be a workable solution.
A question:
What do you mean by "This will only work if SQL-authetication enabled" ?
Funambol does not work so far...
-
I had to create an ibay to manage the default domain cgi since Primary is owned admin:shared.
I installed egw with utf-8 character set
I have no idea about that, for my fresh 7.1 install it just worked by copying it to the primary ibay.
Note:
Using Funambol (Sync4j), the recommended folders are :
* Contact Name: ./sifcontacts
* Calendar Name: ./sifcalendar
* Task Name: ./siftasks
* Note Name: ./sifnotes (? it looks that its not yet implemented)
I just tested with Synthesis for Palm OS. I'm still looking for a solution to sync Outlook. Does Funambol for Outlook work? I could not get that to work so far, I think its a problem with the certificate.
Also, a note about editing egroupware source code:
This would have to be done after updates and would not be a workable solution.
I know, that's the reason I changed it. But the roadmap for egroupware plans major changes in SyncML for egroupware 1.4, so we can't be sure about upgrades anyway.
A question:
What do you mean by "This will only work if SQL-authetication enabled" ?
That's the default authentication method in egroupware. Users are created manually and stored in the database. You can change that to Mail-authentication in setup/config.php. If a new user logs into egroupware username and password are looked up in the imap-server and then the egroupware-user is created automatically. For SyncMl you additionally need /usr/lib/php5/extensions/imap (which I can provide) and set some symlinks (which I will have to look up again)
-
@kb-ohnemus:
Thank you for your work so far! I have not yet tested it on my server but would do so, if you could provide the infos you mentioned concerning mail-auth (which i am using).
So, could you provide the necessary files (/usr/lib/php5/extensions/imap) and the symlinks to set? Thank you!
-
Sorry, been a bit busy the last days, so:
Additionally if you use Mail-Authentication:
Download http://kb-ohnemus.de/div/php5-fastcgi_imap.tgz
Extract it and copy it to:
cp imap /usr/lib/php5/extensions
This file was taken from OpenSuSE10, some libs are named differently there, so you need four symlinks for php5-fastcgi to find the correct libs:
ln -s /usr/lib/libc-client.so.0 /usr/lib/libc-client.so
ln -s /usr/lib/libkrb5.so.3.2 /usr/lib/libkrb5support.so.0
ln -s /lib/libssl.so.0.9.7a /lib/libssl.so.0.9.7
ln -s /lib/libcrypto.so.0.9.7a /lib/libcrypto.so.0.9.7
These symlinks should work for SME 7.1.3.
Again, if something doesn't work have a look at /var/log/httpd/error_log and /tmp/egroupware_syncml.log.
-
I have make a new installation of SME 7.1
I have installed egroupware with your howto:
1. Install egroupware using this Howto.
http://forums.contribs.org/index.php?topic=35146.0
2. Download the files needed for php5-fastcgi and extract them somewhere:
http://kb-ohnemus.de/div/php5-fastcgi_for_SME7.1.tgz
3. Then do the following:
Code:
mkdir /etc/php5
mkdir /etc/php5/conf.d
cp mysql.ini /etc/php5/conf.d
mkdir /etc/php5/fastcgi
cp php.ini /etc/php5/fastcgi
mkdir /usr/lib/php5
mkdir /usr/lib/php5/extensions
cp mysql /usr/lib/php5/extensions
cp php5 /home/e-smith/files/ibays/Primary/cgi-bin
cp 99php5 /etc/e-smith/templates/etc/httpd/conf/httpd.conf
expand-template /etc/httpd/conf/httpd.conf
service httpd-e-smith restart
4. For testing point any Browser to https://your-server/egroupware/rpc.php
But when i go to https://your-server/egroupware/rpc.php
my Webbrowser show this message:
Warning: dl() [function.dl]: Dynamically loaded extensions aren't allowed when running in Safe Mode in /opt/egroupware/html/phpgwapi/inc/class.egw_db.inc.php on line 261
Fatal Error: It appears that you have not created the database tables for eGroupWare. Click here to run setup.
when i go to /var/log/httpd/error_log and /tmp/egroupware_syncml.log.
I see [Tue Apr 24 11:07:19 2007] [error] [client 192.168.141.220] File does not exist: /opt/egroupware/html/function.dl, referer: https://192.168.141.63/egroupware/rpc.php
Can you help me ?
Thanks and scuse for my english !
-
It looks as if your php4 (the one provided by SME-Server) would run in safe mode and therefore does not load extensions.
You could change this by editing
/etc/e-smith/templates/etc/php.ini/10LanguageOptions
Linie13:
safe_mode = Off
and comitting this by:
expand-template /etc/php.ini
BUT: My php-installation runs in safe_mode = Off by default and I suppose you have changed that to On intentionally because of other installed software depending on php. So setting it to Off may break something else?
-
BTW: Centos5 is out and contains php5 by default. So somewhen (are there any plans?) SME will be based on Centos5 and this php-fastcgi-thing will become obsolete...
-
when i see my
/etc/e-smith/templates/etc/php.ini/10LanguageOptions
i see:
# Language Options ;
#;;;;;;;;;;;;;;;;;;;}
engine = On
short_open_tag = On ;
asp_tags = Off
precision = 14
y2k_compliance = Off
output_buffering = Off
output_handler =
implicit_flush = Off
allow_call_time_pass_reference = On
safe_mode = Off
safe_mode_exec_dir =
safe_mode_allowed_env_vars = PHP_
safe_mode_protected_env_vars = LD_LIBRARY_PATH
disable_functions =
highlight.string = #DD0000
highlight.comment = #FF8000
highlight.keyword = #007700
highlight.bg = #FFFFFF
highlight.default = #0000BB
highlight.html = #000000
expose_php = On
and so i don't understand why i have this message
Thanks
-
BTW: Centos5 is out and contains php5 by default. So somewhen (are there any plans?) SME will be based on Centos5 and this php-fastcgi-thing will become obsolete...
AFAIK it will be implemented in SME 8 which is at this moment (i think) in pre-Alpha.
-
and so i don't understand why i have this message
Hm, I'm not very familiar with php so I have no idea. Maybe you could ask in the egroupware-forum?
http://www.nabble.com/eGroupWare-f3741.html
-
Hi,
I'm looking for long time to sync my qteck with egw so I thank you for this job ... but I cannot reach https://myserver/egroupware/rpc.php .
It's a brand new SME Server 7.1.3 with eGroupWare using cool34's howto and php5-fastcgi using your howto (forth position of this threat)
nota : xmlrpc is activate and I used this howto http://wiki.contribs.org/Custom_CA_Certificate to avoid security alerte on https.
But when i go to https://myserver/egroupware/rpc.php
my Webbrowser show this message: Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
And when i go to
/var/log/httpd/error_log and /tmp/egroupware_syncml.log.
I see
[Mon Apr 30 09:13:52 2007] [error] [client 192.168.151.4] (13)Permission denied: exec of '/home/e-smith/files/ibays/Primary/cgi-bin/php5' failed
[Mon Apr 30 09:13:52 2007] [error] [client 192.168.151.4] Premature end of script headers: php5
Can you help me ?
Thks
-
I cant download the tgz files, they sent me to a broken link, where can find the tgz files?
-
My domain kb-ohnemus.de has moved on thursday. Now it works again.