Re: dynamic module or static?

From: Date: Wed, 16 Jan 2002 14:36:37 +0000
Subject: Re: dynamic module or static?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-80707@lists.php.net to get a copy of this message
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 (<? phpinfo() ?>) 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: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.general (#80707) next »