Category: PHP
-
Install Postgres database on Windows and allow password less access
Install Postgres Database on Windows and allow password less access for the database to be used in various applications. Install Postgres database on Windows machine by downloading the executable file from here: https://www.enterprisedb.com/downloads/postgres-postgresql-downloads pgAdmin tool can be downloaded and setup on Windows machine to view and manage the databases and tables by downloading the executable…
-
How to fix 302 redirect issue when updating posts in WordPress? [Solved]
Recently, while writing a blog post I found that I am not able to update/publish any post on my WordPress website dashboard rather it redirects me to the website front page when I click the “Update” button. Now, I was unsure what’s creating this trouble and how to fix this 302 redirect when updating posts…
-
How to stop outgoing emails being sent through postfix from your local machine in Mac OS X ?
In latest versions of Mac OS X, by default the postfix is set to send emails from your local machine to outside world. This might cause you troubles if you are developing applications on your local machine and your application has email sending functionality to customers. Unfortunately if you have some customers’ email addresses in…
-
How to pass dynamic values from PHP to CSS/JS in WordPress
There are situations when you have to use some values stored in DB or values being calculated in PHP script based upon different conditions in the java-script and css code. This can be achieved by writing the inline js/css code directly inside the php script. But in WordPress, this can be done very easily with…
-
Setup PHP CodeSniffer along with WordPress Coding Standards [ Windows, XAMPP ]
The other day, I had some problem setting up latest WordPress coding standard for PHP CodeSniffer on a Windows machine. It was throwing some errors/warnings like the below. There were some others, but eventually we had fixed some of those. However the WP coding standards were not getting listed in phpcs. 🙁 Warning: file_put_contents(C:\php\pear\data/PHP_CodeSniffer/CodeSniffer.conf): failed…
-
How to install Xdebug and Webgrind on Mac OS X – [everything from terminal]
Recently, I have been asked to help install and setup XDebug along with Webgrind in a Mac OS X system using SSH on one of my colleague’s system. All of this setup were done remotely from another system. Here are the steps/commands for achieving the same. Steps for installing Xdebug: Get the information about installed…
-
How to compare files on Mac OS X
Questions those come into mind when someone switches from Windows to Mac OS X for web development and wants to compare files: Which editor has support for file diff or file compare functionalities on Mac OS X ? Which is the best tool for file comparison while developing on Mac OS X ? How to…
-
List of useful tools for WordPress development
When a developer starts WordPress development and tries to make the process easier and faster, generally he searches for best tools and various boiler plates which can alleviate the manual task of starting the development from scratch. WordPress Gear (WPgear.org) is a website which lists out lots of useful tools those are free and GPL(OpenSource).…
-
Timthumb not showing images and throws “Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. ” error. [Solved]
Recently I faced a situation where the timthumb script was unable to crop the images and was throwing error messages. There are themes those still use timthumb even though its a bad practice to use in themes when we have already functions available in core WordPress. Anyway I had to fix the issue as I…
-
How to disable responsiveness in the admin theme of WordPress 3.8
How to disable responsiveness in the admin theme of WordPress 3.8 ? How do I disable responsiveness of WP 3.8 admin ? Is there any way to disable responsiveness ? I want to disable the responsive hiding feature for tablets and mobile for the newly introduced WordPress 3.8 admin back end. The question comes, Why…