IPB

Welcome Guest ( Log In | Register )

Guide To Checking Your Server

This topic is about Guide To Checking Your Server, the author, agentfubu, wrote about: I made this topic because many people don't know how to check to make sure they can run minerva. They just install it and it doesn't work. To save that trouble, just read this topic. I'll ... To read more just scroll down

> Report bugs here!

Hey all!
Please report all bugs and errors to our iptracker it will be much more organised!

 
Reply to this topicStart new topic
Guide To Checking Your Server, Making sure you can use minerva
AgentFubu
post Mar 29 2008, 03:09 PM
Post #1


Advanced Member
***

Group: Moderator
Posts: 163
Joined: 3-February 08
From: Chicago, IL
Member No.: 154



I made this topic because many people don't know how to check to make sure they can run minerva. They just install it and it doesn't work. To save that trouble, just read this topic. I'll explain how to check everything on the list of requirements in the manual

-= REQUIREMENTS =-
· PHP 4 or 5
· Valid IPB 2.3.x License
· MYSQL 4 or 5
· Apache with mod_rewrite enabled
· Access to the Admin CP
· Access to FTP to upload the files

-= HOW TO CHECK =-
  1. The first thing we will check for is PHP 4/5. There are two ways.
    1. You can ask your host, the only problem with this is that they may take time to reply. The other option is much faster.
    2. You can upload a php file to your server. This php file must contain:
      CODE
      <?php
              // Get information from server and display to you.
              phpinfo();
              ?>

      You can either paste that in a php file or just download this one which contains that same code:
      Attached File  phpinfo.php ( 75bytes ) Number of downloads: 2

      When you go to the file you uploaded in your server, at the top of the screen should be a nice big version number. There you go! You're done with this step if it says 4 or 5.

  2. The next requirement is a valid IPB license. Did you pay for IPB? If you didn't set up the website but are an admin, ask the person who did to make sure your board is legal. If it isn't, don't be expecting much help but do expect legal trouble from IPB.

  3. MySql 4 or 5 is needed next. Once again there are two ways:
    1. Ask your host once again. Or...
    2. The other way is to use the same PHP file as before. This time, you're going to scroll down to the bottom of the page. You can search for mysql using your browser or just scroll down until you see this:
      Attached File  MYSQL.png ( 17.5K ) Number of downloads: 3

      Look for the version next to Client API version. That's your MySQL version. If it says 4 or 5, you're set!

  4. Next on the list is mod_rewrite for apache. There's a few ways to do this.
    1. First up like always, ask your hosting providor.
    2. The first way is easiest but most inacurate. This only works on some servers because they cloak this information or change it. Enter your URL in the first box on this website:
      http://www.webconfs.com/http-header-check.php
      When you click Submit, you will be taken to another page. Look under the line "Server =>". Here's the tricky part. If you see something with mod_rewrite you're good to go! If not, don't worry, there's 2 more steps you can try.
    3. Another way is to create a file called .htaccess and upload it to a new folder your server. In this file, only have:
      CODE
      # Set up mod_rewrite
            Options +FollowSymLinks
              RewriteEngine on
             RewriteBase /

      Navigate to the folder on your website, and if it displays like it normally would which should be a list of files in the folder all is well. If not, you don't have mod_rewrite. Ask your host to install mod_rewrite on your server.

    4. Thanks to sford999, there's another way to check by uploading files. Upload a script containing:
      CODE
      <?php
      function apache_is_module_loaded($mod_name)
      {
          $modules = apache_get_modules();
          if (in_array($mod_name, $modules))
          {
              echo 'mod_rewrite is installed.';
          }
          else
          {
              echo 'mod_rewrite is <strong>NOT</strong> installed.';
          }
      }
      echo apache_is_module_loaded('mod_rewrite');
      ?>

      And access the file. It will tell you if the module is installed or not. You can also download it:
      Attached File  rewrite_check.php ( 337bytes ) Number of downloads: 1

      Thanks
      sford999!
    5. The last way to check is more advanced. If you have access to your server's config files, check in httpd.conf or apache's config file. Look for this where all your modules are loaded:
      CODE
      LoadModule rewrite_module modules/mod_rewrite.so

      If you have that same line with no # and it works, you're good to go!
      If you see this instead:
      CODE
      #LoadModule rewrite_module modules/mod_rewrite.so

      You can remove the # and restart your server. If it all works well, you now have mod_rewrite. If you get errors or the server refuses to start, add in the # again and ask your host to rebuild apache with mod_rewrite.

  5. Step 5 is to make sure you have the access you need to IPB to configure minerva to work for your boards. If you have access to the admin CP at your forums, then you're fine with this step. You need to be in a group that has access or you can't setup the mod properly and the forums could become messed up.

  6. The last thing you need is FTP access. This means you can upload files to your server. You need permissions to upload and replace for when you update and make the code edits. You must also be able to download so you can download the files. You also need the ability to CHMOD files if your server is linux. Your host should have provided you with all that information.
