Page 2 of 2

Posted: Fri Nov 23, 2007 4:46 pm
by niugentoo
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...

php ---- ma mysql c'è o non c'è ?---

Posted: Sun Jan 13, 2008 6:51 pm
by xevilstar
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'

notice that ...

Posted: Sun Jan 13, 2008 6:53 pm
by xevilstar
'--with-mysql=shared,/usr' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' are both present in the phpinfo()

Posted: Mon Jan 14, 2008 7:50 am
by Scen
@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: Select all

emerge -pv php

Posted: Wed Jun 23, 2010 3:09 pm
by KinG-InFeT
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: Select all

 <?php phpinfo(); ?>
questo è il primo problema mentre il secondo non riesco ad installare phpmyadmin mi da il seguente errore

Code: Select all

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: Select all

_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

Posted: Wed Jun 23, 2010 3:31 pm
by fbcyborg
Dunque,

Code: Select all

echo "dev-lang/php ctype filter" >> /etc/portage/package.use
emerge php
Riprova ad installare phpmyadmin.

Posted: Wed Jun 23, 2010 4:00 pm
by KinG-InFeT
perfetto grazie ora phpmyadmin è installato
il problema ora e che non leggendomi il php non mi funziona niente :S

Posted: Wed Jun 23, 2010 4:02 pm
by fbcyborg
Non ti interpreta il php? :|
Dunque, io di solito riemergo php e restarto apache... Dovrebbe bastare!

Posted: Wed Jun 23, 2010 4:14 pm
by KinG-InFeT
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: Select all

 * 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...

Posted: Wed Jun 23, 2010 5:28 pm
by Onip
hai abilitato il modulo per php5 nella configurazione di apache?

Posted: Wed Jun 23, 2010 5:34 pm
by KinG-InFeT

Code: Select all

APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP5"
direi di si

Posted: Wed Jun 23, 2010 8:27 pm
by cloc3
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?

Posted: Wed Jun 23, 2010 9:57 pm
by KinG-InFeT
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: Select all

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

Posted: Thu Jun 24, 2010 11:44 am
by KinG-InFeT
UP

Posted: Thu Jun 24, 2010 11:58 am
by cloc3
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 ....

Posted: Thu Jun 24, 2010 12:00 pm
by fbcyborg
cloc3 wrote: nel mio sistema, dove pic è determinata dalle condizioni di default, ho ... -pdo -pic ....
Ovvero prova a togliere sto pic!

Posted: Thu Jun 24, 2010 3:12 pm
by KinG-InFeT
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 .....

Posted: Sun Jun 27, 2010 3:14 pm
by Peach
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

Posted: Tue Jun 29, 2010 11:33 am
by KinG-InFeT
ho reinstallato tutto ma niente da fare...ecco le use
make.conf

Code: Select all

_SERVER = "apache2 mysql php session pam ssl xml xml2 berkdb innodb"
/etc/portage/package.use

Code: Select all

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à

Posted: Fri Jul 02, 2010 2:18 pm
by Peach
KinG-InFeT wrote:ecco le use
puoi postare l'output di

Code: Select all

emerge -pv php apache
?

Posted: Tue Jul 06, 2010 8:48 pm
by KinG-InFeT
eccole

Code: Select all

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 ~ # 

Posted: Sat Jul 10, 2010 11:16 am
by Peach
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: Select all

# 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: Select all

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: Select all

# grep servers\/apache /etc/portage/package.use/devel 
www-servers/apache suexec -threads
e

Code: Select all

# 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: Select all

# 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: Select all

# 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: Select all

# 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: Select all

# 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: Select all

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: Select all

<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: Select all

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.