Tuesday, April 12, 2011

fix exception Unknown relation alias Translation in Doctrine

Fatal error: Uncaught exception 'Doctrine_Table_Exception' with message 'Unknown relation alias Translation' in

method:
rm model/*Translation*

Saturday, February 26, 2011

download directory by ftp

wget -m -rt10 ftp://user:pass@somehost/x/y/z

Wednesday, June 23, 2010

eAccelerator install

wget http://bart.eaccelerator.net/source/0.9.6.1/eaccelerator-0.9.6.1.zip
or
wget http://bart.eaccelerator.net/source/0.9.5/eaccelerator-0.9.5.zip
phpize
./configure
make
make install
cp eaccelerator.ini /etc/php.d/
vi /etc/php.d/eaccelerator.ini
mkdir /tmp/eaccelerator
chmod 0777 /tmp/eaccelerator

Saturday, May 29, 2010

php 5.2.13 configure sample

./configure --build=i686-redhat-linux-gnu --host=i686-redhat-linux-gnu --target=i386-redhat-linux-gnu --program-prefix= --program-suffix=_5.2.13 --prefix=/home/setup/usr --exec-prefix=/home/setup/usr --bindir=/home/setup/usr/bin --sbindir=/home/setup/usr/sbin --sysconfdir=/home/setup/etc --datadir=/home/setup/usr/share --includedir=/home/setup/usr/include --libdir=/home/setup/usr/lib --libexecdir=/home/setup/usr/libexec --localstatedir=/home/setup/var --sharedstatedir=/home/setup/usr/com --mandir=/home/setup/usr/share/man --infodir=/home/setup/usr/share/info --cache-file=../config.cache --with-libdir=lib --with-config-file-path=/home/setup/etc --with-config-file-scan-dir=/etc/php.d --disable-debug --with-pic --disable-rpath --without-pear --with-bz2 --with-curl --with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --without-gdbm --with-gettext --with-gmp --with-iconv --with-jpeg-dir=/usr --with-openssl --with-png --with-pspell --with-expat-dir=/usr --with-pcre-regex=/usr --with-zlib --with-layout=GNU --enable-exif --enable-ftp --enable-magic-quotes --enable-sockets --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-track-vars --enable-trans-sid --enable-yp --enable-wddx --with-kerberos --enable-ucd-snmp-hack --with-unixODBC=shared,/usr --enable-memory-limit --enable-shmop --enable-calendar --enable-dbx --enable-dio --with-mime-magic=/usr/share/file/magic.mime --without-sqlite --with-system-tzdata --without-mysql --without-gd --without-odbc --disable-dba --without-unixODBC --disable-pdo --with-xml --enable-soap

Tuesday, May 11, 2010

clear sendmail queue

If you ever felt the need of flushing the sendmail queue then this post will be handy to you.

How to flush sendmail queue under linux sendmail mailq command in linux how to flush mail queue in sendmail under linux

If u r worried about sendmail pending mail flush do the following 2 things.

1) manually method –>

delete /var/spool/mail/*.* files in this dir –>

delete /var/mqueue/*.* files

delete /var/spool/mqueue/*.* files

then check if all mail gone using mailq command. all mail will be deleted.

2) using command:

use simple command sendmail -v -q in root prompt. it will flush all pending mails. rest to confirm u can run mailq command if all are really gone !!….

3) if u want perticular domain or user or recepitience mail to delete use this command

sendmail -qS -v test.com it will delete all mail from *@test.com

sendmail -qR -v hotmail.com it will delete all mail from recepient of hotmail….

Tuesday, January 19, 2010

mysql performance optimization -- add filter

SELECT id
FROM question
WHERE id <> 8668
AND deleted=0
AND status = 'resolved'
ORDER BY created_at DESC
limit 0,10;

43814 lines
0.26s


SELECT id
FROM question
WHERE id <> 8668
AND deleted=0
AND status = 'resolved'
AND created_at > '2010-01-18'
ORDER BY created_at DESC
limit 0,10;

40 lines
0.01s