How to install Custom PHP Version for suphp handler domains.

33

How to install Custom PHP Version for suphp handler domains.

# cd /usr/src
# wget http://us.php.net/get/php-5.4.17.tar.gz
# tar -zvxf php-5.4.17.tar.gz
# cd php-5.4.17

To check the current PHP configuration option

# php -i | grep configure

Here I am using prefix as /usr/local/php-5.4.17

[ #./configure –prefix=/usr/local/php-5.4.17 –enable-cli –enable-cgi –with-curl –as per your requirements.

#make
#make install

Check the PHP Version

-bash-4.1# /usr/local/php-5.4.17/bin/php -v
PHP 5.4.17 (cli) (built: Jul 19 2013 00:45:34)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
with the ionCube PHP Loader v4.4.1, Copyright (c) 2002-2013, by ionCube Ltd.
-bash-4.1#

Copy the main php.ini on the Custom php location, here it is /usr/local/php-5.4.17/lib

Check the current configuration file for Custom php.ini

-bash-4.1# /usr/local/php-5.4.17/bin/php -i | grep php.ini
Configuration File (php.ini) Path => /usr/local/php-5.4.17/lib
Loaded Configuration File => /usr/local/php-5.4.17/lib/php.ini
-bash-4.1#

Add the required PHP modules on extension directory. Here I have downloaded the ionCube and copy the .so module on ***20100525 directory

[IONLoader]
zend_extension=/usr/local/php-5.4.17/lib/php/extensions/no-debug-non-zts-20100525/ioncube_loader_lin_5.4.so

# vim /opt/suphp/etc/suphp.conf

[handlers]
application/x-httpd-php5.4=”php:/usr/local/php-5.4.17/bin/php-cgi”

# /usr/local/apache/conf/includes/pre_main_2.conf


Allow from All

### check the domain document root and set info page.
suPHP_AddHandler application/x-httpd-php5.4
AddType application/x-httpd-php5.4 .php

Also add the handler in the domain .htacess file.

/etc/rc.d/init.d/httpd configtest
/etc/rc.d/init.d/httpd restart

———————————>

Permission denied (publickey,gssapi-keyex,gssapi-with-mic)

1

If you are facing this error while accessing the server via SSH

Permission denied (publickey,gssapi-keyex,gssapi-with-mic)

Reason is the password authentication was disabled on sshd_config file:

# Password authentication disabled

Resolution : Access the server WHM and enable password authentication

WHM >> Security Center »SSH Password Authorization Tweak

Restart the sshd service.

MySQL ERROR! The server quit without updating PID file

2

ERROR! The server quit without updating PID file

You may face this error while restarting MySQL service.

——————–
root@ [~]# /etc/init.d/mysql status
ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists
——————–

If you are facing the above error just remove the MySQL lock file and restart the server. May be while restarting the service you will get the pid error.

root@ [~]# rm /var/lock/subsys/mysql
rm: remove regular empty file `/var/lock/subsys/mysql’? y

—————————
root@ [~]# /etc/init.d/mysql restart
ERROR! MySQL server PID file could not be found!
Starting MySQL… ERROR! The server quit without updating PID file (/var/lib/mysql/hostname.pid).
—————————

In this case check the MySQL process and kill it. In this case there is no more MySQL process, so I need to check the MySQL log.

———————
root@ [~]# ps aux | grep mysql
root 32616 0.0 0.0 107412 864 pts/3 S+ 11:14 0:00 grep mysql
——————–

If the issue still persist please check the MySQL log may be there is any incorrect entry on my.cnf file.

Sample log
—————
130728 11:23:45 [ERROR] /usr/sbin/mysqld: unknown variable ‘set-variable=max_user_connections=50’
130728 11:23:45 [ERROR] Aborting

130728 11:23:45 InnoDB: Starting shutdown…
130728 11:23:45 InnoDB: Shutdown completed; log sequence number 2153996
130728 11:23:45 [Note] /usr/sbin/mysqld: Shutdown complete

130728 11:23:45 mysqld_safe mysqld from pid file /var/lib/mysql/hostname.pid ended
—————

Edit the my.cnf file and #hash the enrty then start the MySQL.

—————
root@ [~]# /etc/init.d/mysql start
Starting MySQL.. SUCCESS!
root@ [~]#
—————

Clamd AntiVirus daemon giving local socket error while restarting Exim

0

Clamd AntiVirus daemon giving local socket error

———-
root@ [~]# /etc/init.d/exim restart
Shutting down clamd: [FAILED]
Shutting down exim: [ OK ]
Shutting down spamd: [ OK ]
Starting clamd: ERROR: LOCAL: Socket file /var/clamd could not be bound: Permission denied
ERROR: Can’t unlink the socket file /var/clamd

[FAILED]
Starting exim: [ OK ]
0 processes (antirelayd) sent signal 9
/usr/local/cpanel/scripts/update_sa_rules: running in background
———-

Open clamd.conf file

vim /etc/clamd.conf

Comment the below lines by giving #. This will fix the error:

LocalSocket unix:/var/run/clamav/clamd.sock
FixStaleSocket yes

root@ [~]# /etc/init.d/exim restart

—————————->

How to reset Litespeed password

0

How to reset Litespeed password in Linux system

Login to the server via SSH access. Go to the directory /admin/misc/; where LiteSpeed installed. If you have install LiteSpeed in /usr/local/ then you will find it in /usr/local/admin/misc/.

# cd /usr/local/lsws/admin/misc
#/usr/local/lsws/admin/misc# pwd
/usr/local/lsws/admin/misc

Change your password by running admpass.sh file which works to change the Litespeed admin password.

bash-4.1# ./admpass.sh

Please specify the user name of administrator.
This is the user name required to login the administration Web interface.

User name [admin]:

Please specify the administrator’s password.
This is the password required to login the administration Web interface.

Password:
Retype password:

Administrator’s username/password is updated successfully!

Done!
—————————->