Web Tool Bag
Home · Articles · Downloads · Discussion Forum · Web Links · News Categories · Hosting information · Hosting ArticlesJanuary 06 2009 20:08:09
Navigation
Home
Articles
Downloads
Discussion Forum
Web Links
News Categories
Contact Me
Search
Site Partners
Users Online
Guests Online: 2
No Members Online

Registered Members: 125
Newest Member: Walter_Rowbotham36c41
viagra joke download us licensed pharmacies ketamine valium phentermine discount on-line no prescription best generic ultram cheap phentermine and xanax ambien long term side effects tramadol medication weight loss medicine meridia buy line viagra where danger of ambien cialis with purple pill paxil cr tablets paxil cr online from dreampharmaceuticals phentermine 37.5mg 90 pills ativan and flexeril tramadol serotonin dopamine buy cheap valium tramadol 58 93 generic phentermine india order ultram with out a prescription buy cheap discounted tramadol 20mg of ambien pharm phentermine buying viagra uk tramadol and flushed feeling order ambien from canada cheap phentermine about cheap phentermine mexico pharmacy ambien weight loss meridia lorazepam anxiety attack sleep insomnia picture of the pill viagra cheap cheap deal pill viagra viagra perscription drug stores ultram tramadol cheap ambien no prescription klonopin vers xanax can ambien cause a stroke zovirax pills pfizer sildenafil viagra counterfeit lorazepam effect phentermine 30mg blue no prescription viagra pulminary hypertension sildenafil citrate lowest cheap phentermine with no physician approval drug know maker need xanax ambien and breast pain tramadol detect urinalysis side effects of ultram free shipping on tramadol orders tramadol diazepam no prior prescription overnight delivery lunesta vs ambien soft pill cialis online and phentermine and cod pharmacy degree line buy tramadol cheap cod fedex tramadol very wellbutrin adhd phentermine sold without a prescription generic finasteride propecia order tadalafil and online fluconazole and alprazolam green white capsules phentermine phentermine drug indications buy xanax cheap medic affect phentermine side online pharmacy diflucan and clonazepam celecoxib and mesothelioma anaerobic infection atrophic rhinitis zithromax cod prozac cheap prednisone muscle weakness my fioricet fiorcet migraine is ambien gluten free cialis fee online cheapest xanax online female viagra alternate what is soma the drug nextday tramadol cash on deliver cod generic viagra money order weight loss and celexa withdrawal viagra online pharmacies glucophage help ovulation ambien as a date rape drug tramadol and kidneys weight glucophage hrt phentermine discount 30 mg phentermine 2737 amerimedrx herpes nexium zyban meridia better than phentermine meridia xenical and phentermine where to buy viagra ativan off re phentermine prescription viagra dosage 100mg cialis consultation delivery discount health man wellbutrin and lorazepam viagra sale pharmacy online cheap viagra new zealand buy xanax online us pharmacy picture of phentermine 37.5 12.5 ambien cr drug generic online pharmacy wellbutrin zyban wellbutrin information sildenafil viagra tablets bei hf6rsturz sildenafil viagra no presrciption what generic xanax look like lorazepam trip by glucophage generic equivalent of ambien lorazepam ld50 crushing tramadol for quick release cash on delivery fioricet mp 58 soma ambien sulfa diazepam no prescription next day delivery does ambien increase testosterone soma cubes phentermine scripts online herbal supplement contains sildenafil citrate adipex effects harmful side xanax grapefruit juice interaction phentermine hpen fen no dr required buring levitra online viagra baby what is best viagra cialis overnight phentermine no prescription hair loss and wellbutrin ambien bovine danger in using ambien viagra versus cialis espa ol viagra online canadiain effects of ambien on fetus what color is ambien acxess cialis usa mail buy sublingual cialis online sildenafil citrate us overnight delivery cheap phentermine 37.5mg buy tadalafil prescription medicine levitra duration of action ordering cheap phentermine cod cialis tadalafil canadian ultram more drug side effects metformin glucophage buy sildenafil citrate for sale online pharmacy overnight ativan 1mg finasteride propecia is tramadol a narcotic phentermine phentermine abuse eye from hemorrhage paxil phentermine and soma online pharmacy soma drug interaction tramadol seizures no script for cheap phentermine pliva tramadol buy keflex online can you get high on tramadol fosamax cancer splitting viagra 100 mg cheap online genric ambien buy evista cheap canada ambien levitra versus viagra tramadol as antidepressant search for fioricet when is valium perscribed ambien sleep pill atenolol fatigue generic meridia 10 mg discount hepsera hydrocodone soma wellbutrin allergic reaction pain medication tramadol fosamax weight loss side effects wellbutrin paxil valium accuretic ambien causing brain tumors add adult strattera vs wellbutrin appetite suppression drug sibutramine meridia phentermine levitra doseage order propecia pill atavan ativan tramadol drug guide order tadalafil canada online no rx cheap phentermine tramadol effects on dogs zoloft and valium together paxil or lexapro mix diazepam and vicoden avodart ciales clomid diflucan dostinex glucophage buy phentermine online without prescription cheap weight gain wellbutrin lexapro next day ambien adipex p lawsuits cialis the new viagra ativan withdrawl medical breakthrough of 1998 viagra diazepam experiment tramadol 100 er description id foreign phentermine pill sildenafil citrate tabletes buy phentermine costa rica buy viagra online in the uk viagra soft tabs next day buy xanax amex buy canadian prozac online danger levitra lexapro and xanax phentermine cod pharmacy online line tramadol cialis online from dreampharmaceuticals vrx v herbal viagra false positive for tramadol cheap soma usa tramadol and menstrual cycles tramadol cloridrato best herbal viagra viagra buy lamisil online generic cialis pills free sample tramadol and money order fluoxetine and norco fosamax weekly dose buy tramadol online pharmacy online online pharmacy phentermine xenical meridia ambien ativan klonopin dosage withdrawl detox diabetic diet vegetarian phentermine pill prescription drugs ambien free sample paxil and nursing buy xanax prescription require cheap phentermine through lighthouse phentermine yellow low dose prednisone low nexium price dysfunction erectile viagra alprazolam food effect valium stage fright interview generic viagra listings tramadol naproxin buy propecia online consultation lowest price tetracycline acne generic cialis soft viagra teddy bear phentermine no prescription 32 lorazepam for anxiety offender sex viagra buying viagra in canada ambien and price pharmacy online buy fioricet diazepam prilosec weight loss drugs phentermine clonazepam valium phentermine shipping celexa discount pharmacy purchase mixing ambien and vicodin cheap viagra pills buying phentermine without a prescription viagra online description chemistry ingredients sildenafil safe viagra alternatives switch from celexa to effexor ambien sleep talking find viagra free online search a buy phentermine online between difference levitra viagra glyburide metformin ambien online cheap phentermine discounts lexapro cause weight nexium delayed release capsule identify generic xanax phentermine free consultation no prescription addictive diazepam valium and alprazolam xanax fluoxetine hydrochloride as treatment information about danger of taking phentermine buy tramadol with paypal nexium online no prescription viagra and money order 5citrate generic sildenafil viagra 100 no prescription phentermine no topomax neurontin ritalin prozac ambien safe dose 5 sildenafil citrate warnings 67 flomax fluoxetine prescription writing for diazepam furosemide wellbutrin xl muscle relaxer drugs soma bontril xanax ambien day use cold sore valtrex mexican jumping bean viagra paxil pharmacy no prescription 1mg ativan vs xanax 0.5mg diazepam 2mg effects lowest price on phentermine 37.5 tetracycline antibiotic phentermine online overseas overnight express delivery generic cialis diet levitra ativan pdr diazepam drug information viagra perscription levitra drug cialis lawyer columbus ambien side effects tinnitus buy phentermine online u s pharmacy generic cialis pills doses discount online propecia lowest price phentermine gt can viagra delay ejaculation phentermine 37 5mg california ortho specialists newport beach ca buying phentermine with a money order tramadol recreational dose danger zithromax long term and liver viagra cll buy phentermine overnight online tramadol and depression meridia diet aie prednisone tablets side effects xanax xr generic ambien generic substitute soma discount code chicos generic ambien price crushing fosamax physical properties sildenafil citrate phentermine 90 pills no prescription buy tramadol where phentermine differences in pills info on tramadol living performance anxiety viagra propecia generic brand weight loss no prescription meridia western health levitra coverage tramadol 2bonline free tramadol delivery bontril ultram generic zanaflex cheap no prescription viagra order valium online drinking alcohol tramadol tramadol inducing withdrawl meridia cheap from india paxil pe online ambien zolpidem tartrate buy phentermine blue white capsuls online wellbutrin sr bupropion massachusetts christian cialis where can i buy phentermine cod synthroid more drug side effects xanax versus klonopin for chronic anxiety phentermine no prescription us pharmacy cheap ambien discount online pharmacy ambien table prednisone long term phentermine hcl diet pills dream online order pharmaceutical soma prevent effexor withdrawal with prozac discount valtrex fosamax 70 mg weekly phentermine hcl safe to take tramadol rls plmd iv iv sample viagra cheap evista online 6generic propecia alternative ambien cause numbness famvir buy prescription online valtrex viarga phentermine without prescription foreign online pharmacies lexapro xanax drug levitra viagra vs ambien rock opera mexican generic cialis trazadone and prozac interaction 180 cheap tramadol ativan drug interaction viagra erection attorneys dui ambien acyclovir 400 mg tablets order viagra buying viagra uk buy tetracycline no prescription valium shipped in u s fioricet drug phentermine tablets no rx buy phentermine online medipharm nexium discount permanent side effects ambien ambien and beer don't mix cut viagra pill ambien dose where can i buy cialis does herbal phentermine work gt generic overnight viagra pregnancy safety diazepam loss meridia pill weight switching from lexapro to zoloft online search tramadol cheap evista online cheap weight loss with paxil fda-approved prescribing ambien what type of medication is glucophage taking 5htp with prozac buy ambien without prescription information on cialis for erectile disfuntion ambien dreams online valium no prescriptions alternate uses for acyclovir tramadol drug medication tramadol cheap overnight inexpensive buy cialis dreampharmaceuticals online sildenafil chronic lung disease ambien shape buy viagra online u ambien cheapest paxil lawsuit canada plavix and cialis taken together what is metformin cheap adipex online cheap i us phentermine very buy fluoxetine hydrochloride india lorazepam seizure prophylaxis by dhl fioricet shipped overnight shipping phentermine without prescription phentermine 37.5 mg without primary doctor phentermine in stock overnight oxycontin taken with xanax sibutramine meridia and orlistat xenical generic viagra drugstore india lorazepam images diazepam manufacturer meridia buy without prescription phentermine 30mg without doctor prescription ambien side effects pulmonary tight chest ambien day next online drug soma manufacturer ultracet with aspirin lethal dose for lorazepam does it long paxil take work order viagra or levitra ambien yellow pills aciphex phentermine alprazolam online pharmacy cheap source viagra buy lexapro cheap ndice keflex oral soft tabs viagra canadian pharmacy for phentermine fentanyl patch and ultracet weight gain due to ambien lexapro more drug interactionslipitor dosage paxil lorazepam 1mg images pill splitter cialis glucophage tablets cheap genaric tramadol mix maxalt and valium cialis cost viagra pills online pharmacy 2b soma 100 mg tramadol what is chemical formula of tramadol no prior perscription tramadol health viagra woman ambien dangers tramadol drop drug tramadol ultram acid indigestion tramadol wetrack it fioricet 40 mg discount buy cialis doctor online 90 pills phentermine under 100.00 is klonopin or xanax better cheap online sales viagra ativan and celexa reactions buy cialis tadalafil at horizon drugs levitra online prescription augmentin side effects generic xanax 5 picture 1 meridia online contraindications information overdose tramadol ultracet buy tramadol online meridia pharmacy what is fioricet butalbital apap generic cialis uk fluoxetine drug info 10 panel drug tests and alprazolam fosamax osteonecrosis ambien and expire help vicoden effexor soma lexapro buying viagra in the united kingdom generic celexa problems viagra free gratis soma medication in florida tramadol for sale without a presription buy phentermine from study trial erope paxil weight loss tips prednisone weaning 37.5 mg phentermine tab cheap tramadol cod cheap valium with no rx canadian pharmacy for viagra when did prozac go generic uk viagra supplier side effects to ambien phentermine us pharmacy consultation xanax lortab adipex impurity related substance viagra depakote with tramadol take phentermine with xen soma on line cheap 6 finax hair loss generic propecia order finasteride online order phentermine safe viagra woman ambien articles cheap deal deal pill viagra viagra best quality lowest prices generic viagra available wellbutrin zyban difference cheap celecoxib buy phentermine 37.5 mgs morphine tramadol dosage equivalent tramadol dog dose tramadol cheap overseas fosamax mice thyroid difference between niravam xanax and alprazolam prednisone side effects in cats deal free viagra viagra free consultation us prednisone side effects in dog ambien overdose amount cheap no phentermine prescription required online catalog buy phentermine buy cheap xenical ambien and sinus smell discount phentermine 100 viagra ans levitra risk chest pain atenolol bush valium images of phentermine diet pills cialis wholesale online nexium drug tramadol and gos phentermine phentermine successful stories online pharmacy pill soma u s viagra buying phentermine online us licensed pharmacies leathal dose ambien information phentermine shortage ambien class action law suit viagra femenino cheap phentermine for sale cheap gerneric viagra valium equivalents for lorazepam 92 accepted cod phentermine mood disorder nos and prozac diet pill phentermine 37.5 meridia 15mg buy cheap cheap phentermine shipped by fedex buy viagra $8 per pill xanax and hydrocodone tadalafil vs generic viagra pill tramadol 180 ct tramadol cod delivery diazepam medication sildenafil and steroid use ativan generic lorazepam online soma drug information school finance what is tramadol discounted adipex meridia drug interaction cheap 15mg of meridia is lorazepam a truth serum inventor of lorazepam wyeth no rx phentermine 37.5 90 150 fioricet dosage ambien looks like ambien skin crawling phentermine to order weaning from ambien female free sample viagra minoxidil propecia phentermine online pharmacy's snorted valium buy cheap free online viagra viagra osteoporosis fosamax glucosamine glucophage pregnancy dose prozac impotence pill viagra phentermine fast no prescription nexium online phentermine 37.5mg no perscription fioricet medicine coupons ativan online no prescription articles about ambien cr phentermine no prescription fed-ex day where to puchase cialis online diazepam makes me depressed chlorhydrate de tramadol ingredients in phentermine original phentermine no rx diazepam dose in dogs phentermine adipex no prescripton necessary klonopin review rating xanax adipex buy online phentermine xanax cheap mexico buy tadalafil medicine online ambien fibromyalgia taking xanax lamisil and zoloft drugs tramadol ultram online diazepam no prescription meridia success pain meds and viagra is generic propecia fda approved sibutramin and phentermine and orlistat canadian pharmacy cialis deals cheap viagra nz recreation use of tramadol diazepam and gaba buy lexapro news imprint codes for tramadol medication pill ambien cr how supplied generic cialis pills levitra cialis generic versus brand name side effects of evista and fortical order tadalafil mexico online diazepam ip but phentermine without prescription soma conference san diego cheap soma canada buy generic ambien online drug fosamax osteoporosis treatment diet drug manufacturer meridia order phentermine free consultation buy viagra ambien 2baddiction tramadol chlorhydrate supply price history of valium buy ambien cr no rx finasteride vs dutasteride for steroids famvir zovirax valtrex phentermine diet pills no precription required tadalafil cialis from india cialis bestellen soma 350 flexeril meridia 10mg buy descrition of ambien cr buy 37.5 phentermine ambien cr while pregnant celexa and pregnancy glucophage buy diazepam from us pharmacy lorazepam 1mg picture buy cheap fioricet prescription nexium side effects phentermine with no prescription needed metformin insulin resista side effects if tetracycline vs sumycin foreign pharmacy buy hydrocodone xanax diet phentermine pill official store ups next day air tramadol celexa side effects 5cheapest sildenafil citrate alprazolam buy or xanax tramadol cod 50 states best buy deal online viagra viagra action ambien class suit lorazepam long acting benzodiazepine tramadol lead investigator viagra on-line drug testing ultram interaction tramadol and dalmane can glucophage cause a delayed period nursing article on ativan are ambien and tylenol safe together herbal i viagra is levitra as good as viagra cheap cod online sold tramadol celexa order online ambien patent expired cheap online viagra viagra viagra ultracet tab does paxil cause weight loss cheap diazepam 32 dream online pharmaceutical propecia hypertension pulmonar y sildenafil order phentermine online without perscription pharmacy cialis silagra fioricet migraine treatment ativan or xanax diazepam valium fedex online lorazepam and pregnancy buy ambien overnight what does viagra pill look like lamina propecia buy tramadol cod synthroid effect of fasting blood glucose klonopin to replace ativan klonopin rating xanax hycrococone phentermine viagra online in united states tramadol consult ambien where to buy ambien ambulance picture of viagra bottle tramadol proper doses for dogs phentermine no prescription 90 day order phentermine ativan by phone calcium fosamax asthma prednisone fosamax and teeth phentermine education genuine ham percussor reflex viagra what does viagra do to females buy generic cialis uk fioricet delivery on saturday buy adipex without prescription phentermine u s online physician how to go off paxil cialis zestril interactions lorazepam discovery free levitra sample discount phentermine blue phentermine no prescription online wellbutrin xl online headaches and migraine tramadol buy sildenafil citrate rxonline cialis pharmacy paxil viagra patanol online drug stores metrogel buy phentermine without a doctor's prescription
PHP installing configuring testing examples - php.ini