-= GOOD TO GO =-

Once you've passed all the checks, you can follow the instructions with minerva and install minerva!
Remember if you need any help and you meet the criteria above you can ask for help!

(please tell me of any errors in my guide)


--------------------
My Site: Mccreations
Need help? PM me!
Go to the top of the page
 
+Quote Post
bramburn
post Mar 29 2008, 04:53 PM
Post #2


Administrator
***

Group: Root Admin
Posts: 905
Joined: 25-June 07
From: London
Member No.: 1



thanks for this guide tongue.gif


--------------------
Remember to please use the bug tracker for all bugs and errors, it is more organised that way.
Support in french and english
If I reply in French please excuse my spelling & grammar, i haven't written in french for a long time.
DO NOT PM ME TO ASK ME TO GO ON MSN, post the query on the support forums!
Go to the top of the page
 
+Quote Post
AgentFubu
post Mar 30 2008, 12:13 AM
Post #3


Advanced Member
***

Group: Moderator
Posts: 163
Joined: 3-February 08
From: Chicago, IL
Member No.: 154



No problem, I corrected some errors and made it a little easier to read smile.gif


--------------------
My Site: Mccreations
Need help? PM me!
Go to the top of the page
 
+Quote Post
sford999
post Mar 30 2008, 01:18 AM
Post #4


Member
**

Group: Contributors
Posts: 27
Joined: 15-October 07
From: Redhill UK
Member No.: 75



A quick way of checking is mod_rewrite is installed is to use this script.

CODE
<?php

function apache_is_module_loaded($mod_name)
{
    $modules = apache_get_modules();
    if (in_array($mod_name, $modules))
    {
        echo 'mod_rewrite is installed.';
    }
    else
    {
        echo 'mod_rewrite is <strong>NOT</strong> installed.';
    }
}

echo apache_is_module_loaded('mod_rewrite');

?>


Attached File  rewrite_check.php ( 336bytes ) Number of downloads: 0


Just upload the file to your server and call it from your browser, eg: http://www.domain.com/rewrite_check.php, you will see the result on screen if mod_rewrite is installed or not.
Go to the top of the page
 
+Quote Post
AgentFubu
post Mar 30 2008, 02:54 AM
Post #5


Advanced Member
***

Group: Moderator
Posts: 163
Joined: 3-February 08
From: Chicago, IL
Member No.: 154



Thanks, I added it the main post with credit to you.


--------------------
My Site: Mccreations
Need help? PM me!
Go to the top of the page
 
+Quote Post
mmmec
post Mar 30 2008, 05:43 AM
Post #6


Advanced Member
***

Group: +Pre-release Team
Posts: 78
Joined: 23-July 07
Member No.: 11



CODE
Just upload the file to your server and call it from your browser, eg: http://www.domain.com/rewrite_check.php, you will see the result on screen if mod_rewrite is installed or not.


Fatal error: Call to undefined function apache_get_modules() in /home/xxxxx/public_html/rewrite_check.php on line 4
Go to the top of the page
 
+Quote Post
sford999
post Mar 30 2008, 11:30 AM
Post #7


Member
**

Group: Contributors
Posts: 27
Joined: 15-October 07
From: Redhill UK
Member No.: 75



QUOTE (mmmec @ Mar 30 2008, 06:43 AM) *
CODE
Just upload the file to your server and call it from your browser, eg: http://www.domain.com/rewrite_check.php, you will see the result on screen if mod_rewrite is installed or not.


Fatal error: Call to undefined function apache_get_modules() in /home/xxxxx/public_html/rewrite_check.php on line 4


That means your host has the "apache_get_modules" function disabled.

Try this one instead.

CODE
<?php

function apache_is_module_loaded($mod_name)
{
    $modules = apache_get_modules();
    if(in_array($mod_name, $modules))
    {
        echo 'mod_rewrite is installed.';
    }
    else
    {
        echo 'mod_rewrite is <strong>NOT</strong> installed.';
    }
}

if(function_exists('apache_get_modules'))
{
    echo apache_is_module_loaded('mod_rewrite');
}
else
{
    echo 'Sorry, but your host has disabled the required functions to run this script.<br />This does not mean that mod_rewrite is, or is not available, it just means that this script cannot tell you if it\'s available or not.';
}

?>


Another way to check is to use this:

Create a .htaccess file with the following contents.
CODE
RewriteEngine On
RewriteRule ^link([^/]*)\.html$ rewrite2.php?link=$1 [L]


Then create a file named rewrite2.php and insert the following code into it.
CODE
<?php

