When I try and access a PHP file, it downloads instead of running the script / loading the page. I have tried running PHP scripts from the command line and this works OK. The issue is limited to pages served by Apache2. I’ve tried removing Apache2 and reinstalling Apache2 with PHP 5.3
You may also need to load the module for PHP, but I think SUSE does that
automatically as long as you have the RPMs installed properly… I
think. If not, something like:
LoadModule php5_module modules/libphp5.so
Good luck.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
You did get an answer already, but I am not sure that you are at the correct place at all. You talk about having SuSE without any further specification (which makes all sorts of answering in any case a bit of a guess). But there is no SuSE for years. The forums here are about openSUSE. There is also SUSE LInux Enterprise (SLED/SLED), but hthey have different forum.
Can you please state what openrating system you have, including it’s version? That would help your potential helpers not to poke around in the dark (or even skipping your question at all).
Thank you for your responses. The version I am using is suse-sles-11-sp2-v1.00.x86_64 as used in Amazon EC2. As you correctly identify, it is not OpenSuSE. Following some other issues and some advice by others, I have terminated this instance and I have have found an AMI of OpenSuSE 12.2 v4 by SUSE Studio, which I am currently installing and await a result.
While waiting, you could try to get used to the real name of your new operating system: openSUSE.
Else people will again wonder about what you realy use.
And also be aware that many people here simply have the plain vanilla openSUSE 12.2 and not one from SUSE Studio. Thus when you come with any questions, it is up to you to explain where your version differs from what most here have. Else I foresee a lot of misunderstanding.
The change would only be needed in /etc/php5/apache2/php.ini, that’s the config for the apache module. The other one is only used if you run a php script on the command line by typing f.e.:
php *myscript.php*
And if you don’t set “short_open_tag = on”, your php statements have to be enclosed in php tags like this: