Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 3 Installare server Web in Windows XP con Apache2, PHP5 e MySQL4 - Parte 3
Part 3 - Install PHP 5 Parte 3 - Installare PHP 5
Unzip the PHP zip package that downloaded in Decomprimere il pacchetto di PHP zip scaricato in che Part 1 Parte 1 to C:\PHP (Create a new folder named PHP at C:\ root level). in C: \ PHP (Creare una nuova cartella denominata PHP in C: \ root livello). Then shut down Apache server. Quindi arrestare il sistema server Apache.
Open the Apache httpd.conf with a text editor and add two lines of code: Aprire la Apache httpd.conf con un editor di testo e aggiungere due righe di codice:
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 Aggiunto. Php estensione di mostrare come fare il parsing. Php file
Note also the directory in load module points to where we installed PHP. Nota anche la directory in carico il modulo a punti dove abbiamo installato PHP. So if you install PHP at other location, change it accordingly. Quindi, se l'installazione di PHP in altre località, modificarlo di conseguenza. The directory style should be / too instead of common DOS \. La directory dovrebbe essere / troppo comune, invece di DOS \.
These two lines can be added to the bottom of the httpd.conf file. Queste due righe possono essere aggiunti al fondo del file 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. Tuttavia, ricordiamo che i moduli di carico nel listino sono in reverse-ordine di priorità; quelle che vengono più tardi possibile ignorare o anticipare quelli elencati in precedenza. 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). Pertanto, aggiungendo php_mod alla fine della lista può avere risultati inaspettati, come ad esempio la disattivazione mod_rewrite (e altri moduli) per ogni file php che esistono (mod_rewrite verrà eseguito bene se il file non esiste). The same error can disable mod_auth and other important modules. Lo stesso errore può disattivare mod_auth e di altri importanti moduli. In summary, php_mod should be loaded before any modules you wish to run before your php code is executed. In sintesi, php_mod deve essere caricato prima che tutti i moduli che si desidera eseguire prima che il codice php viene eseguito. See the note in the Vedere la nota nella Apache AddModule documentation Apache AddModule documentazione for how to find the recommended ordering. per come trovare l'ordinazione.
Next, copy/paste “php.ini-recommended” to C:/Program Files/Apache Group/Apache2 (or your Apache installation path), and rename it to php.ini. Quindi, copia / incolla "php.ini-raccomandato" in C: / Program Files / Apache Group/Apache2 (o il vostro percorso di installazione di Apache), e rinominarlo in php.ini. Restart the Apache server. Riavviare il server Apache.
Testing php5 Installation PHP5 test di installazione
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”. Creare un file con i seguenti contenuti e salvatelo nella directory principale Web cartella (C: / Server / htdocs o di default C: / Program Files / Apache Group/Apache2/htdocs /) come "php5info.php".
<?php <? php
phpinfo(); phpinfo ();
?>
Access the following url Accedere al seguente URL http://localhost/php5_info.php . The complete PHP setting should be displayed on the browser. Il testo completo del PHP impostazione deve essere visualizzati sul browser. If there is an error or nothing been shown, there is problem with installation. Se si verifica un errore o nulla è stato dimostrato, non vi è problema con l'installazione. Try the installation procedures again. Prova la procedure di installazione di nuovo.
Enable MySQL extension Consentire l'estensione di MySQL
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 che copiato da php.ini-raccomandato già impostato per impostazione ottimale, per cui non vi è alcun bisogno di speciale per modificarlo. However, it still need to edit to enable mysql extension. Tuttavia, è ancora necessario modificare per consentire l'estensione mysql.
Open php.ini in the Apache2 directory with text editor. Aperto nel php.ini Apache2 directory con editor di testo.
Search for the line of extension_dir = “./” . Ricerca per la linea di extension_dir = ". /". Change it to extension_dir = “C:\php5\ext” . Cambiarlo in extension_dir = "C: \ php5 \ int". Also, uncomment the line of extension=php_mysql.dll . Inoltre, scommentare la linea di extension = php_mysql.dll.
Save the php.ini. Salvare il php.ini. Restart the Apache server. Riavviare il server Apache. Re-try to access Re-tenta di accedere a http://localhost/php5_info.php . It should working fine. Esso dovrebbe lavorare bene. If not try to check what’s the cause of errors, which most likely due to wrong extension_dir or missing extension. Se non cercare di controllare ciò che è la causa di errori, che molto probabilmente a causa di errate o mancanti extension_dir estensione. Or you may try to copy all the needed extentions (with .dll extenstion) to Apache2 directory. Oppure puoi provare a copiare tutte le estensioni necessarie (con. Extenstion dll) per Apache2 directory.
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. IMPORTANTE: Questa è una pagina tradotta macchina che è fornito "così com'è" senza alcuna garanzia. Machine translation may be difficult to understand. Traduzione automatica può essere difficile da capire. Please refer to Si prega di fare riferimento a original English article articolo originale inglese whenever possible. quando possibile.
Share and contribute or get technical support and help at Condividere e contribuire o ottenere supporto tecnico e assistenza in My Digital Life Forums La mia vita digitale Forum .
Related Articles Articoli correlati
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 1 Installare server Web in Windows XP con Apache2, PHP5 e MySQL4 - Parte 1
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 4 Installare server Web in Windows XP con Apache2, PHP5 e MySQL4 - Parte 4
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 2 Installare server Web in Windows XP con Apache2, PHP5 e MySQL4 - Parte 2
- Using phpMyAdmin for Effective MySQL Management in Windows XP Utilizzando phpMyAdmin per un'efficace gestione di MySQL in Windows XP
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 5 L'installazione di server Web in FreeBSD 6,0 con Apache 2,2, 5,0 MySQL e PHP 5 - Parte 5
- Install, Setup and Configure CGI and Perl in Windows XP Installare, installazione e configurazione CGI e Perl in Windows XP
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 4 L'installazione di server Web in FreeBSD 6,0 con Apache 2,2, 5,0 MySQL e PHP 5 - Parte 4
- Install phpBB 2 in Windows XP running on Apache 2, PHP 5 and MySQL 4 Installare phpBB 2 in Windows XP in esecuzione su Apache 2, PHP 5 e MySQL 4
- Subversion (SVN) Issues and Problems on mod_dav_svn in FreeBSD Sovversione (SVN) questioni e problemi a mod_dav_svn in FreeBSD
- Easily Set Up Web Server with XAMPP Facilmente istituire server Web con XAMPP

