PHP installing configuring testing examples - php.ini  

After installing PHP, the next step would be configuring its many options. In order to do this,
you must edit the configuration file, which should be called “php.ini”. PHP reads this file when it starts,
so you shouldn’t expect your changes to apply as soon as you’ve modified the file, you have to restart the web-server
after you’ve changed PHP’s configuration file!

The configuration file is not provided with PHP; instead, there are two templates which should help you
decide on PHP settings: a development purposes template “php.ini-dist” - and a production site template
“php.ini-recommended”. If no configuration file is used, then PHP will use the factory settings.

If you intend to use PHP for learning and development, you should definitely use the first template.
If you will use PHP for production purposes, you should go with the second template. This second one makes PHP more
efficient and more secure. Unfortunately, this way of improving PHP’s performance may make it incompatible with some applications,
and may prove to be difficult to develop with. So go ahead and choose the one it suits you best, and then copy it under the name
“php.ini” in its intended location - you can find out where PHP looks for its configuration file if you read the documentation.

The locations of the configuration file may differ for each platform, so, for example, on UNIX-systems you should place it in “/usr/local/lib/”;
on a Windows system, the default location is the Windows directory. A “php.ini” file in the current working directory will override one
in the default location, so it’s easy to change the behavior of PHP on a per-directory basis.


The configuration file is fully commented, so you can go over each one setting and see the effect on your application, and then decide
weather to modify it or not. Changing the values is actually very easy, you just have to open the configuration file in your
favorite text file editor, and simply modify the settings according to your needs. Again, remember to restart the web-server
after you’ve altered the configuration file.

The settings in the php.ini file take the form of a setting name and a value separated by an equals sign. White spaces between
these two are ignored; a semicolon instructs PHP not to take into consideration the text that follows the semicolon, until the
end of the line. Most settings’ names are suggestive to their behavior, and you will find some useful descriptions before
each setting.


One of the most powerful features of PHP is the ability to customize its behavior through a configuration file. In this first article,
we're going to cover some of the ways the php.ini file can be used and how it might help you. The second article will outline
in detail many of the more frequently used directives of the php.ini file.

 Using the PHP configuration file can make administration of PHP as simple as administration of Apache! Depending on your web server
 preferences, that could be good or bad. But we'll just assume it's good for the sake of this article. The php.ini file is used by
 PHP to simplify post-installation configuration of PHP and gives you one place for all of PHP's runtime configurations. Wouldn't
 it just be a pain to have to recompile PHP for every little change in behavior?


When PHP fires up its engines, one of the first thing it does is to look for the php.ini file so that it can read into memory the
directives defined therein. It looks for php.ini in the current working directory, the path designated by the environmental variable PHPRC,
and in the path defined at compile time. Most of the time when you compile PHP, it places a copy of the ini file in /usr/local/lib/php/.

If you are on a Unix machine, you may be able to type locate php.ini or find / -name php.ini -print and have it tell you the location of the
php.ini file. If you have installed it on a Windows machine, use the "Find -> Files or Folders" option from the Start Menu.


As I said before, the php.ini file provides the advantage of allowing you to dynamically customize PHP. Well, dynamically is only half true.
If you're running PHP as an Apache module, the configuration directives reside in memory until a new Apache process has been started.
Since a CGI program starts a new process each time, the configuration information is re-read each time PHP is used as a CGI program,
thus giving the impression of dynamic configuration. Otherwise, the PHP configuration remains unchanged until the web server is restarted.
If you are using Apache, apachectl restart will do the trick.


In previous versions of PHP you could include the configuration directives as Apache directives in either the httpd.conf or .htaccess files.
With version 4.x, all directives must reside in the php.ini file with the exception of php_value, php_flag, php_admin_value, and php_admin_flag.
The following is a brief description of what these four directives do as well as their usage:


php_value name value

 This directive allows you to essentially define your own directives. Just enter the directive php_value followed by the name of
 your custom directive and then the value that should be associated with that directive.
 
php_flag name on|off
 This directive is similar to php_value except that it allows you to define a custom directive with a Boolean ("on" or "off") value.
 
php_admin_value name value
 Also similar to php_value, this directive can only be defined in the Apache httpd.conf file.
 
php_admin_flag name on|off
 The Boolean version of php_admin_value.
 

Because of the power of php.ini, some security issues must be noted or the world will end. OK, well, it might not actually "end."
But it sure might feel as if it did. If you're using PHP as a CGI, then you should always set the safe_mode directive to "On."

Then set the safe_mode_exec_dir directive. By doing this, you're ensuring that the user can only access information contained in his document root.

Also note that if you enable dynamic module loading with the enable_dl directive, it's possible the safe_mode restrictions could be bypassed.

The structure of the php.ini file is a standard "directive = value" syntax, very much in the style of Windows .ini files. Lines consisting
of only white space and lines beginning with a semicolon are ignored. The semicolon is used to add comments to the file. To give a directive
an empty value, you can either leave the value blank or use the word none. Sections are defined with "[" and "]" with the section name
sandwiched in between (i.e., "[custom stuff]"). You probably don't need to worry about sections very much except to make reading the
configuration file a little easier.


Now that you have located your php.ini file, it can be edited with any text editor. In Unix, vi is the standard, with pico and emacs
popular alternatives. Windows users can use Notepad, but be careful when using programs like Microsoft Word that change the format of the document.

System administration is best done with a text editor instead of a word processor.


In the next article I cover in detail some of the more powerful directives of the PHP configuration file, so stay tuned!

