Re: MacOSX Requests and Cookies

2002-02-03 Thread Rick Frankel

On Fri, Feb 01, 2002 at 10:39:02PM -0500, Joe Schaefer wrote:
...
 Great -  thanks a ton!
Not so great. I'm half asleep. You need to do patch -r or, apply the
forward patch included below...

rick

--- http_main.c~   Mon Jan 28 04:07:46 2002
+++ http_main.cFri Feb  1 19:22:51 2002
@@ -7805,5 +7805,12 @@
 {
 return ApacheRequest_new(r);
 }
+/*RAF*/
+#include apache_cookie.h
+ApacheCookie *suck_in_apcookie(request_rec *r);
+ApacheCookie *suck_in_apcookie(request_rec *r)
+{
+return ApacheCookie_new(r);
+}
 #endif /* USE_APREQ */



Re: MacOSX Requests and Cookies

2002-02-03 Thread Joe Schaefer

John Siracusa [EMAIL PROTECTED] writes:

 Well, I can confirm that it still doesn't work for me... :-/  Is everyone
 using Perl 5.6.1 here?  Because somehow some of the files I downloaded had
 the string perl500503 embedded in them.  Even after search/replacing all
 that, I ended up with an httpd that pukes with the same old symbol
 conflicts when I try to start it.

Don't try to use the modperl tree that's in the apache tarball- it was 
left in there by mistake (I didn't realize make distclean won't remove
modperl from the apache source tree).  You need the modperl source 
to compile everything from scratch, starting with modperl.  When you're 
testing Apache::Cookie and Apache::Request, be sure you're not trying to
load the old versions of these packages.

Sorry for the confusion.

-- 
Joe Schaefer



Re: MacOSX Requests and Cookies

2002-02-03 Thread John Siracusa

On 2/3/02 10:23 AM, Joe Schaefer wrote:
 John Siracusa [EMAIL PROTECTED] writes:
 Well, I can confirm that it still doesn't work for me... :-/  Is everyone
 using Perl 5.6.1 here?  Because somehow some of the files I downloaded had
 the string perl500503 embedded in them.  Even after search/replacing all
 that, I ended up with an httpd that pukes with the same old symbol
 conflicts when I try to start it.
 
 Don't try to use the modperl tree that's in the apache tarball- it was
 left in there by mistake (I didn't realize make distclean won't remove
 modperl from the apache source tree).  You need the modperl source
 to compile everything from scratch, starting with modperl.  When you're
 testing Apache::Cookie and Apache::Request, be sure you're not trying to
 load the old versions of these packages.

Okay, I tried it again, from the very beginning.  I made a shell script to
automate it.  The shell script is attached.  The result of running it
appears in full below.  The upshot is the final bit:

---

dyld: bin/httpd Undefined symbols:
_ApacheRequest___parse
_ApacheRequest_expires
_ApacheRequest_new
_ApacheRequest_script_name
_ApacheRequest_tmpfile
_ApacheUpload_find
_ap_null_cleanup
_ap_pcalloc
_ap_register_cleanup
_ap_table_add
_ap_table_get
_ap_table_set
_ap_table_unset
_hvrv2table
_mod_perl_tie_table
_perl_request_rec
_sv2request_rec

---

So...what am I doing wrong?

-John

---

# ./mpapache.sh
Sun Feb  3 14:12:45 EST 2002
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
  Platform:
osname=darwin, osvers=1.4, archname=darwin
uname='darwin localhost 1.4 darwin kernel version 1.4: sun sep 9
15:39:59 pdt 2001; root:xnuxnu-201.obj~1release_ppc power macintosh powerpc
'
config_args='-des -Dfirstmakefile=GNUmakefile -Dldflags=-flat_namespace'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
cc='cc', ccflags ='-pipe -fno-common -DHAS_TELLDIR_PROTOTYPE
-fno-strict-aliasing -I/usr/local/include',
optimize='-O3',
cppflags='-pipe -fno-common -DHAS_TELLDIR_PROTOTYPE -fno-strict-aliasing
-I/usr/local/include'
ccversion='', gccversion='Apple devkit-based CPP 6.0', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, usemymalloc=n, prototype=define
  Linker and Libraries:
ld='cc', ldflags ='-flat_namespace -L/usr/local/lib'
libpth=/usr/local/lib /usr/lib
libs=-lm -lc
perllibs=-lm -lc
libc=/System/Library/Frameworks/System.framework/System, so=dylib,
useshrplib=true, libperl=libperl.dylib
  Dynamic Linking:
dlsrc=dl_dyld.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-flat_namespace -bundle -undefined suppress
-L/usr/local/lib'


Characteristics of this binary (from libperl):
  Compile-time options: USE_LARGE_FILES
  Built under darwin
  Compiled at 01/26/02 17:02:40
  %ENV:
PERL_READLINE_NOWARN=
  @INC:
