[lug] PHP/Postgres on KRUD 8.0

Jeff Schroeder jeff at neobox.net
Wed Jan 7 16:20:15 MST 2004


Mike wrote:

> I had to hack things a bit, creating a
> softlink  /usr/lib/libjpeg.so.62 -> /usr/lib/libjpeg.so.62.0.0. Dunno
> why. That got me to where browsing a .php file didn't show me the
> source code :)

I use MySQL so I can't help with your Postgres question, but I can tell 
you the reason your PHP source code was showing up in web pages was 
probably because Apache didn't know what to do with files ending 
in .php.

To remedy that, and get Apache to run anything ending in .php through 
the PHP parser, you need to have something like this in your httpd.conf 
file:

LoadModule php4_module /usr/local/lib/libphp4.so
AddModule mod_php4.c

<IfModule mod_mime.c>
  AddType application/x-httpd-php .php
  AddType application/x-httpd-php-source .phps
</IfModule>

I'm not sure why linking the JPEG library would fix it, but be sure you 
have something like the above in order to get the PHP engine working 
with Apache (perhaps the RPM took care of that already?).

HTH,
Jeff




More information about the LUG mailing list