.weblog engine
 

Pivot Setup

Is a small PHP script that enables you to install Pivot very easily and is especially handy when you are faced with a hosting-provider who has turned safe-mode on.

  • Install directly from SourceForge (without downloading to your local machine and then uploading the files to your host with FTP); OR
  • Install by just uploading the zip file through the script - no need for an FTP client (or unzipping before uploading).

In addition you install Pivot:

  • In a safe manner (without world-writeable files/directories) AND
  • On servers which have Safe Mode enabled you no longer need to use any hacks.

Maybe even more importantly is that Pivot Setup can detect any problems with your server before you install Pivot. This can save you much time and frustration. Fatal errors are reported on the frontpage of the script and even more info can be found on the test page.

Pivot Setup has its own support thread in the forums where you can get the latest version (as a 11 kB zip file).

Documentation

This is a short introduction to safe-mode and a detailed list to how to install and use Pivot Setup (if in safe-mode). If you are not in safe-mode, you can skip to the general_steps section - the six first points in the list should do. If you have problems, you can read the rest of the list.

This text is based on a post in the Pivot forums written by notjikkie - thanks!

Safe-mode troubles

Safe-mode causes a lot of problems with Pivot when uploading (installing) manually by FTP. Since Pivot writes back data to disk on the server, a lot of errors occur and as a result will cause Pivot to become severely crippled if not useless. This is because the web server sees your FTP-program as a different user as when visiting/modding your weblog and as a result of this Pivot is refused write-access to its own files. A workaround is to manually change the access-permissions of your Pivot directories using the chmod-command with an FTP-program. This is not only a tedious job to do, but also introduces an unwanted security risk. This is where Pivot Setup comes in very handy.

How does it work

Pivot Setup uses a different approach and omits the use of manually chmodding files and directories (almost) completely. A (small) disadvantage is that when you have installed your Pivot weblog with Pivot Setup you can no longer arbitrary use a FTP-program to upload things to your weblog. If you really, really need to use FTP (for example because you prefer to edit the templates in your favorite editor), you must first use Pivot Setup to set the permission to 666/777 on the relevant files.

Now how does it work? Simply said, Pivot is installed (copied over HTTP) to your weblog directory and as such doesn't 'upload' files but 'downloads' them from your (home) computer or from another host (e.g. sourceforge). By doing so the owner-rights of the files are instantly correct without having them to be 'world-writable'.

General steps

  1. Download the Pivot Setup zip-file from the support thread to your computer and unzip the php-file to a directory of your choice.
  2. Open pivot-setup.php in a txt-editor (e.g. Wordpad or something, but not Notepad because it sucks) and fill in a password of your choice between the 2 double-quotes after the password-definition. This will be the password that is required when you run pivot-setup.php on your server. Save the file and exit.
  3. Using a FTP program make a new directory where your weblog will be installed. (resulting in something like .com/johnsblog) With the chmod command change the setting of the johnsblog-directory temporarily to 777.
  4. Upload your modified pivot-setup.php file to the johnsblog directory. Close your FTP connection for now.
  5. Open your browser and type the url: www.johndoesdomain.com/johnsblog/pivot-setup.php and hit enter. Of course you need to change the url to your own one.
  6. Read the HELP in the script. Seriuosly, do it, since it explains a lot of questions you might think of later!
  7. Use the TEST option to check if your webserver is in safe mode and if the php unzip function is activated. Follow the instructions if the unzip-test fails.
  8. If your server is in safe mode let the script make a new directory where the index.php (startpage) will reside after the installation is done. This IS important to do when running in safe mode. In our example this could be: www.johndoesdomain.com/johnsblog/blogfiles where blogfiles is the newly created directory. If you're not in safe mode, you do not need to do this. If you find the url to your weblog a bit long, you can skip creating the johnsblog directory and install from the root directory (which needs to be chmod to 777 as described in step 2).
  9. Pivot Setup can install Pivot directly from the files on Source Forge, there is no need to download them to your own computer first. For this the unzip-functionality of php should be installed (mostly standard). You allready checked for this with the 'test'-option if you followed these instructions.
  10. Let the script install all the necessary files.
  11. Click on the admin-setup in Pivot Setup to set up the admin-account of your weblog. To avoid any problems later on in your weblog life, make an everyday-user account for yourself in the userpages. This account should be used to post your logs so that you can't screw up your layout in daily use.
  12. If you had have Pivot Setup made a new directory for your index.php file you should tell Pivot you did in the setup. (administration - weblogs) Every setting where it says ../ change it to what you chose. In our example it would be ../blogfiles/. Do not forget the last slash!
  13. When you're done installing, chmod the weblog directory back to what it was (normally 755). That would be the johnsblog directory in our example. Optionally use your FTP program to either delete pivot-setup.php or edit it and set an empty password, so you are 100% sure that it can't be mis-used. It is password protected, but you never know …

Additional notes

Everytime you use Pivot Setup to install/upgrade/uninstall files do not forget:

  1. Use your ftp program to change your weblog directory's permissions (chmod) to 777.
  2. Edit pivot-setup.php and set your password. (Optional)
  3. Use the script to do what you want to do.
  4. Edit pivot-setup.php and set an empty password, so you are 100% sure that it can't be mis-used. (Optional)
  5. Use your ftp program to reset the weblog directory's permissions to 755.

 
pivot_setup.txt · Last modified: 2008/06/27 13:43 (external edit)
 
Special thanks to our platinum sponsors: Gambling News