Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed May 21, 2014 3:19 pm 
Offline
Newbie

Joined: Wed May 21, 2014 3:11 pm
Posts: 3
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
Code:
<!DOCTYPE html>
<html>
<body>

<h1>My First Heading</h1>

<p>My first paragraph.</p>
<?php echo "hello"; ?>
</body>
</html>


Output:
Quote:
My First Heading

My first paragraph.

hello


But if I instead change the file to:
http://85.159.208.250/linode/testPHP.php
Code:
<?php echo "hello"; ?>

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?


Top
   
PostPosted: Wed May 21, 2014 4:49 pm 
Offline
Senior Member

Joined: Mon Jan 02, 2012 12:45 pm
Posts: 365
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?


Top
   
PostPosted: Wed May 21, 2014 5:09 pm 
Offline
Newbie

Joined: Wed May 21, 2014 3:11 pm
Posts: 3
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?


Top
   
PostPosted: Wed May 21, 2014 5:31 pm 
Offline
Senior Member

Joined: Mon Jan 02, 2012 12:45 pm
Posts: 365
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?


Top
   
PostPosted: Wed May 21, 2014 8:40 pm 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
hjalle83 wrote:
But if I instead change the file to:
http://85.159.208.250/linode/testPHP.php
Code:
<?php echo "hello"; ?>

the site will be unresponsive.

Seems to work from here. I get this:
Code:
$ 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.


Top
   
PostPosted: Wed May 21, 2014 9:12 pm 
Offline
Senior Member

Joined: Mon Jan 02, 2012 12:45 pm
Posts: 365
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?


Top
   
PostPosted: Thu May 22, 2014 2:03 am 
Offline
Newbie

Joined: Wed May 21, 2014 3:11 pm
Posts: 3
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!


Top
   
PostPosted: Thu May 22, 2014 6:14 am 
Offline
Senior Member

Joined: Mon Jan 02, 2012 12:45 pm
Posts: 365
hjalle83 wrote:
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).


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group