Re: [: -le: argument expected
On Thu, 2008-01-31 at 18:41 -0800, Chris H. wrote: The cause is in the file: lang/php5/files/patch-Zend_zend_list.c It accounts for all /3/ errors emitted during the initial portion of the make process. The lines are as follows: --- Zend/zend_list.c.orig 2007-01-01 10:35:46.0 +0100 +++ Zend/zend_list.c 2008-01-29 11:05:14.0 +0100 @@ -48,7 +48,7 @@ return index; } -ZEND_API int _zend_list_delete(int id TSRMLS_DC) +ZEND_API int _zend_list_delete(ulong id TSRMLS_DC) { *** zend_rsrc_list_entry *le; @@ -65,7 +65,7 @@ } -ZEND_API void *_zend_list_find(int id, int *type TSRMLS_DC) +ZEND_API void *_zend_list_find(ulong id, int *type TSRMLS_DC) { *** zend_rsrc_list_entry *le; @@ -78,7 +78,7 @@ } } -ZEND_API int _zend_list_addref(int id TSRMLS_DC) +ZEND_API int _zend_list_addref(ulong id TSRMLS_DC) { *** zend_rsrc_list_entry *le; (highlighted with three asterisks for clarity). While it's nice that I found them. I'm not sure what to do to make them correct. Any thoughts? Should I simply send-pr - php5-apache-module build failure (lang/php5/files/patch-Zend_zend_list.c)? I doubt that patch is the issue. The error comes from a malformed call to /bin/test (or /bin/[ ). The -le test tests two numbers to see if the first is less than the second. With correct usage: /bin/[ 5 -le 10 ] echo first is less first is less With incorrect usage /bin/[ 5 -le ] echo first is less [: -le: argument expected The patch you have shown changes the id of a zend_rsrc_list_entry to be an unsigned long rather than an int, the fact that the variable name (which does not get updated, modified or altered) is called 'le' for 'list element' is neither here nor there. I would thoroughly recommend using apache 2.2 with the prefork MPM if you wish to run PHP. Your arguments for choosing 2.0 over 2.2 are spurious, as there are virtually no difference in conf directives, server layout or security, where as apache 2.2 is well maintained and secure. Apache 2.2 has many notable improvements, especially in performance and proxying. See [1]. The real hint is on apache.org [2] - 'We consider Apache 2.2 to be the best available version at the time of this release. We offer Apache 2.0.63 as the best legacy version of Apache 2.0 available. Users should first consider upgrading to the current release of Apache 2.2 instead.' On the other hand, your server, your rules. :) Tom [1] http://httpd.apache.org/docs/2.2/new_features_2_2.html [2] http://www.apache.org/dist/httpd/Announcement2.0.html signature.asc Description: This is a digitally signed message part
Re: [: -le: argument expected
Hello Tom, and thank you for your thoughtful reply. Quoting Tom Evans [EMAIL PROTECTED]: On Thu, 2008-01-31 at 18:41 -0800, Chris H. wrote: The cause is in the file: lang/php5/files/patch-Zend_zend_list.c It accounts for all /3/ errors emitted during the initial portion of the make process. The lines are as follows: --- Zend/zend_list.c.orig 2007-01-01 10:35:46.0 +0100 +++ Zend/zend_list.c2008-01-29 11:05:14.0 +0100 @@ -48,7 +48,7 @@ return index; } -ZEND_API int _zend_list_delete(int id TSRMLS_DC) +ZEND_API int _zend_list_delete(ulong id TSRMLS_DC) { *** zend_rsrc_list_entry *le; @@ -65,7 +65,7 @@ } -ZEND_API void *_zend_list_find(int id, int *type TSRMLS_DC) +ZEND_API void *_zend_list_find(ulong id, int *type TSRMLS_DC) { *** zend_rsrc_list_entry *le; @@ -78,7 +78,7 @@ } } -ZEND_API int _zend_list_addref(int id TSRMLS_DC) +ZEND_API int _zend_list_addref(ulong id TSRMLS_DC) { *** zend_rsrc_list_entry *le; (highlighted with three asterisks for clarity). While it's nice that I found them. I'm not sure what to do to make them correct. Any thoughts? Should I simply send-pr - php5-apache-module build failure (lang/php5/files/patch-Zend_zend_list.c)? I doubt that patch is the issue. The error comes from a malformed call to /bin/test (or /bin/[ ). The -le test tests two numbers to see if the first is less than the second. With correct usage: /bin/[ 5 -le 10 ] echo first is less first is less With incorrect usage /bin/[ 5 -le ] echo first is less [: -le: argument expected The patch you have shown changes the id of a zend_rsrc_list_entry to be an unsigned long rather than an int, the fact that the variable name (which does not get updated, modified or altered) is called 'le' for 'list element' is neither here nor there. Quite so. I eventually figured that out. But by then had been up for far too long, and decided to get some sleep, and reply in the morning. Good morning. :) I would thoroughly recommend using apache 2.2 with the prefork MPM if you wish to run PHP. Your arguments for choosing 2.0 over 2.2 are spurious, as there are virtually no difference in conf directives, server layout or security, where as apache 2.2 is well maintained and secure. Apache 2.2 has many notable improvements, especially in performance and proxying. See [1]. The real hint is on apache.org [2] - 'We consider Apache 2.2 to be the best available version at the time of this release. We offer Apache 2.0.63 as the best legacy version of Apache 2.0 available. Users should first consider upgrading to the current release of Apache 2.2 instead.' I would have to assert that in my case, your assertions are also a bit moot. Would make deinstall apache2.0 make install apache2.2 make install php5 -DWITH_CGI=TRUE -DWITH_CLI=true -DWITH_APACHE=true accomplish a successful build? In fact, no. As the real problem at hand, is getting php5 to build the apache module (libphp5.so). :) On the other hand. Assuming a successfully built apache module; How large is the difference between the same modules in 1.2 vs 2.0 vs 2.2? How large is the difference in apache' reaction to calls made to apache, where these modules are involved? Does Apache 2.2 offer the -DWITH_MPM=threadpool? I couldn't find it. Thank you for your informative, and thoughtful reply. --Chris H On the other hand, your server, your rules. :) Tom [1] http://httpd.apache.org/docs/2.2/new_features_2_2.html [2] http://www.apache.org/dist/httpd/Announcement2.0.html -- panic: kernel trap (ignored) ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: [: -le: argument expected
On Fri, 2008-02-01 at 07:42 -0800, Chris H. wrote: Hello Tom, and thank you for your thoughtful reply. I would have to assert that in my case, your assertions are also a bit moot. Would make deinstall apache2.0 make install apache2.2 make install php5 -DWITH_CGI=TRUE -DWITH_CLI=true -DWITH_APACHE=true accomplish a successful build? In fact, no. As the real problem at hand, is getting php5 to build the apache module (libphp5.so). :) On the other hand. Assuming a successfully built apache module; How large is the difference between the same modules in 1.2 vs 2.0 vs 2.2? How large is the difference in apache' reaction to calls made to apache, where these modules are involved? Does Apache 2.2 offer the -DWITH_MPM=threadpool? I couldn't find it. Thank you for your informative, and thoughtful reply. --Chris H HTH. I'm afraid I can't help too much with PHP, as I don't myself use PHP anywhere. I know other guys in the office do have PHP 5 working nicely with apache22 from ports though - I'd assume that the problem is with a system library, I may have missed the email with the actual error logs in it. When using PHP, it is important to use the prefork MPM. The other MPMs are all threaded, and not very many PHP extensions are thread safe. I'm not sure what the 'threadpool' MPM is - in 2.2 there is prefork, worker (which implements itself through a multi-process multi-thread model), and event, which is a specialized version of worker that uses a single dedicated thread to handle listening sockets and keep-alive sockets. We use the event MPM on our front end proxies (also marked as 'experimental', but this is (according to the dev I asked) as it doesn't support accept filters (and hence cannot handle SSL). Our proxies handle a large amount of web traffic, serving static files locally and reverse proxying dynamic requests to the appropriate backend webservers, running anything from custom 1.3 apache modules, PHP 5 served from prefork MPM apache 2.2 servers, and, in one unfortunate incidence, hand-rolled web servers. The event model works incredibly well at this task, with load averages never peeking above 0.05. I just checked the 2.0 modules page [1], and there is a 'threadpool' MPM there, listed as 'This MPM is a developer playground and highly experimental'! I think that even if you do get PHP5 to build with that, you will be disappointed as soon as you get some significant load, and will have a hell of a time debugging it. prefork MPM isn't sexy, but it does work with PHP. From [2]: We do not recommend using a threaded MPM in production with Apache2. Use the prefork MPM instead, or use Apache1. For information on why, read the related FAQ entry on using Apache2 with a threaded MPM If you have some error messages (or pointers to the emails I missed!) I'll take a looksie at them. Cheers Tom [1] http://httpd.apache.org/docs/2.0/mod/ [2] http://uk.php.net/manual/en/install.unix.apache2.php signature.asc Description: This is a digitally signed message part
Re: [: -le: argument expected
Hello Tom, and thank you for your reply. Quoting Tom Evans [EMAIL PROTECTED]: On Fri, 2008-02-01 at 07:42 -0800, Chris H. wrote: Hello Tom, and thank you for your thoughtful reply. I would have to assert that in my case, your assertions are also a bit moot. Would make deinstall apache2.0 make install apache2.2 make install php5 -DWITH_CGI=TRUE -DWITH_CLI=true -DWITH_APACHE=true accomplish a successful build? In fact, no. As the real problem at hand, is getting php5 to build the apache module (libphp5.so). :) On the other hand. Assuming a successfully built apache module; How large is the difference between the same modules in 1.2 vs 2.0 vs 2.2? How large is the difference in apache' reaction to calls made to apache, where these modules are involved? Does Apache 2.2 offer the -DWITH_MPM=threadpool? I couldn't find it. Thank you for your informative, and thoughtful reply. --Chris H HTH. I'm afraid I can't help too much with PHP, as I don't myself use PHP anywhere. I know other guys in the office do have PHP 5 working nicely with apache22 from ports though - I'd assume that the problem is with a system library, I may have missed the email with the actual error logs in it. When using PHP, it is important to use the prefork MPM. The other MPMs are all threaded, and not very many PHP extensions are thread safe. I'm not sure what the 'threadpool' MPM is - in 2.2 there is prefork, worker (which implements itself through a multi-process multi-thread model), and event, which is a specialized version of worker that uses a single dedicated thread to handle listening sockets and keep-alive sockets. We use the event MPM on our front end proxies (also marked as 'experimental', but this is (according to the dev I asked) as it doesn't support accept filters (and hence cannot handle SSL). Our proxies handle a large amount of web traffic, serving static files locally and reverse proxying dynamic requests to the appropriate backend webservers, running anything from custom 1.3 apache modules, PHP 5 served from prefork MPM apache 2.2 servers, and, in one unfortunate incidence, hand-rolled web servers. The event model works incredibly well at this task, with load averages never peeking above 0.05. I just checked the 2.0 modules page [1], and there is a 'threadpool' MPM there, listed as 'This MPM is a developer playground and highly experimental'! I think that even if you do get PHP5 to build with that, you will be disappointed as soon as you get some significant load, and will have a hell of a time debugging it. prefork MPM isn't sexy, but it does work with PHP. From [2]: We do not recommend using a threaded MPM in production with Apache2. Use the prefork MPM instead, or use Apache1. For information on why, read the related FAQ entry on using Apache2 with a threaded MPM I greatly appreciate your /very/ informative reply. All points well taken. If you have some error messages (or pointers to the emails I missed!) I'll take a looksie at them. Well, I decided that perhaps something might have been added that to ports since my last cvsup. Hoping that any addition might cure my current delemna. I wanted to sync up my ports database before hand. So ran a portsdb -uU. This - interestingly enough, resulted in both [: -le: argument expected, and [: -eq: argument expected being emitted /many/ times during the portsdb process. So, now I'm stumped. It is clear that it is /not/ specific to the php5-apache-module. But rather, something that is common to that, and other ports. It's clear that /bin/[ is the command complaining. But my guess is that something else is triggering it - perl perhaps? Don't know, and ATM don't know how to find out, or what to try next. :( Thank you again for taking the time to provide such an informative response. FWIW make extract emits the following: [: -le: argument expected [: -le: argument expected === Cleaning for php5-5.2.5_1 [: -le: argument expected make emits the above, as well as the following: configure.in:152: warning: AC_PROG_LEX invoked multiple times ../../lib/autoconf/programs.m4:779: AC_DECL_YYTEXT is expanded from... aclocal.m4:2080: PHP_PROG_LEX is expanded from... configure.in:152: the top level Thank you for using PHP. config.status: creating php5.spec config.status: creating main/build-defs.h config.status: creating scripts/phpize config.status: creating scripts/man1/phpize.1 config.status: creating scripts/php-config config.status: creating scripts/man1/php-config.1 config.status: creating sapi/cli/php.1 config.status: creating main/php_config.h config.status: executing default commands === Building for php5-5.2.5_1 Makefile, line 592: warning: duplicate script for target main/internal_functions.lo ignored -I/usr/ports/lang/php5/work/php-5.2.5/Zend-O2 -fno-strict-aliasing -pipe -prefer-non-pic -c /usr/ports/lang/php5/work/php-5.2.5/sapi/apache/sapi_apache.c -o sapi/apache/sapi_apache.lo
Re: [: -le: argument expected
On Fri, Feb 01, 2008 at 10:18:14AM -0800, Chris H. wrote: I wanted to sync up my ports database before hand. So ran a portsdb -uU. This - interestingly enough, resulted in both [: -le: argument expected, and [: -eq: argument expected being emitted /many/ times during the portsdb process. So, now I'm stumped. It is clear that it is /not/ specific to the php5-apache-module. But rather, something that is common to that, and other ports. It's clear that /bin/[ is the command complaining. But my guess is that something else is triggering it - perl perhaps? Don't know, and ATM don't know how to find out, or what to try next. :( Some educational history and points: /bin/[ is the same thing as /bin/test (one might be a hardlink, I can't remember). If you've ever seen an sh script, you'll see a lot of this: if [ x$o = xhello ]; then ... fi Which is identical to: if test x$o = xhello; then ... fi There's some important things to note about this, though. Many shells (such as bash) include their own internal version of test, which is wise because it saves on having to fork a /bin/[ or /bin/test process every time something wanted to run a comparison operation. test(1) describes the applicable comparison operators (=, !=, -gt, -le, etc.). [: -le: argument expected This means something somewhere is doing: if [ val1 -le $val2 ]; then ... fi I'm willing to bet val2 is a variable which isn't being set prior to the test conditional being run, which would mean the test conditional would be expanded by the shell into this: if [ val1 -le ]; then ... fi Which is going to emit the error in question. To confirm that the problem is coming from a /bin/sh script (or something that actually uses /bin/[ or /bin/test, versus, say, a bash shell script which uses bash's internal [/test), we can do this: icarus$ /bin/sh # if [ 123 -le ]; then echo hi; fi [: -le: argument expected # if test 123 -le; then echo hi; fi test: -le: argument expected Note the difference if [ or test is used within bash: bash# if [ 123 -le ]; then echo hi; fi -bash: [: 123: unary operator expected bash# if test 123 -le; then echo hi; fi -bash: test: 123: unary operator expected What all this means: the error is being induced by a /bin/sh script of somekind. That said, the added fact that make extract causes this for you means that the error is coming from something within the ports framework, which means something in ports/Mk. This sort-of thing has happened in the past, and has occasionally turned out to be caused someone having some very bad typos in /etc/make.conf which broke all sorts of things. make emits the above, as well as the following: configure.in:152: warning: AC_PROG_LEX invoked multiple times ../../lib/autoconf/programs.m4:779: AC_DECL_YYTEXT is expanded from... aclocal.m4:2080: PHP_PROG_LEX is expanded from... configure.in:152: the top level Second time someone's told you -- this is normal based on the current autoconf framework in ports. I've complained about this to ale@ in the past, but was told if it bothers you that much, fix it; it's harmless otherwise. And being as I have dealt with similar autoconf warnings in ports that *I* maintain, I can tell you that getting them to not emit such warnings is a real pain in the ass. config.status: executing default commands === Building for php5-5.2.5_1 Makefile, line 592: warning: duplicate script for target main/internal_functions.lo ignored Also normal. -I/usr/ports/lang/php5/work/php-5.2.5/Zend-O2 -fno-strict-aliasing -pipe -prefer-non-pic -c /usr/ports/lang/php5/work/php-5.2.5/sapi/apache/sapi_apache.c -o sapi/apache/sapi_apache.lo /usr/ports/lang/php5/work/php-5.2.5/sapi/apache/sapi_apache.c: In function 'apache_php_module_main': /usr/ports/lang/php5/work/php-5.2.5/sapi/apache/sapi_apache.c:44: error: 'NOT_FOUND' undeclared (first use in this function) /usr/ports/lang/php5/work/php-5.2.5/sapi/apache/sapi_apache.c:44: error: (Each undeclared identifier is reported only once /usr/ports/lang/php5/work/php-5.2.5/sapi/apache/sapi_apache.c:44: error: for each function it appears in.) *** Error code 1 Hmm, this looks like there could be two versions of Apache APR on your machine (one from the www/apache20 port, and possibly some other port installing something similar to devel/apr on the same box). This could also be induced by something broken in /etc/make.conf, but it's hard to tell. It's getting to the point where for someone to help you with this, they're going to need access to the machine. I can't reproduce this behaviour on any of my personal FreeBSD boxes, nor any of our production machines (running RELENG_6 and RELENG_7), and I haven't seen anyone else on this list able to reproduce the symptom either. -- | Jeremy Chadwickjdc at parodius.com | | Parodius Networking
Re: [: -le: argument expected
After several failed attempts to get a /stable/ installation of Apache13-ssl and friends built and installed from source (see thread: /usr/bin/objformat, for more background). I chose to look at the possibility of using Apache 2.0. Out of interest, why did you choose 2.0 and not 2.2 ? When I migrated away from 1.3 I originally tried 2.0 and had quite a bad time of it as I recall. So I left it a while and ended up going directly to 2.2, which has behaved beautifully. I can't solve your problem, but I can say that personal experience was 2.2 being easier to move to. -pete. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: [: -le: argument expected
Quoting Pete French [EMAIL PROTECTED]: After several failed attempts to get a /stable/ installation of Apache13-ssl and friends built and installed from source (see thread: /usr/bin/objformat, for more background). I chose to look at the possibility of using Apache 2.0. Out of interest, why did you choose 2.0 and not 2.2 ? When I migrated away from 1.3 I originally tried 2.0 and had quite a bad time of it as I recall. So I left it a while and ended up going directly to 2.2, which has behaved beautifully. I can't solve your problem, but I can say that personal experience was 2.2 being easier to move to. Hello, and thank you for your reply. That's a fair (and expected) question. I have to tell you, my experiences with 13-ssl have been /very/ good. That is until I upgraded to 7-PRERELEASE. I spent quite some time (1 wk.) attempting to make it continue to work. In the final analysis, I /did/ discover that even after resolving the original problem exporting the symbols from the mod_*'s correctly, there is still an apparent signalling/timing issue. I blame that on the fact that I'm using ULE scheduling on 7, and am using BSD scheduling on all our 6.x servers. Even baring that, after starting a working version of apache13-ssl on a 7-PRE i386 box and closely monitoring it reveals that it leaks memory like sieve. So, rather than spending even more time (which I don't have) attempting to plug the hole(s), and accounting for/correcting the timing issue. I opted to take Jeremy Chadwick's gentle nudge to move to a newer version of Apache - I went kicking and screaming the whole way. :) But I spent an entire day reading the Apache 2.0, and 2.2 documentation (I'm also already subscribed to the Apache dev list). My conclusion was that the ultimate migration to 2, would be a lot smoother, and easier if moving to 2.0 - the layout of both the server, and conf files are /very/ similar (to 1.3). Further; the point changes occur at a much lower rate than that of 2.2 - overhead that my current workload cannot tolerate. In 2.0's defence; I found absolutely no issues what-so-ever with the building, installing, or running of it. It also required /far/ less resources than that of 1.3. Yet offered more threads/servers. So, it is difficult for me to find an argument to move from 2.0. The current trouble I'm encountering is clearly a PHP5 issue. As it isn't even touching the Apache 2 install during the build process. I hope I've adequately answered your question, and hope I wasn't /too/ verbose. :) Thanks again. --Chris H. -pete. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to [EMAIL PROTECTED] -- panic: kernel trap (ignored) ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: [: -le: argument expected (php5 unbuildable)
Quoting Chris H. [EMAIL PROTECTED]: Hello all, System: FreeBSD 7.0-PRERELEASE i386 Wed Jan 16 18:39:53 PST 2008 Context: After several failed attempts to get a /stable/ installation of Apache13-ssl and friends built and installed from source (see thread: /usr/bin/objformat, for more background). I chose to look at the possibility of using Apache 2.0. I was reluctant, as doing so would require migrating ~50 carefully crafted conf files which have evolved over many yrs. to be now seemingly impervious to abuse, or attack. I hadn't intended this server to become a guinea pig, but my ill fated attempts to install a stable copy of www/apache13-ssl from source necessitated increasing the resources on the other servers. So as to experiment on this one. To the point! Building Apache 2.0 on this box requied cvsupping src/ports (2008-01-30). As the version of Apache 2.0 was 2.0.61 (has 2 security related issues). Current version: 2.0.63. Building/installing this version went w/o trouble. Ran as expected. I only made 1 mod from the default config/build: WITH_MPM?= threadpool. The original was: WITH_MPM?= prefork. My diong so also required: KQUEUE. Other than that, all was as-was. Error(s): After determining that everything was acceptablr/as intended with Apache. I moved on to building/installing php5 as cgi,cli, and module. The first thing emitted when typing make is: [: -le: argument expected [: -le: argument expected This gets emitted once more early in the configure process. Followed by: configure.in:152: warning: AC_PROG_LEX invoked multiple times ../../lib/autoconf/programs.m4:779: AC_DECL_YYTEXT is expanded from... aclocal.m4:2080: PHP_PROG_LEX is expanded from... configure.in:152: the top level The build finally /dies/ with the following otput (with context): ... Thank you for using PHP. config.status: creating php5.spec config.status: creating main/build-defs.h config.status: creating scripts/phpize config.status: creating scripts/man1/phpize.1 config.status: creating scripts/php-config config.status: creating scripts/man1/php-config.1 config.status: creating sapi/cli/php.1 config.status: creating main/php_config.h config.status: executing default commands === Building for php5-5.2.5_1 Makefile, line 592: warning: duplicate script for target main/internal_functions.lo ignored ... -I/usr/ports/lang/php5/work/php-5.2.5/Zend-O2 -fno-strict-aliasing -pipe -prefer-non-pic -c /usr/ports/lang/php5/work/php-5.2.5/sapi/apache/sapi_apache.c -o sapi/apache/sapi_apache.lo /usr/ports/lang/php5/work/php-5.2.5/sapi/apache/sapi_apache.c: In function 'apache_php_module_main': /usr/ports/lang/php5/work/php-5.2.5/sapi/apache/sapi_apache.c:44: error: 'NOT_FOUND' undeclared (first use in this function) /usr/ports/lang/php5/work/php-5.2.5/sapi/apache/sapi_apache.c:44: error: (Each undeclared identifier is reported only once /usr/ports/lang/php5/work/php-5.2.5/sapi/apache/sapi_apache.c:44: error: for each function it appears in.) *** Error code 1 Stop in /usr/ports/lang/php5/work/php-5.2.5. *** Error code 1 Stop in /usr/ports/lang/php5. *** Error code 1 From sapi_apache.c: if (display_source_mode) { zend_syntax_highlighter_ini syntax_highlighter_ini; php_get_highlight_struct(syntax_highlighter_ini); if (highlight_file(SG(request_info).path_translated, syntax_highlighter_ini TSRMLS_CC) != SUCCESS) { *** OFFENDING LINE (44) retval = NOT_FOUND; } } else { Any chance somebody knows what is required to resolve this - pretty please? Thank you for all your time and consideration. --Chris H Just making the title more meaningful. The original wasn't very representitive of the problem. Sorry. --Chris -- panic: kernel trap (ignored) ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-apache To unsubscribe, send any mail to [EMAIL PROTECTED] -- panic: kernel trap (ignored) ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: [: -le: argument expected
also already subscribed to the Apache dev list). My conclusion was that the ultimate migration to 2, would be a lot smoother, and easier if moving to 2.0 - the layout of both the server, and conf files are /very/ similar (to 1.3). O.K., that makes a lot of sense - I can't remember how I did this, but I think I ended abandonning migrating the config files and simply re-wrote them to have the same functionality when I got a few spare dayes ;) me to find an argument to move from 2.0. The current trouble I'm encountering is clearly a PHP5 issue. As it isn't even touching the Apache 2 install during the build process. I hope I've adequately answered your question, and hope I wasn't /too/ verbose. :) NO, answered perfectly - am tyring to remmebr whether the reaosn I didnt like 2.0 was to do with php too though. It seems to cause some kind of woes every time I upgrade. You said you had to sup the ports tree BTW - does that mean you rebuilt every other port on the system ? -pete. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: [: -le: argument expected
Hello Peter, and thank you for your thoughtful reply. Quoting Pete French [EMAIL PROTECTED]: also already subscribed to the Apache dev list). My conclusion was that the ultimate migration to 2, would be a lot smoother, and easier if moving to 2.0 - the layout of both the server, and conf files are /very/ similar (to 1.3). O.K., that makes a lot of sense - I can't remember how I did this, but I think I ended abandonning migrating the config files and simply re-wrote them to have the same functionality when I got a few spare dayes ;) Well, to be Frank with you ( even though my name is Chris ;) ), having to migrate ~50 conf files/layouts on top of mastering the /new/ Apache way of doing things, on top of aquainting myself with the way the modules /now/ do things, just isn't going to fit in my schedule. Oh sure I hear you (or others) say; you're going to have to do all of that anyway. So why not just start now, and get it over with. While to a degree that may be so. But as I have it now, my servers are frequently hammered at ~50-75 attacks/second, all without fail. They are (thus far) also impervious to attempts to acquisition/manipulation of server data (most notably PHP). This has been no small feat, and has all been from the acumulation, and examination of the data that was waged against our servers over the years. Not to mention, becoming intimately familiar with all the modules we use (weaknesses/strengths etc...). So, in an effort to continue to thwart such attacks. I'm going to /attempt/ to use 2.0.x. Which really only requires me to re-aquaint myself with the modules. /Then/ should the need/time/desire to move to 2.2.x occur. It won't be such an unreasonable task. :) me to find an argument to move from 2.0. The current trouble I'm encountering is clearly a PHP5 issue. As it isn't even touching the Apache 2 install during the build process. I hope I've adequately answered your question, and hope I wasn't /too/ verbose. :) NO, answered perfectly - am tyring to remmebr whether the reaosn I didnt like 2.0 was to do with php too though. It seems to cause some kind of woes every time I upgrade. I don't think it's (at this point in my install) reasonable to assume Apache 2.0 has anything to do with it. As the PHP5 build doesn't even care (or ask about) which Apache version I'm using, except to differentiate between it being 1.3 || 2.x. You said you had to sup the ports tree BTW - does that mean you rebuilt every other port on the system ? No. Not yet. I examined the changes that were applied, and the only areas that affect what I struggling with now, are being built /after/ the cvsup (weren't built before). Thanks again for taking the time to respond. --Chris H -pete. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to [EMAIL PROTECTED] -- panic: kernel trap (ignored) ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: [: -le: argument expected
Well, to be Frank with you ( even though my name is Chris ;) ), having to migrate ~50 conf files/layouts on top of mastering the /new/ Apache way of doing things, on top of aquainting myself with the way the modules /now/ do things, just isn't going to fit in my schedule. Oh sure I hear you (or others) say; you're going to have to do all of that anyway. Actually I understand that perfcetly - indeed I spent today finally mihgrating something originally installed on FreeBSD 3 many years ago (possibly 1999) and getting it working with ports as I had been avoiding re-doing it for all these years. Several hour and a lot of pain. If I wasn't off work sick it wouldn't have got done at all. I don't think it's (at this point in my install) reasonable to assume Apache 2.0 has anything to do with it. As the PHP5 build doesn't even care (or ask about) which Apache version I'm using, except to differentiate between it being 1.3 || 2.x. O.K., so this is a simple case of cd /usr/ports/lang/php5 make fetch-recursive make config-recursive make clean make yup ? now, I did that with a csup of php5 a few days ago and it was O.K. for me. I am reconning that this has something to do with some other ports that php5 is dependent on which havent been upgraded to the version in the tree. How about try configuring it *not* to build the apache dependent bits and see if it compiles then? The php5 port only depends on Apache if you tell it to build the Apache module. Or try installing it with pkg_add -r ? -pete. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: [: -le: argument expected
Hello, and thank you for your reply. Quoting Lawrence Stewart [EMAIL PROTECTED]: Hi Chris, Firstly, a disclaimer: I'm not an expert so I might be behind the times on what I'm about to tell you... Note taken. :) Chris H. wrote: Hello all, System: FreeBSD 7.0-PRERELEASE i386 Wed Jan 16 18:39:53 PST 2008 Context: After several failed attempts to get a /stable/ installation of Apache13-ssl and friends built and installed from source (see thread: /usr/bin/objformat, for more background). I chose to look at the possibility of using Apache 2.0. I was reluctant, as doing so would require migrating ~50 carefully crafted conf files which have evolved over many yrs. to be now seemingly impervious to abuse, or attack. I hadn't intended this server to become a guinea pig, but my ill fated attempts to install a stable copy of www/apache13-ssl from source necessitated increasing the resources on the other servers. So as to experiment on this one. To the point! Building Apache 2.0 on this box requied cvsupping src/ports (2008-01-30). As the version of Apache 2.0 was 2.0.61 (has 2 security related issues). Current version: 2.0.63. Building/installing this version went w/o trouble. Ran as expected. I only made 1 mod from the default config/build: WITH_MPM?= threadpool. The original was: WITH_MPM?= prefork. My diong so also required: KQUEUE. Other than that, all was as-was. [snip] Regardless of the errors you reported, I believe changing the MPM is a problem. Last time I tried Apache with the threaded worker MPM it worked flawlessly. However PHP has issues because it isn't thread safe. The only safe way to run the 2 together was to set the Apache MPM back to the default (prefork). While I appreciate your insight regarding php5 not being thread safe. I would argue that I am not seeing php5 using anthing regarding my Apache 2.0 build, except to ask whether it is 1.3 || 2. So, while you may be /absolutely/ correct about php5 not running well/at all with a threaded Apache. I'm still stumped as to why php5 refuses to build, and emits what appears to be errors in the php5 configure/make files. Point being; if I can get php5 to build/install. I might be able to make it play nice with a threaded Apache; and that would make /everyone/ happy. :) Taking my disclaimer into account, I possibly just didn't figure out how to make the 2 play nice, so I'd welcome info/pointers from others who have managed to get threaded apache and PHP working together. Assuming no one pipes up and explains how to work around the PHP threading issues, I'd recommend rebuilding apache with the default MPM (shouldn't require any make variables defined). Verify it works ok once installed and then try get PHP working again. I may try that. But I'm at a loss as to what that has to do with getting php5 to build. As (mentioned earlier) I am unable to find where php5 does anything more that to ask if I'm using Apache 1.3 || 2. I would also echo the recommendation of others to jump straight to Apache 2.2(.8) if you're going to make a disruptive switch now anyways. I have a personal step-by-step build guide for getting Apache 2.2 and PHP5 working together if you're interested. Not going to happen - in the near future anyway. It's not unlike asking an Athiest to become a Jew. While it may be possible for one to make the change. It's a quantum leap. I've recently elaborated on this already. So I'll not repeat myself here. :) As to your reported errors, I can't really shed any light on them, sorry. Thank you very much for your thoughtful reply, and your generous offer Lawerence. :) --Chris Cheers, Lawrence -- panic: kernel trap (ignored) ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: [: -le: argument expected
Hi Chris, Firstly, a disclaimer: I'm not an expert so I might be behind the times on what I'm about to tell you... Chris H. wrote: Hello all, System: FreeBSD 7.0-PRERELEASE i386 Wed Jan 16 18:39:53 PST 2008 Context: After several failed attempts to get a /stable/ installation of Apache13-ssl and friends built and installed from source (see thread: /usr/bin/objformat, for more background). I chose to look at the possibility of using Apache 2.0. I was reluctant, as doing so would require migrating ~50 carefully crafted conf files which have evolved over many yrs. to be now seemingly impervious to abuse, or attack. I hadn't intended this server to become a guinea pig, but my ill fated attempts to install a stable copy of www/apache13-ssl from source necessitated increasing the resources on the other servers. So as to experiment on this one. To the point! Building Apache 2.0 on this box requied cvsupping src/ports (2008-01-30). As the version of Apache 2.0 was 2.0.61 (has 2 security related issues). Current version: 2.0.63. Building/installing this version went w/o trouble. Ran as expected. I only made 1 mod from the default config/build: WITH_MPM?= threadpool. The original was: WITH_MPM?= prefork. My diong so also required: KQUEUE. Other than that, all was as-was. [snip] Regardless of the errors you reported, I believe changing the MPM is a problem. Last time I tried Apache with the threaded worker MPM it worked flawlessly. However PHP has issues because it isn't thread safe. The only safe way to run the 2 together was to set the Apache MPM back to the default (prefork). Taking my disclaimer into account, I possibly just didn't figure out how to make the 2 play nice, so I'd welcome info/pointers from others who have managed to get threaded apache and PHP working together. Assuming no one pipes up and explains how to work around the PHP threading issues, I'd recommend rebuilding apache with the default MPM (shouldn't require any make variables defined). Verify it works ok once installed and then try get PHP working again. I would also echo the recommendation of others to jump straight to Apache 2.2(.8) if you're going to make a disruptive switch now anyways. I have a personal step-by-step build guide for getting Apache 2.2 and PHP5 working together if you're interested. As to your reported errors, I can't really shed any light on them, sorry. Cheers, Lawrence ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: [: -le: argument expected
Hello Pete, and thank you for your continued input. I really appreciate it. Quoting Pete French [EMAIL PROTECTED]: Well, to be Frank with you ( even though my name is Chris ;) ), having to migrate ~50 conf files/layouts on top of mastering the /new/ Apache way of doing things, on top of aquainting myself with the way the modules /now/ do things, just isn't going to fit in my schedule. Oh sure I hear you (or others) say; you're going to have to do all of that anyway. Actually I understand that perfcetly - indeed I spent today finally mihgrating something originally installed on FreeBSD 3 many years ago (possibly 1999) and getting it working with ports as I had been avoiding re-doing it for all these years. Several hour and a lot of pain. If I wasn't off work sick it wouldn't have got done at all. I don't think it's (at this point in my install) reasonable to assume Apache 2.0 has anything to do with it. As the PHP5 build doesn't even care (or ask about) which Apache version I'm using, except to differentiate between it being 1.3 || 2.x. O.K., so this is a simple case of cd /usr/ports/lang/php5 make fetch-recursive make config-recursive make clean make yup ? now, I did that with a csup of php5 a few days ago and it was O.K. for me. A few days ago it worked great for me too. :) But seems that my cvsup of 2008-01-31 has added some changes to my php5 source. Namely: lang/php5/files/patch-Zend_zend_list.c, and lang/php5/files/patch-Zend_zend_list.h. I thought about getting the diffs from freebsd.org and diffing back. But felt I should hold back, in hopes of a better solution. I am reconning that this has something to do with some other ports that php5 is dependent on which havent been upgraded to the version in the tree. Hey, that's not asking much (not sarcastic). I'm not getting anywhere in/ at my current state. :) How about try configuring it *not* to build the apache dependent bits and see if it compiles then? The php5 port only depends on Apache if you tell it to build the Apache module. I'm /quite/ sure that that will work flawlessly. I'll do that first, and report my experience. Or try installing it with pkg_add -r ? I won't realize the recent changes that cvsup has added to the port source. Thanks again for all your input! I'll be back... --Chris -pete. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to [EMAIL PROTECTED] -- panic: kernel trap (ignored) ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: [: -le: argument expected
I may try that. But I'm at a loss as to what that has to do with getting php5 to build. As (mentioned earlier) I am unable to find where php5 does anything more that to ask if I'm using Apache 1.3 || 2. This puzzles me - my php5 from ports doesnt ask this at all. You just build it and it finds your Apache install (if you dont have apache installed then it tries to install 1.3). As to what it needs from Apache - well preseumbaly it uses axps and associated bits in order to build the module. -pete. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: [: -le: argument expected
Quoting Pete French [EMAIL PROTECTED]: I may try that. But I'm at a loss as to what that has to do with getting php5 to build. As (mentioned earlier) I am unable to find where php5 does anything more that to ask if I'm using Apache 1.3 || 2. This puzzles me - my php5 from ports doesnt ask this at all. You just build it and it finds your Apache install (if you dont have apache installed then it tries to install 1.3). As to what it needs from Apache - well preseumbaly it uses axps and associated bits in order to build the module. Yes, it's an if, then block, and that's the size of it. Nothing more. OK. Off to the /meat/ of things... I did a build by declaring a WITHOUT_APACHE=true in my /etc/make.conf and the /var/db/ports/php5/options. Leaving the following in both: WITH_SUHOSIN=true WITHOUT_MULTIBYTE=true WITHOUT_MAILHEAD=true WITH_CLI=true WITH_CGI=true WITHOUT_REDIRECT=true WITHOUT_DISCARD=true WITH_FASTCGI=true WITH_PATHINFO=true As suspected, it built without /any/ errors - OK just the following: configure.in:152: warning: AC_PROG_LEX invoked multiple times ../../lib/autoconf/programs.m4:779: AC_DECL_YYTEXT is expanded from... aclocal.m4:2080: PHP_PROG_LEX is expanded from... configure.in:152: the top level But it's been doing that for quite awhile, and doesn't get in the way of a successful build or install. On another note of interest; I found the problem that causes the error message as used in the title of this thread: [: -le: argument expected The cause is in the file: lang/php5/files/patch-Zend_zend_list.c It accounts for all /3/ errors emitted during the initial portion of the make process. The lines are as follows: --- Zend/zend_list.c.orig 2007-01-01 10:35:46.0 +0100 +++ Zend/zend_list.c2008-01-29 11:05:14.0 +0100 @@ -48,7 +48,7 @@ return index; } -ZEND_API int _zend_list_delete(int id TSRMLS_DC) +ZEND_API int _zend_list_delete(ulong id TSRMLS_DC) { *** zend_rsrc_list_entry *le; @@ -65,7 +65,7 @@ } -ZEND_API void *_zend_list_find(int id, int *type TSRMLS_DC) +ZEND_API void *_zend_list_find(ulong id, int *type TSRMLS_DC) { *** zend_rsrc_list_entry *le; @@ -78,7 +78,7 @@ } } -ZEND_API int _zend_list_addref(int id TSRMLS_DC) +ZEND_API int _zend_list_addref(ulong id TSRMLS_DC) { *** zend_rsrc_list_entry *le; (highlighted with three asterisks for clarity). While it's nice that I found them. I'm not sure what to do to make them correct. Any thoughts? Should I simply send-pr - php5-apache-module build failure (lang/php5/files/patch-Zend_zend_list.c)? Anyway, at least some headway has been made. :) Thanks again, for all your input. --Chris H -pete. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to [EMAIL PROTECTED] -- panic: kernel trap (ignored) ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: [: -le: argument expected
[I've kept your ccs, but I'm only subscribed to -stable] On Thu, 31 Jan 2008, Chris H. wrote: Hello Pete, and thank you for your continued input. I really appreciate it. Quoting Pete French [EMAIL PROTECTED]: [.. huge snip.. ] How about try configuring it *not* to build the apache dependent bits and see if it compiles then? The php5 port only depends on Apache if you tell it to build the Apache module. I'm /quite/ sure that that will work flawlessly. I'll do that first, and report my experience. Or try installing it with pkg_add -r ? I won't realize the recent changes that cvsup has added to the port source. It wouldn't work anyway. Unless things have changed very recently - and I'd be pleasantly surprised to be told that they had - for some utterly bizarre reason, the php5 package does not include the apache module. Well, the reason is that packages are built with default port options, and the apache module is not a default port option. Fair enough, but for those people who'd hope to be able to install apache[anything] + php5 from packages, a php5-with-modphp5 package would be really handy. cheers, Ian ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: [: -le: argument expected
Hi Chris, Chris H. wrote: Hello, and thank you for your reply. Quoting Lawrence Stewart [EMAIL PROTECTED]: Hi Chris, Firstly, a disclaimer: I'm not an expert so I might be behind the times on what I'm about to tell you... Note taken. :) Chris H. wrote: Hello all, System: FreeBSD 7.0-PRERELEASE i386 Wed Jan 16 18:39:53 PST 2008 Context: After several failed attempts to get a /stable/ installation of Apache13-ssl and friends built and installed from source (see thread: /usr/bin/objformat, for more background). I chose to look at the possibility of using Apache 2.0. I was reluctant, as doing so would require migrating ~50 carefully crafted conf files which have evolved over many yrs. to be now seemingly impervious to abuse, or attack. I hadn't intended this server to become a guinea pig, but my ill fated attempts to install a stable copy of www/apache13-ssl from source necessitated increasing the resources on the other servers. So as to experiment on this one. To the point! Building Apache 2.0 on this box requied cvsupping src/ports (2008-01-30). As the version of Apache 2.0 was 2.0.61 (has 2 security related issues). Current version: 2.0.63. Building/installing this version went w/o trouble. Ran as expected. I only made 1 mod from the default config/build: WITH_MPM?= threadpool. The original was: WITH_MPM?= prefork. My diong so also required: KQUEUE. Other than that, all was as-was. [snip] Regardless of the errors you reported, I believe changing the MPM is a problem. Last time I tried Apache with the threaded worker MPM it worked flawlessly. However PHP has issues because it isn't thread safe. The only safe way to run the 2 together was to set the Apache MPM back to the default (prefork). While I appreciate your insight regarding php5 not being thread safe. I would argue that I am not seeing php5 using anthing regarding my Apache 2.0 build, except to ask whether it is 1.3 || 2. So, while you may be /absolutely/ correct about php5 not running well/at all with a threaded Apache. I'm still stumped as to why php5 refuses to build, and emits what appears to be errors in the php5 configure/make files. Point being; if I can get php5 to build/install. I might be able to make it play nice with a threaded Apache; and that would make /everyone/ happy. :) It does smell of a problem related with another port... Perhaps you just need to do some portupgrading? That said, with problems like this, I just reckon that it's best to start simple i.e. setup apache in the known good way (prefork mpm) and then get php working. Once you're convinced that all plays nice, then upgrade apache to use worker MPM and see what breaks (if anything). You're more likely to get useful help from people if you only change one variable at a time as it were. Taking my disclaimer into account, I possibly just didn't figure out how to make the 2 play nice, so I'd welcome info/pointers from others who have managed to get threaded apache and PHP working together. Assuming no one pipes up and explains how to work around the PHP threading issues, I'd recommend rebuilding apache with the default MPM (shouldn't require any make variables defined). Verify it works ok once installed and then try get PHP working again. I may try that. But I'm at a loss as to what that has to do with getting php5 to build. As (mentioned earlier) I am unable to find where php5 does anything more that to ask if I'm using Apache 1.3 || 2. As am I. But the cvsup of the ports tree has possibly required php to use a new dependency on a newer version of autoconf or some other pkg. Installing the ports-mgmt/portupgrade port and running portupgrade -Rrf php5 will take all the hard work out of ensuring all your packages required by PHP are up to date. I would also echo the recommendation of others to jump straight to Apache 2.2(.8) if you're going to make a disruptive switch now anyways. I have a personal step-by-step build guide for getting Apache 2.2 and PHP5 working together if you're interested. Not going to happen - in the near future anyway. It's not unlike asking an Athiest to become a Jew. While it may be possible for one to make the change. It's a quantum leap. I've recently elaborated on this already. So I'll not repeat myself here. :) The other messages in the thread hadn't arrived at my mail client before I said this... sorry for flogging the dead horse a little more (but I guess I suspected the effort to go from 1.3-2.0 is effectively identical to 1.3-2.2, but that is a guess). Cheers, Lawrence ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to [EMAIL PROTECTED]