Skip to content

Instantly share code, notes, and snippets.

@niceboy120
Created January 29, 2013 20:23
Show Gist options
  • Save niceboy120/4667420 to your computer and use it in GitHub Desktop.
Save niceboy120/4667420 to your computer and use it in GitHub Desktop.
list modules apache with php
<?php
if( ! function_exists('apache_get_modules') ){ phpinfo(); die; }
$result = ' not available';
if(in_array('mod_rewrite',apache_get_modules())) $result = '
available';
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Check for mod_rewrite</title></head>
<body>
<p><?php echo apache_get_version(),"</p><p>mod_rewrite $result"; ?></p>
<?php foreach( apache_get_modules() as $module ) echo "$module<br />"; ?>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment