LAMP not showing PHP pages after update

Hello,

After updating these pages:

apache2-mpm-itk apache2.2-bin apache2.2-common libapache2-mod-php5filter

my Apache/PHP server started to behave strange.

PHP files having a correct HTML layout is fine, this works:

http://85.159.208.250/linode/testHTML.php

# My First Heading

My first paragraph.

Output:
> My First Heading

My first paragraph.

hello

But if I instead change the file to:

http://85.159.208.250/linode/testPHP.php

the site will be unresponsive.

I have checked the logfiles but there is no good clues how to continue.

Does any one have any idea?

7 Replies

Have you turned on "display errors"? That could reveal something.

What version of Ubuntu are you running?

Are you using anything as a front end that apache would pass pure html requests to?

The display errors is ON but will not revel any important information :(

Ubuntu 12.04.4 LTS

I might have a front end that do something…How can I investigate/check this further?

I think I have Suhosin installed, but it is not supported anymore and therefore was uninstalled?

Or is it something to do with apache2filter?

Are you sure that Suhosin isn't supported? Suhosin supports PHP 5.3 (the default version in 12.04 LTS).

Did you upgrade the version of PHP?

@hjalle83:

But if I instead change the file to:

http://85.159.208.250/linode/testPHP.php

the site will be unresponsive.
Seems to work from here. I get this:

$ wget -S 'http://85.159.208.250/linode/testPHP.php'
--2014-05-21 20:33:00--  http://85.159.208.250/linode/testPHP.php
Connecting to 85.159.208.250:80... connected.
HTTP request sent, awaiting response... 
  HTTP/1.1 200 OK
  Date: Thu, 22 May 2014 00:33:00 GMT
  Server: Apache/2.2.22 (Ubuntu)
  Accept-Ranges: bytes
  X-Powered-By: PHP/5.4.28-1+deb.sury.org~precise+1
  Connection: close
  Content-Type: text/html
Length: unspecified [text/html]
Saving to: “testPHP.php”

    [ <=>                                   ] 5           --.-K/s   in 0s      

2014-05-21 20:33:00 (400 KB/s) - “testPHP.php” saved [5]

$ cat testPHP.php 
hello$

Possibly your browser is getting confused since there's no newline after "hello"? Or because the content type is text/html but just plaintext is being delivered? The PHP script is definitely running, though.

Based on Vance's wget header detail I see you're running PHP 5.4.28, I've read (including here in these forums) that Ubuntu 12.04 LTS doesn't do well if you upgrade the PHP beyond the 5.3.x natively supported by 12.04. When did you upgrade your PHP?

Hi, thanks for your replays!

I upgraded the server to PHP 5.4 in January, and after some initial problem it has been working fine.

I have need to display plain text, however I use PHP do set dynamic .css files (colors, size etc), and the same problem as plain text occurs, very slooooow response.

So running 12.04 with PHP 5.4 is a bad idea? What is my best option from now on?

Thanks!

@hjalle83:

Hi, thanks for your replays!

I upgraded the server to PHP 5.4 in January, and after some initial problem it has been working fine.

I have need to display plain text, however I use PHP do set dynamic .css files (colors, size etc), and the same problem as plain text occurs, very slooooow response.

So running 12.04 with PHP 5.4 is a bad idea? What is my best option from now on?

Thanks!
I'm not saying running PHP 5.4 on 12.04 is a bad idea, but you can't use the 12.04 repositories for things like "apache2-mpm-itk apache2.2-bin apache2.2-common libapache2-mod-php5filter" because they are expecting PHP 5.3. You're going to have to hit the Ubuntu forums and try to get a solution for fixing this (which may be as simple as updating those items from a different source).

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct