How to create modify .htaccess file with cpanel

New client ask me to fix his web application. he said that his application work well at home server but not work well after I put it online. I promise to check it and after have spare time I conduct a check with final summary :

  1. Case sensitive, a few picture not show up because system can’t find the file. Rename the file to right name will bring its functionality.
  2. Not using super globals when coding.

To fix number 2 problem I told him to recode all his application using superglobals and in my part I’ll set register globals to ON.

The webhosting company he use not support php.ini alteration but they support override the value using .htaccess file.

Here’s my step for enable register_globals with cpanel

Login to cpanel and access File Manager

Choose a directory to open. Make sure to pick Show Hidden Files (dot files) and click Go.

You’ll see .htaccess file . Click the file once and hit Edit button.

You can click “Disable Encoding Check” to go to editor or just click Edit button.

Add this line :

php_flag register_globals on

save the file.

Check current setting by create new file.

Save the file as info.php

type this lines :

<?php

phpinfo();

?>

Save and open the file with your browser.

Make sure that value under Local is On. (Off in the other side is value for master)

Using this way I can let the application work as he saw with home server while he fix the program. Of course he knew the problem that might rise. Do it at your own risk.

See you in other post and stay health!