Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 3 Instalar Web Server no Windows XP com Apache2, PHP5 e MySQL4 - Parte 3

Part 3 - Install PHP 5 Parte 3 - Instale o PHP 5

Unzip the PHP zip package that downloaded in Descompacte o zip PHP pacote que baixaram em Part 1 Parte 1 to C:\PHP (Create a new folder named PHP at C:\ root level). a C: \ PHP (Crie uma nova pasta denominada PHP em C: \ nível raiz). Then shut down Apache server. Em seguida, desligue servidor Apache.

Open the Apache httpd.conf with a text editor and add two lines of code: Abra o Apache httpd.conf com um editor de texto e adicione duas linhas de código:

LoadModule php5_module C:/php/php5apache2.dll LoadModule php5_module C: / php/php5apache2.dll
AddType application/x-httpd-php .php AddType aplicação / x-httpd-php. Php

Added .php extension to show how to parse .php files Acrescentou. Extensão php para mostrar como a analisar. Php arquivos

Note also the directory in load module points to where we installed PHP. Note também o diretório no módulo carga pontos para onde estamos instalados PHP. So if you install PHP at other location, change it accordingly. Portanto, se você instalar PHP em outro local, alterá-lo nesse sentido. The directory style should be / too instead of common DOS \. O diretório deve ser estilo / demasiado vez de comum DOS \.

These two lines can be added to the bottom of the httpd.conf file. Estas duas linhas podem ser adicionados à parte inferior do arquivo httpd.conf. 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. No entanto, note que os módulos de carga lista estão em ordem inversa-prioridade; aqueles que podem vir mais tarde ou sobrepor antecipar-se as enumeradas anteriormente. 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). Por conseguinte, acrescentando php_mod no final da lista pode ter resultados inesperados, tais como desabilitar o mod_rewrite (e de outros módulos) para qualquer php arquivos que existe (o mod_rewrite irá correr bem se o arquivo não existe). The same error can disable mod_auth and other important modules. O mesmo erro pode desativar mod_auth e outros importantes módulos. In summary, php_mod should be loaded before any modules you wish to run before your php code is executed. Em resumo, php_mod deve ser carregado antes de qualquer módulo que você deseja executar antes do seu código PHP é executado. See the note in the Veja a nota na Apache AddModule documentation Apache AddModule documentação for how to find the recommended ordering. para a forma de encontrar o recomendado ordenação.

Next, copy/paste “php.ini-recommended” to C:/Program Files/Apache Group/Apache2 (or your Apache installation path), and rename it to php.ini. Em seguida, copiar / colar "php.ini-recomendados" para C: / Program Files / Apache Group/Apache2 (ou a sua instalação Apache caminho), e renomeie-o para php.ini. Restart the Apache server. Reinicie o servidor Apache.

Testing php5 Installation Testes PHP5 Instalação

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”. Crie um arquivo com o seguinte conteúdo e salve-o para a pasta raiz da web (C: / Server / htdocs ou por defeito C: / Program Files / Apache Group/Apache2/htdocs /) como "php5info.php".

<?php <? PHP
phpinfo(); phpinfo ();
?>

Access the following url Acesse o seguinte URL http://localhost/php5_info.php . The complete PHP setting should be displayed on the browser. A lista completa de configuração do PHP deverá ser exibida no navegador. If there is an error or nothing been shown, there is problem with installation. Se houver um erro ou nada se demonstrou, não há problema com a instalação. Try the installation procedures again. Tente novamente procedimentos de instalação.

Enable MySQL extension Ativar MySQL extensão

The php.ini that copied from php.ini-recommended already being set to optimum setting, so there is no special need to edit it. O php.ini que copiado do php.ini-recomendou já a ser fixado a optimizar a fixação, de modo especial, não há necessidade de editá-lo. However, it still need to edit to enable mysql extension. No entanto, é ainda necessário editar mysql para permitir a prorrogação.

Open php.ini in the Apache2 directory with text editor. Abra php.ini no diretório Apache2 com editor de texto.

Search for the line of extension_dir = “./” . Buscar a linha de extension_dir = ". /". Change it to extension_dir = “C:\php5\ext” . Mude-a para extension_dir = "C: \ php5 \ ext". Also, uncomment the line of extension=php_mysql.dll . Além disso, descomentando a linha de extensão = php_mysql.dll.

