Phpgacl Chinese Handbook (10) installation

Source: Internet
Author: User
Tags gz file
Phpgacl Chinese Manual (10) installation

In front of the PHPGACL concept and how to control the rights of the simple elaboration, from the beginning of this chapter, write how to install PHPGACL, installation of two, basic installation and advanced installation, I would like to make a description.
Installation
Basic Installation
1 Extract the. tar.gz file to the root or subdirectory of your site, and you can rename it to a name that you think is appropriate.
2 You can edit the phpgacl/gacl.class.php,gacl.inc.php file with your favorite editor and set the Db_type, Db_host, Db_user, Db_password and db_name variables you will use.
Now keep the same information in the phpgacl/admin/gacl_admin.inc.php file. This file is not only installed by the script but is also called by the ACL Management daemon.

The reason to keep the same information for two files is that the ACL core library file gacl.class.php is much smaller than the entire API class file, and there is no need to include all the code when you just want to call the Acl_check () file.

Create the database you specified in the DB_NAME variable on the server (take MySQL as an example)

Enter the URL in the browser http://Your site/phpgacl/setup.php. The requested form will be built into the database you created. Don't worry about seeing a bunch of output, and if it works, you'll only see the success message.

Now create the Phpgacl/admin/templates_c directory according to the recommendations that appear on the screen at the end. it must be writable by the WEB server user. If you cannot do this, then you will not be able to use CAL management!
Click the link at the bottom of the successful Installation page or enter the URL directly in the browser: http://yoursite.net/phpgacl/admin/acl_admin.php

Advanced Installation
Re-use an existing ADOdb installation method
If you have already used ADOdb, you can make phpgacl use the ADOdb copy.
1 Edit the phpgacl/gacl.class.php file and set the Adodb_dir variable to the directory where the ADBDB library resides.
2 Rename the Phpgacl/adodb directory to another name, such as Adodb_x, and reload the page phpgacl/admin/acl_admin.php to make sure it works correctly.
3 Remove the ADODB directory installed with Phpgacl.


Re-use installed Smarty
1 Edit the phpgacl/admin/gacl_admin.inc.php file so that the variables $smarty _dir and $smarty _compile_dir can point to the location where the Smarty library is installed, and the Template_c directory you are using.
Move the Phpgacl template directory to another directory (such as the parent directory), and adjust the variable $smarty _template_dir to point to the new location. Of course, if you want to, you can also move these templates to an existing template directory.
2 Rename the Phpgacl/smarty directory to a different name (such as smarty_x) and reload the phpgacl/admin/acl_admin.php page to make sure it works correctly.
3 Remove the Smarty directory installed with Phpgacl


How do I move the Phpgacl file out of the site directory while leaving a link in the directory to manage it?
1 Go to your website root directory
2 Move the Phpgacl directory into your includes directory while creating a soft link to the Administrative Tools directory.
MV phpgacl//www/includes_directory
Ln-s/www/includes_directory/phpgacl/admin/gacl
3 Enter the URL now: http://yoursite.net/gacl/acl_admin.php, go to the Administration page. If the page does not display properly, make sure that your site server allows soft links to exist in the site directory.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.