Running PHP as an Apache module
When using PHP as an Apache module, you can also change the configuration settings using directives in Apache configuration files
(e.g. httpd.conf) and .htaccess files. You will need "AllowOverride Options" or "AllowOverride All" privileges to do so.

With PHP 4 and PHP 5, there are several Apache directives that allow you to change the PHP configuration from within the Apache
configuration files. For a listing of which directives are PHP_INI_ALL, PHP_INI_PERDIR, or PHP_INI_SYSTEM, have a look at the List of php.ini directives appendix.


Note: With PHP 3, there are Apache directives that correspond to each configuration setting in the php3.ini name, except the name is
prefixed by "php3_".


php_value name value
Sets the value of the specified directive. Can be used only with PHP_INI_ALL and PHP_INI_PERDIR type directives. To clear a
previously set value use none as the value.

Note: Don't use php_value to set boolean values. php_flag (see below) should be used instead.


php_flag name on|off
Used to set a boolean configuration directive. Can be used only with PHP_INI_ALL and PHP_INI_PERDIR type directives.

php_admin_value name value
Sets the value of the specified directive. This can not be used in .htaccess files. Any directive type set with php_admin_value
can not be overridden by .htaccess. To clear a previously set value use none as the value.


php_admin_flag name on|off
Used to set a boolean configuration directive. This can not be used in .htaccess files. Any directive type set with php_admin_flag
can not be overridden by .htaccess.


Example#1 Apache configuration example

<IfModule mod_php5.c>
  php_value include_path ".:/usr/local/lib/php"
  php_admin_flag safe_mode on
</IfModule>
<IfModule mod_php4.c>
  php_value include_path ".:/usr/local/lib/php"
  php_admin_flag safe_mode on
</IfModule>
<IfModule mod_php3.c>
  php3_include_path ".:/usr/local/lib/php"
  php3_safe_mode on
</IfModule>


Caution

PHP constants do not exist outside of PHP. For example, in httpd.conf you can not use PHP constants such as E_ALL or E_NOTICE to set
the error_reporting directive as they will have no meaning and will evaluate to 0. Use the associated bitmask values instead.


