Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: Simpler1 on August 10, 2013, 11:31:55 PM

Title: php5 and apache2
Post by: Simpler1 on August 10, 2013, 11:31:55 PM
I'm new to trying TinyCore and I'm trying to install php and apache.  I've loaded the following extensions, but it seems that php is not loading the required modules.

apache2.tcz
php5.tcz

The php.net site says that I need to add/modify the following lines to httpd.conf:
Code: [Select]
LoadModule php5_module modules/libphp5.so

<FilesMatch \.php$>
  SetHandler application/x-httpd-php
</FilesMatch>

<Directory "/home/tc/www">
                                     
DocumentRoot "/home/tc/www"

I get errors when I try to start "apachectl -k start" and I don't see an libphp5.so file anywhere in my installation.

I appreciate any pointers.

Thanks
Title: Re: php5 and apache2
Post by: Rich on August 11, 2013, 12:28:50 PM
Hi Simpler1
Quote
The php.net site says that I need to add/modify the following lines to httpd.conf: ...
Did you first read and follow the instructions in the info files for apache2.tcz and php5.tcz?
Quote
I get errors when I try to start "apachectl -k start" and I don't see an libphp5.so file anywhere in my installation.
The repository does not have libphp5.so.
Title: Re: php5 and apache2
Post by: gutmensch on August 18, 2013, 03:15:43 PM
You could try to use apache2-mod-php5.tcz instead of php5.tcz. This should enable php automatically when no other special changes are made to httpd.conf. php5.tcz is not including the php module for apache2, only the interpreter, so you cannot LoadModule it. However you could of course also "cgi" it like every other script interpreter, but then you need the cgi configuration for apache2, not the php5 module configuration.