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
Installing Apache 2.2, MySQL 5 and PHP 5 in FreeBSD 6.0 for a Reliable Web Server 2,2 installato Apache, MySQL e PHP 5 in 5 FreeBSD 6,0 affidabile per un server Web
Part 5 - Installing PHP Hypertext Preprocessor Scripting Language 5 and PHP 5 Extensions Parte 5 - Installazione di PHP Hypertext Preprocessor linguaggio di scripting 5 e le estensioni PHP 5
- Install by enter the following commands on FreeBSD OS command line, wait for previous command to finish before running the next command: Installare di immettere i seguenti comandi su FreeBSD OS riga di comando, attendere precedente comando per terminare prima di eseguire il comando successivo:
cd /usr/ports/lang/php5 CD / usr/ports/lang/php5
make install clean make install clean - If you’re prompted, select “use Apache 2.x instead”. Se sei richiesto, selezionare "l'uso di Apache 2.x invece".
- Continue with the following commands to install PHP5 extensions and modules to enable the support of the modules in Apache: Continuare con i seguenti comandi per installare PHP5 estensioni e moduli per consentire il sostegno dei moduli in Apache:
cd /usr/ports/lang/php5-extensions CD / usr/ports/lang/php5-extensions
make config make config - At Options for php5-extension 1.0 menu, select all PHP extensions and modules that you may use with Apache webserver. A Opzioni per PHP5-estensione 1.0 menu, selezionare tutte le estensioni PHP e moduli che si possono utilizzare con Apache web. This is a part of the configuration for PHP, where you need to enable features of PHP that come in modules, such as ability to manage user sessions, interface with databases and many others. Si tratta di una parte della configurazione per PHP, in cui è necessario abilitare funzionalità di PHP che vengono in moduli, come ad esempio capacità di gestire sessioni utente, l'interfaccia con i database e molti altri. Default extensions such as ctype functions support, HASH Message Digest Framework support, session support and etc have been selected. Impostazione predefinita le estensioni come ad esempio ctype funzioni di supporto, hash Message Digest quadro di sostegno, sessione etc sostegno e sono stati selezionati. Other popular extensions that you most likely to be in used are MySQL database support and GD library support. Altri popolari estensioni che molto probabilmente ad essere utilizzati sono a base di dati di MySQL sostegno e supporto libreria GD. Use space bar to select or unselect the extensions and press Enter when done. Uso barra spaziatrice per selezionare o deselezionare le estensioni e premere Invio quando fare.
- Continue the installation of php5-extensions with the following commands: Continuare l'installazione di php5-estensioni con i seguenti comandi:
make install clean make install clean
- If there are any message the pops up and prompts you to select some options or configurations, you can just accept the default settings by pressing Enter. Se ci sono il messaggio si apre e viene chiesto di selezionare alcune opzioni o configurazioni, si può solo accettare le impostazioni predefinite premendo Invio. Some modules that may prompt you for action include php5-gd, php5-mbstring and php5-sqlite. Alcuni moduli che potrebbe essere richiesto per l'azione comprendono php5-gd, php5-mbstring e PHP5-sqlite.
- Edit the Apache configuration file in order to enable Apache web server to load the PHP modules when initialization: Modificare il file di configurazione di Apache per consentire ai server web Apache per caricare i moduli del PHP, quando l'inizializzazione:
- Go to Apache configuration file location by cd /usr/local/etc/apache2/ Vai a file di configurazione di Apache posizione di cd / usr/local/etc/apache2 /
- Edit Apache configuration file by vi httpd.conf Modificare file di configurazione di Apache httpd.conf di vi
- Search for LoadModule lines, after the last LoadModule line, but within the same section, add the following 2 lines: Ricerca di linee LoadModule, dopo l'ultima linea LoadModule, ma all'interno della stessa sezione, aggiungere le seguenti 2 righe:
AddType application/x-httpd-php .php AddType application / x-httpd-php. Php
AddType application/x-httpd-php-source .phps AddType application / x-httpd-php-source. Phps
- Optionally, copy /usr/local/etc/php.ini-recommended or /usr/local/etc/php.ini-dist to /usr/local/etc/php.ini (in same directory), which will enable you to tune and change the default settings of behaviours of PHP. In alternativa, copia / usr / local / etc / php.ini-raccomandata o / usr / local / etc / php.ini-dist in / usr / local / etc / php.ini (nella stessa directory), che vi permetterà di affinare e modificare le impostazioni di default di comportamenti di PHP.
- Start the Apache HTTP web server by using apachectl start (or restart Apache HTTP web server by using apachectl restart). Inizio HTTP Apache web server utilizzando apachectl start (o riavviare HTTP Apache web server utilizzando apachectl restart). apachectl is located in /usr/local/sbin, if you encounter Command not found problem, try to change directory to its location. apachectl si trova in / usr / local / sbin, se si incontrano Command not found problema, provare a cambiare directory alla sua posizione.
- PHP5 installation done. PHP5 installazione fare.
A web server has been setup with the FreeBSD with Apache, MySQL and PHP. Un web server è stato di installazione con il FreeBSD con Apache, MySQL e PHP. The document root of the web server (where you should put your HTML and PHP files is at /usr/local/www/apache22/data/ and you will need a SecureFTP (SFTP) client such as WinSCP to upload your files to web server securely. Il documento principale del server web (dove si dovrebbe mettere il vostro codice HTML e di PHP è al file / usr/local/www/apache22/data / e avrai bisogno di un SecureFTP (SFTP) client come WinSCP di caricare i file a server web sicuro.
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
- 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
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 3 L'installazione di server Web in FreeBSD 6,0 con Apache 2,2, 5,0 MySQL e PHP 5 - Parte 3
- Easily Set Up Web Server with XAMPP Facilmente istituire server Web con XAMPP
- 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 3 Installare server Web in Windows XP con Apache2, PHP5 e MySQL4 - Parte 3
- FreeBSD Apache HTTP Accept Filter Error FreeBSD HTTP Apache accettare filtro errore
- Using phpMyAdmin for Effective MySQL Management in Windows XP Utilizzando phpMyAdmin per un'efficace gestione di MySQL in Windows XP
- PHP 5 Unable to Open HTTP Request Stream with fopen or fsockopen Functions PHP 5 Impossibile aprire Richiesta HTTP Stream con fopen o fsockopen Funzioni
- Enable Logging of Slow Queries (Slow Query Log) in MySQL Database Attivare la registrazione di Slow query (query lente Accedi) nel Database MySQL
- Enable MySQL InnoDB Storage Engine Support in XAMPP Installation Consentire MySQL InnoDB motore di memorizzazione sostegno in XAMPP installazione




























May 24th, 2006 10:23 24 maggio 2006 10:23
Hi, I am trying to install, php5 with apache2.2 on freebsd 6.1. Ciao, sto cercando di installare, php5 con apache2.2 su FreeBSD 6,1. I have followed the instructions on this page. Ho seguito le istruzioni su questa pagina. I can get apache running well, but php will not interpret any pages. Sono in grado di ottenere Apache, php, ma non interpretare tutte le pagine. I have a file; info.php with in it, but when I load it from a browser it tries to *download* the php file not display it. Ho un file; info.php con in essa, ma quando è carico da un browser prova a scaricare * * il php file non visualizzarlo. Furthermore, the httpd.conf does not have a entry to load the php module as a shared object. Inoltre, la httpd.conf non ha ancora una voce per caricare il modulo PHP come un oggetto. should it? dovrebbe? its as if apache has not idea how to process php’s. come se il suo apache non ha idea di come il processo di php. Any guideance would be appreciated! Qualsiasi guideance sarebbe apprezzato!
kind regards Cordiali saluti
May 24th, 2006 10:30 24 maggio 2006 10:30
Did you add the followng lines to your httpd.conf? Ti è aggiungere il followng righe al vostro httpd.conf?
AddType application/x- httpd-php . AddType application/x- httpd-php. php PHP
AddType application/x- httpd-php-source . AddType application/x- httpd-php-source. phps
Normally, ports installation will auto update the httpd.conf with php5 load module. Di norma, i porti installazione automatica di aggiornamento httpd.conf a carico php5 modulo. Check if your httpd.conf has the following line, if not try to add: Controllate se il vostro httpd.conf è la seguente riga, se non tenta di aggiungere:
LoadModule php5_module libexec/apache22/libphp5.so LoadModule php5_module libexec/apache22/libphp5.so
May 24th, 2006 11:54 24 maggio 2006 11:54
Yes, I certainly did add the AddType’s Sì, certamente ha fatto aggiungere il AddType's
the php5 port installation did not auto update httpd.conf with ‘LoadModule php5_module libexec/apache22/libphp5.so’. php5 il porto di installazione non ha Auto Update httpd.conf con 'LoadModule php5_module libexec/apache22/libphp5.so'. I would manually add it but the libphp5.so does not exist in the mentioned directory. Vorrei aggiungere manualmente, ma il libphp5.so non esiste nel citato elenco. Any idea’s? Qualsiasi idea? I installed from the /usr/ports/lang/php5 port. Ho installato dal / usr/ports/lang/php5 porto. I heard using /usr/ports/www/mod_php5 port may work. Ho sentito utilizzando / usr/ports/www/mod_php5 porto può funzionare. Would/should it make any difference? Avrebbe / dovrebbe fare alcuna differenza?
May 24th, 2006 16:01 24 maggio 2006 16:01
Hi Bruce, you may give mod_php5 a try, but I think you will lose some functionalities such as command line CLI. Hi Bruce, si può dare mod_php5 una prova, ma credo che si perderà alcune funzionalità come, ad esempio riga di comando CLI. Or else try to make clean in php5 first. Oppure cercare di fare pulizia in php5 prima. Reinstalling from Apache again worth a try too. Reinstallare da Apache nuovamente vale la pena di provarlo. Note that you should install Apache first, and php5 will detect which version of Apache you’re running. Si noti che si dovrebbe installare prima di Apache, e PHP5 rileveranno quale versione di Apache si sta eseguendo.
May 24th, 2006 16:11 24 maggio 2006 16:11
Beside, make sure you updated to latest ports tree with Accanto, assicuratevi di aggiornare le ultime porti con albero portsnap or o cvsup CVSup .
May 29th, 2006 20:59 29 maggio 2006 20:59
You might missed to install the php for apache, only cgi and cli. Si potrebbe perdere per installare il php per apache, solo CGI e CLI.
CD /usr/ports/php5 CD / usr/ports/php5
make config make config
then allora
make install clean make install clean
mayby you have to do mayby ciò che devi fare
make deinstall && make reinstall fare disinstallare & & make reinstallare
June 4th, 2006 10:48 4 giugno 2006 10:48
When you add the following lines to httpd.conf file, make sure you removed the extra spaces (there are 2 extra spaces in the original article, following doesnt’t have). Quando aggiungi le seguenti linee al file httpd.conf, assicurarsi che la rimozione di spazi aggiuntivi (ci sono 2 spazi aggiuntivi in originale, hanno seguito doesnt't).
AddType application/x-httpd-php .php AddType application / x-httpd-php. Php
AddType application/x-httpd-php-source .phps AddType application / x-httpd-php-source. Phps
June 7th, 2006 05:21 7 Giugno 2006 05:21
I’m having the same problem as Bruce above. Sto avendo lo stesso problema come Bruce sopra. I’m using FreeBSD 6.1, Apache 2.2, and PHP 5.1.4. Sto utilizzando FreeBSD 6,1, 2,2 Apache e PHP 5.1.4. My ports tree is fresh and synched. Porti il mio albero è fresco e sincronizzato.
I installed the PHP5 port with Apache module support. Ho installato il PHP5 porta con Apache module support. The installation completes without complaining, but there is no Apache module built. L'installazione completa senza lamentarsi, ma non vi è alcun modulo di Apache costruito. The file /usr/local/libexec/apache22/libphp5.so does not exist. Il file / usr/local/libexec/apache22/libphp5.so non esiste. It doesn’t exist anywhere else in the filesystem either. Non esiste in nessun altro luogo il filesystem. Something is broken with this port. È rotto qualcosa a questa porta. I see source files in the work directories , like /usr/ports/lang/php5/work/php-5.1.4/sapi/apache that look appropriate to this module… but are not getting compiled. Vedo i file di origine nella directory di lavoro, come / usr/ports/lang/php5/work/php-5.1.4/sapi/apache opportuno che guardano a questo modulo… ma non sono sempre compilato. Any insights? Qualsiasi intuizioni?
June 9th, 2006 20:41 9 giugno 2006 20:41
Ahmet gave a working answer. Ahmet un gruppo di lavoro ha dato risposta. I was having the same problems, until I noticed the extra space before the file extention, now everything works like a charm! Mi è stato avere gli stessi problemi, fino a quando ho notato lo spazio in prima estensione del file, ora tutto funziona come un fascino!
June 9th, 2006 20:59 9 giugno 2006 20:59
Thanks for point out, has since corrected the error. Grazie per sottolineare, dal momento che ha corretto l'errore.
August 28th, 2006 10:55 Ago 28, 2006 10:55
Recompile php5 with ‘Apache Module’ included. Ricompilare php5 con 'Apache Modulo' incluso.
‘cd /usr/ports/lang/php5′ 'CD / usr/ports/lang/php5'
‘make deinstall’ ignore warnings 'Make disinstallare' ignorare gli avvertimenti
‘make config’ make sure to select apache module 'Make config', assicuratevi di selezionare modulo di apache
‘make install’ 'Make install'
September 26th, 2006 16:37 26 settembre 2006 16:37
I’ve Done it successfully. Ne ho fatto, con successo. It doesnt work.. Essa non di lavoro ..
How do i access it? Come faccio ad accedervi?
ive typed Ho digitato http://192.168.1.9
November 29th, 2006 10:32 29 novembre 2006 10:32
Had run into the same problem as those above with the extra spaces in the AddType declaration but solved it before looking at the comments. Aveva eseguito in lo stesso problema di quelli di cui sopra con gli spazi nella dichiarazione AddType risolto, ma prima di guardare i commenti. Would recommend updating the article as, all in all, this is a great tutorial. Consigliamo l'aggiornamento del articolo come, tutto in tutti, questa è una grande esercitazione. Thanks. Grazie.
Ben
November 29th, 2006 12:35 29 novembre 2006 12:35
Thanks Ben, have since corrected the error. Grazie Ben, dal momento che hanno corretto l'errore.
January 6th, 2007 16:50 6 gennaio 2007 16:50
I’m running into the same issue. Sono in esecuzione nella stessa edizione. My php files are trying to download instead. Il mio file php stanno cercando di scaricare.
I’ve gone over everything three and four times yet nothing. Ho andato su tutto tre e quattro volte ancora nulla.
I’ve checked the additional spaces as well and no luck. Ho controllato le ulteriori spazi e non e fortuna.
Any assistance is appreciated!! Qualsiasi tipo di assistenza è apprezzato!
January 9th, 2007 22:05 9 gennaio 2007 22:05
I had same issue. Avevo stesso argomento.
Try make config and unselect CGI and be sure to select APACHE. Prova a fare config e deselezionare CGI e seleziona Apache.
Check at end of install that you have a line like:chmod 755 /usr/local/libexec/apache22/libphp5.so Verificare alla fine di installare di avere una linea del tipo: chmod 755 / usr/local/libexec/apache22/libphp5.so
I config without CLI ang CGI. I CLI di configurazione senza il CGI.
March 16th, 2007 08:28 Marzo 16, 2007 08:28
Trying to install the package php5 without port sources via Cercando di installare il pacchetto php5 senza porta attraverso fonti
pkg_add -r php5 pkg_add-r PHP5
only this doesnt install the apache module by the looks of it.. solo questo non installare il modulo di apache la guarda di esso ..
nor does it build it.. né costruirla ..
I dont want the sources on the server because it is to be a production server.. I dont desidera le fonti sul server perché è di essere un server di produzione .. i’m gunna try a reinstall… Sono gunna provare una reinstallazione…
March 16th, 2007 08:36 Marzo 16, 2007 08:36
reinstall was unsuccessful reinstallare non è riuscito
April 18th, 2007 05:40 18 aprile 2007 05:40
I uninstalled, reinstalled making double sure to include the Apache model, still no dice. Ho disinstallato, reinstallato fare doppio Assicurarsi di includere il modello di Apache, ancora nessun dadi. So I uninstalled again and reinstalled without CLI and CGI and it still would startup no errors, but it would list the directories in document source and would treat cgi files as text files. Così ho disinstallato e reinstallato di nuovo senza CLI e CGI e sarebbe ancora nessun errore di avvio, ma sarebbe la lista elenchi di cui al documento di origine e di tratterebbe cgi file come file di testo. All my configs were in order, so I thought maybe it needed a reboot… and walah. Tutti i miei configurazioni sono stati in ordine, così ho pensato forse è necessario un riavvio,… e walah. Working like a charm. Lavoro come un fascino.
I think Unix is for massochists =) Credo che per Unix è massochists =)
April 18th, 2007 05:42 18 aprile 2007 05:42
edit.. modificare .. I meant ” .. Volevo dire ".. would treat PHP files as text files ..” and not CGI. tratterebbe di PHP file come file di testo .. "e non CGI.
Long day =0 Lunga giornata = 0
September 14th, 2007 17:03 14 settembre 2007 17:03
I’ve been trying to install Timetrex and it requires Apache, php and postgresql. Sto cercando di installare Timetrex e richiede Apache, PHP e PostgreSQL. Postgresql is not a problem because I install it from source. Postgresql non è un problema perché la sua installazione dai sorgenti. But as you can see from above, the FreeBSD ports system is so often in a state of flux that you’re not guaranteed anything that will work. Ma come si può vedere da sopra, il sistema di port di FreeBSD è così spesso in uno stato di flusso che non sei garantito tutto ciò che funzionerà.
On this issue, the bosses, and I myself got so fed up with the results from FreeBSD that we installed Fedora and then took the vendors installation file, which only works on Linux and got on with the task. Su questo tema, i datori di lavoro, e io stesso ho avuto modo alimentato in su con i risultati di FreeBSD che abbiamo installato Fedora Core e poi ha preso il file di installazione fornitori, che funziona solo su Linux e ottenuto con il compito.
With so many dependencies and librairies to update, the FreeBSD ports system as left me feeling very cautious about using it and it harkens me back to the old M$ “dll - hell” days when Windows 3x and Win9x were such a pain to deal with. Con così tanti dipendenze e librairies di aggiornamento, il sistema di port di FreeBSD sinistra come me sensazione molto prudente per quanto riguarda l'uso e harkens mi riporta al vecchio M $ "dll - inferno" giorni in cui Windows 3x e Win9x sono stati un tale dolore per far fronte a .
November 30th, 2007 09:57 30 novembre 2007 09:57
This series of articles has been very, very helpful. Questa serie di articoli è stata molto, molto utile. Many thanks for your contribution! Molte grazie per il tuo contributo!
December 11th, 2007 20:53 Dicembre 11, 2007 20:53
Should the problem with downloadable sourcecodes exist for anyone else, if it was just a problem occurring from localhost, changing the listening port from the default 80 to *:80 might help. Qualora il problema con scaricabili sourcecodes esistono per chiunque altro, se è stato soltanto un problema che si verificano da localhost, cambiando la porta di ascolto di default da 80 a *: 80 potrebbe aiutare. It is highly likely that in the above mentioned cases Apache had not much to do with serving the files on localhost. E 'altamente probabile che in casi di cui sopra Apache non aveva molto a che fare con i file che servono a localhost.
Fedora does not have less dependancies, they are just handeld elswehere out of user eyes. Fedora Core non ha meno dipendenze, esse sono solo handeld elswehere di utente occhi.
Understanding the package & port system and when and why to update is part of the game. La comprensione e il pacchetto del sistema portuale e quando e perché l'aggiornamento è parte del gioco.
For those who go for Fedora on servers, you might opt for ubuntu instead. Per coloro che vai per Fedora sui server, si potrebbe optare per ubuntu. it’s easy and fast as well as free. e 'facile e veloce e gratuito.
May 10th, 2008 01:44 10 maggio 2008 01:44
Lol, you should put this somewhere… Lol, si dovrebbe mettere questo da qualche parte…
Befor testing… REBOOT! Prima di test… REBOOT! XD
30 minutes lost trying to fix apache + php and all that was required was reboot ¬¬ 30 minuti persi cercando di fissare apache + php e tutto ciò che è stato è stato richiesto il riavvio ¬ ¬