/Server/htdocs">
Youhavetomakesurethetthefolderyouspecifiedexistsandrestartapache.JustopenthaeApacheMonitorandclickon"Restart".
[TOP]
UpgradeApache
JustGotoControlPanel->AddorRemovePrograms,findApacheanduninstallit.Irecommendyoutore-dothehttpd.confediting.
DeleteyouroldApachefolder.
FollowtheApacheinstallationguidetoinstallthenewversion.
IfyouhadPHPinstalledyou'llhavetocopysomefilestoyourApachedirectory,asdescribedinthePHPinstallationguide.
IfyouhavedecidedtouseApache2.2.2you'llhavetotaketheadditionalApache2.2.xPHPinstallationstep.
InstallingPHP
ThispartofthetutorialassumesyouhaveApache2alreadyinstalled.
Afterdownloadingthetwozipfilesextractthefirston(theoneWITHOUT"pecl"init'sname)toC:
\Server\(Youcanchoosewahteverfolderyoulikebutit'sagoodideatohaveitallinoneplace.
Afterextractingitandrenamethefolderto"php".
NowExtractthesecond.zipfiletoC:
\Server\php\ext\.Justcopyeverything.
GobacktoC:
\Server\phpandrenamethefile"php.ini-dist"to"php.ini"
Editthephp.ini:
Find:
error_reporting=E_ALL&~E_NOTICE
∙andchangeitto
error_reporting=E_ALL
∙Find:
display_startup_errors=Off
∙andchangeitto
display_startup_errors=On
∙(optional;SeeManual)Find:
track_errors=Off
∙andchangeitto
track_errors=On
∙Find:
;arg_separator.output="&"
∙andchangeitto
arg_separator.output="&"
∙Find:
register_long_arrays=On
∙andchangeitto
register_long_arrays=Off
∙(improtant)MagicQuotesareveryannoying
Find:
magic_quotes_gpc=On
∙andchangeitto
magic_quotes_gpc=Off
∙(improtant)Extensions(thisisneededifyouwanttouseadatabase...orgd)
Find:
extension_dir="./"
∙andchangeitto
extension_dir="C:
\Server\php\ext"
∙Itshouldpointtotheextfolder.Ifyou'veextractedphptoanotherdirectorythepathshouldbedifferent.
∙Find:
;extension=php_mbstring.dll
;extension=php_bz2.dll
;extension=php_curl.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_filepro.dll
;extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_ifx.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
;extension=php_mcrypt.dll
;extension=php_mhash.dll
;extension=php_mime_magic.dll
;extension=php_ming.dll
;extension=php_mssql.dll
;extension=php_msql.dll
;extension=php_mysql.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_oracle.dll
;extension=php_pgsql.dll
;extension=php_shmop.dll
;extension=php_snmp.dll
;extension=php_sockets.dll
;extension=php_sqlite.dll
;extension=php_sybase_ct.dll
;extension=php_tidy.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll
∙andchangeittooneofthese:
oReasonable-ThisissomethingyoumayfindonaPHP5.1host.
oMinimum-Theminimumnumberofextensionsaservershouldhave.
oAllwebserver-Allextensionsexceptthosethatareuseless/harmfulwhenrunonawebserver.
oAll-Allextensions
∙Note:
Allextensionsasinallthatworkwithoutadditionaldownloads.
∙NowyouhavetoinstallPHPwithApache.
Firstyou'llhavetoStopApache.TodothatopentheApacheMonitorandclickonStop.
NhowgotoC:
\Server\Apache2\confandopenhttpd.conf
Atthebottom,add:
LoadModulephp5_moduleC:
/Server/php/php5apache2.dll
PHPIniDirC:
/Server/php
AddTypeapplication/x-httpd-php.php
∙Mindthatifyouchosetoinstallatadifferentlocationthepathsshouldbedifferent.
∙Find
DirectoryIndexindex.htmlindex.html.var
∙andchangeitto:
DirectoryIndexindex.phpindex.htmlindex.htmindex.html.var
NowmovetoC:
\Server\public_htmlandaddafilenamed"phpinfo.php"withthecontent:
php
phpinfo();
?
>
CopythefilesshownontheimagetoC:
\Server\Apache2\
IfyouinstalledApache2.2.xyou'llhavetodothisaswell:
PHP'sphp5apache2.dllwasmadetoworkwithApache2.0.xonly.You'llneedtogettherightfileandunlessyouwanttocompileityourselfyou'llhavetodownloadit.You'llhavetofollowtheinstructionsinthereadmefilethatcomeswiththezipfile.Omiteverythingafter
#Addtoyourhttpd.conf
DoNOTdowhatiswrittenbelowthatline.Youhavealreadydoneit.
StartApachebyopeningtheApacheMonitorandclickingstart.
Ifyouseemessages"Modulecannotbefound"(youshouldn't)justfindthemoduleinphp.iniandaddasemicolononthebeginningoftheline.
IfPHPwasinstalledcorrectlythestatusbarshouldshowsomethinglikethis:
Apache/2.0.58(Win32)PHP/5.1.3
Nowvisithttp:
//localhost/phpinfo.php(orhttp:
//127.0.0.1/phpinfo.php).
IfyouseeinformationaboutyourPHPinstalleverythingshouldwork.
Done!
[TOP]
UpgradefromPHP5.1.2
RemovethewholePHPfolder.Theonlythingyoumightwanttobackupisyourphp.ini.
RemovetheselectedfilesfromyourApachedirectory.
Followtheinstallationinstructionsuptothepointwherephp.iniisedited.Ifyou'vebackupedyourphp.iniyoucanjustcopyittothephpfolder.Youshouldchecktheextensionspartthoughasthesemighthavechanged.
[TOP]
InstallingMySQL
Justprettymuchfollowtheimages.Mindthecommentsbelowsomeimages.
Next...
Custominstall...
Change...
Let'schangethepathtoC:
\Server\MySQLsoeverythingisinoneplace.
OkthenNext...
Install...
Skipthisunlessyoureallyneedtodothat...
Installationcomplete.Nowweneedtoconfiguretheserver.
Makesureyou'vecheckedthecheckbox.
Youcanchangethepathifyouneedto.Butyoudon'thaveto.
Probablythemostimportantconfigscreen.
Youshouldcheck"EnableTCP/IPnetworking"checkboxbutthereissomeriskinvolved.Youshouldmakesurethatnobodywillconnecttothatportexceptforyou.
THesecondcheckboxisalsoimprtant.IfyouplantowriteSQLwhichisnotasstrictorifyou'reusingPHPsoftwarewhichhaspoorlywrittenqueries(vbulletinhasproblems)youshoulduncheckit.ButyoushouldleaveitcheckedasyoushouldwriteyourSQLcorrectly.
Checkboth.
Hereyoucansettherootuser(It'ssomethingliketheserveradminifyoudidn'tknow)password.Youcansetittowhateveryoulikeoruncheckthe"ModifySecuritySettings"checkbox.
Thiswillallowyoutoconnectwith"root"astheuserandanemptystringasthepassword.It'snotsecurebutifnooneelseconnectstoyouserver(nobodyshould-it'sadevelopementservers)it'llmakelifeeasier.
Done!
Nowtotestit.
ThispartassumesyouhaveaServerwithPHPinstalled.
DownloadphpMyAdminfrom
ExtractthefiletoyouryouDocumentRoot\pma(C:
\Server\htdocs\pmaforexample).
Edit"config.default.php"locatedinthepmafolder.
∙Find:
$cfg['PmaAbsoluteUri']='';
∙andchangeitto
$cfg['PmaAbsoluteUri']='http:
//localhost/pma/';
∙(optional)Find:
$cfg['Servers'][$i]['extension']='mysql';//ThephpMySQLextensiontouse('mysql'or'mysqli')
∙andchangeitto
$cfg['Servers'][$i]['extension']='mysqli';//ThephpMySQLextensiontouse('mysql'or'mysqli')
∙ThemysqliextensionwasmadetousethenewfunctionalityintroducedinMySQL4.1andup.phpMyAdmincanuseit.
∙(important)Thisiswhereyouhavetoenteryoudatabaseusernameandpassword
Find:
$cfg['Servers'][$i]['auth_type']='config';//Authenticationmethod(config,httporcookiebased)?
$cfg['Servers'][$i]['user']='root';//MySQLuser
$cfg['Servers'][$i]['password']