wUD‡Uvwiqvj `yB : A¨vcvwP, wcGBPwc Ges gvBGmwKDG‡ji g¨vbyqvj
BÝU‡jkb
--nvwmb nvq`vi--
wcGBPwc, A¨vcvwP Ges gvBGmwKDGj c„_K fv‡e BÝUj Kiv
A‡bK mgq Ggb cwiw¯’wZ Avm‡Z cv‡i ‡h wcGBPwc UªvqvW QvovI Avcbv‡K A¨vcvwP, wcGBPwc Ges
gvBGmwKDGj Gi evBbvix wWmwUªweDkb ev c„_K c„_K BÝUjvi ‡_‡K BÝUj Ki‡Z n‡e| GB‡¶‡Î Avcbv‡K
Avjv`v fv‡e A¨vcvwP wcGBPwc Ges gvBGmwKDG‡ji evBbvix fvk©b/ BÝUjvi WvDb‡jvW K‡i wb‡Z n‡e| Z‡e
me ‡¶‡ÎB BÝUjvi WvDb‡jvW Ki“b| mvavib fv‡e A¨vcvwP BÝUj Ki“b| A¨vcvwP Avcbvi i“U WªvB‡fi
Program Files ‡dvìv‡i A¨vcvwP bv‡g BÝUj n‡e| Gevi wcGBPwci DB‡ÛvR BÝUjvi ‡_‡K wcGBPwc BÝUj
Kivi cvjv| Pjyb ‡`Lv hvK BÝUj Kivi ‡÷c evB ‡÷c wb‡`©kbv| wcGBPwc BÝUjvi ivb Ki‡j wb‡Pi DB‡ÛvwU
‡`L‡Z cv‡eb|
wPÎ 1 : wcGBPwc BÝUjv‡ii cª_g avc
Gevi next evU‡b wK¬K K‡i GwM‡q hvb| cieZ©x DB‡Ûv‡Z I Agree evU‡b wK¬K Ki“b| wb‡Pi DB‡Ûv Avm‡e|
wPÎ 2 : wcGBPwc BÝUjv‡ii 3q avc
wcGBPwc G·cvU©m : A¨vcvwP, wcGBPwc Ges gvBGmwKDG‡ji g¨vbyqvj BÝU‡jkb 1
GLv‡b ÷¨vÛvW© ‡jLv ‡iwWI evU‡b wKK Ki“b wK¬K Ki“b| wb‡Pi DB‡ÛvwU Avm‡e|
wPÎ 3 : wcGBPwc BÝUjv‡ii 4_© avc
wWdë fv‡e wcGBPwc c: WªvB‡f wcGBPwc ‡dvìv‡i BÝUj n‡e| G‡K cwieZ©b bv KivB fvj| Next evU‡b wK¬K
Ki“b| cieZ©x DB‡Ûv‡Z Next evU‡b wK¬K Ki“b| wb‡Pi DB‡ÛvwU Avm‡e|
wPÎ 4 : wcGBPwc BÝUjv‡ii 6ó avc
GLv‡b Apache ‡jLv ‡iwWI evU‡b wK¬K Ki“b| cieZ©x DB‡Ûv‡Z Next evU‡b wK¬K Ki“b| Gevi wcGBPwc
BÝUj n‡e Ges Avcbv‡K GKwU mdj BÝUj msµvš— ‡g‡mR w`‡e| Gevi Avcbvi KvR n‡e Aí wKQy KbwdMvi
Kiv| c:\php ‡dvìviwU I‡cb Ki“b| GLv‡b BÝUj bv‡g GKwU ‡U·U dvBj Av‡Q, dvBjwU I‡cb Ki“b| GB
dvB‡ji wb‡Pi w`‡K GKwU ‡mKkb Av‡Q I‡qe mvf©vi KbwdMv‡ikb bv‡g| GB AskwU Avwg wb‡P nyeyny Zy‡j
w`jvg|
wcGBPwc G·cvU©m : A¨vcvwP, wcGBPwc Ges gvBGmwKDG‡ji g¨vbyqvj BÝU‡jkb 2
Web server configuration
========================
Installing PHP on Windows with Apache 1.3.x
------------------------------------------------------------
ATTENTION: Apache 2 Users
At this time, support for Apache 2 is experimental. It's
highly recommended you use PHP with Apache 1.3.x and not
Apache 2. Documentation for installing Apache 2 on windows
can be seen here:
http://www.php.net/manual/en/install.apache2.php
With the basic difference being that when installing as a
module you'll use php4apache2.dll instead of php4apache.dll
Both files are included within this release.
------------------------------------------------------------
There are two ways to set up PHP to work with Apache 1.3.x
on Windows. One is to use the CGI binary (php.exe),
the other is to use the Apache module dll. In either case
you need to stop the Apache server, and edit your
httpd.conf or srm.conf to configure Apache to work with PHP.
We'll refer to either of these files with httpd.conf in the
text.
Although there can be a few variations of configuring PHP
under Apache, these are simple enough to be used by the
newcomer. Please consult the Apache Docs for further
configuration directives.
Installing PHP for Apache as module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Now that version 4.1 introduces a safer sapi module, we recommend
that you configure PHP as a module in Apache.
To accomplish this, you have to load the php4apache.dll in your
Apache httpd.conf.
!! NOTE !!
Whereever you load php4apache.dll from, php4apache.dll also
needs the php4ts.dll also included in the PHP4 distribution.
wcGBPwc G·cvU©m : A¨vcvwP, wcGBPwc Ges gvBGmwKDG‡ji g¨vbyqvj BÝU‡jkb 3
php4apache.dll depends on php4ts.dll which is loaded as soon as
Apache loads php4apache.dll. If php4ts.dll can't be found, you
usually get an error like (also see the "Problems?" section at
the end of the file):
Cannot load c:/php/sapi/php4apache.dll into server
So where does php4ts.dll has to be to be properly loaded ?
php4ts.dll is searched in the following order:
1) in the directory where apache.exe is start from
2) in the directory where php4apache.dll is loaded from
3) in your %SYSTEMROOT%\System32, %SYSTEMROOT%\system and
%SYSTEMROOT% directory.
Note: %SYSTEMROOT%\System32 only applies to Windows NT/2000/XP)
4) in your whole %PATH%
Note: What is %SYSTEMROOT% ? Depending on your Windows
installation this may be for example c:\winnt or C:\windows
Usually you would just copy it over to %SYSTEMROOT%\System32.
But if you want to have multiple PHP installations (for
whatever reason) this is a bad idea. For this circumstance the
safest thing is to let php4ts.dll reside in the same directory
where php4apache.dll is loaded from (see point 2 above).
After you've set up the file layout properly, you're ready to
finally configure Apache to load the PHP4 module. Just add the
following lines to your httpd.conf:
LoadModule php4_module c:/php/sapi/php4apache.dll
AddModule mod_php4.c
AddType application/x-httpd-php .php
Note: Especially newer versions of Apache do not need the
AddModule directive anymore, your milage may vary.
Where do I have to put the php.ini ?
The php.ini files is only searched in two places:
1) in your Apache installation directory (e.g. c:\apache\apache)
2) in your %SYSTEMROOT% directory.
gyjZ GB AskUyKyB Avgv‡`i `iKvi| Avgiv wcGBPwc ‡K A¨vcvwPi GKwU gwWDj wn‡m‡e BÝUj Kie| GQvovI
wcGBPwc‡K wmwRAvB evBbvix ‡gv‡WI BÝUj Kiv hvq| Dc‡ii ‡U·‡U “Installing PHP For Apache As
wcGBPwc G·cvU©m : A¨vcvwP, wcGBPwc Ges gvBGmwKDG‡ji g¨vbyqvj BÝU‡jkb 4
Module” AskwU GKevi c‡o ‡`Lyb| Avgiv GB AskUyKy Abymib K‡iB wcGBPwc‡K A¨vcvwPi Rb¨ KbwdMvi
Kie| wb‡Pi c`‡¶c My‡jv Abymib Ki“b|
1| c:/php/sapi/php4apache.dll dvBjwU Avcbvi system wW‡i±ix‡Z ‡c÷ Ki“b| wm‡÷g wW‡i±ix
ej‡Z DB‡ÛvR G·wc, DB‡ÛvR 2000 ev DB‡ÛvR GbwUi Rb¨ c:\windows\system32 Ges DB‡ÛvR
GgB I DB‡ÛvR 98 Gi Rb¨ c:\windows\system wW‡i±ix ‡evSvq| D‡j−L¨ ‡h Avwg a‡i wb‡qwQ c:
WªvBf Avcbvi i“U WªvBf|
2| Gevi Avcbvi A¨vcvwPi KbwdMv‡ikb ‡dvìviwU I‡cb Ki“b| wUD‡Uvwiqvj GK G Avwg wewfbœ ‡dvìv‡ii
cwiwPwZ D‡j−L K‡iwQ| Zvic‡iI Avwg GLv‡b Av‡iKevi Avcbv‡K g‡b Kwi‡q w`w”Q ‡h apache ‡dvìvi
Gi wfZ‡i conf ‡dvìviwUB A¨vcvwPi KbwdMv‡ikb ‡dvìvi| GB ‡dvìv‡i httpd.conf bv‡g GKwU dvBj
Av‡Q hv‡Z A¨vcvwPi hveZxq ‡mwUsm wjwce× _v‡K| GB dvBj I‡cb K‡i wb‡Pi wZbwU jvBb ‡hvM Ki“b
GK`g cª_‡g|
LoadModule php4_module c:/php/sapi/php4apache.dll
AddModule mod_php4.c
AddType application/x-httpd-php .php
dvBjwU ‡mf Ki“b|
e¨vm Avcbvi cªv_wgK KbwdMv‡ik‡bi KvR ‡kl| Gevi Avcbvi A¨vcvwPi htdocs ‡dvìv‡i p1.php bv‡g GKwU
dvBj ‰Zix K‡i wb‡Pi ‡KvW wj‡L ‡mf Ki“b|
<?
echo “Hello World, This is My First PHP Script”;
?>
Gevi B›Uvi‡bU G·‡c−vivi I‡cb K‡i A¨v‡Wªm ev‡i wjLyb http://localhost/p1.php Ges G›Uvi w`b| wb‡Pi
wP‡Îi gZ wWm‡c− ‡`L‡Z cvi‡eb|
wPÎ 5 : cª_g wcGBPwc ‡KvW ivb Kiv
wcGBPwc G·cvU©m : A¨vcvwP, wcGBPwc Ges gvBGmwKDG‡ji g¨vbyqvj BÝU‡jkb 5
Avcwb hw` Dc‡ii wP‡Îi gZ wKQy ‡`L‡Z bv cvb Zvn‡j AbyMªn K‡i GKevi ‡PK Ki“b ‡h Avcbvi A¨vcvwP
mvf©vi ivb Ki‡Q wKbv| GUv ‡PK Kiv hv‡e DB‡ÛvR Uv¯‹ g¨v‡bRvi DB‡Ûv ‡_‡K| Ctrl+Alt+Del KxÎq ‡cªm
Ki“b| Avcbvi Uv¯‹ g¨v‡bRvi DB‡Ûv I‡cb n‡e| G‡Z j¶¨ Ki“b A¨vcvwP ivb Ki‡Q wKbv| wb‡Pi wPÎ GB
e¨vcviwU eyS‡Z mvnvh¨ Ki‡e|
wPÎ 6 : Uv¯‹ g¨v‡bRvi DB‡Ûv
GLv‡b j¶¨ Ki“b ‡h A¨vcvwP ivb Ki‡Q| hw` Avcwb Uv¯‹ g¨v‡bRv‡i Apache.exe ivwbs Ae¯’vq ‡`L‡Z bv cvb
Z‡e AbyMªn K‡i apache.exe ivb Ki“b Ges B›Uvi‡bU G·‡c−vivi wi‡dªk Ki“b, Zvn‡j wPÎ 5 Gi gZ ‡`L‡Z
cv‡eb|
wcGBPwc G·cvU©m : A¨vcvwP, wcGBPwc Ges gvBGmwKDG‡ji g¨vbyqvj BÝU‡jkb 6
gvBGmwKDGj BÝU‡jkb
gvBGmwKDGj BÝUj Kiv GK`g ‡mvRv| Avcwb gvBGmwKDGj Gi ‡h BÝUjvi wU WvDb‡jvW K‡i‡Qb Zv ivb
Ki“b| wb‡Pi DB‡ÛvwU Avm‡e|
wPÎ 7 : gvBGmwKDGj BÝUjv‡ii 1g avc
Next evU‡b wK¬K Ki“b| wb‡Pi DB‡ÛvwU Avm‡e|
wPÎ 8 : gvBGmwKDGj BÝUjv‡ii 2q avc
GB DB‡Ûv‡Z gvBGmwKDG‡ji KbwdMv‡ikb msµvš— wKQy Z_¨ _v‡K| Next evU‡b wK¬K Ki“b| gvBGmwKDGj
BÝU‡jkb ‡dvìvi Gi cv_ Rvb‡Z ‡P‡q GKwU DB‡Ûv Avm‡e hv‡Z wWdë fv‡e c:\mysql ‡dvìvi
wcGBPwc G·cvU©m : A¨vcvwP, wcGBPwc Ges gvBGmwKDG‡ji g¨vbyqvj BÝU‡jkb 7
gvBGmwKDGj BÝU‡jkb wW‡i±ix wn‡m‡e ‡mU Kiv _vK‡e| GUv cwieZ©b bv KivB fvj| Next evU‡b wK¬K
Ki“b| wb‡Pi DB‡ÛvwU Avm‡e|
wPÎ 9 : gvBGmwKDGj BÝUjv‡ii 4_© avc
Typical ‡iwWI evU‡b wK¬K K‡i Next evU‡b wK¬K Ki“b| Gevi gvBGmwKDGj BÝUj n‡e| BÝU‡jkb ‡kl
n‡j Finish evU‡b wK¬K Ki“b|
Gevi Aí wKQy KbwdMvi Kivi cvjv| c:\mysql\bin ‡dvìvi wU I‡cb Ki“b| G‡Z winmysqladmin.exe
bv‡g GKwU dvBj Av‡Q, G‡K ivb Ki“b| cª_gevi iv‡bi ‡¶‡Î GKwU DB‡Ûv Avm‡e hv‡Z BDRvi ‡bg Ges
cvmIqvW© PvB‡e|
wPÎ 10 : winmysqladmin G wWdë BDRvi Ges cvmIqvW© ‡mU Kiv
wWdë wn‡m‡e DfqwU‡ZB “root” wj‡L G›Uvi Ki“b| winmysqladmin GLb ‡_‡K wm‡÷g ‡Uª‡Z ‡`Lv hv‡e|
winmysqladmin Gi mvnv‡h¨ gvBGmwKDG‡ji wewfbœ A¨vWwgwb‡÷ªwUf KvR m¤úv`b Kiv hvq hv Avwg c‡i
Av‡jvPbv Kie| winmysqladmin Gi B›Uvi‡dm wb‡Pi DB‡Ûvi gZ|
wcGBPwc G·cvU©m : A¨vcvwP, wcGBPwc Ges gvBGmwKDG‡ji g¨vbyqvj BÝU‡jkb 8
wPÎ 11 : winmysqladmin Gi B›Uvi‡dm
Avcbvi A¨vcvwP, wcGBPwc Ges gvBGmwKDGj KbwdMv‡ik‡bi KvR ‡kl| KgwcDUvi GKevi wi÷vU© Ki“b|
----------------
Avgvi mv‡_ ‡hvMv‡hvM Kivi Rb¨ [email protected] A_ev [email protected] A¨v‡WªmwU
e¨envi Ki“b| wcGBPwc msµvš— ‡h‡Kvb civg‡k©i Rb¨ Bqvû ‡g‡mÄv‡i Avgvi AvBwW augustwind16 Ges
GgGmGb ‡g‡mÄv‡i [email protected] e¨envi K‡i mivmwi Avgvi mv‡_ ‡hvMv‡hvM Ki‡Z
cv‡ib| GQvov we¯—vwiZ Z‡_¨i Rb¨ Avgvi cv‡m©vbvj I‡qe mvBU www.hasinme.info eªvDR Ki‡Z cv‡ib|
GB dvBj wcGBPwc G·cvU©m Gi ‡cªvcvwU©| wcGBPwc G·cvU©m nj GKwU Bqvû BDRvi ‡dvivg hvi I‡qe
A¨v‡Wªm http://groups.yahoo.com/group/phpexperts| wcGBPwc m¤¡‡Ü Ab¨vb¨ ‡cªvMªvgvi‡`i mv‡_ gZ
wewbgq Ki“b GB ‡dviv‡g|
wcGBPwc G·cvU©m : A¨vcvwP, wcGBPwc Ges gvBGmwKDG‡ji g¨vbyqvj BÝU‡jkb 9