Strict standard error in PHP

While working on one of clients website after migration from PHP 5.3 to PHP 5.6

I would see the error on “[01-Jul-2016 02:18:54 America/Chicago] PHP Strict Standards:  Declaration of Countries::getAttribute() should be compatible with CActiveRecord”

On googling around I could see the issue was fixed by making changing few settings in php.ini

Add & ~E_STRICT to the end of the active error reporting line. For example, if your current setting is:

error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED

You would change it to read:

error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT

and restart httpd

This will fix the issue.

 

 

An installation already exists softacalous

While working on one server with cpanel I was facing this error

where I was getting “An installation already exists softacalous” while installing an application via softacalous

Where as in Softacalous I could not see any application installed.

While debugging I  found the error was occuring from  in file

/home/username/ .softaculous/ installations.php

I went ahead and truncated it and fixed this issue

 

How-To disable IPv6 on RHEL6 / CentOS 6 / etc

Proper way of disabling IPv6 subsytem in RedHat Linux 6 / CentOS 6 (dont unload modules or so)

in /etc/sysctl.conf  :  net.ipv6.conf.all.disable_ipv6 = 1

in /etc/sysconfig/network  : NETWORKING_IPV6=no

in /etc/sysconfig/network-scripts/ifcfg-eth0 : IPV6INIT=”no”

disable iptables6 – chkconfig –level 345 ip6tables off

reboot

done

 

Without reboot it can be done using below command to disable IPV6

root@host121 [~]# echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
root@host121 [~]# echo 1 > /proc/sys/net/ipv6/conf/default/disable_ipv6

 

However on reboot will need to run same command again as it will revert back to original settings.

 

 

 

[AuthFailure] Either the username was not recognised, or the password was incorrect)

Getting error on XVNC for password authentication

I could see below error in logs

[AuthFailure] Either the username was not recognised, or the password was incorrect)

After googling I found vnc server will need to be restarted once password is reset

root@online [~]# /etc/init.d/vncserver-virtuald restart
root@online [~]# /etc/init.d/vncserver-x11-serviced restart

Now VNC work fine

Apache Issue

“Secure Connection Failed

An error occurred during a connection to realtrafficsource.com. The OCSP server suggests trying again later. Error code: SEC_ERROR_OCSP_TRY_SERVER_LATER

The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
Please contact the website owners to inform them of this problem.”

Solution:

Login in server and restart Apache.

 

Find GPU or Graphical processing Unit in Linux

While working on one of the issue we need to check if GPU is installed

We got it using below command which shows type of CPU installed in cli mode

[root@localhost ~]# lspci -vnn | grep VGA -A 12
07:0b.0 VGA compatible controller [0300]: ASPEED Technology, Inc. ASPEED Graphics Family [1a03:2000] (rev 10) (prog-if 00 [VGA controller])
Subsystem: QUANTA Computer Inc Device [152d:897a]
Flags: medium devsel, IRQ 10
Memory at df800000 (32-bit, non-prefetchable) [size=8M]
Memory at df7e0000 (32-bit, non-prefetchable) [size=128K]
I/O ports at ec00 [size=128]
Expansion ROM at <unassigned> [disabled]
Capabilities: [40] Power Management version 3

We could see our server had  ASPEED Technology, Inc. ASPEED Graphics card installed

 

Find the Model Number of Network Card in Linux

To find the model number of Network Interface Card installed in your Machine, you can use the lspci command. lspci command will list all detected PCI or PCIe hardware devices installed on your machine. So in order to find only network cards, you can run following command:

We got it using below command on our linux server

[root@localhost ~]# lspci | grep -i “Ethernet”
06:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
06:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)

We see the ethernet card installed is  Intel Corporation 82576 Gigabit Network

Installing lspci on CentOS

lspci module is not installed on linux os by default

you need to use below steps to install it

[root@localhost ~]# yum install pciutils
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: yum.tamu.edu
* extras: mirrors.cmich.edu
* openvz-kernel-rhel6: openvz.jetfire.io
* openvz-utils: openvz.jetfire.io
* updates: centos.mia.host-engine.com
Resolving Dependencies
–> Running transaction check
—> Package pciutils.x86_64 0:3.1.10-4.el6 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================================================
Installing:
pciutils x86_64 3.1.10-4.el6 base 85 k

Transaction Summary
========================================================================================================================================================================
Install 1 Package(s)

Total download size: 85 k
Installed size: 180 k
Is this ok [y/N]: y
Downloading Packages:
pciutils-3.1.10-4.el6.x86_64.rpm | 85 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : pciutils-3.1.10-4.el6.x86_64 1/1
Verifying : pciutils-3.1.10-4.el6.x86_64 1/1

Installed:
pciutils.x86_64 0:3.1.10-4.el6

Complete!

The module is necessary to check of ethernet or graphics card installed in cli mode

 

 

Fixed: Strict Standards: Non-static method JLoader::import()

