Jump to content

additional php.ini


birbal

Recommended Posts

if i upload php.ini in a webroot. its loading at phpinfo(). actually i want to stop magic quote. so i put a php.ini (php 5.3) file into my web root online host (which is php 5.2)and hopefully it works and stop the magic quote. but there is some question...as i did not use it before..Questions:1) if version dffrence create problem?2) how does this work? i mean to say if particularly want to stop magic quote and write only the command to only stop magic quote and save it in web root directory..so is the master php.ini also be implimented with change of magic quote coommand or i need to change the whole (which i upload) php.ini and put it in web root directory?3) which is best to use .htaccess or additional php.ini ?hope i am able to clear my problem

Link to comment
Share on other sites

Check here for information about changing runtime options:http://www.php.net/manual/en/configuration.phpHere is a list of all of the options which lists where each one is allowed to be set:http://www.php.net/manual/en/ini.list.php
ok i checked this. but still have some confusion...not getting allsuppose a php_ini_perdir config is set in main php.ini file. so if i want to change particluarly that config then should i write only that config (changed) in a directory php.ini file?or i have to write all other asscoiated php_ini_perdir and php_ini_user? (as php_ini_system is unchangeble as it seems to me)
Link to comment
Share on other sites

1. If a certain setting doesn't exist in the PHP version getting the ini file, it will be ignored. If the effect of a certain setting/value has changed between versions, you'll get whatever the effect of the PHP version getting the file is. Depending on the scenario, this may be a problem, or just the effect you were looking for.2. You need to change it in whatever file PHP is looking for its settings, additional or main ones. The first link justsomeguy gave explains the order is which different settings are processed and located. Change it on one of those places, and assuming it's not overriden along the way, that's what you'll get. In general, it's best to set the setting at the toppest level possible, and which one that is depends on the kind of portability you desire, and the kind of access you have. For least portability where you have full access, the main php.ini file is the best place.3. If PHP is running as an Apache module, the only way is .htaccess. If PHP is running as CGI/FCGI, the only way is .user.php.ini. If you want your app to be portable, use both.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...