WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: php5 and apache2  (Read 2719 times)

Offline Simpler1

  • Newbie
  • *
  • Posts: 1
php5 and apache2
« 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

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11502
Re: php5 and apache2
« Reply #1 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.

Offline gutmensch

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 605
  • I can make it disappear, have no fear!
    • remembrance blog
Re: php5 and apache2
« Reply #2 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.
If I seem unduly clear to you, you must have misunderstood what I said. (Alan Greenspan)