开发者

how to check if my shared hosting has suexec or suphp

开发者 https://www.devze.com 2023-04-13 00:16 出处:网络
I need to check if my shared host has suexec or suphp. I found this documentat开发者_运维知识库ion:

I need to check if my shared host has suexec or suphp. I found this documentat开发者_运维知识库ion: http://www.alain.knaff.lu/howto/PhpSuexec/

At the very end of this document there is a test. When I run the test, it says:

Warning: system() has been disabled for security reasons in /home.......... on line 3

Is there any other method to check it? (I have SSH access)


the best and simplest way I have found to test it is to have a PHP script executing the "id" command:

put the following in a .php file, and uplaod via ft. then, visit the file location in your browser.

<?php
system('id');
?>


Because of warning system() has been disabled for security reasons, you should run this PHP function getmyuid() instead of system():

<?php
echo "<p>Current User ID: ".getmyuid()."</p>";
echo "<p>Current Script Owner: ".get_current_user()."</p>";
?>
0

精彩评论

暂无评论...
验证码 换一张
取 消