Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
The following applies to Unix:

If you are crazy and DO decide to compile Apache with php4 (with mysql support) and mod_perl (as a DSO), make damn sure you use your own mysql library and header files. If you installed mysql from binary or source rpms, the required files are in /usr/include/mysql and /usr/lib/mysql, so you tell php:
./configure --with-mysql='/usr'

and it's able to find everything it needs. If you use the mysql headers/libs included with the php source, you may witness unexplainable segfaults when trying to use modperl DBI connects to a mysql server. Here's my build script in case you're interested...
#!/bin/sh # # build_apache.sh # # -------install Apache using DSOs-------- # # first, untar apache, mod_perl, and php in a common dir. # my tree looks like this: # /tmp/apache # | # ./apache_1.3.14/ # ./apache_1.3.14.tar.gz # ./build_apache.sh # ./mod_perl-1.24/ # ./mod_perl-1.24.tar.gz # ./php-4.0.3pl1/ # ./php-4.0.3pl1.tar.gz ########################################################### # prebuild apache for php cd apache_1.3.14 rm -rf config.cache make clean ./configure --prefix='/usr/local/apache' cd .. ########################################################### # build php cd php-4.0.3pl1 rm -rf config.cache make clean ./configure --with-mysql='/usr' --enable-track-vars \ --with-apache='../apache_1.3.14' # mysql header files in /usr/include/mysql # mysql library files in /usr/lib/mysql # (this is the default from an rpm install of mysql) make make install cd .. ########################################################### # build mod_perl cd mod_perl-1.24_01 rm -rf config.cache make clean perl Makefile.PL \ APACHE_PREFIX='/usr/local/apache' \ APACHE_SRC='../apache_1.3.14' \ NO_HTTPD=1 \ USE_APACI=1 \ PREP_HTTPD=1 \ EVERYTHING=1 make make install cd .. ########################################################### # build apache cd apache_1.3.14 rm -rf config.cache make clean ./configure --prefix='/usr/local/apache' \ --enable-module=rewrite \ --enable-module=proxy \ --activate-module='src/modules/perl/libperl.a' \ --activate-module='src/modules/php4/libphp4.a' \ --enable-shared=perl make make install cd .. ########################################################### # fin

In reply to compiling apache with mod_perl (DSO) and php4 by meonkeys
in thread Combining PHP and Perl by rodry

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-04-25 21:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found