[SWLUG] Configuring Apache for php under SuSE 9.3 Pro

Pete Prior swlug at nermal.org
Wed May 10 10:58:24 UTC 2006


Christ that's a stupid place to put logs.

I though all logs went in /var/log :|



Terry John wrote:
> Like all of these things, take a look in the error logs, under RedHat
> they're available under /etc/httpd/logs
> 
> Terry 
> 
> -----Original Message-----
> From: discuss-bounces at swlug.org [mailto:discuss-bounces at swlug.org] On
> Behalf Of James
> Sent: 10 May 2006 10:24
> To: discuss at swlug.org
> Subject: Re: [SWLUG] Configuring Apache for php under SuSE 9.3 Pro
> 
> 
> Installing Apache/PHP/Mysql was a matter of installing:
> 
> apache2
> PHP4
> mod_php4
> mysql (not applicable here though)
> 
> Im guessing its because you havent installed the php4 package?
> 
> After that it required no editing of configs to get it working with 
> apache - im guessing it does it when php4 is installed.
> 
> peter wrote:
> 
>> Hi gurus
>>
>> I'm trying to configure Apache to display php files.
>>
>> Apache is installed OK and will display an html file in
> /srv/www/htdocs
>> I've installed mod_php4 from the SuSE installation CD and patched it 
>> via YaST2.
>>
>> Following the instructions, I've made the following changes to config 
>> files:
>>
>> /etc/apache2/conf.d/php4.conf
>> =============================
>>
>> # Added by PB 09.05.2006
>>
>> <Files *.php>
>>    SetOutputFilter PHP
>>    SetInputFilter PHP
>>    LimitRequestBody 9524288
>> </Files>
>>
>> # End PB addition 09.15.2006
>>
>> <IfModule sapi_apache2.c>
>>        AddType application/x-httpd-php .php
>>        AddType application/x-httpd-php .php3
>>        AddType application/x-httpd-php .php4
>>        AddType application/x-httpd-php-source .phps
>>        DirectoryIndex index.php
>>        DirectoryIndex index.php3
>>        DirectoryIndex index.php4
>> </IfModule>
>>
>> /etc/sysconfig/apache2
>> ======================
>> ...
>> ...
>>
>> # Modified by PB 09.15.2006
>> # added php4.conf to include files
>>
>> APACHE_CONF_INCLUDE_FILES="/etc/apache2/conf.d/php4.conf"
>>
>> # End PB modification 09.05.2006
>> ...
>> ...
>>
>> There are no changes to httpd.conf.
>>
>> I've then restarted Apache (/usr/sbin/rcapache2 restart)
>>
>> But Apache will not display php files from htdocs.  Firefox says:
>>
>> "You have chosen to open
>>     index.php
>> which is a: PHP script
>> from: http://localhost
>>
>> What should Firefox do with this file?
>> * Open with ...
>> * Save to disk
>> ...
>> ..."
>>
>> So Apache clearly doesn't understand that it is to use mod_php for 
>> *.php files.
>>
>> Anyone have any suggestions?
>>
>> Thanks
>>
>> Peter
>>
>>
>> _______________________________________________
>> SWLUG Discussion List - Discuss at swlug.org
>> http://swlug.org/mailman/listinfo/discuss
>>
> _______________________________________________
> SWLUG Discussion List - Discuss at swlug.org
> http://swlug.org/mailman/listinfo/discuss
> 
> http://www.bbc.co.uk/
> 
> This e-mail (and any attachments) is confidential and may contain
> personal views which are not the views of the BBC unless specifically
> stated.
> If you have received it in error, please delete it from your system. 
> Do not use, copy or disclose the information in any way nor act in
> reliance on it and notify the sender immediately. Please note that the
> BBC monitors e-mails sent or received. 
> Further communication will signify your consent to this.
> 
> 
> 
> _______________________________________________
> SWLUG Discussion List - Discuss at swlug.org
> http://swlug.org/mailman/listinfo/discuss



More information about the Swlug mailing list