debug sql inside cakephp model
$dbo = $this->getDatasource(); $dbo->fullDebug = true; $this->find(‘all’, … $logs = $dbo->_queriesLog; $log = end($logs); print_r($logs);exit;
$dbo = $this->getDatasource(); $dbo->fullDebug = true; $this->find(‘all’, … $logs = $dbo->_queriesLog; $log = end($logs); print_r($logs);exit;
The fix is pretty simple, run the following commands and afterwards reenter your previous ./configure command ln -s /usr/lib64/libmysqlclient.so /usr/lib/libmysqlclient.so ln -s /usr/lib64/libmysqlclient.so /usr/local/libmysqlclient.so
1. stop all services /etc/init.d/httpd stop ; /etc/init.d/exim stop ; /etc/init.d/pure-ftpd stop ; /etc/init.d/dovecot stop ; /etc/init.d/cpanel stop ; /etc/init.d/lfd stop ; /etc/init.d/munin-node stop ; /etc/init.d/crond stop ; /etc/init.d/mysql stop ; /etc/init.d/exim stop ; /etc/init.d/portsentry stop 2. uninstall mysql, the … Continue reading
I’ll describe the installation process for Centos as this is my server’s operating system, the installation is very similar for any linux flavour. In order to have imagick class available inside php firstly we need to install ImageMagick-devel: 1. yum … Continue reading
Recently I wanted to have different elements surrounded by transparent borders. For instance an ajax popup, similar with what facebook has, or a design element to look nicer. The solution is having another div that is inside the one you … Continue reading
cd to where you dearchived the sourcecode files for apc export PHP_PREFIX=”/opt/php” #where /opt/php is where you have php installed $PHP_PREFIX/bin/phpize ./configure –with-php-config=$PHP_PREFIX/bin/php-config make make install add in php.ini the reference to the new extension that was copied inside extension … Continue reading
Quick info how to setup everything so you’ll be able to check the cpu user per each user. As a note I have the PHP set up in fcgid mode and also suexec so each php process is running under … Continue reading
This is a very quick fix for people having a very long list of categories inside prestashop. The problem occurs because in the product edit page from admin you need to scroll a lot to get to the save button … Continue reading
This is a short post to share my favorite way of generating strong passwords in php. The advantage over other functions you’ll find over the internet is that it makes sure it uses all the character sets also making sure … Continue reading
When writing html code to draw columns you usually use float elements contained inside a div container like here: left content right content the problem occurs when bellow this code you want to have a footer for instance. To work … Continue reading