Important CPANEL logs

These cpanel logs are important when troubleshooting:

apache: /usr/local/apache/logs/

exim, ssh and others: /var/log/

cpanel: /usr/local/cpanel/logs/

Speeding up vagrant virtualbox disk access

Virtualbox driver is very slow. You can google about this all over the internet. There are 2 ways to speed up vagrant disk access using nfs, one way is to use vagrant-bindfs plugin and another way is the traditional way to change permissions in vm. This method outlines the later. shutdown vagrant using “vagrant halt” … Continue reading

Disable postfix to send email to outside world

disabling postfix to send email to outside world is important especially in development environment. you don’t want client to receive emails when you are testing in the dev environment. Unless software is using external smtp server to send email, you can simply update postfix config (main.cf) relayhost = 127.0.0.1 and restart postfix

Custom ajax call in woocommerce

sometimes you need to update database via ajax. wordpress has tools to make it easy. Well not that easy… here for example, we want to create a link that when clicked, automatically change the order status of a woocommerce order and insert some notes. In the template, Note that we have to use nonce to … Continue reading

Creating custom pages in woocommerce

what if you want to have a custom page in woocommerce? For example a page called abc under my-account best way is to use shortcodes. Create a new page under my-account, ie my-account/abc and put in the shortcode [abc_shortcode] then in functions.php now you need to create the abc.php file which can contain anything

Symfony: Quick way to change bundle name

You have generated a new bundle under src/Oldnamespace/oldbundle and decided to change the bundle name or move it to a new name space. Symfony doesn’t provide any tools to do that. Sounds like a tedious job… There is no short cut to this solution but some Bash scripting can save your lots of time. Use … Continue reading

Installing phpmyadmin in hhvm

when installing phpmyadmin under hhvm and nginx especially, you might get an error like so: “Error during session start; please check your PHP and/or webserver log file and configure your PHP installation properly” this is due to hhvm settings, got /etc/hhvm/php.ini and comment out all the php options like so: ; php options ;session.save_handler = … Continue reading

CPanel exim unrouteable address

if exim is showing up errors like “unrouteable address”, it means that exim is trying to send mail locally. If your local dns is borked, you will get this error. The fix is to fix your local mx entry. If you have configured an external dns server, then you should go to DNS functions -> … Continue reading

Cpanel unblock IP

sometimes your IP gets blocked if you have done something funny on the server. Best way is to ssh into the server csf -r (Restart CSF) csf -d (quick deny an ip: csf -d xxx.xxx.xxx.xxx) csf -a (quick allow / whitelist an ip: csf -a xxx.xxx.xxx.xxx) csf -dr (unblock an ip and remove from the … Continue reading

Listing and deleting exim messages

To look at all the messages in mail queue, exim -bp To remove a message from the queue: exim -Mrm “message-id” To clear all messages in the queue: exim -bp | exiqgrep -i | xargs exim -Mrm