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.


17 Responses to “Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 – Part 3” 17 Responses to "Install Web Server, Windows XP su Apache2, PHP5 ir MySQL4 - 3 dalis"

  1. james van leuvaan James Van leuvaan
    March 1st, 2009 12:24 1 kovas 2009 12:24
    17 17

    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:


    # php # Php
    LoadModule php5_module “C:/php/php5apache2_2.dll” LoadModule php5_module "C: / php/php5apache2_2.dll"
    <IfModule php5_module> <IfModule Php5_module>
    AddType application/x-httpd-php .php AddType application / x-httpd-php. Php
    </IfModule> </ IfModule>

    My Configuration: Mano konfigūracija

    1: Windows XP Professional SP3 1: Windows XP Professional SP3
    2: Apache 2.2.11 2: Apache 2.2.11
    3: PHP 5.2.6 3: PHP 5.2.6

    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

  2. TIGABEATS.COM TIGABEATS.COM
    November 13th, 2008 05:22 13 lapkritis 2008 05:22
    16 16

    Amit, Amit,

    try putting in the ip address of the host computer instead of localhost. pabandykite į IP adresą kompiuterio, o ne localhost.

  3. TIGABEATS.COM TIGABEATS.COM
    November 13th, 2008 05:20 13 lapkritis 2008 05:20
    15 15

    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.

  4. Amit Amit
    October 19th, 2008 12:02 19 spalis 2008 12:02
    14 14

    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ū.

  5. Handril Handril
    June 21st, 2007 13:10 21 birželis 2007 13:10
    13 13

    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į.

  6. Asokan Asokan
    February 25th, 2007 01:30 25 vasaris 2007 01:30
    12 12

    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

  7. Asokan Asokan
    February 25th, 2007 01:30 25 vasaris 2007 01:30
    11 11

    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
    ****** ******

  8. JaD JAD
    February 19th, 2007 17:23 19 vasaris 2007 17:23
    10 10

    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 : P

  9. JaD JAD
    February 19th, 2007 17:11 19 vasaris 2007 17:11
    9 9

    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".

  10. cary Cary
    October 7th, 2006 07:18 7 spalis 2006 07:18
    8 8

    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/

  11. Tom Tomas
    September 10th, 2006 20:48 10 rugsėjis 2006 20:48
    7 7

    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.

  12. greg Greg
    July 13th, 2006 08:43 13 liepa 2006 08:43
    6 6

    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ą!

  13. greg Greg
    July 13th, 2006 07:32 13 liepa 2006 07:32
    5 5

    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!

  14. Administrator Administratorius
    July 12th, 2006 19:46 12 liepa 2006 19:46
    4 4

    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.

  15. greg Greg
    July 12th, 2006 19:10 12 liepa 2006 19:10
    3 3

    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!

  16. Administrator Administratorius
    May 20th, 2006 14:33 20 gegužė 2006 14:33
    2 2

    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.

  17. Todd Todas
    May 20th, 2006 03:42 20 gegužė 2006 03:42
    1 1

    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?

Leave a Reply Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> Galite naudoti šiuos žodžius: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime = ""> <em> <i> <q Cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. Subscribe to comments funkcija buvo išjungta. To receive notification of latest comments posted, subscribe to Norėdami gauti pranešimus apie naujausius komentarų, užsiprenumeruoti My Digital Life Comments RSS feed Mano skaitmeninis gyvenimas Komentarų RSS or arba register to receive Registruokitės gauti new comments in daily email digest. Nauji komentarai kasdien elektroniniu paštu.
Custom Search

New Articles Nauji straipsniai

Incoming Search Terms for the Article Gaunamus paieškos terminus straipsnis

error trying access httpd.conf file. Klaida bandant patekti httpd.conf failą. you will need to manually configure the web server Jums reikia rankiniu būdu konfigūruoti serverio - -- error trying access httpd.conf file. Klaida bandant patekti httpd.conf failą. you will need to manually configure the web server. Jums reikia rankiniu būdu konfigūruoti serverio. - -- apache2 windows xp apache2 Windows XP - -- error trying accesing httpd.conf Klaida bandant accesing httpd.conf - -- error trying access httpd.conf Klaida bandant patekti httpd.conf - -- how to install php5.2.11 kaip įdiegti php5.2.11 - -- installing php apache 2.2 windows įrengimo PHP Apache 2.2 Windows - --