NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
mfe_
Dec 05, 2012Tutor
Advice compiling php
Hello,
I'm trying to compile php from source by using gcc 4.6.0 on the readynas duo sparc. I read the php.net manual which says I have to set the parameter --with-apxs2=
The only apxs file I found in the readynas duo was located in /c/home/admin/support/apxs.
But when viewing the content of apxs I seems that the paths are set wrong. Anyway, when using "../php-5.3.10/configure --with-apxs2=/c/home/admin/support/apxs --host=sparc-linux I'll get
Have I to correct all paths? Is there a newer apxs file available? Or is there an other workaround to get the php compiled with using the apache version of the readynas duo? greetings
I'm trying to compile php from source by using gcc 4.6.0 on the readynas duo sparc. I read the php.net manual which says I have to set the parameter --with-apxs2=
The only apxs file I found in the readynas duo was located in /c/home/admin/support/apxs.
But when viewing the content of apxs I seems that the paths are set wrong. Anyway, when using "../php-5.3.10/configure --with-apxs2=/c/home/admin/support/apxs --host=sparc-linux I'll get
Sorry, I cannot run apxs. Possible reasons follow:
1. Perl is not installed
2. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs
3. Apache was not built using --enable-so (the apxs usage page is displayed)
The output of /c/home/admin/support/apxs follows:
sh: line 1: /usr/local/apache2/bin/envvars: No such file or directory
apxs:Error: Sorry, no shared object support for Apache.
apxs:Error: available under your platform. Make sure.
apxs:Error: the Apache module mod_so is compiled into.
apxs:Error: your server binary `/c/home/admin/'..
configure: error: Aborting
Have I to correct all paths? Is there a newer apxs file available? Or is there an other workaround to get the php compiled with using the apache version of the readynas duo? greetings
14 Replies
Replies have been turned off for this discussion
- chirpaLuminaryWhoCares will probably have some input, he went through those growing pains awhile ago.
Do you need specific customized stuff? Looked at viewtopic.php?f=47&t=54543 ? - mfe_TutorHello, I need some customized extensions like mapi (for zarafa) and the pgsql extension. greetings
- http://readynasxtras.com/forum/viewtopic.php?f=17&t=57
http://readynasxtras.com/forum/viewtopic.php?f=17&t=18
Might be more too, those are just from memory. - mfe_TutorHi,
thanks for the replies. I'm able to compile php php-5.4.9 without the parameter --with-apxs2=/c/home/admin/support/apxs with my gcc 4.6.0 + upgraded tools.
Configuring php with ../php-5.3.10/configure --exec-prefix=/usr/lib/apache2 --with-apxs2=/c/home/admin/support/apxs --host=sparc-linux will break at:[...]
checking for Apache 1.x module support... no
checking whether to enable Apache charset compatibility option... no
checking for Apache 2.0 filter-module support via DSO through APXS... no
checking for Apache 2.0 handler-module support via DSO through APXS...
Sorry, I cannot run apxs. Possible reasons follow:
1. Perl is not installed
2. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs
3. Apache was not built using --enable-so (the apxs usage page is displayed)
The output of /c/home/admin/support/apxs follows:
sh: line 1: /usr/local/apache2/bin/envvars: No such file or directory
apxs:Error: Sorry, no shared object support for Apache.
apxs:Error: available under your platform. Make sure.
apxs:Error: the Apache module mod_so is compiled into.
apxs:Error: your server binary `/c/home/admin/'..
configure: error: Aborting
As we know Perl is installed on the readynas duo. In addition I figured out that apache2 was compiled with enable-so (checked with apache2 -l). The message "sh: line 1: /usr/local/apache2/bin/envvars: No such file or directory" is confusing.
I edited /homes/admin/support/apxs and changed the paths to:my $installbuilddir = "/usr/sbin/apache2"; ##"/usr/local/apache2/build";
so the paths should be correct. Why is it me telling that the path in "sh: line 1:" / is incorrect? This is a perl script and not a shell script. Is it possible that the error does not occour in the apxs file, because the error is in a shell script on line 1? 0o Or am I searching the error in the wrong file?
##get_config_vars("$installbuilddir/config_vars.mk",\%config_vars);
get_config_vars("/c/home/admin/build/config_vars.mk",\%config_vars);
An other problem is that printing perl variables in the apxs file will be suppressed. So maybe I have to create a seperated perl script to dump "my $httpd = get_vars("sbindir") . "/" . get_vars("progname");
$httpd = eval qq("$httpd");
$httpd = eval qq("$httpd");
my $envvars = get_vars("sbindir") . "/envvars";
$envvars = eval qq("$envvars");
$envvars = eval qq("$envvars");
".
The config.log last line is:
configure:5271: checking whether to enable Apache charset compatibility option
configure:5438: checking for Apache 2.0 filter-module support via DSO through APXS
configure:6327: checking for Apache 2.0 handler-module support via DSO through APXS
and doenst support any more information :(
Another idea whould be to create the missing folders and copy the apache files into these directories? But first I will try to dump the perl variables and look forward.
greetings and best regards - WhoCares_MentorIf it helps, I could provide you with the complete Apache .deb packages for the ReadyNAS. Of course you could also compile them from the GPL sources yourself. Using the apxs2 from that package should fix your problem I guess.
-Stefan - mfe_TutorThanks, I would like to use your apxs2 file and then try to compile it by my self. :)
greetings - WhoCares_MentorSince I couldn't upload them here, you'll find the packages there: http://readynasxtras.com/forum/viewtopic.php?f=18&t=2555
-Stefan - mfe_TutorThanks Stefan.
I successfully compiled php-5.4.9 with your apxs2 btw. the unpacked apache2-prefork-dev_2.2.6-2.netgear2_sparc.
I used the following configure
../php-5.4.9/configure '--with-config-file-path=/etc/php5/cli/php.ini' '--with-config-file-scan-dir=/etc/php5/cli/conf.d' '--enable-calendar' '--enable-bcmath' '--with-pgsql=/usr/local/pgsql' '--exec-prefix=/usr/lib/apache2' '--with-apxs2=/c/home/admin/support/apxs2' '--host=sparc-linux' '--build=sparc-linux' '--with-gnu-ld' '--prefix=/usr' '--mandir=/usr/share/man' '--without-iconv' 'build_alias=sparc-linux' 'host_alias=sparc-linux'
I also had to create a symlink in /etc/apache2/httpd.conf -> /etc/frontview/apache2.httpd.conf
greetings
[Edit]
If you want to compile an older version of php for example 5.3.10 you run into the issue, that configure will include ieefph.h into main/php_config.h and unix.h which results in an compiler error because this files doesn't exists on the readynas duo. Just uncomment unix.h and ieeefph.h in nano main/php_config.h and it should work. - WhoCares_MentorGlad it worked!
-Stefan - mfe_TutorHi,
I got here some dependcy problem with apt-get and want to ask if i can do apt-get install -f without breaking the apache:fes-a120d19nas:/backup/fes-a120d19nas/zarafa/gss-0.1.5# apt-get install -f
Reading Package Lists... Done
Building Dependency Tree... Done
Correcting dependencies... Done
The following extra packages will be installed:
libexpat1-dev libgnutls11 libldap2 libldap2-dev liblzo1 libopencdk8 libpcre3-dev libpcrecpp0 libsqlite3-dev libtasn1-2
Suggested packages:
gnutls-bin sqlite3-doc
The following packages will be REMOVED:
apache2-prefork-dev libapr1-dev libaprutil1-dev
The following NEW packages will be installed:
libexpat1-dev libgnutls11 libldap2-dev liblzo1 libopencdk8 libpcre3-dev libpcrecpp0 libsqlite3-dev libtasn1-2
The following packages will be upgraded:
libldap2
1 upgraded, 9 newly installed, 3 to remove and 75 not upgraded.
3 not fully installed or removed.
Need to get 1693kB of archives.
After unpacking 1847kB disk space will be freed.
Do you want to continue? [Y/n]
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!