Robert Paulsen wrote:
Well My apache2 server will not display php web pages. If I try to load a page in my browser I get a message saying that (e.g.) index.php is a pdf file and asks what app would I like to open it with.
I have apache2, php5 and mod_php5 installed but apache will not load a php5 page.
/etc/sysconfig/apache2 has php5 set in APACHE_MODULES. mod_php5 is listed in /etc/apache2/sysconfig.d/loadmodule.conf. The file conf.d/php5.conf.
I had this working on 9.3 and 10.3 ut can't get it working on 1.1. What am I missing?
Thanks! Bob
Bob, I had the same problem with 10.3, I think. It turned out to be a really simple problem, but dammit, I can't remember exactly what the fix was. Every time I would try and open a php page, IIRC, I would just get the text or an error. There were a couple of things I had to do to migrate a server from pre-10.3 to 10.3 or later. One thing that you will have to do is to use the *full* php tags in your code like <?php to open and ?> to close. PHP itself changed to prevent the short open <? and as Low already mentioned, you can try setting the short open setting on. (I didn't, I just recoded and made everything comply with the new standard. Another *big* change if your coming from something pre-10.3 to 11.1, is the way php includes are handled. The rule now is that all includes must be in the same directory or below the calling page *or* must reside in a path defined in httpd *and* must have the full path supplied. Further, the include statement need to be of the form: <?php include '/srv/www/other-dir/page-to-include.php'; ?> The changes are for security purposes and are actually a good thing -- depending on how much code you have to change. If it isn't the php tags or the includes, I'll try digging further to recall what changed. -- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org