Archive for the tag 'editing'

SBDavid

Editing Your php.ini File

Editing Your php.ini File

Cpanel server’s php.ini file is located at /usr/local/lib/php.ini. Cpanel strongly recommend using WHM’s PHP Configuration Editor feature (Main >> Service Configuration >> PHP Configuration Editor) to edit PHP’s configuration file.

You must access the Advanced Configuration Editor to change many of the settings.

Example:

safe_mode

Safe mode attempts to solve many of the problems associated with using PHP in a shared hosting environment.
It checks the user ID (UID) of the PHP script and the files and directories it attempts to access. If the UIDs do not match, the script will not be allowed to access the requested file or directory.
note

Note: This feature is deprecated as of PHP 5.3.0.

Reference: http://cpanel.net/

Creating and editing users in MySQL from shell prompt.

First we need to login into MySQL server as root.

mysql -u root -p

Will be prompted for your MySQL root password (note this is not the same as the server root password).

mysql> create user ‘buddy@localhost’ identified by ‘new-password’;
Query OK, 0 rows affected (0.12 sec)

Next we need to flush the privileges which reloads the ‘user’ table in MySQL - do this each time you add or edit users.

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

To give the user buddy select permission on all the databases, this allows the user to read, but not edit and delete.

mysql> grant select on *.* to ‘buddy’@'localhost’;
Query OK, 0 rows affected (0.00 sec)

The GRANT statement enables system administrators to create MySQL user accounts and to grant rights to accounts. To use GRANT, you must have the GRANT OPTION privilege, and you must have the privileges that you are granting. The REVOKE statement is related and enables administrators to remove account privileges.

SBDavid

Creating and editing ACLs

Creating and editing ACLs

Before you can block or allow requests from some address, to some server or for some page you will need to create an appropriate ACL. The basic steps to do this are :

1. Select the type of ACL to create from the drop-down menu below the Access control lists table and click the* Create new ACL* button.

2. On the form that appears, enter a name for your new ACL in the ACL name field. If more than one has the same name, it will be treated as matched if any ACL with that name matches. The name should consist of only letters and numbers, with no spaces or special characters.

3. Fill in the rest of the form as explained in the table below.

4. In the Failure URL field, enter a complete URL that clients who are denied by this ACL will be redirected to. This allows you to define custom error pages to be displayed instead of the default Squid responses.

5. Click the Save button at the bottom of the form.

Once an ACL has been created you can edit it by clicking on its name in the list, changing the fields and clicking Save. Or your can delete it (if it is not in use by some proxy or ICP restriction) with the Delete button. As usual, the Apply Changes link must be used to activate any changes that you make.

Squid has an amazing number of ACL types, although not all are available in all versions of the server.

Many types of ACL are inappropriate for certain situations. For example, if a client sends a CONNECT request the URL path is unavailable, and thus a URL Path Regexp ACL will not work. In cases like this the ACL is automatically assumed not to match.

Article taken from - http://doxfer.com/Webmin/