😕
I cannot believe this - is ANYONE able to run php and apache on Linux? To give the short story:
I run, for the moment, I've tried three other PHPs as well, Apache 1.3.28:
-Red Hat Linux 8.0 3.2-7
-PHP 4.3.3
-Apache/2.0.46
-postgresql-7.2.3
postgres is not an issue, works fine, php on it's own too, for instance I tested on a web page called news.html containing
..
<?php
if($con = pg_connect('host=localhost port=5432 user=me dbname=mine')){
echo 'got conn';
}else{
echo 'no conn';
}
?>
..
like php -f news.html and it works fine (ie I get "got conn". But getting Apache to work with php.. it just nonsense, huh?
Configured apache like:
./configure --enable-module=most --enable-shared=max --with-perl=/usr/bin/perl
configured php like like:
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-pgsql=/usr/local/pgsql
added these things to my http.conf:
php stuff
ScriptAlias /php4/ "/usr/local/bin/"
AddType application/x-httpd-php4 .php .php4 .phtml .html
AddHandler cgi-script cgi php html
Using httpd 2.0.46, I always get this (familiar yet never properly solved?) thing:
Starting httpd: httpd: module "/usr/src/build/144344-i386/BUILD/php-4.2.2/sapi/apache2filter/sapi_apache2.c" is not compatible with this version of Apache (found 20020628, need 20020903).
Please contact the vendor for the correct version.
alternatively, when trying out some elder PHP together with some elder httpd always:
Starting httpd: Syntax error on line 951 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/lib/httpd/modules/libphp4.so into server: /usr/lib/httpd/modules/libphp4.so: undefined symbol: apr_bucket_type_file
It just.. it NEVER works to load this module?
Eventually I thought, fine, skip it, let's just make sure httpd has the path to my ordinary php binary, that making it possible to parse php stuff at all, I thought? Well..
ScriptAlias /php4/ "/usr/local/bin/"
Action application/x-httpd-php4 "/php4/php"
in httpd.conf just doesn't do any good either of course.
You get tired, fed up, sick with. If I can't get advices that work, pity would do for now.