[BlueOnyx:21180] Re: php 7.0 user

Michael Stauber mstauber at blueonyx.it
Mon Jul 17 00:36:48 -05 2017


Hi Ernie,

> the file ownership is fine, it doesn't seem to be calling php-cgi like it use to on
> the old server the site was moved from. 

Ah, I see what you mean. Well, 5209R uses Apache 2.4, so the suPHP
implementation is slightly different.

Create a page with this in it and call it in a browser:

<?php phpinfo(); ?>

Under "Server API" you will see that a suPHP Vsite uses "CGI/FastCGI"
and under $_ENV['_SOWNER'] you will see the name of the owner of the
file of your test-page: The siteAdmin.

You can also take it one step further and can let the test-page create a
file and then check who owns the file. That should be the siteAdmin:

<?php
$myfile = fopen("testfile.txt", "w") or die("Unable to open file!");
$txt = "Test!\n";
fwrite($myfile, $txt);
fclose($myfile);
?>

That ought to create the file testfile.txt with "Test!" in it. If that
fails it creates an error message "Unable to open file!". If it
succeeds, check who owns the file. If it's owned by the siteAdmin, then
it confirms as well that suPHP is working.

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list