Code:
Strict Standards: Non-static method JLoader::import() should not be called statically in /var/www/vhosts/marylynnmurray/yalestationspaandsalon.com/libraries/joomla/import.php on line 38Strict Standards: Non-static method JLoader::register() should not be called statically in /var/www/vhosts/marylynnmurray/yalestationspaandsalon.com/libraries/loader.php on line 71

Strict Standards: Non-static method JLoader::import() should not be called statically in /var/www/vhosts/marylynnmurray/yalestationspaandsalon.com/libraries/joomla/import.php on line 39

Strict Standards: Non-static method JLoader::register() should not be called statically in /var/www/vhosts/marylynnmurray/yalestationspaandsalon.com/libraries/loader.php on line 71

Strict Standards: Non-static method JLoader::load() should not be called statically in /var/www/vhosts/marylynnmurray/yalestationspaandsalon.com/libraries/loader.php on line 161

Strict Standards: Non-static method JLoader::register() should not be called statically in /var/www/vhosts/marylynnmurray/yalestationspaandsalon.com/libraries/loader.php on line 138

Strict Standards: Non-static method JLoader::import() should not be called statically in /var/www/vhosts/marylynnmurray/yalestationspaandsalon.com/libraries/loader.php on line 186

Strict Standards: Non-static method JLoader::register() should not be called statically in /var/www/vhosts/marylynnmurray/yalestationspaandsalon.com/libraries/loader.php on line 71

Strict Standards: Non-static method JFactory::getConfig() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/marylynnmurray/yalestationspaandsalon.com/libraries/joomla/application/application.php on line 726

Strict Standards: Non-static method JFactory::_createConfig() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/marylynnmurray/yalestationspaandsalon.com/libraries/joomla/factory.php on line 73

Strict Standards: Non-static method JLoader::import() should not be called statically in /var/www/vhosts/marylynnmurray/yalestationspaandsalon.com/libraries/loader.php on line 186

Strict Standards: Non-static method JLoader::load() should not be called statically in /var/www/vhosts/marylynnmurray/yalestationspaandsalon.com/libraries/loader.php on line 161

Strict Standards: Non-static method JLoader::register() should not be called statically in /var/www/vhosts/marylynnmurray/yalestationspaandsalon.com/libraries/loader.php on line 138

Strict Standards: Non-static method JLoader::register() should not be called statically in /var/www/vhosts/marylynnmurray/yalestationspaandsalon.com/libraries/joomla/registry/registry.php on line 19

Strict Standards: Non-static method JLoader::load() should not be called statically in /var/www/vhosts/marylynnmurray/yalestationspaandsalon.com/libraries/loader.php on line 161

Strict Standards: Non-static method JLoader::register() should not be called statically in /var/www/vhosts/marylynnmurray/yalestationspaandsalon.com/libraries/loader.php on line 138

Strict Standards: Non-static method JUtility::getHash() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/marylynnmurray/yalestationspaandsalon.com/libraries/joomla/application/application.php on line 99

Strict Standards: Non-static method JFactory::getConfig() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/marylynnmurray/yalestationspaandsalon.com/libraries/joomla/utilities/utility.php on line 111

Strict Standards: Non-static method JFactory::getSession() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/marylynnmurray/yalestationspaandsalon.com/libraries/joomla/application/application.php on line 752

Solution:

 Open your php.ini
Find:

Code:
error_reporting = E_ALL | E_STRICT

and change it to:

Code:
;error_reporting = E_ALL | E_STRICT
Shut error reporting off. It worked for me and allowed my joomla site to show up.
HOORAY!!

How to install FFmpeg & PHP-FFmpeg on cPanel

By Default ffmpeg rpms are not added in centos yum repositories

a new repository will have to be added to install ffmpeg

For centos6 64bit OS

run below commands,

wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
rpm -ivh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm

Once done

# yum install ffmpeg ffmpeg-devel

This will install ffmpeg on server

Now once this is done

you will need to install ffmpeg-php for php to recognize ffmpeg

Below are the steps

#wget http://sourceforge.net/projects/ffmpeg-php/files/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2

# tar -xvf  ffmpeg-php-0.6.0.tbz2

#cd ffmpeg-php-0.6.0

#phpize

#./configure

#make && make install

now you need to add ffmpeg.so module in php.ini

add   extension=ffmpeg.so and restart httpd

You can check for ffmpeg in phpinfo page

 

 

Note: You may get error ” error: ‘new_le’ undeclared (first use in this function)” while running make command

You need to make modification in below file ffmpeg_movie.c which is in ffmpeg-php-0.6.0

 

Changes in ffmpeg_movie.c:

  • row 311: list_entry *le; to zend_rsrc_list_entry *le;
  • row 346: list_entry new_le; to zend_rsrc_list_entry new_le;
  • row 360: hashkey_length+1, (void *)&new_le, sizeof(list_entry), to hashkey_length+1, (void *)&new_le,sizeof(zend_rsrc_list_entry),