• Resolved larryzeropointcom

    (@larryzeropointcom)


    With a browser the php file returns as a download rather than executing the php file and returning the results of execution. I’m running on suse linux 11.2 64-bit, and apache2-2.2.13-2.4.1. I’m stumped as to how to debug this problem.

    php is working and installed but there must be some sort of apache 2 issue. Search engine results have not been helpful.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    Does this happen on all php pages or just WordPress ones?

    It may be wackiness with your version of PHP. What version are you running?

    Thread Starter larryzeropointcom

    (@larryzeropointcom)

    all php pages..

    php5-5.3.2-1.1.1

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    Yeah, sorry, it’s gotta be a server config issue πŸ™ Do you have a webhost you can pester for help?

    Thread Starter larryzeropointcom

    (@larryzeropointcom)

    I know that this is not a problem attributable to wordpress, but I’m not sure where to go or who to ask for help on this one. Any suggestions would be a great help.

    I set up the standard info.php file

    <?php
    phpinfo();
    ?>

    to test web access and apache returns the file as a download. I can run the file at the console and phpinfo() data returns. I uninstalled and then reinstalled apache and php just in case, but nothing has worked.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    That’s why I asked if you have a web host or if you’re flying solo πŸ™‚

    Usually this is an apache handler issue. See http://www.webmasterworld.com/apache/3418477.htm for a start.

    Thread Starter larryzeropointcom

    (@larryzeropointcom)

    Thanks for the link, sounds exactly like what is happening here, but none of the suggestions work for me.

    AddHandler server-parsed .php

    looks like exactly what I need but it didn’t work, and there wasn’t any other combinations of addtype or addhandler that made any difference. I also added the mime type

    application/x-httpd-php .php

    to the mime.types file. Nothing seems to get apache to execute the php code.

    I’m looking forward to getting WordPress installed, so I hope I can get this sorted out..

    Thread Starter larryzeropointcom

    (@larryzeropointcom)

    I have vmware running suse linux 11.2 and I quickly installed php, mysql and apache, and php is processing the php files just fine.

    My problem is on our deployment server and somehow I need to diagnose the problem and fix it. I know a lot of you have located this sort of problem. Can anyone give me some hints on where and what to look for? I will post the solution here of course as to what the problem is when I find it. It should save someone else a lot of time too.

    Thanks!

    Thread Starter larryzeropointcom

    (@larryzeropointcom)

    The solution!

    Since I was able to see php executing on a fresh suse 11.2 install, I knew there was most likely an error in the configuration files. The server I am deploying on was to a great extent experimental and I must have created statements that interfered with php. I regret to say that I’m not sure what the final change was that made it work. But it’s working great now.

    I just basically trimmed the configuration in the server (/etc/apache2) to conform to the newer installation that worked, until it started working. Some apache configuration rules are a little confusing, I most likely made a small mistake that rendered php5 inoperative.

    I did find in the apache2 error logs a large number of errors that went away when I used yast to shutdown apparmor. I had not fully configured apparmor, so there might have been an issue there.

    I’m not aware of any side effects to shutting apparmor down, but things are working well now, so I can get on with the blog.

    My thanks for the suggestions from ipstenu.. It got me off ‘stumped mode’ and gave me somewhere to start.

    Now to the creative work!

    Thanks.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘php runs from the cmdline, apache does not execute’ is closed to new replies.