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]




Re: [PHP] dynamic module or static?

2002-01-16 Thread Erik Price

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.

Note, though, that I haven't tested or even installed mod_perl yet, so I 
can't verify the long-term success of this experiment.  But PHP has been 
working fine with MySQL and Apache since then.

Also make sure that you didn't just "cp php.ini-dist /usr/local/lib", 
you also have to rename it "php.ini" (but I'm sure you did that).


Erik

On Wednesday, January 16, 2002, at 12:41  AM, Cary Mathews wrote:

> 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-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]