stephank Posted March 9, 2018 Posted March 9, 2018 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
Bailey Posted March 9, 2018 Posted March 9, 2018 Go to "MultiPHP" in cPanel and pick the version you need. I wouldn't use the Apache handler.
wolstech Posted March 9, 2018 Posted March 9, 2018 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.
stephank Posted March 9, 2018 Author Posted March 9, 2018 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
stephank Posted March 12, 2018 Author Posted March 12, 2018 hello, I am sorry, I was away over the weekend. Here is the content of the script file 'test.php': <?phpphpinfo(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
Krydos Posted March 13, 2018 Posted March 13, 2018 Make sure the permissions of the php file are 644.
stephank Posted March 13, 2018 Author Posted March 13, 2018 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
Bailey Posted March 13, 2018 Posted March 13, 2018 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.
wolstech Posted March 13, 2018 Posted March 13, 2018 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.
stephank Posted March 13, 2018 Author Posted March 13, 2018 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now