Installing PHP under Windows: Further Configuration of WAMP - Configuring PHP
(Page 3 of 4 )
Now we are going to edit php.ini in the Apache folder (one up from the conf folder). Anything following the semi-colon character (;) is commented out, to uncomment it, simply delete the semi-colon.
short_open_tag = On
This should be set to off. This will not allow us to use the short <? ?> style tags. Although there are ways to get around this, this setting will force us to code in the 'proper' and more portable way (<?php ?>).
asp_tags = Off
Who wants to use ASP style <% %> tags (apart from ASP developers)?
highlight.string = #DD0000
highlight.comment = #FF9900
highlight.keyword = #007700
highlight.bg = #FFFFFF
highlight.default = #0000BB
highlight.html = #000000
Simply uncomment these lines (remove the semi colon (;) before them).
error_reporting = E_ALL
Sets PHP to tell us about all errors.
display_errors = On
PHP tells us about errors rather that just sit there with a blank screen!
register_globals = Off
Stops many possible security issues, and forces the user of the superglobal arrays (ie: $_POST, $_GET, $_COOKIES, etc.).
doc_root = C:Program FilesApache GroupApache2htdocs
This path should be the same as the document root you set in Apache’s httpd.conf file.
;extension= ...
This allows you to include various PHP extensions, a bit like modules in Apache. You should only turn then on when you need them.
session.save_handler = files
Make sure that this is set to files.
session.save_path = c:/temp
Make sure that this is set to a temp directory that exists on your PC. It will be used to save data for sessions.
Next: Conclusion >>
More PHP Articles
More By Matthew Phillips