Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[HOW-TO] Installazione Apache2, PHP, Mysql e PhpMyAdmin
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Risorse italiane (documentazione e tools)
View previous topic :: View next topic  
Author Message
niugentoo
Tux's lil' helper
Tux's lil' helper


Joined: 15 Oct 2007
Posts: 95

PostPosted: Fri Nov 23, 2007 4:46 pm    Post subject: Reply with quote

Il webserver si è installato, ho le informazioni di php, apache risponde, e tutto quanto, ma il mysql non funziona, mi da sempre degli acces denied, ho provato di tutto ma proprio niente.......provo a entrare nel phpmyadmin e non entra, sicuramente vorrette informazioni più dettagliate, ma non so cosa dirvi di più preciso.......voi chiedete io vi do le informazioni in più che vi servono...
Back to top
View user's profile Send private message
xevilstar
n00b
n00b


Joined: 21 Jun 2007
Posts: 13

PostPosted: Sun Jan 13, 2008 6:51 pm    Post subject: php ---- ma mysql c'è o non c'è ?--- Reply with quote

phpmyadmin, drupal, squirrelmail ...etc same problem


Cannot load mysql extension. Please check your PHP configuration.







PHP Version 5.2.5

System Linux vajra 2.6.23-gentoo-r3 #1 SMP Sat Dec 15 13:54:09 Local time zone must be set--see zic i686
Build Date Jan 13 2008 18:33:10
Configure Command './configure' '--prefix=/usr/lib/php5' '--host=i686-pc-linux-gnu' '--mandir=/usr/lib/php5/man' '--infodir=/usr/lib/php5/info' '--sysconfdir=/etc' '--cache-file=./config.cache' '--enable-maintainer-zts' '--disable-cli' '--with-apxs2=/usr/sbin/apxs2' '--with-config-file-path=/etc/php/apache2-php5' '--with-config-file-scan-dir=/etc/php/apache2-php5/ext-active' '--without-pear' '--enable-bcmath=shared' '--with-bz2=shared' '--enable-calendar=shared' '--with-curl=shared' '--with-curlwrappers' '--enable-dbase=shared' '--enable-exif=shared' '--with-fbsql=shared' '--with-fdftk=shared,/opt/fdftk-6.0' '--enable-ftp=shared' '--with-gettext=shared' '--with-gmp=shared' '--with-kerberos=/usr' '--enable-mbstring=shared' '--with-mcrypt=shared' '--with-mhash=shared' '--without-msql' '--without-mssql' '--with-ncurses=shared' '--with-openssl' '--with-openssl-dir=/usr' '--disable-pcntl' '--with-pgsql=shared' '--with-pspell=shared' '--without-recode' '--disable-shmop' '--with-snmp=shared' '--enable-soap=shared' '--enable-sockets=shared' '--without-sybase' '--without-sybase-ct' '--enable-sysvmsg=shared' '--enable-sysvsem=shared' '--enable-sysvshm=shared' '--with-tidy=shared' '--enable-wddx=shared' '--with-xmlrpc=shared' '--with-xsl=shared' '--enable-zip=shared' '--with-zlib=shared' '--enable-debug' '--enable-dba=shared' '--with-cdb' '--with-db4' '--with-flatfile' '--with-gdbm' '--with-inifile' '--without-qdbm' '--with-freetype-dir=/usr' '--with-t1lib=/usr' '--enable-gd-jis-conv' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--with-gd' '--with-imap=shared' '--with-imap-ssl' '--with-interbase=/usr' '--with-ldap=shared' '--with-ldap-sasl' '--with-mysql=shared,/usr' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--with-mysqli=shared,/usr/bin/mysql_config' '--with-unixODBC=shared,/usr' '--without-adabas' '--without-birdstep' '--with-dbmaker=shared' '--without-empress' '--without-esoob' '--without-ibm-db2' '--without-iodbc' '--without-sapdb' '--without-solid' '--without-pdo-dblib' '--with-pdo-mysql=shared,/usr' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-pdo-pgsql=shared' '--with-pdo-sqlite=shared,/usr' '--with-readline' '--without-libedit' '--without-mm' '--with-sqlite=/usr' '--enable-sqlite-utf8' '--with-pic'
Back to top
View user's profile Send private message
xevilstar
n00b
n00b


Joined: 21 Jun 2007
Posts: 13

PostPosted: Sun Jan 13, 2008 6:53 pm    Post subject: notice that ... Reply with quote

