You are using a browser which is not compatible with CSS (for more information, see Tara's tutorial).
Because of this, it is possible that our website may not appear
correctly in your browser. We apologise for the inconvenience, and
recommend you upgrade your browser to one which is compatible with CSS.
For more information, please visit our Browser Upgrade page.
Shared web hosting always has been and always will be a low cost way of hosting your average website. After all, most people cannot afford to rent/buy a dedicated server for their website. However, shared hosting presents a major inconvenience: customisability. Since you're "sharing" this server with other people, you can't just do what you want. Your host will decide on all server wide settings, in the interests of all. These settings will include PHP settings.
But let's say you need to change these settings: how are you going to do it? One way would be to get down on your hands and knees and plead with your host. But that's not exactly an easy or sure way of getting the PHP configuration changed. No, there's a much easier solution: set them yourself! "But they're server wide settings" I hear you say. Wrong! Most of the PHP settings which developers use can actually be changed by the user, surprisingly enough.
Now, let's get down to the technical aspect of this. Let's say I want to turn
off magic quotes (automatic escape of special characters, usually in preparation
for use in an SQL query). The relevant setting for this would be magic_quotes_gpc
.
You now have two ways of setting it to off:
<?php
ini_set ('magic_quotes_gpc', 0);
?>
php_value
command. Simply place the following code in your .htaccess file:
php_value magic_quotes_gpc 0
Simple, eh? Now didn't that save you (and your server administrator!) a lot
of trouble?
For a complete list of settings which you can or cannot set by yourself,
please see PHP.net: http://www.php.net/manual/en/function.ini-set.php.
© 4WebHelp and Daniel
If I am hosting 2 domains on one hosting plan and I would like the emails to go to different places, how would I configure that? The issue I am having is that the emails will work for one domain or the other, not both. I thought you might know.
<?php
ini_set ('magic_quotes_gpc', 0);
?>
will not do anything. Magic quotes are added before the script starts running, so by the time you call ini_set it's too late.
A better example might be:
<?php
ini_set('error_reporting', E_ALL);
?>
which enables all error/warning/debug/info messages to be displayed.
Add a new comment