Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 – Part 3 Įdiekite serverį Windows XP su Apache2, PHP5 ir MySQL4 - 3 dalis
Part 3 – Install PHP 5 3 dalis - Įdiegti PHP 5
Unzip the PHP zip package that downloaded in Unzip zip PHP kodo, kad atsisiųsti Part 1 1 dalis to C:\PHP (Create a new folder named PHP at C:\ root level). C: \ PHP (Sukurti naują aplanką, pavadintą PHP, C: \ root lygio). Then shut down Apache server. Tada išjungti Apache serveris.
Open the Apache httpd.conf with a text editor and add two lines of code: Atidaryti Apache httpd.conf su teksto redaktoriumi ir pridėti dvi eilutes kodo:
LoadModule php5_module C:/php/php5apache2.dll LoadModule php5_module C: / php/php5apache2.dll
AddType application/x-httpd-php .php AddType application / x-httpd-php. Php
Added .php extension to show how to parse .php files Skelbimas. Php pratęsimas rodo, kaip ardyti. Php failus
Note also the directory in load module points to where we installed PHP. Taip pat atkreipkite dėmesį į krovinio katalogas modulis rodo kur mes įdiegta PHP. So if you install PHP at other location, change it accordingly. Taigi, jei įdiegti PHP ar kitą vietą, pakeisti jį pakeisti. The directory style should be / too instead of common DOS \. Rodyklės stilius turėtų būti / taip pat vietoj bendro DOS \.
These two lines can be added to the bottom of the httpd.conf file. Šios dvi linijos gali būti įtraukti į httpd.conf failo apačioje. However, note that modules in the load list are in reverse-priority order; those that come later can override or pre-empt those listed earlier. Atminkite, kad modulių apkrova sąrašas yra atvirkštinės prioriteto tvarka; tie, kurie atėjo vėliau, gali nepaisyti arba užbėgti už akių išvardyti anksčiau. Therefore, adding php_mod at the end of the list can have unexpected results, such as disabling mod_rewrite (and other modules) for any php files that exist (mod_rewrite will run fine if the file doesn't exist). Todėl pridėti php_mod prie sąrašo pabaigoje gali turėti netikėtų rezultatų, pavyzdžiui, uždraudžiant mod_rewrite (ir kitų modulių), bet php failus, naujas (mod_rewrite veiks gerai, jei failas neegzistuoja). The same error can disable mod_auth and other important modules. Pačią klaidą galima išjungti mod_auth ir kitus svarbius moduliai. In summary, php_mod should be loaded before any modules you wish to run before your php code is executed. Apibendrinant, php_mod turėtų būti pakrautas prieš modulius, kuriuos norite paleisti prieš savo php kodą. See the note in the Žr pastabą Apache AddModule documentation Apache AddModule dokumentacija for how to find the recommended ordering. , kaip rasti rekomenduojama užsisakyti.
Next, copy/paste “php.ini-recommended” to C:/Program Files/Apache Group/Apache2 (or your Apache installation path), and rename it to php.ini. Be to, copy / paste "php.ini-recommended" C: / Program Files / Apache Group/Apache2 (arba jūsų Apache kelio) ir pervadinti jį į php.ini. Restart the Apache server. Paleiskite Apache serveris.
Testing php5 Installation Testavimas php5 įrengimas
Create a file with the following contents and save it to the root web folder (C:/Server/htdocs or default C:/Program Files/Apache Group/Apache2/htdocs/) as “php5info.php”. Kurti su šiuo turiniu failą ir įrašykite jį į namų interneto kataloge (C: / Server / htdocs arba nutylėjimą C: / Program Files / Apache Group/Apache2/htdocs /) kaip "php5info.php".
<?php <? php
phpinfo(); phpinfo ();
?> ?>
Access the following url Access šiuo adresu http://localhost/php5_info.php http://localhost/php5_info.php . . The complete PHP setting should be displayed on the browser. Pilnas PHP, kuriame turėtų būti rodomi naršyklėje. If there is an error or nothing been shown, there is problem with installation. Jei yra klaida, ar niekas nebuvo parodyta, yra problema su instaliacija. Try the installation procedures again. Bandykite įdiegti procedūras iš naujo.
Enable MySQL extension Įtraukti MySQL išplėtimas
The php.ini that copied from php.ini-recommended already being set to optimum setting, so there is no special need to edit it. Php.ini kad nukopijuotas nuo php.ini-Rekomenduojama jau nustatytas optimalus nustatymas, todėl nėra jokio ypatingo poreikio ją redaguoti. However, it still need to edit to enable mysql extension. Tačiau jai vis tiek reikia keisti, kad MySQL išplėtimas.
Open php.ini in the Apache2 directory with text editor. Atidaryti php.ini į Apache2 kataloge su teksto redaktoriumi.
Search for the line of extension_dir = “./” . Ieškoti iš extension_dir eilutė = ". /. Change it to extension_dir = “C:\php5\ext” . Pakeisti jį extension_dir = "C: \ php5 \ ext". Also, uncomment the line of extension=php_mysql.dll . Be to, odkomentować pratęsimo eilutė = php_mysql.dll.
Save the php.ini. Prisiminti php.ini. Restart the Apache server. Paleiskite Apache serveris. Re-try to access Vėl pabandyti prisijungti prie http://localhost/php5_info.php http://localhost/php5_info.php . . It should working fine. Reikia darbo baudą. If not try to check what's the cause of errors, which most likely due to wrong extension_dir or missing extension. Jei ne, pabandykite išsiaiškinti, kokių yra klaidų, kurių priežastis greičiausiai dėl neteisingai extension_dir ar dingusių pratęsimo. Or you may try to copy all the needed extentions (with .dll extenstion) to Apache2 directory. Arba galite bandyti kopijuoti visas reikalingas plėtinius (su. Dll extenstion) į Apache2 katalogas.
IMPORTANT : The page is machine translated and provided "as is" without warranty. DĖMESIO: Šis puslapis yra mašina išvertė ir pateikiama "kaip yra" be garantijų. Machine translation may be difficult to understand. Automatinis vertimas gali būti sunku suprasti. Please refer to Remkitės original English article originalas anglų straipsnis whenever possible. jei įmanoma.
Related Articles Susiję straipsniai
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 – Part 2 Įdiekite serverį Windows XP su Apache2, PHP5 ir MySQL4 - 2 dalis
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 – Part 1 Įdiekite serverį Windows XP su Apache2, PHP5 ir MySQL4 - 1 dalis
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 – Part 4 Įdiekite serverį Windows XP su Apache2, PHP5 ir MySQL4 - 4 dalis
- Install, Setup and Configure CGI and Perl in Windows XP Įdiegimas, diegimas ir konfigūravimas CGI, Perl, Windows XP
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 – Part 5 Diegimas web serveris FreeBSD 6,0 su Apache 2.2, MySQL 5.0, PHP 5 - 5 dalis
- Hack to Install Windows 7, Vista or Server 2008 On Computer or Virtual Machine with Less Than 512 MB RAM Memory Hack Įdiekite Windows 7 Vista "arba" Server 2008 kompiuterių ar virtuali mašina mažiau kaip 512 MB RAM atmintis
- Official Registry Hack Script to Install Windows Server 2008 and Vista SP2 Beta Build 16497 (CPP) via Windows Update Oficialusis kanceliarija Hack Script įdiegti "Windows Server 2008" ir "Vista SP2 Beta Build 16497 (CPP) per" Windows Update
- How to Install and Use Windows Server 2008 240 Days for Free Kaip įdiegti ir naudoti Windows Server 2008 240 dienas NEMOKAMAI
- Workaround Fix to Install Virtual PC Additions on Windows Server 2008 Core PROBLEMOS Fix norite įdiegti Virtual PC papildymų Windows Server 2008 Core
- Install Windows Server 2003 Administration Tools Pack (adminpak) on Windows Vista Windows Server 2003 Administration Tools Pack (adminpak) Windows Vista "










































March 1st, 2009 12:24 1 kovas 2009 12:24
There is an error in the copy/paste code written for Apache2.2.11 with php5 Yra ir kopiją klaidą / įklijuokite kodą parašyti Apache2.2.11 su php5
Here is the proper LoadModule method : Čia yra tinkamas LoadModule būdas:
My Configuration: Mano konfigūracija
Also, it is fine to uncomment all the extensions in the php.ini. Be to, tai yra bauda odkomentować visų php.ini patobulinimų.
I migrated from an IIS 6.1 installation to an Apache installation to test J2EE on Apache2, using MySQL, postgreSQL, MSSQL Aš pereis nuo 6,1 IIS diegimą į Apache išbandyti J2EE ant apache2, naudojant MySQL, PostgreSQL, MSSQL
November 13th, 2008 05:22 13 lapkritis 2008 05:22
Amit, Amit,
try putting in the ip address of the host computer instead of localhost. pabandykite į IP adresą kompiuterio, o ne localhost.
November 13th, 2008 05:20 13 lapkritis 2008 05:20
Hey for the once that apache returns error saying it cannot load the php module, the reason behind this is apache doesnt support php5.1, they say they will only support 5.2 but luckily theres a fix, Ei už vieną kartą, kad apache ir grąžina klaidą sakydamas, kad tai gali būti įkelti ne php modulį, už tai apache doesnt paramos php5.1 priežasties, jie sako, kad jie palaiko tik 5,2, bet laimei Theres nustatyti,
in httpd.conf include php5apache2_2.dll instead of php5apache2.dll. į httpd.conf įtraukti php5apache2_2.dll vietoj php5apache2.dll.
the “_2″ special module version works just fine. "_2" specialusis modulio versija dirba tik gerai.
October 19th, 2008 12:02 19 spalis 2008 12:02
I install apache2.2.9, php5 and Mysql5 on windows XP, ican see php info page and php scripts from my machine, But when i try from any other machine on network it gives me error page can not be shown. Įdiegti apache2.2.9, php5 ir Mysql5 Windows XP, ican pamatyti PHP info puslapyje ir PHP mano mašina, bet kai bandau iš bet kurios kitos mašinos tinklo jis suteikia man klaida puslapyje gali būti nerodomas. can you help me in accessing page from other machine on network. Ar galite man padėti patekti į puslapį iš kitų mašina tinklo.
Thanks. Ačiū.
June 21st, 2007 13:10 21 birželis 2007 13:10
I have succes install apache 2, php5 and MySQL 5. Turiu succes įdiegti Apache 2, PHP5 ir MySQL 5. I can display php info. Galiu rodyti PHP info. But, why php script that I make can not run in the IE browser. Bet, kodėl PHP skripto, kad galiu daryti negalima paleisti IE naršyklės. this simple script like this: tai paprastas scenarijus, panašus į šį:
I use Windows XP. Aš naudoju Windows XP.
Thank you for your attention. Ačiū už Jūsų dėmesį.
February 25th, 2007 01:30 25 vasaris 2007 01:30
I am trying to connect mysql5 from apache2 but Bandau prisijungti mysql5 nuo apache2, bet
browser showing an error naršyklė rodo klaidą
” "
Warning: require(/config/db_config.php) [function.require]: failed to open stream: No such file or directory in C:\webroot\dbconnect.php on line 2 Warning: require (/ config / db_config.php) [function.require]: failed to open stream: Nėra tokio failo ar katalogo C: \ webroot \ dbconnect.php on line 2
Fatal error: require() [function.require]: Failed opening required '/config/db_config.php' (include_path='.;C:\php5\pear') in C:\webroot\dbconnect.php on line 2 Fatal error: require () [function.require]: Failed opening required '/ config / db_config.php' (include_path = '.; C: \ php5 \ pear') in C: \ webroot \ dbconnect.php on line 2
I am using,MySQL5, PHP5 and Apache2.2 running windows xp Aš naudoju, MySQL5, PHP5 ir apache2.2 Windows XP
Request your help Request your help
Thanking you Padėkoti
Asokan Asokan
February 25th, 2007 01:30 25 vasaris 2007 01:30
I am trying to connect mysql5 from apache2 but Bandau prisijungti mysql5 nuo apache2, bet
browser showing an error naršyklė rodo klaidą
” "
Warning: require(/config/db_config.php) [function.require]: failed to open stream: No such file or directory in C:\webroot\dbconnect.php on line 2 Warning: require (/ config / db_config.php) [function.require]: failed to open stream: Nėra tokio failo ar katalogo C: \ webroot \ dbconnect.php on line 2
Fatal error: require() [function.require]: Failed opening required '/config/db_config.php' (include_path='.;C:\php5\pear') in C:\webroot\dbconnect.php on line 2 Fatal error: require () [function.require]: Failed opening required '/ config / db_config.php' (include_path = '.; C: \ php5 \ pear') in C: \ webroot \ dbconnect.php on line 2
I am using,MySQL5, PHP5 and Apache2.2 running windows xp Aš naudoju, MySQL5, PHP5 ir apache2.2 Windows XP
Request your help Request your help
Thanking you Padėkoti
****** ******
February 19th, 2007 17:23 19 vasaris 2007 17:23
u forgot a thing, for the apache.. U Pamiršote dalykas, dėl Apache ..
modify DirectoryIndex and put index.php pakeisti DirectoryIndex ir įdėti index.php
in rest is a good tutorial poilsio yra gera pamoka
February 19th, 2007 17:11 19 vasaris 2007 17:11
You said… Tu sakei ...
… ...
Search for the line of extension_dir = “./”. Ieškoti iš extension_dir eilutė = "./". Change it to extension_dir = “C:\php5\ext”. Pakeisti jį extension_dir = "C: \ php5 \ ext". Also, uncomment the line of extension=php_mysql.dll. Be to, odkomentować pratęsimo eilutė = php_mysql.dll.
Save the php.ini. Prisiminti php.ini. Restart the Apache server. Paleiskite Apache serveris. Re-try to access Vėl pabandyti prisijungti prie http://localhost/php5_info.php http://localhost/php5_info.php . . It should working fine. Reikia darbo baudą. If not try to Jei ne, pabandykite
….. ... ..
….. ... ..
“C:\php5\ext”. "C: \ php5 \ ext". ?????? ?????? — the correct line is - Teisinga linija
“C:\php\ext”. "C: \ PHP \ ext".
October 7th, 2006 07:18 7 spalis 2006 07:18
With Apache 2.2, you will need PHP 5.2.x. Su Apache 2.2, jums reikia PHP 5.2.x. It has the php5apache2_2.dll that is compiled for the new version. Ji php5apache2_2.dll kad yra surinkti nauja versija. You can download a stable build at Galite parsisiųsti stabilią statyti ne http://snaps.php.net/ http://snaps.php.net/
September 10th, 2006 20:48 10 rugsėjis 2006 20:48
There seems to be a problem with Apache 2.2 and the PHP dll modules (on Windows obviously, don't know if there are any problems on unix). Atrodo, kad su Apache 2.2 ir PHP dll modulius (Windows akivaizdžiai problema, nežinau, ar yra kokių nors problemų, UNIX). I fixed it by going to I fixed it by going to http://www.apachelounge.com/download/ http://www.apachelounge.com/download/ and downloading their version of the php4apache2.dll file. ir atsisiųsti savo versiją php4apache2.dll failas. This also comes with another file which you have to put in your Apache/bin directory, and you will also need to download a MS Visual C++ Package if you don't have the .NET framework installed. Tai taip pat atvyksta su kita byla, kurios jums reikia įrašyti savo Apache / bin ir jums taip pat reikės parsisiųsti MS Visual C + + kodo, jei jūs neturite. NET Framework installed. This is all explained in the readme file that comes with the DLL. Tai viskas paaiškinta Readme failas, kuris ateina su DLL.
July 13th, 2006 08:43 13 liepa 2006 08:43
I got it to work i uninstalled apache 2.2 and installed 2.0 and followed your steps again and now it is all working:) Aš į darbą i pašalinta Apache 2.2 ir įdiegtas 2,0 ir po savo veiksmus, dar ir dabar ji yra visiems darbo:)
Thank you for the help! Ačiū už pagalbą!
July 13th, 2006 07:32 13 liepa 2006 07:32
ok i reset it and now the server cannot find php5apache2.dll? Gerai, aš iš naujo ir dabar serverio neranda php5apache2.dll? It is in the php folder. Ji yra php katalogą. I am using php5.1.4 and apache2.2.2! Aš naudoju php5.1.4 ir apache2.2.2!
July 12th, 2006 19:46 12 liepa 2006 19:46
Looks like your web server doesn't parse PHP file and treat it as text file, follow the steps carefully. Atrodo, kad jūsų žiniatinklio serveryje nėra Parse PHP failą ir laikyti jį kaip tekstinį failą, atlikite šiuos veiksmus atidžiai.
July 12th, 2006 19:10 12 liepa 2006 19:10
I have the server set up and i can read a php file if i start it withhtml tags but it doesnt read the php script i put in. if i dont use the html tags i get a download box when i click on the link to test the php?? Turiu serverį sukurti ir aš galiu skaityti php failą, jei aš pradedu ji withhtml žodžius, bet tai nepadės skaityti scenarijų PHP įdėti in jei i dont naudoti HTML žymes gaunu parsisiųsti lauke, kai spaudžiu nuorodą į bandymo php? can u help me!! Can U help me!
May 20th, 2006 14:33 20 gegužė 2006 14:33
Hi Todd, the issue might be related to mod_perl (if you're using it as ActivePerl). Hi Todd, problema gali būti susijusi su mod_perl (jei naudojate jį ActivePerl). If you install Apache/2.2, please use mod_perl that is compiled with Apache 2.2 and not Apache 2.0 for compatibility issue. Jei įdiegėte Apache/2.2, prašome naudoti mod_perl, kad yra rengiami Apache 2.2 ir ne apache 2.0 suderinamumo problema.
May 20th, 2006 03:42 20 gegužė 2006 03:42
well, I have followed your directions and everyone else's before this, but no luck. Na, aš po savo puses ir kiekvienam žmogui, prieš tai, bet ne laimę. After adding the module declaration in the httpd.conf file, when I restart apache i get – syntax error: cannot load specific module. Pridėjus modulį deklaraciją httpd.conf failą, kai perkrauti apache gaunu - sintaksės klaida: Nepavyko įkelti modulį. all of my paths are correct what is the problem? visi mano keliai yra teisingi, kas yra problema?