Save the php.ini. Salve o php.ini. Restart the Apache server. Reinicie o servidor Apache. Re-try to access Re-tentar acessar http://localhost/php5_info.php . It should working fine. Deve trabalhar bem. If not try to check what’s the cause of errors, which most likely due to wrong extension_dir or missing extension. Se não tentar verificar o que está na origem dos erros, o que muito provavelmente devido à ampliação mal extension_dir ou desaparecidas. Or you may try to copy all the needed extentions (with .dll extenstion) to Apache2 directory. Ou você pode tentar copiar todos os necessários extenssões (com a extensão. Extenstion dll) para Apache2 diretório.

IMPORTANT : This is a machine translated page which is provided "as is" without warranty. IMPORTANTE: Esta é uma página traduzida máquina que é fornecida "como está" sem garantia. Machine translation may be difficult to understand. A tradução automática pode ser difícil de compreender. Please refer to Por favor, consulte a original English article Inglês original article whenever possible. sempre que possível.

Share and contribute or get technical support and help at Compartilhe e contribuir ou obter suporte técnico e ajudar a My Digital Life Forums Minha vida digital Fóruns .



13 Responses to “Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 3” 13 Responses para "Instalar Web Server no Windows XP com Apache2, PHP5 e MySQL4 - Part 3"

  1. Todd
    May 20th, 2006 03:42 20 de maio de 2006 03:42
    1

    well, I have followed your directions and everyone else’s before this, but no luck. assim, tenho seguido a sua direcção e todos os outros antes do presente, mas sem sorte. After adding the module declaration in the httpd.conf file, when I restart apache i get - syntax error: cannot load specific module. Depois de adicionar o módulo declaração no arquivo httpd.conf, quando eu reiniciar o apache i get - erro de sintaxe: não pode carregar módulo específico. all of my paths are correct what is the problem? todos os meus caminhos estão corretos qual é o problema?

  2. Administrator Administrador
    May 20th, 2006 14:33 20 de maio de 2006 14:33
    2

    Hi Todd, the issue might be related to mod_perl (if you’re using it as ActivePerl). Oi Todd, o problema pode estar relacionado com mod_perl (se você estiver usando-a como 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. Se você instalar Apache/2.2, use mod_perl que é compilado com Apache 2,2 e 2,0 não Apache questão de compatibilidade.

  3. greg Greg
    July 12th, 2006 19:10 12 de julho de 2006 19:10
    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?? Eu tenho o servidor criado e posso ler um arquivo php se eu começar a lhe withhtml tags mas não ler o php script que se ponha pol i dont use as tags html i get download de uma casa quando eu clicar no link para teste o php? can u help me!! u pode ajudar-me!

  4. Administrator Administrador
    July 12th, 2006 19:46 12 de julho de 2006 19:46
    4

    Looks like your web server doesn’t parse PHP file and treat it as text file, follow the steps carefully. Parece que seu servidor não analisar arquivo PHP e tratá-la como arquivo de texto, siga os passos cuidadosamente.

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

    ok i reset it and now the server cannot find php5apache2.dll? ok i redefini-la, e agora o servidor não pode encontrar php5apache2.dll? It is in the php folder. É do php pasta. I am using php5.1.4 and apache2.2.2! Eu estou usando php5.1.4 e apache2.2.2!

  6. greg Greg
    July 13th, 2006 08:43 13 de julho de 2006 08:43
    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:) Eu comecei a trabalhar-i desinstalado e instalado apache 2,2 e 2,0 seguiram seus passos, outra vez, e agora ele está trabalhando todos:)

    Thank you for the help! Obrigado pela ajuda!

  7. Tom
    September 10th, 2006 20:48 10 de setembro de 2006 20:48
    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). Parece haver um problema com o PHP e Apache 2,2 dll módulos (no Windows evidentemente, não sei se existem problemas em UNIX). I fixed it by going to Eu fixo-lo através da página de http://www.apachelounge.com/download/ and downloading their version of the php4apache2.dll file. e sua versão de download do arquivo php4apache2.dll. 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. Isso também vem com um outro arquivo que você tem que colocar no seu Apache / bin diretório, e você também precisará fazer o download de um MS Visual C + + Package se você não tem o. NET instalado. This is all explained in the readme file that comes with the DLL. Isto é explicado em todo o ficheiro readme que vem com a DLL.

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

    With Apache 2.2, you will need PHP 5.2.x. Com 2,2 Apache, você precisará de PHP 5.2.x. It has the php5apache2_2.dll that is compiled for the new version. Ele tem o php5apache2_2.dll que é compilado para a nova versão. You can download a stable build at Você pode baixar a construir uma sociedade estável http://snaps.php.net/

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

    You said… Você disse…

    Search for the line of extension_dir = “./”. Buscar a linha de extension_dir = "./". Change it to extension_dir = “C:\php5\ext”. Mude-a para extension_dir = "C: \ php5 \ ext". Also, uncomment the line of extension=php_mysql.dll. Além disso, descomentando a linha de extensão = php_mysql.dll.

    Save the php.ini. Salve o php.ini. Restart the Apache server. Reinicie o servidor Apache. Re-try to access Re-tentar acessar http://localhost/php5_info.php . It should working fine. Deve trabalhar bem. If not try to Se não tente
    ….. … ..
    ….. … ..
    “C:\php5\ext”. "C: \ php5 \ ext". ?????? — the correct line is -- É a linha correcta
    “C:\php\ext”. "C: \ php \ ext".

  10. JaD JAD
    February 19th, 2007 17:23 19 de fevereiro de 2007 17:23
    10

    u forgot a thing, for the apache.. u esqueci uma coisa, para o apache ..
    modify DirectoryIndex and put index.php modificar e colocar DirectoryIndex index.php
    in rest is a good tutorial no resto é um bom tutorial : P

  11. Asokan
    February 25th, 2007 01:30 25 de fevereiro de 2007 01:30
    11

    I am trying to connect mysql5 from apache2 but Estou tentando conectar a partir de apache2 mas mysql5
    browser showing an error navegador mostrando um erro
    "
    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 Aviso: exigir (/ config / db_config.php) [function.require]: Falha ao abrir stream: Arquivo ou diretório não encontrado em C: \ webroot \ dbconnect.php sobre a linha 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 Erro fatal: exigir () [function.require]: Falha na abertura exigida '/ config / db_config.php' (include_path = '.; C: \ php5 \ pear') em C: \ webroot \ dbconnect.php sobre a linha 2

    I am using,MySQL5, PHP5 and Apache2.2 running windows xp Eu estou usando, MySQL5, PHP5 e Apache2.2 com o Windows XP
    Request your help Pedir sua ajuda
    Thanking you Agradecendo-lhe
    ******

  12. Asokan
    February 25th, 2007 01:30 25 de fevereiro de 2007 01:30
    12

    I am trying to connect mysql5 from apache2 but Estou tentando conectar a partir de apache2 mas mysql5
    browser showing an error navegador mostrando um erro
    "
    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 Aviso: exigir (/ config / db_config.php) [function.require]: Falha ao abrir stream: Arquivo ou diretório não encontrado em C: \ webroot \ dbconnect.php sobre a linha 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 Erro fatal: exigir () [function.require]: Falha na abertura exigida '/ config / db_config.php' (include_path = '.; C: \ php5 \ pear') em C: \ webroot \ dbconnect.php sobre a linha 2

    I am using,MySQL5, PHP5 and Apache2.2 running windows xp Eu estou usando, MySQL5, PHP5 e Apache2.2 com o Windows XP
    Request your help Pedir sua ajuda
    Thanking you Agradecendo-lhe
    Asokan

  13. Handril
    June 21st, 2007 13:10 21 de junho de 2007 13:10
    13

    I have succes install apache 2, php5 and MySQL 5. Tenho sucessão install apache 2, php5 e MySQL 5. I can display php info. Posso exibir php info. But, why php script that I make can not run in the IE browser. Mas, por que razão php script que eu faço não pode ser executado no navegador IE. this simple script like this: este script simples como isto:

    I use Windows XP. Eu uso o Windows XP.

    Thank you for your attention. Muito obrigado pela sua atenção.