if($_GET['link']==1)
{
    echo "You are not using mod_rewrite";
}
elseif($_GET['link']==2)
{
    echo "You are using Apache mod_rewrite";
}
else
{
    echo "Linux Apache mod_rewrite test";
}

echo '<p><a href="rewrite2.php?link=1">LINK1</a> = rewrite2.php?link=1</p>
        <p><a href="link2.html">LINK2</a> = link2.html</p>';

?>
Go to the top of the page
 
+Quote Post
AgentFubu
post Mar 30 2008, 12:43 PM
Post #8


Advanced Member
***

Group: Moderator
Posts: 163
Joined: 3-February 08
From: Chicago, IL
Member No.: 154



QUOTE (sford999 @ Mar 30 2008, 05:30 AM) *
That means your host has the "apache_get_modules" function disabled.

Try this one instead.

CODE
<?php

function apache_is_module_loaded($mod_name)
{
     $modules = apache_get_modules();
     if(in_array($mod_name, $modules))
     {
         echo 'mod_rewrite is installed.';
     }
     else
     {
         echo 'mod_rewrite is <strong>NOT</strong> installed.';
     }
}

if(function_exists('apache_get_modules'))
{
     echo apache_is_module_loaded('mod_rewrite');
}
else
{
     echo 'Sorry, but your host has disabled the required functions to run this script.';
}

?>


Another way to check is to use this:

Create a .htaccess file with the following contents.
CODE
RewriteEngine On
RewriteRule ^link([^/]*)\.html$ rewrite2.php?link=$1 [L]


Then create a file named rewrite2.php and insert the following code into it.
CODE
<?php

if($_GET['link']==1)
{
     echo "You are not using mod_rewrite";
}
elseif($_GET['link']==2)
{
     echo "You are using Apache mod_rewrite";
}
else
{
     echo "Linux Apache mod_rewrite test";
}

echo '<p><a href="rewrite2.php?link=1">LINK1</a> = rewrite2.php?link=1</p>
         <p><a href="link2.html">LINK2</a> = link2.html</p>';

?>


The only problem is that with the second test it will either work or just give a 500 Internal Server Error. That's why in the main post I just used one .htaccess because if you don't have mod_rewrite installed it will give you a server error no matter what.


--------------------
My Site: Mccreations
Need help? PM me!
Go to the top of the page
 
+Quote Post
mmmec
post Mar 30 2008, 03:02 PM
Post #9


Advanced Member
***

Group: +Pre-release Team
Posts: 78
Joined: 23-July 07
Member No.: 11



after trying the first code i got this
CODE
Sorry, but your host has disabled the required functions to run this script.

so should i ask to host to enable mod_rewrite ??
Go to the top of the page
 
+Quote Post
sford999
post Mar 30 2008, 09:02 PM
Post #10


Member
**

Group: Contributors
Posts: 27
Joined: 15-October 07
From: Redhill UK
Member No.: 75



No, what that error means is that the script cannot determine if mod_rewrite is enabled or not.

You`ll have to use an alternative method to check is its available.
Go to the top of the page
 
+Quote Post
mmmec
post Apr 5 2008, 06:42 AM
Post #11


Advanced Member
***

Group: +Pre-release Team
Posts: 78
Joined: 23-July 07
Member No.: 11



i tried the alternate method i got this result
CODE
You are not using mod_rewrite

LINK1 = rewrite2.php?link=1

LINK2 = link2.html

so what this represent mate ? sorry for being lame
BTY :: my host told me that thay have enabled this and u need to put in .htaccess
also told that my forum is using this mod that why i m getting url like this
CODE
http://xxxx.com/forum/content/PHP-Books/121/Programming-PHP/
Go to the top of the page
 
+Quote Post
AgentFubu
post Apr 5 2008, 02:01 PM
Post #12


Advanced Member
***

Group: Moderator
Posts: 163
Joined: 3-February 08
From: Chicago, IL
Member No.: 154



QUOTE (mmmec @ Apr 5 2008, 01:42 AM) *
i tried the alternate method i got this result
CODE
You are not using mod_rewrite

LINK1 = rewrite2.php?link=1

LINK2 = link2.html

so what this represent mate ? sorry for being lame
BTY :: my host told me that thay have enabled this and u need to put in .htaccess
also told that my forum is using this mod that why i m getting url like this
CODE
http://xxxx.com/forum/content/PHP-Books/121/Programming-PHP/


If that page loaded at all you have mod_rewrite no matter what it says on the page. If you didn't get a 500 Server Error, then you have mod_rewrite.


--------------------
My Site: Mccreations
Need help? PM me!
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
Tags
No Tag inserted yet


 



RSS Lo-Fi Version | Sitemap  | SEO by MinervaSEO © Icelabz.net Time is now: 6th October 2008 - 05:33 PM