Apr 13th 2009 by Shawn
32 Comments   respond |  trackback  

It seems one of the biggest problems people have with installing PHPmotion on their web server is the phpSHIELD requirement. The PHPmotion forum gets so many posts on the subject in fact, that they opened a special phpSHIELD board just to accommodate all of the questions.

The vast majority of problems IMO is that people don’t understand how to install the PHP Shield loaders properly. Either they can’t find the documentation on the phpSHIELD website, they don’t understand the documentation (which isn’t very beginner friendly), or they believe that they have to install the full version of phpSHIELD which costs $75. However this just isn’t true. The fact is…the phpSHIELD loaders are free, and all you need to install (as far as phpSHIELD goes), in order to run PHPmotion or any other script that utilizes phpSHIELD.

This tutorial will give you step by step instructions on how to install phpSHIELD loaders on a Linux server. Please be sure to read all of the requirements before beginning tutorial.

Requirements

  • This tutorial covers installing phpSHIELD on a Linux server. These instructions will do no good if you are using a Windows server. I know that it can be done, however Windows servers are not supported by PHPmotion so there is no sense in me covering how to install on Windows.
  • You must have root access to your server. This means you have a VPS, dedicated server, or are running a server in your home. If you have shared hosting, you will not be able to install phpSHIELD, so there is no point reading any further if you are on a shared hosting plan.
  • In this tutorial, I will be installing phpSHIELD on a server running CentOS 5.2, although the tutorial should still be helpful for any Linux distro.
  • Although not vital, it would be helpful if you have at least a basic knowledge of Linux commands and how to use a Linux terminal and/or SSH client.
IMPORTANT: If you are not comfortable using a terminal to edit, move, delete files etc… you should not attempt this. I am not responsible for any damage you do to your server configuration.

Installing phpShield Loaders

  1. The first thing we need to do is check a couple of PHP settings. The easiest way to do this is with a phpinfo file. If you don’t know how to create a phpinfo file, you can find instructions here.
  2. Now that you have a php info file, upload it to your website’s public_html directory and view it in your browser by typing http://www.yoursite.com/phpinfo.php in your address bar. You want to find/verify the following in your phpinfo.php file:
    • Your PHP version
    • Thread Safety is disabled
    • enable_dl is set to on
    • The path to your extension_dir
    • Path to your php.ini file
  3. Now connect to your webserver using your favorite SSH client and login as root.
  4. Create a new working directory then change directories:
    # mkdir ~/phpshield

    # cd ~/phpshield

  5. Download the phpSHIELD loaders:
    # wget http://phpshield.com/loaders/phpshield.loaders.linux.zip

    or if you have a 64 bit OS (most people will have a 32 bit OS so you will most likely use the code above)

    # wget http://phpshield.com/loaders/phpshield.loaders.linux-64.zip
  6. Extract the loaders:
    # unzip phpshield.loaders.linux.zip
  7. If you do a directory list:
    # ls

    you will see a bunch of files named phpshield.4.3.lin to phpshield.5.2.lin. What we want to do here is find the phpshield file with the number that matches your PHP version. You can find your PHP version at the very top of your phpinfo file from earlier.

  8. Now we need to copy the appropriate phpshield loader file to your PHP extensions directory.
    # cp ~/phpshield/phpshield.x.x.lin /path/to/your/php/extensions/directory

    Replace x.x above with your PHP version and use the path to your PHP extensions directory (you should have found this in step 2 above.)

  9. Open your php.ini file
    # nano /path/to/php/ini/php.ini

    You should have found the path to your php.ini file in your phpinfo.php file from earlier.

  10. Append the following to the Dynamic Extensions section of your php.ini file:
    # extension=phpshield/phpshield.x.x.lin

    Replace x.x with the number on the phpshield file you moved earlier.

  11. Finally, restart httpd:
    # /etc/rc.d/init.d/httpd restart

That’s it! You should have phpSHIELD installed correctly on your server now.


