All posts by Arvind Kumar

.htaccess pcfg_openfile: Linux- unable to check htaccess file, ensure it is readable and that public_html is executable

I am on ENTOS 7.6 xen.

In order to fix some permissions error n files I ran the following while staying on the parent folder to public_html

chown -R mysiteaccount:mysiteaccount public_html

After I ran this command the following error started to appear:
htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that ‘public_html/’ is executable

I wondered what happened and then with the help of some internet sources I figured out that I had changed the apache user from nobody to mysiteaccount. I remember running the same chown command on public_html would work at may other occasions fine but this time.

Fixing htaccess pcfg_openfile error in Centos

In order to fix this I navigated to the parent folder of public_html and ran the following:

chown mysiteaccount:nobody public_html

And it worked!

(Note that there is not recursive option passed, means it would change the owner of public_html folder only and of nothing inside it)

Adding multiple Recaptcha and custom form validation with Ajax

It is possible to add multiple Google Recaptcha on single page. Here is an example of adding Google Recaptcha in two different forms and adding custom validation to them. This example illustrates using how response ids are created when rendering of form and later using them to create custom validation on the time of submission of this form. Example uses jQuery to handle form submission events and the action of adding fields dynamically to forms where you don’t have an access to the building or rendering of the form. Continue reading

A simple way to debug a php application in production mode

How to know the location of a function defined in PHP

A simple way to debug a php application in production mode

Sometimes you want to know the location of a function defined in your php application. For example you are debugging a large online web application or website. To continue debug you want to enter into a function to debug. You don’t have an easy way to download all the files to your location system to do a text search. Also you don’t have access to file system search capabilities on the server. How to get into the function? Continue reading

My Airtel Coupon PIN overscratched – Or Pin got damaged, What to do?

In another post we receive frequent comments with user complaining about over scratched or damaged pin. So if you have got Airtel Coupon PIN overscratched or you have received a damaged pin from shop, all I can say is, don’t panic you can still get its full value! Just follow following simple instructions. Continue reading

Leverage Browser Cache to speed up website

When a visitor visits a website, browser renders page in form of html to your browser window and you see a well arranged web page as a result. This page may include text blocks, images, videos, slide shows, animations and many more. From programming point of view,  every time you visit a web page, the web browser displays the page in form of html which is combination of text blocks, images and videos arranged in a pre-designed or organised manner, using cascading style sheets (css), Javascript (js) files and more. Continue reading