PHP extension/compiler problem

Questions regaring MySQL and PHP may go here

Moderators: Synology Inc, Honorary Moderator

Forum rules
Please note the disclaimer before modifying your Synology Product.

PHP extension/compiler problem

Postby Kokotoss » Thu Feb 15, 2007 6:02 am

I want to add an extension to PHP module. Usualy its enough to copy and execute those commands
. / configure
make

however i have no compiler. Did anyone of you installed any compiler?
Kokotoss
I'm New!
I'm New!
 
Posts: 1
Joined: Thu Feb 15, 2007 3:31 am

Postby bartik » Fri Feb 23, 2007 11:55 am

http://oinkzwurgl.org/diskstation
Particularly the section Toolchains could be of interest to you.
bartik
Experienced
Experienced
 
Posts: 112
Joined: Mon Oct 23, 2006 1:51 pm

PHP extension/compiler problem

Postby FunkyBox » Mon Apr 23, 2007 9:01 pm

Kokotoss wrote:I want to add an extension to PHP module. Usualy its enough to copy and execute those commands
. / configure
make

however i have no compiler. Did anyone of you installed any compiler?

Did you get this working? I got the GCC compiler installed through the Toolchains but in my case './configure' and 'make' does not get the PHP using the extension libxml. Do you have a step-by-step for getting php extensions to work on the DS-106??

Thanks in advance.
FunkyBox
I'm New!
I'm New!
 
Posts: 1
Joined: Mon Apr 23, 2007 8:43 pm

Postby bartik » Wed Apr 25, 2007 8:43 am

Did you get this working?


Yes.
1) I have used crosstools http://kegel.com/crosstool/crosstool-0.43/doc/crosstool-howto.html on ubuntu to build the compiler. I was able to build a statically linked binary "hello world" which could run on ds. I didn't go further.
2) With a chrooted debian you can make something like apt-get install build-essentials and then compile directly on the ds. I use this if I need something what is not in debian or ipkg.

I got the GCC compiler installed through the Toolchains but in my case './configure' and 'make' does not get the PHP using the extension libxml.


Is your problem the compiler itself or the ./configure, make process (e.g. missing libraries etc...) ? But then again I didn't go this direction so I'm afraid but probably I will be of no use to you...

Do you have a step-by-step for getting php extensions to work on the DS-106??


No.

I have simply installed IPKG and then php-fcgi with ipkg install. This version is compiled with this parameters:

'./configure' '--build=i386-pc-linux-gnu' '--host=powerpc-603e-linux' '--target=powerpc-603e-linux' '--prefix=/opt' '--with-config-file-scan-dir=/opt/etc/php.d' '--with-layout=GNU' '--disable-static' '--enable-dba=shared' '--with-inifile' '--with-flatfile' '--enable-dom=shared' '--enable-exif=shared' '--enable-ftp=shared' '--enable-pdo=shared' '--enable-shmop=shared' '--enable-sockets=shared' '--enable-sysvmsg=shared' '--enable-sysvshm=shared' '--enable-sysvsem=shared' '--enable-xml=shared' '--enable-xmlreader=shared' '--with-bz2=shared,/home/slug/optware/ds101g/staging/opt' '--with-db4=/home/slug/optware/ds101g/staging/opt' '--with-dom=shared,/home/slug/optware/ds101g/staging/opt' '--with-gdbm=/home/slug/optware/ds101g/staging/opt' '--with-openssl=shared,/home/slug/optware/ds101g/staging/opt' '--with-sqlite=shared' '--with-pdo-sqlite=shared' '--with-xsl=shared,/home/slug/optware/ds101g/staging/opt' '--with-zlib=shared,/home/slug/optware/ds101g/staging/opt' '--with-libxml-dir=/home/slug/optware/ds101g/staging/opt''--with-jpeg-dir=/home/slug/optware/ds101g/staging/opt' '--with-png-dir=/home/slug/optware/ds101g/staging/opt' '--with-freetype-dir=/home/slug/optware/ds101g/staging/opt' '--with-zlib-dir=/home/slug/optware/ds101g/staging/opt' '--with-gettext=/home/slug/optware/ds101g/staging/opt' '--enable-maintainer-zts' '--with-pcre-regex=/home/slug/optware/ds101g/staging/opt' '--with-regex=php' '--without-iconv' '--without-pear' '--enable-spl' '--enable-memory-limit' '--disable-cli' '--enable-cgi' '--enable-fastcgi' '--enable-force-cgi-redirect'

That solved my problems with php so I didn't do anything more.
bartik
Experienced
Experienced
 
Posts: 112
Joined: Mon Oct 23, 2006 1:51 pm

Postby ArtCyb » Fri Jun 22, 2007 5:04 pm

Hello, I installed php-fcgi on my ds101j as explained in the preceding post but, it is always the version of origin which is carried out, there has to you it another modification to make? Thank you
ArtCyb
I'm New!
I'm New!
 
Posts: 3
Joined: Sat Nov 25, 2006 11:52 am

Postby bartik » Wed Jun 27, 2007 2:58 pm

1) Do you have a startup script for php-fcgi ? (in /opt/etc/init.d should be something like S..php (where .. is a number from the range 0-99) you need this to start up the php interpreter you will need to supply the port number where it shoud listen and a complete path to a php.ini file

2) You have to teach apache to forward PHP requests to the fcgi daemon. It seems you'll need mod_fastcgi so it's a no go probably.

3) Seems the only way is to use another web server. Either Lighttpd or nginx or whatever suits you.
bartik
Experienced
Experienced
 
Posts: 112
Joined: Mon Oct 23, 2006 1:51 pm


Return to MySQL/PHP Mods

Who is online

Users browsing this forum: No registered users and 0 guests