May 20th, 2006 03:42 20 maggio 2006 03:42
well, I have followed your directions and everyone else’s before this, but no luck. bene, ho seguito le vostre istruzioni e tutti gli altri prima di questo, ma senza fortuna. After adding the module declaration in the httpd.conf file, when I restart apache i get - syntax error: cannot load specific module. Dopo aver aggiunto il modulo di dichiarazione nel file httpd.conf, quando ho riavviare Apache I get - errore di sintassi: non può caricare modulo specifico. all of my paths are correct what is the problem? tutti i miei percorsi sono corretti qual è il problema?
May 20th, 2006 14:33 20 maggio 2006 14:33
Hi Todd, the issue might be related to mod_perl (if you’re using it as ActivePerl). Hi Todd, la questione potrebbe essere collegata alla mod_perl (se lo si usa come 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 si installa Apache/2.2, si prega di utilizzare mod_perl che è compilato con Apache 2,2 e non 2,0 per Apache problema di compatibilità.
July 12th, 2006 19:10 12 luglio 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?? Ho il server creato e posso leggere un file php se i avviarlo withhtml tag ma non leggere il php script ho messo i pollici se non utilizzare il tag html ottenere una casella di scaricare quando faccio clic sul link per testare il PHP? can u help me!! e può aiutare me!!
July 12th, 2006 19:46 12 luglio 2006 19:46
Looks like your web server doesn’t parse PHP file and treat it as text file, follow the steps carefully. Appare come il vostro web server non parsing PHP file e trattarla come file di testo, attenersi alla procedura descritta attentamente.
July 13th, 2006 07:32 13 luglio 2006 07:32
ok i reset it and now the server cannot find php5apache2.dll? ok i reset e ora il server non riesce a trovare php5apache2.dll? It is in the php folder. E 'in php la cartella. I am using php5.1.4 and apache2.2.2! Sto usando php5.1.4 e apache2.2.2!
July 13th, 2006 08:43 13 luglio 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:) I got a farlo funzionare i disinstallato apache 2,2 e 2,0 installato e seguite i vostri passi ancora ed ora è tutto di lavoro:)
Thank you for the help! Grazie per l'aiuto!
September 10th, 2006 20:48 10 settembre 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). Sembra esserci un problema con Apache e il 2,2 PHP dll moduli (su Windows, ovviamente, non si sa se ci sono problemi su UNIX). I fixed it by going to I fixed it andando a http://www.apachelounge.com/download/ and downloading their version of the php4apache2.dll file. e scaricare la loro versione dei file di 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. Anche questo viene fornito con un altro file che dovete inserire il proprio Apache directory / bin, e si dovrà anche scaricare un MS Visual C + + Pacchetto se non si dispone di. NET Framework installato. This is all explained in the readme file that comes with the DLL. Tutto questo è spiegato nel file readme che viene fornito con la DLL.
October 7th, 2006 07:18 7 Ottobre 2006 07:18
With Apache 2.2, you will need PHP 5.2.x. 2,2 con Apache, sarà necessario PHP 5.2.x. It has the php5apache2_2.dll that is compiled for the new version. Ha la php5apache2_2.dll che è compilato per la nuova versione. You can download a stable build at È possibile scaricare una stabile a costruire http://snaps.php.net/
February 19th, 2007 17:11 19 febbraio 2007 17:11
You said… Lei ha detto…
…
Search for the line of extension_dir = “./”. Ricerca per la linea di extension_dir = "./". Change it to extension_dir = “C:\php5\ext”. Cambiarlo in extension_dir = "C: \ php5 \ int". Also, uncomment the line of extension=php_mysql.dll. Inoltre, scommentare la linea di extension = php_mysql.dll.
Save the php.ini. Salvare il php.ini. Restart the Apache server. Riavviare il server Apache. Re-try to access Re-tenta di accedere a http://localhost/php5_info.php . It should working fine. Esso dovrebbe lavorare bene. If not try to Se non cercare di
….. … ..
….. … ..
“C:\php5\ext”. "C: \ php5 \ int". ?????? — the correct line is -- La linea è corretta
“C:\php\ext”. "C: \ php \ ext".
February 19th, 2007 17:23 19 febbraio 2007 17:23
u forgot a thing, for the apache.. e dimenticato una cosa, per l'apache ..
modify DirectoryIndex and put index.php modificare e mettere DirectoryIndex index.php
in rest is a good tutorial nel resto è un buon tutorial
February 25th, 2007 01:30 25 febbraio 2007 01:30
I am trying to connect mysql5 from apache2 but Sto cercando di collegare mysql5 ma da apache2
browser showing an error browser che mostra un errore
” "
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 Attenzione: richiedere (/ config / db_config.php) [function.require]: failed to open stream: Nessun file o directory 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 Errore fatale: richiedono () [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 Sto usando, MySQL5, PHP5 e Apache2.2 esegue Windows XP
Request your help Richiesta il vostro aiuto
Thanking you Ringraziandovi
******
February 25th, 2007 01:30 25 febbraio 2007 01:30
I am trying to connect mysql5 from apache2 but Sto cercando di collegare mysql5 ma da apache2
browser showing an error browser che mostra un errore
” "
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 Attenzione: richiedere (/ config / db_config.php) [function.require]: failed to open stream: Nessun file o directory 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 Errore fatale: richiedono () [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 Sto usando, MySQL5, PHP5 e Apache2.2 esegue Windows XP
Request your help Richiesta il vostro aiuto
Thanking you Ringraziandovi
Asokan
June 21st, 2007 13:10 21 Giugno 2007 13:10
I have succes install apache 2, php5 and MySQL 5. Ho successo installare Apache 2, php5 e MySQL 5. I can display php info. Sono in grado di visualizzare informazioni php. But, why php script that I make can not run in the IE browser. Ma, perché php script che faccio non può essere eseguito nel browser IE. this simple script like this: questo semplice script come questo:
I use Windows XP. Io uso Windows XP.
Thank you for your attention. Vi ringrazio per l'attenzione.