Custom php.ini to use with fcgi

1, copy the default cgi-sys wrapper script and save it like the following

cp -rp /usr/local/cpanel/cgi-sys/php5 /usr/local/cpanel/cgi-sys/php5-username

2, Now edit the newly created file

vi /usr/local/cpanel/cgi-sys/php5-username

3, Add the following line above exec

[[ -f ~/public_html/php.ini ]] && exec /usr/bin/php -c ~/public_html/php.ini

4, So the script will look like this now

#!/bin/sh

# If you customize the contents of this wrapper script, place
# a copy at /var/cpanel/conf/apache/wrappers/php5
# so that it will be reinstalled when Apache is updated or the
# PHP handler configuration is changed
[[ -f ~/public_html/php.ini ]] && exec /usr/bin/php -c ~/public_html/php.ini
exec /usr/bin/php

5. Now copy the default php.ini to the public_html location

6, Add the following htaccess code

FCGIDWrapper /usr/local/cpanel/cgi-sys/php5-username .php

Undefined subroutine &main::user2uid called

After the recent upcp to 11.54.18, we are facing issues with exim in which the mails are not sending properly and the logs shows the following.

failed to expand condition “${if and{{bool_lax{NULL}}{bool_lax{${perl{enforce_mail_permissions}}}}}}” for enforce_mail_permissions router: Undefined subroutine &main::enforce_mail_permissions called.

Fix : rebuild exim conf and copy exim.conf.pl

/scripts/buildeximconf
cp -rpf /etc/exim.pl.local /etc/exim.pl

Cpanel X3 theme issue

My cpanel was not loading with x3 theme and paper lantern theme. My server was running on cloudlinux kernel

Issue: This issue was reported in internal case CPANEL-3875, however it was determined the issue is with the Cloud Linux application

Fix : Remove the following three lines from the files

a, /usr/local/cpanel/base/frontend/paper_lantern/dynamicui.conf and

/usr/local/cpanel/base/frontend/x3/dynamicui.conf

 

file=>lverubysel,skipobj=>1
file=>lvepythonsel,skipobj=>1
file=>enduserlve,skipobj=>1

 

 

RAID Array in IMPACTED STATE

I have a server with raid controller adaptec and the raid status was showing as impacted.

Logical device number 1
Logical device name :
RAID level : 50
Status of logical device : Impacted

In order to get the array into an Optimal state, a Verify with Fix must be initiated from Storage Manager or ARCCONF. Using ARCCONF, the following method is used

/usr/StorMan/arcconf task start <Controller#> LOGICALDRIVE <LogicalDrive#> option

Controller# is the controller number
LogicalDrive# is the number of the logical drive in which the task is to be performed

/usr/StorMan/arcconf task start 1 logicaldrive 1 verify_fix

Various Logical drive options:

======================
– verify_fix (Verify with fix) — verifies the logical drive redundancy and repairs the drive if bad data is found.
– verify — verifies the logical drive redundancy without repairing bad data.
– clear — removes all data from the drive.

Steps to add an existing openvz VE into solusvm

We can directly import virtual servers, that were created manually into SolusVM s using the following method

1, First we need to enable import mode to on from solusvm panel

a, admincp go to Configuration > Settings > Other and tick Import Mode.

2, To import a OpenVZ virtual server from the admincp do the following:

Select Virtual Servers > Add Virtual Server

Select OpenVZ

Select the Node & Plan, then click Continue
Enter the container ID of the virtual server you want to import (as shown under vzlist on the host node) in the Container ID field
Fill in the rest of the fields
Click the Create Virtual Server button
Add any extras ip’s etc.. to the virtual server
If you receive the error “Container id already exists”, it means that the VEID of the vps that we are importing is already present in solusvm. For that you need to use the following method
3, Enter the node where the ve exists
4, If backup is mounted, umount the backup
5, Now we are considering the following

sourcecid=100
targetcid=101

6, Proceed with the chnage

vzctl chkpnt 100 –dumpfile /tmp/Dump.100
mv /etc/vz/conf/100.conf /etc/vz/conf/101.conf
mv /vz/private/100 /vz/private/101
mv /vz/root/100 /vz/root/101
vzctl restore 101 –dumpfile /vz/Dump.101

now check vzlist -a and you will see the VE is updated with the new VEID 101
Now you can go to step number 2 again and successfully import the ve through solusvm

InnoDB: Error: pthread_create returned 11

Mysql was not starting in my server and checking the error log, I got the following

——–

InnoDB: Fatal error: cannot allocate memory for the buffer pool

InnoDB: Error: pthread_create returned 11

——–

The fix I found in various forums was to to reduce the innodb buffer pool size and also increase the stack size using the following command

ulimit -s unlimited

In my server, I need to reduce the buffer size ( eg key_buffer_size) and also the cache like query_cache_size mentioned in my.cnf also to fix the issue.