32 Responses

  1. avatar jhowzr says:

    I’m trying to install phpmotion on an opensuse 11.2 server with php 5.3. Has anyone been able to get the phpshield loader to work? they’re now named ixed4.x.x.x.lin…

    Thanks!

  2. avatar Valentin says:

    Guyz, I trying to install it, but with no luck…How to disable thread-safety? I am using wamp and xampp on a windows XP machine…

  3. avatar mark says:

    hello
    in http://phpshield.com/loaders/phpshield.loaders.linux.zip
    the extensions are 1.0.x and 2.0.x …
    there is no 1.x or 2.x
    what should i do
    should i rename the file?

    also where do you create this phpshield folder and why you have the following line :
    # extension=phpshield/phpshield.x.x.lin
    into php.ini if you mouve the phpshield.x.x.lin file into extension folder?

    thanks

  4. avatar ghostrider says:

    I’m new to phpmotion but i read that it does not support local installation.

  5. avatar Dr.Vista says:

    And What if i’m not The owner of the server??

    i’m on shared host

    • avatar shawn says:

      Then you won’t be able to install the loaders. This is explained in the requirements above. You will need to talk to your host.

  6. avatar Justin says:

    To my last post right below, than where can I ask that question or questions like that one? Do they have a phone number or an e-mail that I can ask to find more information?

  7. avatar Justin says:

    What is the point of using the phpShield Loaders, if this software is free to use, other than limiting it only to users who have their own server or who have payed a lot of money to have their own server. Can you all make one for people who use shared hosting, so we can have the same opportunity and make it run on PHP4 and MySql 4?

    • avatar shawn says:

      Most of PHPmotion is open, but it is not distributed under an open source license and has never been said to be Open Source. The decision to use phpShield was made by the devs of PHPmotion, which do not run or have anything to do with this site (PHPmotionWiz). I have no role in that decision or anything to do with the development of PHPmotion. I only do the templates, other than that…I am just a user of PHPmotion like the rest of you.

      In short… You’re asking this question in the wrong place.

  8. avatar chej says:

    Please help,

    I followed the tutorial but still the server saying “PHP script /var/www/vhosts/medivisionfilms.com/httpdocs/classes/config.php is protected by phpSHIELD and requires the phpSHIELD loader phpshield.5.1.lin. The phpSHIELD loader has not been installed, or is not installed correctly. Please visit the phpSHIELD php encoder site to download required loader.”

    thanks

  9. avatar Rumait says:

    I have download the file from http://www.phpshield.com/loaders/ and i have php version 5.2.9, its not in the folder, what i do ?

  10. avatar Yury says:

    My Thread Safety is enabled, how do i disable it?

    And on number
    4.Create a new working directory then change directories:
    # mkdir ~/phpshield
    # cd ~/phpshield

    what is that? what is #??? and stuff, how and where do I do this?? (I use FileZilla)

  11. avatar thomas says:

    # extension=phpshield/phpsheild.x.x.lin

    should be

    # extension=phpshield/phpshield.x.x.lin

    ofc. :)

  12. avatar candeller says:

    The only thing I can think of more is that I am not copying them directly to the /var/www folder (which is my public_html) folder.

    I upload classes, phpshield folders to a /home/ folder and then just move them over via an SSH client. Can this make a difference?

  13. avatar candeller says:

    Hi. I just redeployed everything making sure I upload the classes and phpshield folders in binary mode – and unfortunately it didn’t help. Still getting the error when I use convertor,php :/

  14. avatar candeller says:

    Hi.

    I got a problem on ubuntu server edition.

    http://mypage.com works,
    http://mypage.com/setup works

    Essentially everything works except

    that after running a command:
    php -q /var/www/convertor.php

    I get a following error

    From: root@admin.pptv.pl (Cron Daemon)
    To: zb1g@admin.pptv.pl
    Subject: Cron php -q /var/www/convertor.php
    Content-Type: text/plain; charset=UTF-8
    X-Cron-Env:
    X-Cron-Env:
    X-Cron-Env:
    X-Cron-Env:
    Message-Id:
    Date: Sat, 23 May 2009 09:45:01 +0200 (CEST)

    Warning: dl(): Dynamically loaded extensions aren’t enabled in /var/www/classes/config.php on line 2
    PHP script /var/www/classes/config.php is protected by phpSHIELD and requires the phpSHIELD loader php$shield.5.2.lin. The phpSHIELD loader has not been installed, or is not installed correctly. Please visit the <A HREF=”http://www.phpshield.com/loader$phpSHIELD php encoder site to download required loader.

    Which means I am unable to convert movies and I have no idea why.

    I got added

    myextensionpath/phpshield/phpshield.5.2.lin

    dynamic extensions loaded:

    extension=phpshield/phpshield5.2.lin

    Any ideas?

  15. avatar lex says:

    how come there are approved shared web hosting, but the installation clearly states that the phpmotion script and phpshield CANNOT be upload or installed on anything but VPS, or dedicated hosts????

    I currently have hostmonster as my host and i woul like to try phpmotion. is it possible to use phpmotion on hostmonster host (shared)???

    also, i looked into glowhost, they claim phpmotion can fully be used with their basic shared hosting? please advise…

    • avatar shawn says:

      Because shared hosting typically does not give you root access to the servier, which is required for this tutorial… The approved shared hosts work because they already have phpshield loaders installed, so there is no need for you to install them. If hostmonster has all of the server requirements for PHPmotion installed, then you should be able to use them. My guess however, is that they do not.

  16. avatar jess says:

    Hi again, i have managed to open the php.ini file with the command

    vi /etc/php.ini and not nano… because it just doesn’t work.

    and it opens up the php.ini file, but after making the change in the file, how do you save the changes and get back to the comman prompt in order to restart httpd?

    Obviously i’m a total novice at all of this, so thank you in advance for your help?

    j

  17. avatar jess says:

    Help! pleeeze…

    I am trying to this all correctly and following each direction… but when I get to the part where I have to …. # nano /path/to/php/ini/php.ini … which for me is # nano /etc/php.ini …. I get a return comment …. -bash: nano: command not found

    what do I do?

    any help would be greatly appreciated!

    j

  18. avatar shamblix says:

    Oh and I used phpshield.5.1.lin because my server is running php 5.1.6.

  19. avatar shamblix says:

    Hi, thanks for this step by step guide. I got the error saying “…config.php is protected by phpSHIELD and requires the phpSHIELD loader phpshield.5.1.lin” I followed all of the steps but it did not fix the problem. Everything went smooth, but i got unsure at the part where I am to open the php.ini file. Once we find the Dynamic Section part, do I add the line # extension=phpshield/phpsheild.x.x.lin and press cntrl X and save by pressying Y and then enter again? Do I add it with or without the “#”.

    Thanks you

  20. avatar islandjim says:

    A great tutorial would be how to set up and work on the site locally.

  21. avatar sbcjr says:

    Great specific info! Thank you!

Leave a Reply

Shopping Cart

Your shopping cart is empty

Visit the shop