'--with-mysql=shared,/usr' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' are both present in the phpinfo()
Back to top
View user's profile Send private message
Scen
Retired Dev
Retired Dev


Joined: 29 Jul 2003
Posts: 2470
Location: Padova, Italy

PostPosted: Mon Jan 14, 2008 7:50 am    Post subject: Reply with quote

@xevilstar: i suppose you don't speak Italian, do you?

If it's true, i suggest you to search in Networking and Security Section (this section is intended to Italian folks 8) )

However... please post the output of
Code:

emerge -pv php

_________________
I was born in a deep forest/I wish I could live here all my life/I am made from stones and roots/My home, these woods and roads
All my life I loved this sound/Of the woods all around/Eagles flies where the winds blows free
Journey is my destiny
Back to top
View user's profile Send private message
KinG-InFeT
Apprentice
Apprentice


Joined: 01 Oct 2009
Posts: 269
Location: Napoli

PostPosted: Wed Jun 23, 2010 3:09 pm    Post subject: Reply with quote

perdonatemi raga ma ho un 2 problemi...
mi va tutto alla grande fino alla visualizzazione della pagina per le informazioni info.php ed ècome se la pagina non venisse interpretata da php siccome mi esce solo la scritta ovvero il contenuto di essa
Code:
 <?php phpinfo(); ?>

questo è il primo problema mentre il secondo non riesco ad installare phpmyadmin mi da il seguente errore
Code:
KinG-InFeT ~ # emerge phpmyadmin                       
Calculating dependencies... done!

emerge: there are no ebuilds built with USE flags to satisfy "dev-lang/php[crypt,ctype,filter,session,unicode]".
!!! One of the following packages is required to complete your request:
- dev-lang/php-5.2.13 (Change USE: +ctype +filter)
(dependency required by "dev-db/phpmyadmin-3.3.2" [ebuild])
(dependency required by "phpmyadmin" [argument])

KinG-InFeT ~ #

ho anche aggiunto le use flag sia al php che nel make.conf
Code:
_NOTSET="-gnome -kde -qt3 -qt4 -nocxx -arts"
_CUSTOM="hal unicode X dbus alsa ipv6 python php apache2 session pam mysql xmlrpc imap exif gd pic odbc soap postgres snmp iconv crypt ctype filter session unicode"
_EDIROT="vim vim-syntax"
_IMAGE="png jpeg gif jpeg2k tiff"
_AUDIO="mp3 vorbis aac timidity flac ogg sid mad misepack sndfile speex opencore-amr gsm cue"
_VIDEO="theora v41 v412 vdpau x264 xvid schroedinger dirac"

USE="${}NOTSET} ${_CUSTOM} ${_EDITOR} ${_IMAGE} ${_AUDIO} ${_VIDEO}"


e non sò più che fare...,mi potreste aiutare? grazie
_________________
My Site => http://www.kinginfet.net/
Back to top
View user's profile Send private message
fbcyborg
Advocate
Advocate


Joined: 16 Oct 2005
Posts: 3056
Location: ROMA

PostPosted: Wed Jun 23, 2010 3:31 pm    Post subject: Reply with quote

Dunque,

Code:
echo "dev-lang/php ctype filter" >> /etc/portage/package.use
emerge php


Riprova ad installare phpmyadmin.
_________________
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Back to top
View user's profile Send private message
KinG-InFeT
Apprentice
Apprentice


Joined: 01 Oct 2009
Posts: 269
Location: Napoli

PostPosted: Wed Jun 23, 2010 4:00 pm    Post subject: Reply with quote

perfetto grazie ora phpmyadmin è installato
il problema ora e che non leggendomi il php non mi funziona niente :S
_________________
My Site => http://www.kinginfet.net/
Back to top
View user's profile Send private message
fbcyborg
Advocate
Advocate


Joined: 16 Oct 2005
Posts: 3056
Location: ROMA

PostPosted: Wed Jun 23, 2010 4:02 pm    Post subject: Reply with quote

Non ti interpreta il php? :|
Dunque, io di solito riemergo php e restarto apache... Dovrebbe bastare!
_________________
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Back to top
View user's profile Send private message
KinG-InFeT
Apprentice
Apprentice


Joined: 01 Oct 2009
Posts: 269
Location: Napoli

PostPosted: Wed Jun 23, 2010 4:14 pm    Post subject: Reply with quote

