Page 1 of 3
Recompile php

Posted:
Thu May 10, 2012 1:54 pm
by sgripon
Hi,
I would like to add some modules to php in nwsp1 in order to be able to run owncloud. Zip and mb multibyte modules are missing.
Could you tell me what compilation toolchain is used to build the image and if I really need to recompile php.
Thanks.
Re: Recompile php

Posted:
Thu May 10, 2012 6:42 pm
by Jocko
Hi sgripon,
Yes, recompile php is required to add modules... :crazy
:idea: About the mbstring module, which is large (2 MB), you can easily find on several web sites some alternative php codes without having this module if your purpose is only to handle UTF-8 string with non ASCII chars.
Re: Recompile php

Posted:
Thu May 10, 2012 7:16 pm
by fvdw
well it is possible build modules for php without recompile of php by using phpize, but you will need the php build files as well. Those are generated during building php. Furthermore php and apache are closely connected, probably you need to recompile both of them including the dependencies. Its a tricky excercise. We can give you the mbstring module and I can look if the zip module is easy to compile and post it here as well
Re: Recompile php

Posted:
Thu May 10, 2012 8:11 pm
by fvdw
compiling zip as php module was smooth, the module is attached
you need to put it in /usr/lib/php/extensions and be sure that is set executable (chmod 755)
Of course to load it it will need to be added in php.ini
But I guess you know how to do this
success
php526-extension-module-zip.zip
Re: Recompile php

Posted:
Tue May 22, 2012 11:37 am
by sgripon
Thank you very much ! I'll try this one as soon as possible. If I try to use owncloud on the NAS, I will post the news here. Maybe it could be a nice thing to integrate in the firmware? However, I have to check performance issues first.
Re: Recompile php

Posted:
Tue May 22, 2012 8:42 pm
by sgripon
It is ok for zip module now but I still need mbstring. Would it be possible for you to compile it ?
Re: Recompile php

Posted:
Tue May 22, 2012 8:46 pm
by fvdw
here you go ;)
mbstring.zip
Re: Recompile php

Posted:
Tue May 22, 2012 8:53 pm
by sgripon
It seems that this one was already on my firmware (or maybe i copied it from somewhere, don't remember). Anyway, it has been created in 2011 and it seems that it doesn't work (not recognized). Any idea ?
Re: Recompile php

Posted:
Tue May 22, 2012 8:54 pm
by sgripon
Forget this last post. I have an error in my php.ini. I am doing the test now...
Re: Recompile php

Posted:
Tue May 22, 2012 8:59 pm
by fvdw
indeed it is in the firmware already and I am sure it works as it has been tested successfully by Jocko