/System/Library/Perl/darwin
/System/Library/Perl
/Library/Perl/darwin
/Library/Perl
/Library/Perl
/Network/Library/Perl/darwin
/Network/Library/Perl
/Network/Library/Perl
.
Will configure via APACI
Configure mod_perl with ../apache_1.3.23/src ? [y] y
Shall I build httpd in ../apache_1.3.23/src for you? [y] n
(cd ../apache_1.3.23/src  ./Configure -file Configuration)cp
apaci/Makefile.libdir ../apache_1.3.23/src/modules/perl/Makefile.libdir
cp apaci/Makefile.tmpl ../apache_1.3.23/src/modules/perl/Makefile.tmpl
cp apaci/README ../apache_1.3.23/src/modules/perl/README
cp apaci/configure ../apache_1.3.23/src/modules/perl/configure
cp apaci/libperl.module ../apache_1.3.23/src/modules/perl/libperl.module
cp apaci/mod_perl.config.sh
../apache_1.3.23/src/modules/perl/mod_perl.config.sh
cp apaci/load_modules.pl ../apache_1.3.23/src/modules/perl/load_modules.pl
cp apaci/find_source ../apache_1.3.23/src/modules/perl/find_source
cp apaci/apxs_cflags ../apache_1.3.23/src/modules/perl/apxs_cflags
cp apaci/perl_config ../apache_1.3.23/src/modules/perl/perl_config
cp apaci/mod_perl.exp ../apache_1.3.23/src/modules/perl/mod_perl.exp
PerlDispatchHandler.enabled
PerlChildInitHandlerenabled
PerlChildExitHandlerenabled
PerlPostReadRequestHandler..enabled
PerlTransHandlerenabled
PerlHeaderParserHandler.enabled
PerlAccessHandler...enabled
PerlAuthenHandler...enabled
PerlAuthzHandlerenabled
PerlTypeHandler.enabled
PerlFixupHandlerenabled
PerlHandler.enabled
PerlLogHandler..enabled
PerlInitHandler.enabled
PerlCleanupHandler..enabled

Re: MacOSX Requests and Cookies

2002-02-03 Thread Ged Haywood

Hi there,

On Sun, 3 Feb 2002, John Siracusa wrote:

 Okay, I tried it again, from the very beginning.
[snip]
 So...what am I doing wrong?
 
Well this doesn't look good...

[snip]
 /usr/bin/ld: warning -L: directory name (/usr/local/lib) does not exist
[snip]

...nor does this.

[snip]
 Checking if your kit is complete...
 Warning: the following files are missing in your kit:
 Makefile.in
 c/Makefile.in
 configure
 Please inform the author.

but I never tried to do what you're trying to do.

73,
Ged.




Re: MacOSX Requests and Cookies

2002-02-02 Thread John Siracusa

On 2/1/02 10:39 PM, Joe Schaefer wrote:
 Rick Frankel [EMAIL PROTECTED] writes:
 The following patch, while probably not correct (and probably the cause
 of the silent failure), covers it.
 [...]
 I've incorporated your patch and uploaded it to the website.
 Hopefully other OS X'ers will be able to confirm it works now.

Well, I can confirm that it still doesn't work for me... :-/  Is everyone
using Perl 5.6.1 here?  Because somehow some of the files I downloaded had
the string perl500503 embedded in them.  Even after search/replacing all
that, I ended up with an httpd that pukes with the same old symbol conflicts
when I try to start it.

I tried to track exactly what I was doing, command-line by command-line,
starting with the downloads from Joe's site, but that kind of got tossed
away when I had to make that excursion to fix the perl500503 business.
I'll try again today and see if I can work out clean line-by-line example
that exhibits the continued failure on my end.

-John




Re: MacOSX Requests and Cookies

2002-02-01 Thread Joe Schaefer

Rick Frankel [EMAIL PROTECTED] writes:

 Joe- ApacheCookie_* was not being boostrapped into the executable, so it 
 was being optimized of the linkage.
 
 The following patch, while probably not correct (and probably the cause 
 of the silent failure), covers it.

Great -  thanks a ton!

 --- http_main.c Fri Feb  1 19:22:51 2002
 +++ http_main.c~Mon Jan 28 04:07:46 2002
 @@ -7805,12 +7805,5 @@
   {
   return ApacheRequest_new(r);
   }
 -/*RAF*/
 -#include apache_cookie.h
 -ApacheCookie *suck_in_apcookie(request_rec *r);
 -ApacheCookie *suck_in_apcookie(request_rec *r)
 -{
 -return ApacheCookie_new(r);
 -}
   #endif /* USE_APREQ */

I've incorporated your patch and uploaded it to the website.
Hopefully other OS X'ers will be able to confirm it works now.

 Also, the all-in-one compile method doesn't setup apache correctly,
 so the steps taken were:
 
 unpack everthing in the same root directory
 
 mod_perl:
 
 $ perl Makefile.PL APACHE_PREFIX=/usr/local/apache DO_HTTP=1 \
 PREP_HTTP=1 USE_APACI=1 EVERYTHING=1
 $ make
 $ make install
 
 http_apreq:
 
 $ perl Makefile.PL
 $ make
 $ make install
 
 apache:
 
 $ CFLAGS='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' ./configure 
 --prefix=local/apache  \
   --enable-shared=max --disable-rule=EXPAT --with-layout=Apache \
 --activate-module=src/modules/perl/libperl.a --disable-shared=perl
 
 $ make
 $ make install

You're my hero ;-)

-- 
Joe Schaefer