These constants can be used in php.ini

Changing PHP configuration via the Windows registry
When running PHP on Windows, the configuration values can be modified on a per-directory basis using the Windows registry.
 The configuration values are stored in the registry key HKLM\SOFTWARE\PHP\Per Directory Values, in the sub-keys corresponding to the path names. 

 For example, configuration values for the directory c:\inetpub\wwwroot would be stored in the key HKLM\SOFTWARE\PHP\Per
 Directory Values\c\inetpub\wwwroot. The settings for the directory would be active for any script running from this directory or any subdirectory of it.
  The values under the key should have the name of the PHP configuration directive and the string value. PHP constants in the values are not parsed.
  However, only configuration values changeable in PHP_INI_USER can be set this way, PHP_INI_PERDIR values can not.


Other interfaces to PHP
Regardless of how you run PHP, you can change certain values at runtime of your scripts through ini_set().
See the documentation on the ini_set() page for more information.

If you are interested in a complete list of configuration settings on your system with their current values,
you can execute the phpinfo() function, and review the resulting page. You can also access the values of individual
configuration directives at runtime using ini_get() or get_cfg_var().


To change the configuration for php running as cgi those handy module commands won't work.. The work-around is being
able to tell php to start with a custom php.ini file.. configured the way you want.


 With multiple custom php.ini files
-------------------------------------------
/site/ini/1/php.ini
/site/ini/2/php.ini
/site/ini/3/php.ini
--

The trick is creating a wrapper script to set the location of the php.ini file that php will use. Then it exec's the php cgi.

 shell script /cgi-bin/phpini.cgi
-------------------------------------------
#!/bin/sh
export PHPRC=/site/ini/1
exec /cgi-bin/php5.cgi
--

Now all you have to do is setup Apache to run php files through the wrapper script instead of just executing the php cgi.

 In your .htaccess or httpd.conf file
-------------------------------------------
AddHandler php-cgi .php
Action php-cgi /cgi-bin/phpini.cgi
--

So to change the configuration of php you just need to change the PHPRC variable to point to a different directory
containing your customized php.ini.. You could also create multiple shell wrapper scripts and create multiple Handler's+Actions in .htaccess..

 in your .htaccess
-------------------------------------------
AddHandler php-cgi1 .php1
Action php-cgi1 /cgi-bin/phpini-1.cgi

AddHandler php-cgi2 .php2
Action php-cgi2 /cgi-bin/phpini-2.cgi

AddHandler php-cgi3 .php3
Action php-cgi3 /cgi-bin/phpini-3.cgi
--


The only caveat here is that it seems like you would have to rename the file extensions, but there are ways around that too ->
http://www.askapache.com/php/custom-phpini-tips-and-tricks.html

It is not possible to unset a config option using php_value.

This caused me problems with auto_prepend_file settings where I wanted to have a global file auto included, with an exception for only one site.
The solution used to be to use auto_prepend_file /dev/null, but this now causes errors, so I just create and include blank.inc now instead.


The PHP configuration file
Before beginning with the tour, a quick note on how PHP's configuration file is structured.

This file is named php.ini for a reason—it follows the INI file structure popular in many Windows applications.
It's an ASCII text file is broken into named sections, each containing variables related to that section.
Each section looks something like this:

[MySection]
variable="value"
anothervariable="anothervalue"
 
The section name is in square braces at the top, followed by any number of name-value pairs, with each pair on a separate line.
As with regular PHP code, variable names are case sensitive and cannot contain spaces, while the values may be numeric, string, or Boolean.

Semicolons placed at the beginning of a line serve as comment markers. This makes it easy to enable or disable PHP features;
rather than deleting a line, you can comment it out so that it isn't parsed. This is handy if you think you might want to
re-enable a feature at a later date, you don't have to delete it out of the file.


In order for PHP to recognize it, the php.ini file must be located either in the current directory, the directory defined
in the $PHPRC environment variable, or the directory specified at compile time (for Windows PHP, this is the main Windows directory).

