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 .
Related Articles Artigos relacionados
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 1 Instalar Web Server no Windows XP com Apache2, PHP5 e MySQL4 - Parte 1
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 4 Instalar Web Server no Windows XP com Apache2, PHP5 e MySQL4 - Parte 4
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 2 Instalar Web Server no Windows XP com Apache2, PHP5 e MySQL4 - Parte 2
- Using phpMyAdmin for Effective MySQL Management in Windows XP Usando phpMyAdmin para a Gestão Eficaz MySQL no Windows XP
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 5 Instalando Web Server no FreeBSD 6,0 a 2,2 Apache, MySQL e 5,0 PHP 5 - Parte 5
- Install, Setup and Configure CGI and Perl in Windows XP Instalar, instalação e configuração CGI e Perl no Windows XP
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 4 Instalando Web Server no FreeBSD 6,0 a 2,2 Apache, MySQL e 5,0 PHP 5 - Parte 4
- Install phpBB 2 in Windows XP running on Apache 2, PHP 5 and MySQL 4 Instale phpBB 2 do Windows XP rodando em Apache 2, PHP 5 e MySQL 4
- Easily Set Up Web Server with XAMPP Facilmente criado com o servidor web XAMPP
- Subversion (SVN) Issues and Problems on mod_dav_svn in FreeBSD Subversion (SVN) questões e problemas em mod_dav_svn no FreeBSD




























May 20th, 2006 03:42 20 de maio de 2006 03:42
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?
May 20th, 2006 14:33 20 de maio de 2006 14:33
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.
July 12th, 2006 19:10 12 de julho de 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?? 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!
July 12th, 2006 19:46 12 de julho de 2006 19:46
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.
July 13th, 2006 07:32 13 de julho de 2006 07:32
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!
July 13th, 2006 08:43 13 de julho de 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:) 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!
September 10th, 2006 20:48 10 de setembro de 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). 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.
October 7th, 2006 07:18 7 Oct, 2006 07:18
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/
February 19th, 2007 17:11 19 de fevereiro de 2007 17:11
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".
February 19th, 2007 17:23 19 de fevereiro de 2007 17:23
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
February 25th, 2007 01:30 25 de fevereiro de 2007 01:30
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
******
February 25th, 2007 01:30 25 de fevereiro de 2007 01:30
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
June 21st, 2007 13:10 21 de junho de 2007 13:10
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.