Saturday, May 30, 2009

Errors when setup phpmotion on ubuntu 9.04

Enviroment: Ubuntu 9.04 under user dir

Error 1:
same this post

Warning: dl() [function.dl]: Dynamically loaded extensions aren't enabled in /home/skatsorg/public_html/classes/config.php on line 2
PHP script /home/skatsorg/public_html/classes/config.php is protected by phpSHIELD and requires the phpSHIELD loader phpshield.5.2.lin. The phpSHIELD loader has not been installed, or is not installed correctly. Please visit the phpSHIELD php encoder site to download required loader.

Solved 1: this server has the dl function disabled in the php.ini file.

phpmotion requires these PHP settings
safe_mode = off
Thread saftery = disabled
enable_dl = On

Error 2: same this post

Warning: dl() [function.dl]: Temporary module name should contain only filename in /home2/hengoutc/public_html/tv/classes/config.php on line 2
PHP script /home2/hengoutc/public_html/tv/classes/config.php is protected by phpSHIELD and requires the phpSHIELD loader phpshield.5.2.lin. The phpSHIELD loader has not been installed, or is not installed correctly. Please visit the phpSHIELD php encoder site to download required loader.

Solved 2: install-phpshield-loaders

How to Install phpSHIELD Loaders

Apr 13th 2009 by shawn
15 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 phpSHEILD 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
    • Tip: can see these infomation by index.php <?php phpinfo(); ?>
  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 yo ur php.ini file:
    # extension=phpshield/phpsheild.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.


Note:
  • บน windows ค่อนข้างยุ่ง ให้เราไปดาวน์โหลด phpshield.loaders.windows.zip และทำการเลือกไฟล์ phpsheild.x.x.win ไปวางไปพาธของ extension_dir และแก้ php.ini โดยเพิ่มเหมือนกันกับ linux นั่นแหละ extension=phpsheild.x.x.win
  • x.x คือ เวอร์ชั่น php บนระบบเรา ซึ่งสามารถดูได้จาก phpinfo();

PHP SHIELD OK [phpinfo();]

Reference

No comments:

Post a Comment

Popular Posts