Leave a Reply Deixe uma resposta

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> Você pode usar estas tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime = ""> <em> <i> <q Cite=""> <strike> <strong>

Subscribe without commenting Subscreva sem comentar


Custom Search

New Articles Novos Artigos

Incoming Search Terms for the Article Incoming Termos de pesquisa para o artigo

error trying access httpd.conf file Erro tentando acessar arquivo httpd.conf - -- error trying access httpd.conf Erro tentando acessar httpd.conf - -- error trying to access httpd.conf file erro ao tentar acessar arquivo httpd.conf - -- error trying access httpd.conf file. Erro tentando acessar arquivo httpd.conf. You will need to manually configure the web server Você terá que configurar manualmente o servidor web - -- php5 apache2 windows PHP5 apache2 Windows - -- error trying to access httpd.conf erro ao tentar acessar httpd.conf - -- Error trying access httpd.conf file. Erro ao tentar acessar arquivo httpd.conf. You will need to manually configure the web server. Você terá que configurar manualmente o servidor web. - -- "error trying access httpd.conf file" "erro tentar acessar arquivo httpd.conf" - -- error trying access httpd.conf file. Erro tentando acessar arquivo httpd.conf. - -- error trying to access httpd.conf file. erro ao tentar acessar arquivo httpd.conf. you will need to manually configure the web server você terá que configurar manualmente o servidor web - -- php apache windows PHP Apache Windows - -- "error trying access httpd.conf" "erro tentar acessar httpd.conf" - -- php5 apache2 PHP5 apache2 - -- apache php windows Apache PHP Windows - -- php5 apache2.2 PHP5 apache2.2 - -- php error trying access httpd.conf php erro tentar acessar httpd.conf - -- windows apache php5 Windows apache PHP5 - -- "error trying to access httpd.conf" "erro ao tentar acessar httpd.conf" - -- PHP error trying access httpd.conf file PHP erro tentar acessar arquivo httpd.conf - -- you will need to manually configure the web server você terá que configurar manualmente o servidor web - -- apache windows php Windows apache php - -- windows apache2 php5 Windows apache2 PHP5 - -- Apache2 php5 Apache2 PHP5 - -- trying to access httpd.conf file manually configure tentando acessar arquivo httpd.conf configurar manualmente - -- php error httpd.conf you will need to manually configure server php erro httpd.conf você terá que configurar manualmente servidor - -- php error trying to access httpd.conf file php erro ao tentar acessar arquivo httpd.conf - -- Error Trying access httpd.conf php Erro acesso httpd.conf PHP - -- apache2.2 php5 apache2.2 PHP5 - -- error trying access httpd.conf file you will need to manually configure the web server Erro tentando acessar arquivo httpd.conf você terá que configurar manualmente o servidor web - -- apache2.2 php5 windows apache2.2 PHP5 Windows - -- php 5.2.x enabled web server PHP 5.2.x permitiu servidor web - -- install php5 and apache2 instalar PHP5 e apache2 - -- error trying access httpd.conf Erro tentando acessar httpd.conf - -- php install error trying access httpd.conf php erro tentar instalar o acesso httpd.conf - -- php error trying to access httpd.conf php erro ao tentar acessar httpd.conf - -- C:\php5\pear C: \ php5 \ pêra - -- error trying access httpd.conf file php Erro tentando acessar arquivo httpd.conf php - -- "error trying to access httpd.conf file" "erro ao tentar acessar arquivo httpd.conf" - -- error trying to access httpd.config file erro ao tentar acessar arquivos httpd.config - -- php5 apache2.2 xp PHP5 apache2.2 XP - -- Error trying access httpd.conf file. Erro ao tentar acessar arquivo httpd.conf. - -- php error access httpd.conf php erro acesso httpd.conf - -- webroot of a php 5.2.x enabled web server webroot de um servidor web php 5.2.x ativado - -- apache2 php5 windows apache2 PHP5 Windows - -- error trying acces httpd.conf erro acces httpd.conf - -- apache2 php5 XP apache2 PHP5 XP - -- php "error trying access httpd.conf" php "erro tentar acessar httpd.conf" - -- Apache 2.2 PHP "Error trying to access httpd.conf file" 2,2 Apache PHP "Erro ao tentar acessar arquivo httpd.conf" - -- install PHP5 apache2.2 instalar PHP5 apache2.2 - -- php5 apache2 installation PHP5 apache2 instalação - --