Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46771 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10592 invoked from network); 18 Jan 2010 00:08:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jan 2010 00:08:45 -0000 Authentication-Results: pb1.pair.com smtp.mail=jochem@iamjochem.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=jochem@iamjochem.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain iamjochem.com from 194.109.193.121 cause and error) X-PHP-List-Original-Sender: jochem@iamjochem.com X-Host-Fingerprint: 194.109.193.121 mx1.moulin.nl Linux 2.6 Received: from [194.109.193.121] ([194.109.193.121:49419] helo=mx1.moulin.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FE/62-20170-B86A35B4 for ; Sun, 17 Jan 2010 19:08:44 -0500 Received: from localhost (localhost [127.0.0.1]) by mx1.moulin.nl (Postfix) with ESMTP id 0C0352BC6A7 for ; Mon, 18 Jan 2010 01:08:39 +0100 (CET) X-Virus-Scanned: amavisd-new at moulin.nl Received: from mx1.moulin.nl ([127.0.0.1]) by localhost (mx1.moulin.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rVdmNCLr8O-p for ; Mon, 18 Jan 2010 01:08:32 +0100 (CET) Received: from [10.0.13.104] (ip129-15-211-87.adsl2.static.versatel.nl [87.211.15.129]) by mx1.moulin.nl (Postfix) with ESMTP id A16B22BC68C for ; Mon, 18 Jan 2010 01:08:32 +0100 (CET) Message-ID: <4B53A680.9070303@iamjochem.com> Date: Mon, 18 Jan 2010 01:08:32 +0100 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; nl; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 MIME-Version: 1.0 To: internals@lists.php.net References: <134308.42725.qm@web56707.mail.re3.yahoo.com> In-Reply-To: X-Enigmail-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Can we call Apache 2 API function from a PHP 5 extension module? From: jochem@iamjochem.com (Jochem Maas) please ignore this if any of the following apply: 1. you name is 'mm w' (I don't care for your response either) - granted this is reverse psychology. 2. your very busy atm (nothing technical being added here) 3. you abhor off-topic junk otherwise the following may help to make you smile ... -------- to start with, let me say that I'm just a lowly php dev who very much appreciates being able to follow discussions on the internals list, it's helped & taught me much about the tools I use and programming in general. the fact that I'm allow to occasionally interject my own questions and comments and that, more often than not, busy talented people take the time to offer serious and well thought out replies is a privelege I value very much. secondly a 'hat's off' to all of you who are responsible for giving us php, I personally owe so much to all of you and I know many of my friends, colleagues and aquaintances feel the same way. I will not mention names because I'll miss out too many, but to all of you: Thank You! @Brian: your kids look really happy, regardless of anything else that's probably the best CV a man could have! now it's time to rip someone a new *******, please forgive me my compulsion :/ I promise not to reply to this thread if the troll decides to take another bite. Op 1/17/10 7:35 AM, mm w schreef: > yep nevermind I don't you post this question on php-internal and don't > understand this ugly suggestion, Brian when I read your cv it seems to > be something serious ... when I see the line with your type recasting > I am not sure you understood something during these 15 years. who the f*** do you think you are? your incessant trolling and abuse offers absolutely nothing constructive to the community or technology of the php ecosystem. I'm very sure you're an absolute coding wizard, but why is it, given that your so skilled in various programming langauge, that you can't find the time to learn even the most basic english language skills before offering your unwanted, useless, negative and totally incomprehensible opinions to this list. you're an idiot with an axe to grind, who openly admits that he like's to troll, a quick google gives the following example: http://php.general.free-usenet.eu/PHP-GURU-NEEDED_T31382161_S2 which is somewhat hilarious or depressing depending on your current state of mind, either way you're still an idiot. here are some simple tips in english an 8 year would understand: 1. look up the word 'Meritocracy' and learn what it means. 2. use your skills to add something to the project rather than abuse people (see point 1). 3. learn to write english that other people understand. failing your ability to do any of those, please ... go crawl back into the dark hole from whence you came ... and stay there until such time that you figure out how to play nice with the other kids. > Best PS - 'Best' is not a 'sign off' by any stretch of the imagination. as a concept it obviously doesn't apply to you and in the context you use it, it is totally meaningless. PPS - before you attempt to reply and critise me for hypocracy let me just come right out and admit it. I'm a hypocritic. there, I said, no need for you to take the time to accuse me :) PPPS - I'm sure that googling me will bring up a number of examples of my own online stupidity, as such just refer to the PPS and move on. PPPPS - your wife must have done something really bad in a previous life to deserve you. PPPPPS - if you feel the need to mention my wife, tough, there isn't one, my girlfriend left me (but at least she still invites me over for dinner) ... and as such, again, please refer to the PPS and move on. boy, was that as good for you as it was for me? > On Sat, Jan 16, 2010 at 10:05 PM, Brian J. France wrote: >> Try this instead: >> >> request_rec *r = (request_rec *)(((SG(server_context) == NULL) ? NULL : ((php_struct*)SG(server_context))->r)); >> >> Apache 2.x server_context is not a request_rec, it is a struct with a request rec in it. >> >> Brian >> >> >> On Jan 16, 2010, at 7:25 PM, rwe rt wrote: >> >>> Hi all,I compiled php-5.3.1 with apache 2.2.14 as DSO and wanted to test how to call Apache API from a PHP module:Run ./ext_skel --extname=helloModified ext/hello.c and the function PHP_FUNCTION(confirm_hello_compiled) so that it contains >>> >>> #include "SAPI.h" >>> #include "httpd.h" >>> #include "http_config.h" >>> #include "http_protocol.h" >>> #include "ap_config.h" >>> request_rec *hello_r;PHP_FUNCTION(confirm_hello_compiled) { hello_r = (request_rec *)SG(server_context); ap_rprintf(hello_r, "Hello world\n"); return SUCCESS; >>> }Under php root, run ./buildconf and ./configure --with-apxs=/home/www/bin/apxs --enable-helloIt worked fine. But when I furhter ran: >>> >>> makeI got an error like:....ext/hello/.libs/hello.o: In function zif_confirm_hello_compiled': /home/www/php-5.3.1/ext/hello/hello.c:167: undefined reference toap_rprintf'near the end of compiling.As far as I know, PHP 5 can only be compiled as DSO and don't have access to compiled objects in Apache 2 directly. How to modify config.m4 or other files so that I can make compiling successful? Any help would be greatly appreciated!Rwe >>> >>> >>> __________________________________________________________________ >>> Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail. Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca >> >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> >