Tiny Core Linux
Tiny Core Extensions => TCE Q&A Forum => Topic started by: flawd on April 10, 2015, 05:28:14 PM
-
Hi
I have the following extensions installed.
Apache2.4.tcz
Apache2-mod-php5.tcz
Mariadb.tcz
I placed a index.php file in my /usr/local/apache2/htdocs folder, the php was not working. Do I need anything else to enable php or do I need to edit a config file somewhere?
Sorry if I am asking too many questions :S
-
Read the info file.
-
Read the info file.
Already read it.
Says to install and restart Apache and that if httpd.conf is not in the default location that I should add "Include conf/php/mod_php5.conf" to add it manually. It does not specify default location of httpd.conf so there is no way for me to tell if I need to modify it or not. I assumed that was not in the default location(since it didn't work) and added the include anyway and tried restart apache again. Didn't work.
I assume that If I have Apache2.tcz installed then installed apache2-mod-php5.tcz it will build on top of that directory then when it is restarted it should run right out of the box. The extension is from 2012 and Apache2 has been replaced by Apache2.4 since then (also needs an update to current version of php). So I do not know if anything major has changed in the directory structure or if this even compatible with Apache 2.4.
-
Hi flawd
If you have not done so already, I would copy:
usr/local/apache2/conf/httpd.conf.orig
to:
usr/local/apache2/conf/httpd.conf
so that Apache has a config file. I would then search that file for php entries and see if they are commented out with a ; (semi colon).
You might also want to take a look in:
usr/local/apache2/conf/php5/extensions/dist.ini.sample
usr/local/apache2/conf/php5/mod_php5.conf
usr/local/apache2/conf/php5/php.ini.sample
for some guidance. Maybe copy the .ini.sample files to .ini files.
-
Hey Rich, thanks for the assistance.
I have copied over the previously existing httpd.conf with httpd.conf.orig and php.ini with php.ini.sample.
I looked into mod_php5.conf and it looks like something that will help apache identify .php and .phps files?
LoadModule php5_module modules/mod_php5.so
<IfModule mod_php5.c>
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
</IfModule>
The dist.ini contains a list of enabled and disabled extensions and I do not see php mentioned anywhere in there. Do I need to add it to enabled list?
(http://i.imgur.com/3HyVKLUb.png?1) (http://imgur.com/3HyVKLU)
If so, how do I add it? extension=???.so
I have tried extension=mod_php5.so with no luck.
-
Hi flawd
There's probably a section in usr/local/apache2/conf/httpd.conf that has a bunch of include statements. Try adding a line that reads:
Include conf/php/mod_php5.conf
to it. Restart apache and see what happens.
-
I have already tried this, the includes are located at the bottom of the file and is placed there by default when you install apache2-mod-php5.tcz. However, it does not seem to be working.
Here is the full file.
http://pastebin.com/Y42Y5hYM
And here is what is showing up on web-browser.
(http://i.imgur.com/IqpGHzTs.png?1) (http://i.imgur.com/IqpGHzT.png?1)
(http://i.imgur.com/SWsEaQCs.png?1) (http://i.imgur.com/SWsEaQC.png?1)
I have also tried looking around for other httpd.conf incase it is reading it from another location, but was unable to find another http.conf file.
And I have tried manually adding the contents of mod_php5.conf to the httpd.conf file as well. Nothing...
-
apache2-mod-php5.tcz is for apache2.tcz not apache2.4.tcz
-
apache2-mod-php5.tcz is for apache2.tcz not apache2.4.tcz
Breaking my heart :(
Was looking forward to running it on Tiny Core.
Would there be any security issues with downgrading to apache2? Or is it possible to get php working with more current version?