LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to run php3 on apache2? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-run-php3-on-apache2-834223/)

ziadh 09-24-2010 06:37 AM

how to run php3 on apache2?
 
dear all,
I have installed the following packages on Linux SUSE:
-Apache 2.2.13
-PHP5.3.3
-freeradius + dialupadmin (web interface for freeradius)

since the htdocs and whole dialupadmin are in .php3
i cannot open the web interface, firefox keep asking me if i want to save the file, or chose a specific program tu run....

does anyone knows how i can make my server understand *.php3 ??

bathory 09-24-2010 07:01 AM

Hi,

I guess you have already installed and the apache2-mod_php5 package

Quote:

does anyone knows how i can make my server understand *.php3 ??
You mean that the php files have the extension .php3. In that case, open /etc/apache2/conf.d/php5.conf, look for the line:
Code:

AddType application/x-httpd-php .php
and add .php3
The fact is that php5 might not be 100% compatible with the php3 code, so you'll get lots of errors

Regards

ziadh 09-24-2010 07:21 AM

thanks for your concern,
i already tried this and it's still not working.

ok, in the directory of the web interface i have many files, one is index.html, and others are, like, buttons.php3, user.php3, errors.php3... which must be services i can access to using this web interface, but unfortunatly, when i enter http://localhost/dialup/ it open the index.html, and ask me about buttons.php3, if i want to save it or open it with specific prog.

i hape i made myself clear, thanks for any help!!

bathory 09-24-2010 07:27 AM

So I'm asking you again:
Have you installed the apache2-mod_php5 package?

ziadh 09-24-2010 07:51 AM

well, im deleting all php5, apache2, freeradius now
will re-install again to have clean conf files
i will check about the apache2-mod_php5 package

bathory 09-24-2010 08:06 AM

You don't need to delete/uninstall anything. Just need this package, as it provides the php5 module for apache (libphp5.so). Without it you'll always be prompted to save a .php(3) page

ziadh 09-24-2010 08:11 AM

i hope it will work, im installing allover, and i chose the apache2_php5 module too!
cross fingers:)

ziadh 09-24-2010 08:21 AM

mmm, still not working..
how can i be sure that apache is using libphp5.so??

bathory 09-24-2010 08:30 AM

There are various ways:
1 Run
Code:

httpd -M|grep php
2. Search the config files for:
Code:

LoadModule php5_module /usr/lib/apache2/mod_php5.so
3. You can create a helloworld.php page in your DocumentRoot and see if apache can parse it without prompting for saving
Code:

<?php
echo 'Hello World!';
?>

Regards


### EDIT ###
From this, the module name on Suse is mod_php5.so


All times are GMT -5. The time now is 04:55 PM.