non sò quante volte l'ho fatto ma niente non mi interpreta le pagine in php :'(
edit però alla fine della compilazione ed installazione di php mi esce questo
Code:
 * If you have additional third party PHP extensions (such as
 * dev-php5/phpdbg) you may need to recompile them now.
 *
 * USE="pic" slows down PHP but has to be enabled on setups where TEXTRELs
 * are disabled (e.g. when using PaX in the kernel). On hardened profiles this
 * USE flag is enabled automatically

se è come penso io mi uccido all'istante

RI-EDIT: HO INSTALLATO ANCHE QUEL PACCHETTO MA NIENTEEEEEEEEEEEE :( INSTALLO IL PACCHETTO RICOMPILATO PHP RISTARTATO APACHE2 E NIENTE DA FARE....DURANTE L'EMERSIONE DI PHP MI ESCE DINUOVO QUEL MEX...
_________________
My Site => http://www.kinginfet.net/
Back to top
View user's profile Send private message
Onip
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2912
Location: Parma (Italy)

PostPosted: Wed Jun 23, 2010 5:28 pm    Post subject: Reply with quote

hai abilitato il modulo per php5 nella configurazione di apache?
_________________
Linux Registered User n. 373835

Titus Lucretius Carus, De Rerum Natura - Tantum religio potuit suadere malorum
Back to top
View user's profile Send private message
KinG-InFeT
Apprentice
Apprentice


Joined: 01 Oct 2009
Posts: 269
Location: Napoli

PostPosted: Wed Jun 23, 2010 5:34 pm    Post subject: Reply with quote

Code:
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP5"

direi di si
_________________
My Site => http://www.kinginfet.net/
Back to top
View user's profile Send private message
cloc3
Advocate
Advocate


Joined: 13 Jan 2004
Posts: 4787
Location: http://www.gentoo-users.org/user/cloc3/

PostPosted: Wed Jun 23, 2010 8:27 pm    Post subject: Reply with quote

KinG-InFeT wrote:
DURANTE L'EMERSIONE DI PHP MI ESCE DINUOVO QUEL MEX...

non urlare, abbiamo capito.
cosa ti restiuisce un emerge dev-lang/php --info|grep pic?
_________________
vu vu vu
gentù
mi piaci tu
Back to top
View user's profile Send private message
KinG-InFeT
Apprentice
Apprentice


Joined: 01 Oct 2009
Posts: 269
Location: Napoli

PostPosted: Wed Jun 23, 2010 9:57 pm    Post subject: Reply with quote

no perdonami non volevo urlare e che mi si era bloccato il blocco maiuscolo ma non era mia intenzione urlare...comunque il risultato è il seguente
Code:
KinG-InFeT ~ # emerge dev-lang/php --info|grep pic
USE="berkdb bzip2 cli crypt ctype exif filter gd gdbm iconv imap ipv6 ldap mysqli ncurses nls odbc pcre pic postgres readline reflection session snmp soap spell spl ssl truetype unicode xml xmlrpc zlib -adabas -apache2 -bcmath -birdstep -calendar -cdb -cgi -cjk -concurrentmodphp -curl -curlwrappers -db2 -dbase -dbmaker -debug -discard-path -doc -empress -empress-bcs -esoob -fastbuild -fdftk -firebird -flatfile -force-cgi-redirect -frontbase -ftp -gd-external -gmp -hash -inifile -interbase -iodbc (-java-external) -json -kerberos -kolab -ldap-sasl -libedit -mcve -mhash -msql -mssql -mysql -oci8 -oci8-instant-client -pcntl -pdo -posix -qdbm -recode -sapdb -sharedext -sharedmem -simplexml -sockets -solid -sqlite -suhosin -sybase -sybase-ct -sysvipc -threads -tidy -tokenizer -wddx -xmlreader -xmlwriter -xpm -xsl -yaz -zip"

la parola pic mi esce di colore rosso
_________________
My Site => http://www.kinginfet.net/
Back to top
View user's profile Send private message
KinG-InFeT
Apprentice
Apprentice


Joined: 01 Oct 2009
Posts: 269
Location: Napoli

PostPosted: Thu Jun 24, 2010 11:44 am    Post subject: Reply with quote

UP
_________________
My Site => http://www.kinginfet.net/
Back to top
View user's profile Send private message
cloc3
Advocate
Advocate


Joined: 13 Jan 2004
Posts: 4787
Location: http://www.gentoo-users.org/user/cloc3/

PostPosted: Thu Jun 24, 2010 11:58 am    Post subject: Reply with quote

KinG-InFeT wrote:
mi si era bloccato il blocco maiuscolo

:roll:

lasciamo perdere. compreso il fatto che ti sei agganciato a un howto datato del forum risorse con un problema personale poco attinente e che fai gli up senza attendere le 24 ore.

ma, a parte gli scherzi, osservo che nel tuo taglia incolla è dichiarata la presenza esplicita della use pic nella prima riga.
evidentemente, devi averla impostata in /etc/make.conf o in /etc/portage .

nel mio sistema, dove pic è determinata dalle condizioni di default, ho ... -pdo -pic ....
_________________
vu vu vu
gentù
mi piaci tu
Back to top
View user's profile Send private message
fbcyborg
Advocate
Advocate


Joined: 16 Oct 2005
Posts: 3056
Location: ROMA

PostPosted: Thu Jun 24, 2010 12:00 pm    Post subject: Reply with quote

cloc3 wrote:

nel mio sistema, dove pic è determinata dalle condizioni di default, ho ... -pdo -pic ....

Ovvero prova a togliere sto pic!
_________________
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Back to top
View user's profile Send private message
KinG-InFeT
Apprentice
Apprentice


Joined: 01 Oct 2009
Posts: 269
Location: Napoli

PostPosted: Thu Jun 24, 2010 3:12 pm    Post subject: Reply with quote

niente da fare ho provato a levarlo riemerso php e restartato mysql e apache2 ma niente
provato a disabilitare con -pic riemerso php restartato tutto ma niente da fare alla fine dell'emerge continua ad esserci quel warning
e il php non ne vuole sapere di interpretare le pagine .....
_________________
My Site => http://www.kinginfet.net/
Back to top
View user's profile Send private message
Peach
Advocate
Advocate


Joined: 08 Mar 2003
Posts: 3686
Location: London, UK

PostPosted: Sun Jun 27, 2010 3:14 pm    Post subject: Reply with quote

scusa, curiosita' potresti postare versioni e use flag di apache e php?
il fatto che non ti interpreta le pagine e' normalmente legato a apache che non trova o non ha riconosciuto l'interprete (tipo qualche problema di misconfigurazione dei mime-types).

la cosa e' risolvibile quindi vivamente suggerirei di partire da zero, brasando i file di configurazione modificati (SE li hai modificati) riemergendo con le USE corrette (e per quello magari se le posti vediamo che non ci siano casini tipo moduli o cgi o altro che faccia casino) e poi vediamo se il problema rimane.

ciao
_________________
Gentoo user since 2004.
"It's all fun and games, until someone loses an eye" - mom
Back to top
View user's profile Send private message
KinG-InFeT
Apprentice
Apprentice


Joined: 01 Oct 2009
Posts: 269
Location: Napoli

PostPosted: Tue Jun 29, 2010 11:33 am    Post subject: Reply with quote

ho reinstallato tutto ma niente da fare...ecco le use
make.conf
Code:
_SERVER = "apache2 mysql php session pam ssl xml xml2 berkdb innodb"


/etc/portage/package.use
Code:

www-servers/apache ldap ssl
dev-db/mysql community perl ssl
dev-lang/php xmlrpc imap exif gd pic odbc soap postgres snmp iconv


bhà
_________________
My Site => http://www.kinginfet.net/
Back to top
View user's profile Send private message
Peach
Advocate
Advocate


Joined: 08 Mar 2003
Posts: 3686
Location: London, UK

PostPosted: Fri Jul 02, 2010 2:18 pm    Post subject: Reply with quote

KinG-InFeT wrote:
ecco le use


puoi postare l'output di
Code:
emerge -pv php apache
?
_________________
Gentoo user since 2004.
"It's all fun and games, until someone loses an eye" - mom
Back to top
View user's profile Send private message
KinG-InFeT
Apprentice
Apprentice


Joined: 01 Oct 2009
Posts: 269
Location: Napoli

PostPosted: Tue Jul 06, 2010 8:48 pm    Post subject: Reply with quote

eccole
Code:

KinG-InFeT ~ # emerge -pv php apache

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ] www-servers/apache-2.2.15  USE="ldap ssl -debug -doc (-selinux) -static -suexec -threads" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias -asis -auth_digest -authn_dbd -cern_meta -charset_lite -dbd -dumpio -ident -imagemap -log_forensic -proxy -proxy_ajp -proxy_balancer -proxy_connect -proxy_ftp -proxy_http -substitute -version" APACHE2_MPMS="-event -itk -peruser -prefork -worker" 0 kB
[ebuild  N    ] dev-db/mysql-5.1.46  USE="community perl ssl -big-tables -cluster -debug -embedded -extraengine -latin1 -max-idx-128 -minimal -pbxt -profiling (-selinux) -static -test -xtradb" 0 kB
[ebuild  N    ] virtual/mysql-5.1  0 kB
[ebuild  N    ] dev-lang/php-5.2.13  USE="apache2 berkdb bzip2 cli crypt exif gdbm iconv ipv6 ldap mysql ncurses nls pcre readline reflection session spell spl ssl truetype unicode xml zlib -adabas -bcmath -birdstep -calendar -cdb -cgi -cjk -concurrentmodphp -ctype -curl -curlwrappers -db2 -dbase -dbmaker -debug -discard-path -doc -empress -empress-bcs -esoob -fastbuild -fdftk -filter -firebird -flatfile -force-cgi-redirect -frontbase -ftp -gd -gd-external -gmp -hash -imap -inifile -interbase -iodbc (-java-external) -json -kerberos -kolab -ldap-sasl -libedit -mcve -mhash -msql -mssql -mysqli -oci8 -oci8-instant-client -odbc -pcntl -pdo -pic -posix -postgres -qdbm -recode -sapdb -sharedext -sharedmem -simplexml -snmp -soap -sockets -solid -sqlite -suhosin -sybase -sybase-ct -sysvipc -threads -tidy -tokenizer -wddx -xmlreader -xmlrpc -xmlwriter -xpm -xsl -yaz -zip" 0 kB

Total: 4 packages (4 new), Size of downloads: 0 kB
KinG-InFeT ~ #

_________________
My Site => http://www.kinginfet.net/
Back to top
View user's profile Send private message
Peach
Advocate
Advocate


Joined: 08 Mar 2003
Posts: 3686
Location: London, UK

PostPosted: Sat Jul 10, 2010 11:16 am    Post subject: Reply with quote

KinG-InFeT wrote:
eccole
...


allora personalmente posso suggerirti di abilitare due o tre flag in piu' in php che molte applicazioni usano, nelle mie use flag ho:
Code:
# grep php /etc/portage/package.use/devel
=dev-lang/php-5* apache2 bzip2 cli -cgi ctype curl -concurrentmodphp force-cgi-redirect filter gd hardenedphp hash memlimit mysql mysqli pdo -soap tokenizer threads tidy xml xmlreader xmlwriter xsl zip unicode truetype iconv -spell suhosin xpm -snmp expat sockets json -force-cgi-redirect simplexml


(tra queste forse l'unica a cui potresti non essere interessato e' suhosin)
il che risulta in
Code:
lifetree ~ # emerge -vp php

These are the packages that would be merged, in order:

Calculating dependencies         ... done!
[ebuild   R   ] dev-lang/php-5.2.13  USE="apache2 berkdb bzip2 cli crypt ctype curl exif filter gd gdbm hash iconv ipv6 json mysql mysqli ncurses nls pcre pdo readline reflection session simplexml sockets spl ssl suhosin threads tidy tokenizer truetype unicode xml xmlreader xmlwriter xpm xsl zip zlib (-adabas) -bcmath (-birdstep) -calendar -cdb -cgi -cjk -concurrentmodphp -curlwrappers -db2 -dbase (-dbmaker) -debug -discard-path -doc (-empress) (-empress-bcs) (-esoob) -fastbuild (-fdftk) (-firebird) -flatfile -force-cgi-redirect (-frontbase) -ftp -gd-external -gmp -imap -inifile -interbase -iodbc (-java-external) -kerberos -kolab -ldap -ldap-sasl -libedit -mcve -mhash -msql -mssql -oci8 -oci8-instant-client -odbc -pcntl -pic -posix -postgres -qdbm -recode -sapdb -sharedext -sharedmem -snmp -soap (-solid) -spell -sqlite (-sybase) (-sybase-ct) -sysvipc -wddx -xmlrpc -yaz" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB


Come vedi ho abilitato il threading perche' su apache sto usando come MPM itk (questo richiede anche la flag suexec in apache); itk fondamentalmente mi consente di usare le dir nella mia public_html come vhost separati per lo sviluppo, inoltre facendo in modo che tutti i file creati da apache siano associati al mio uid/gid senza troppi sbattimenti. Chiaramente se il tuo ambiente di sviluppo fosse diverso la cosa dovrebbe essere realizzata diversamente. Io ti illustro come ho configurato il tutto da me e poi vediamo.

Le flag che ho adesso su apache sono configurate cosi:
Code:
# grep servers\/apache /etc/portage/package.use/devel
www-servers/apache suexec -threads

e
Code:
# grep -i apache /etc/make.conf
APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_default authn_file authz_default authz_groupfile authz_host authz_user autoindex cache deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias"
APACHE2_MPMS="itk"

che risultano in:
Code:
# emerge -pv apache

These are the packages that would be merged, in order:

Calculating dependencies        ... done!
[ebuild   R   ] www-servers/apache-2.2.15  USE="ssl suexec -debug -doc -ldap (-selinux) -static -threads" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_default authn_file authz_default authz_groupfile authz_host authz_user autoindex cache deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias -asis -auth_digest -authn_dbd -authn_dbm -authz_dbm -authz_owner -cern_meta -charset_lite -dav -dav_fs -dav_lock -dbd -dumpio -ident -imagemap -log_forensic -proxy -proxy_ajp -proxy_balancer -proxy_connect -proxy_ftp -proxy_http -substitute -version" APACHE2_MPMS="itk -event -peruser -prefork -worker" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB


una volta riemersi i pacchetti, configuri le opzioni con cui vuoi che apache parta e restarti il servizio:
Code:
# grep OPT /etc/conf.d/apache2
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D SUEXEC -D LANGUAGE -D PHP5 -D USERDIR"
# /etc/init.d/apache2 restart
 * Caching service dependencies ...                                                                         [ ok ]
 * Stopping apache2 ...                                                                                     [ ok ]
 * Starting apache2 ...                                                                                     [ ok ]


a questo punto, teoricamente, accedendo al tuo hostname dovresti poter vedere "It Works!" nel browser, ma questo e' un file html quindi poco ti serve per vedere se php funziona, quindi crea un file phpinfo.php nella root del vhost di default /var/www/localhost/htdocs/ :
Code:
# cat /var/www/localhost/htdocs/phpinfo.php
<?php phpinfo(); ?>

e vedi se accedendo a http://myhostname/phpinfo.php vedi la pagina relativa alla configurazione di php.
considera che devi avere un'entry in /etc/hosts che associa il tuo hostname myhostname almeno a localhost:
Code:
# cat /etc/hosts
127.0.0.1       myhostname localhost


se qualcosa non va, rispondi al thread dicendo se hai fatto qualcosa di diverso rispetto a quello che ho detto, e mi raccomando di controllare e riportare qualsiasi problema che appaia in /var/log/apache2/*log (di solito error_log, controlla gli altri in caso che tutto funzioni come deve)

se tutto va bene puoi continuare a leggere o fermarti pure qui.

ora, se vuoi fare sviluppo web e hai bisogno di replicare l'accesso tramite hostname al posto che tramite sotto directory (o entrambe le cose per testare la portabilita' del tuo codice) hai bisogno di configurare un virtual host (vhost) per gestire le varie directory.
Di base crei un file 01_my_vhost.conf in /etc/apache2/vhosts.d/ e dentro inserisci questo di base:
Code:
ServerName 127.0.0.1

<Directory /home/peach/public_html>
        Order Allow,Deny
        Allow from all
        Options +indexes
</Directory>

ovviamente sostituisci "peach" con il tuo username
in seguito configuri i vari virtualhost che intendi gestire, per fare un esempio per farti capire come funziona con itk:
Code:
<VirtualHost *:80>
        ServerAdmin peach@localhost
        DocumentRoot /home/peach/public_html/project
        ServerName project.myhostname
        ErrorLog /home/peach/public_html/logs/error_log
        CustomLog /home/peach/public_html/logs/access_log common
        DirectoryIndex   index.htm, index.php
        <Directory /home/peach/public_html/project>
                Options All
                AllowOverride All
                Order allow,deny
                Allow from All
        </Directory>
        <IfModule mpm_itk_module>
                AssignUserID peach users
        </IfModule>
</VirtualHost>

chiaramente devi avere una directory logs dentro public_html altrimenti apache non partira' mai e devi avere un entry in /etc/hosts per associare un ip all'hostname che usi per il progetto:
Code:
127.0.0.1  myhostname project.myhostname

puoi chiaramente usare un ip fisico se vuoi che l'hostname sia accessibile anche dall'esterno.
Ora dovresti teoricamente essere in grado di accedere al server dal browser sia tramite http://myhostname/~tuousername/project che tramite http://project.myhostname/

Fammi sapere.
_________________
Gentoo user since 2004.
"It's all fun and games, until someone loses an eye" - mom
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Risorse italiane (documentazione e tools) All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum