[PHP] dynamic module or static?

2002-01-15 Thread Cary Mathews

I am attempting to build a dynaminc module loadable by apache 1.3.x. But
once the (./configure, make, make install, cp php.ini-dist, configure
httpd.conf) process is complete, I restart apache, and try to access a php
page () and I am asked if I would like to download the
page, which is not the expected or desired behavior. :/

Reading through the INSTALL file and the php.net FAQs, I did notice that
there was a mention of copying the compiled httpd directly over the
existing one. Would that not indicate a static module had been compiled?
Else where it appears a libphp4.so is created and placed in the modules/
directory. When I attempt to put a LoadModule directive in my httpd.conf
file to tell apache about the module, I get the following error from
apachectl configtest:
 Syntax error on line 205 of /usr/local/apache/conf/httpd.conf:
 API module structure `php4_module' in file
 /usr/local/apache/modules/libphp4.so
 is garbled - perhaps this is not an Apache module DSO?
I read this one of two ways, a) 'php4_module' is not the correct way to
refrence this module, or b) the libphp4.so module is corrupted, somehow.
Is either one of these right?

I've recompiled twice now, and still no luck.  If I comment out the
LoadModule directive, it starts, but my browser asks if I want to download
the php page instead of displaying it.

Has anyone encountered this before?

Cary Mathews





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] dynamic module or static?

2002-01-16 Thread Cary Mathews

If I put the AddModule line before the LoadModule line, I get the
following error from apachectl configtest:
Cannot add module via name 'mod_php4.c': not in list of loaded modules

If I put the AddModule line after the LoadModule line, I get the original
error.  Seems like a Catch-22 if you ask me!

Cary


On Wed, 16 Jan 2002, Bhavin Modi wrote:

> Date: Wed, 16 Jan 2002 15:52:52 +0530
> From: Bhavin Modi <[EMAIL PROTECTED]>
> To: Cary Mathews <[EMAIL PROTECTED]>
> Subject: Re: [PHP] dynamic module or static?
>
> Have you done the following in your httpd.conf ?
>
> AddModulemod_php4.c
>
> I had a similar error with Apache-PHP4 on Win2K.
> After checking the logs I came to know that I have not added the addmodule
> directive in httpd.conf.
> As far as I know on linux the "make install" command adds AddModule
> directive in httpd.conf.
>
> Regards,
> Bhavin Modi.
>
>
> - Original Message -
> From: "Cary Mathews" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, January 16, 2002 11:11 AM
> Subject: [PHP] dynamic module or static?
>
>
> > I am attempting to build a dynaminc module loadable by apache 1.3.x. But
> > once the (./configure, make, make install, cp php.ini-dist, configure
> > httpd.conf) process is complete, I restart apache, and try to access a php
> > page () and I am asked if I would like to download the
> > page, which is not the expected or desired behavior. :/
> >
> > Reading through the INSTALL file and the php.net FAQs, I did notice that
> > there was a mention of copying the compiled httpd directly over the
> > existing one. Would that not indicate a static module had been compiled?
> > Else where it appears a libphp4.so is created and placed in the modules/
> > directory. When I attempt to put a LoadModule directive in my httpd.conf
> > file to tell apache about the module, I get the following error from
> > apachectl configtest:
> >  Syntax error on line 205 of /usr/local/apache/conf/httpd.conf:
> >  API module structure `php4_module' in file
> >  /usr/local/apache/modules/libphp4.so
> >  is garbled - perhaps this is not an Apache module DSO?
> > I read this one of two ways, a) 'php4_module' is not the correct way to
> > refrence this module, or b) the libphp4.so module is corrupted, somehow.
> > Is either one of these right?
> >
> > I've recompiled twice now, and still no luck.  If I comment out the
> > LoadModule directive, it starts, but my browser asks if I want to download
> > the php page instead of displaying it.
> >
> > Has anyone encountered this before?
> >
> > Cary Mathews
> >
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] dynamic module or static?

2002-01-17 Thread Cary Mathews

>
> I'm no guru on the topic, but I found that when configuring the DSO with
> MySQL (--with-mysql=/usr/local/mysql), it would always garble the PHP
> module.  Eventually I got it all set up by not specifying a directory
> (in other words, just using "--with-mysql") in that configure argument.
> But this meant using PHP's internal MySQL abilities, which work fine but
> apparently aren't compatible with mod_perl.  So I re-did everything, and
> it seems that the smoothest way to do it is to install PHP as a static
> module and use the original --with-mysql=/path/to/mysql (YMMV), but when
> compiling Apache be sure to --enable-so so that you still can load DSOs
> if you want.

THANK YOU! It finaly worked! Compiling as a static was the way to go.
I'll admit that I forgot to shut down httpd prior to copying over the new
binary, but once I got that cleaned up, it worked.  Many thanks, Erik,
and everyone else who gave their input.

BTW, Erik, have you gotten mod_perl working yet?  I'd be intrested in
knowing how that turns out.

Kindest regards,
Cary Mathews


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] imap problems

2002-01-19 Thread Cary Mathews

I am trying to get twiggi-gw (http://sourceforge.net/projects/twiggi/) to
run on an OpenBSD 2.9 system using Apache 1.3.22 with php 4.1.1 compiled
as a static module. Is this even possible?  I'm starting to think it is
not!

php is configured with the --with-imap, --with-mysql, and --with-apache
options. php does not seem to have any problems with these flags.
However, when compiling apache, I got errors relating to my c-client
linker module (?) : /usr/local/lib/libc-client.so.2.1.  The actual error
message doesn't come to mind at the moment.

So I tried recompiling the imap binary; I'm using the one which comes with
pine4.44. When I configured php with --with-imap=/tmp/pine4.44, it told me
it should be --with-imap-ssl. So I changed it to
--with-imap-ssl=/tmp/pine4.44, and re-configured it. No problems with php
or apache this time. Apache and php both work wonderfully.  But when I run
the twiggi installation test, I get the following error regarding imap:

Fatal error:  Call to undefined function:  imap_rfc822_parse_adrlist() in
/usr/local/apache/htdocs/twiggi/lib/mail/php-imap.inc.php on line 873

After reading the Zend and Php.net pages regarding imap, I copied the new
libc-client.a, rfc822.h, mail.h, and linkage.h files to my include path,
and tried recompiling once more.  Again, php, apache compiled fine, but
the same error as above occured.

Why did php tell me it configured in imap functionality and then give me
this error?

Any help, additional documentation would be greatly appreciated!
Cary




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] broken imap client?

2002-01-29 Thread Cary Mathews

I've been trying to compile php_4.1.1 with imap support for the last
couple of days (seems like weeks!). I have the OpenBSD 2.9 ports version
of the c-client2000 libraries, along with the source of pine4.44, which
uses the same libraries, I think.  I can ./configure --with-imap={lib dir}
and it configures and builds just fine.  But when I attempt to install it
as a DSO in Apache, and do an apachectl configtest I get the following:
/usr/libexec/ld.so: Undefined symbol "_mail_string" in
httpd:/usr/local/apache/libexec/libphp4.so

So I try to install it as a static module in Apache, and Apache bombs on
the build with:
/usr/libexec/ld.so: Undefined symbol "_mm_dlog" in
gen_test_char:{lib dir}/libc-client.so.2.1
*** Error code 1

In short, I think the c-client libraries are broken, at least as far as
php is concerned, but the php documentation says that the c-client libs
are required for IMAP support.  Can someone help me understand what I am
doing wrong?

Thanks in advance,
Cary



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] broken imap client?

2002-01-29 Thread Cary Mathews


> > I've been trying to compile php_4.1.1 with imap support for the last
> > couple of days (seems like weeks!). I have the OpenBSD 2.9 ports version
> > of the c-client2000 libraries, along with the source of pine4.44, which
> > uses the same libraries, I think.  I can ./configure --with-imap={lib dir}
> > and it configures and builds just fine.  But when I attempt to install it
> > as a DSO in Apache, and do an apachectl configtest I get the following:
> > /usr/libexec/ld.so: Undefined symbol "_mail_string" in
> > httpd:/usr/local/apache/libexec/libphp4.so
> >
> > So I try to install it as a static module in Apache, and Apache bombs on
> > the build with:
> > /usr/libexec/ld.so: Undefined symbol "_mm_dlog" in
> > gen_test_char:{lib dir}/libc-client.so.2.1
> > *** Error code 1
>
> a common mistake in compiling php is thinking installing the c-client on
> your system is enough :)
>
> a little cut'n'paste from the docs:
>
[snip cut'n'paste]
>
> did you rename the files?


(Was I supposed to rename the files?) I've followed the directions from
the docmuentation, to the 'T'. Unless apache is looking for the rfc822.h
et al in /usr/local/include and _not_ /usr/local/include/c-client, I
don't see why I'm having  so many problems.  I'll try moving those *.h
files up a directory and try once more...[sigh]

[snip some rant about the c-client being broken... ;-)]
>
> the c-client libs arnt broken :)
I'll take your word for it. But as for getting it to work...

--Cary


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]