Quick Way To Test SuPHP?

  • Azoundria
  • Professor
  • Professor
  • User avatar
  • Posts: 907
  • Loc: Calgary, Alberta, Canada

Post 3+ Months Ago

Hi All,

So I HAVE searched Google for this, and it should be very easy.

All I want to be able to do is build a PHP file that tests if SuPHP is enabled on a server. I've searched the entirity of PHP.net for SuPHP, and so I'm sure there's no easy function there. And then I looked all over the PHPInfo configurations of servers with and without SuPHP, and no luck there.

So, does anyone know, how I can find out if a server is running with SuPHP, or not? I'd prefer a solution which doesn't involve creating a test file of 777 permissions, or a new directory with a htaccess that has PHP directives, if possible. I'd like to just upload and view a PHP script to get the answer.

Thanks for your help.
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9091
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

If you can use phpinfo() I would create a php file with the following contents:

PHP Code: [ Select ]
<? phpinfo() ?>


Then browse everything and look where it says Server API. I believe if it the value says Apache then its not running PHP using suPHP. If it says CGI then I believe it is running suPHP.
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9091
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

Okay I just confirmed for you on some servers I run. On a server that is running suPHP for the Server API line it says:

CGI

For a server I run that is not using suPHP it says:

Apache 2.0 Handler
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13504
  • Loc: Florida

Post 3+ Months Ago

I think it's possible to have it installed when PHP is installed as an Apache module too.

I've got a Ubuntu system here next to me that has PHP5 installed as an Apache2 module, in the "Loaded Modules" section of the "Apache2handler" section of phpinfo(), there is a "mod_suphp" listed, though I just now executed

Code: [ Select ]
sudo apt-get install libapache2-mod-suphp


so I can't tell you if it's working properly or not. The marker is there though.

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 38 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
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.