After making changes to PHP's configuration through the php.ini file, you'll need to restart the Web server for your changes
to take effect (assuming, of course, that you're using PHP through the Web server). For command-line usage of PHP,
the configuration file will be read every time you invoke the PHP binary program.


Setting parser options
The first stop on this tour is also one of the more important ones: options related to the language interpreter.
The first item here is the engine variable, which controls whether the PHP engine should be "on" or "off".


Turning the engine off means that embedded PHP code will not be parsed by the Web server. It doesn't usually make sense to do this, so leave it on.

engine = On
 
The short_open_tag variable controls whether the parser should recognize the shortcut <?...?> tags, as well as the standard <?php...?> tags.
Turn this off if you anticipate conflicts with other languages, or if you want to apply strict syntactical rules to your PHP code.

short_open_tag = On
 
Normally, session, cookie or HTTP header data in a PHP script must be sent before any output is generated by the script.
If this is not possible in your application, you can enable what PHP calls output buffering, with the output_buffering variable.


With output buffering on, PHP stores the output of your script in a special memory buffer and sends it only when explicitly told to do so.
This allows you to send special HTTP headers and cookie data even in the middle or at the end of your script; however,
it can degrade performance marginally.

output_buffering = Off
 
You can also pass the output_buffering variable a number indicating the size of the buffer, for example:

output_buffering = 2048
 
When PHP starts up, it adds a message stating its version number to the Web server's standard header.
To turn this off, set the expose_php variable to false. This is useful if, for example, you want to mask the capabilities of your
Web server from potential hackers.

expose_php = On
 
Now let's look at how to set the search path and handle errors.

Setting the PHP search path
You can set a search path for PHP with the include_path variable, which accepts a list of directories.

PHP will automatically check these directories when it encounters references to files without a path prefix.

If you have function libraries or classes that you use frequently, list their locations here to simplify file lookups.
This is also a good place to add the path to PHP's PEAR directory, which contains many reusable classes.

include_path = ".:/usr/local/lib/php/pear:"
 
Windows users can specify multiple locations by separating them with semicolons; UNIX users must use colons instead.


Two interesting variables in this context are auto_prepend_file and auto_append_file. These variables specify files that PHP
automatically appends to the beginning or end of any PHP document. This is mostly used to append a header or footer to pages generated in PHP,
saving you a few lines of code in each PHP document you write. The downside is that the files specified here will be
appended to *all* PHP documents, so these variables are best suited for single-application servers.


The files may be either PHP scripts or regular HTML documents. Embedded PHP code must be surrounded by the standard <?php...?> tags:

auto_prepend_file = /home/web/includes/header.php
auto_append_file = /home/web/includes/legal.php
 Handling errors


PHP errors fall into four categories: parsing errors, notices about code bugs such as uninitialized variables, warnings
(aka non-fatal errors), and fatal errors. Normally, when PHP encounters either a parsing, non-fatal or fatal error,
it displays the error and—if the error is fatal—also stops script processing at that point. You can alter this behavior
with the error_reporting variable, which accepts a bitfield of error codes and only displays errors matching those codes.

error_reporting =  E_ALL
 
To turn off the display of errors—recommended in production code—set the display_errors variable to false, and instead
write the messages to an error log with the log_errors variable.

Doing this is good for security too—by turning off errors, you hide system-specific information that unscrupulous users
could use to try and damage your site or application. You should instead write these errors to a custom log file or to the system logger,
by setting the error_log variable to either a file name or the special value "syslog". Remember to check these log files regularly to keep
an eye on what's happening inside your application.


display_errors = Off
log_errors = On
error_log = "error.log"

 
Come back Thursday (July 22) for the second part of this tutorial. I'll take you deeper into the php.ini file,
showing you the settings to configure file uploads and form parsing, run PHP in restricted mode for greater security,
activate extensions, set resource limits for memory usage, and disable legacy features for better performance.


Posted by zdravko on December 26 2007 15:01:02 553 Reads · Print
Ratings
Rating is available to Members only.

Please login or register to vote.

No Ratings have been Posted.
Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Shoutbox
You must login to post a message.

godemo
15/11/2008 04:56
A demo for Simple Feedback ZDR would be nice

dot
29/07/2008 21:23
hey can anyone help me here with how to link Submit button to a thank you page

dolarat
10/03/2008 12:17
hey all

konv
21/02/2008 04:19
i may be in the wrong place but here goes ,i want to learn about shell/severs .as i am having problems staying connected to a irc chay room because of major lag from their saever any help would be app

Copyright © 2008 - www.webtoolbag.com