Jump to content

Recommended Posts

Posted

Hello all,

Just started with ricky.heliohost.org .

What must I do to enable php 7.1 so that php code in my html files and in php files is handled?

Already tried to set an Apache handler application/x-httpd-php71 .php using cpanel but the result is:

- html file gets handled but except php code in it

- php file: browser asks me to download it

 

I am sorry for such basic questions...

Best regards, Stephan

 

Posted

Bailey's method of picking it in cPanel is correct.

 

The Apache handler method won't work on our servers. You'll likely need to remove that handler to get PHP files to run again.

Posted

Thank you both very much for your quick answer!

 

Assigning php 7.1 using cpanel's MultiPHP results in 'Redirect Status Code: 500' on my site when running a php file. e.g. https://stephank.heliohost.org/test.php

 

Interestingly, assigning php 7.0 works like a charm.

Tested multiple times, results can be reproduced.

 

Not too bad for me, still testing basic things and thus not restricted to 7.1 but could it be a configuration/setup issue?

 

Best regards, Stephan

Posted

hello, I am sorry, I was away over the weekend.

 

Here is the content of the script file 'test.php':

 

<?php
phpinfo(INFO_GENERAL);
?>

 

This seems to generate the 500 error when using php 7.1.

The remaining text of the error message ('Redirect Status Code:') results from the error page I created.

 

Best regards, Stephan

Posted

Currently they are 775, that should be sufficient I guess.

But in case it makes a difference, why does php 7.1 need other permissions than 7.0?

 

Best regards, Stephan

Posted

No, they need to be 644. And all PHP versions are the same. It's what Apache uses to display files. They can't be executable by anyone other wise I believe they are seen as programs not `.php` files.

Posted

It's not that they're not seen as PHP files, it's that Apache (or more specifically suPHP) intentionally refuses to open them if they're writable by the group because it's a security issue.

Posted

Great, thank you very much for pointing this out!

Now as I have set them back to 644 php 7.1 is working as it did with 775 and php 7.0 !

 

Best regards, Stephan

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...