Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Apache2 e php
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
ermes87
Tux's lil' helper
Tux's lil' helper


Joined: 01 Aug 2005
Posts: 79

PostPosted: Sat Feb 25, 2006 3:13 pm    Post subject: Apache2 e php Reply with quote

Ho un problema con apache. HO installato i moduli per php 5, ma quando inserisco una pagina in php, la fà salvare, nn la apre.
_________________
In a world without walls and fences, who needs Windows and Gates?
Back to top
View user's profile Send private message
cloc3
Advocate
Advocate


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

PostPosted: Sat Feb 25, 2006 3:38 pm    Post subject: Re: Apache2 e php Reply with quote

ermes87 wrote:
Ho un problema con apache. HO installato i moduli per php 5, ma quando inserisco una pagina in php, la fà salvare, nn la apre.

In pratica, non esegue il codice php.
Molto problabilmente, è solo la famosa riga di APACHE2_OPTS in /etc/conf.d/apache2 che non è sistemata correttamente. Manca il "-D PHP5".

Ma prova anche a guardare la documentazione completa o il wiki.
_________________
vu vu vu
gentù
mi piaci tu
Back to top
View user's profile Send private message
ermes87
Tux's lil' helper
Tux's lil' helper


Joined: 01 Aug 2005
Posts: 79

PostPosted: Sat Feb 25, 2006 5:09 pm    Post subject: Re: Apache2 e php Reply with quote

Graze mille, ho risolto. Ora ho un altro piccolo problema. Ho un form in PHP che però nn riesce però ad inviare l'email all'indirizzo di prova. COs potrebbe essere?
_________________
In a world without walls and fences, who needs Windows and Gates?
Back to top
View user's profile Send private message
cloc3
Advocate
Advocate


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

PostPosted: Sat Feb 25, 2006 5:41 pm    Post subject: Re: Apache2 e php Reply with quote

ermes87 wrote:
Graze mille, ho risolto. Ora ho un altro piccolo problema. Ho un form in PHP che però nn riesce però ad inviare l'email all'indirizzo di prova. COs potrebbe essere?

Devi configurare un client di posta, tipo ssmtp.
Anche qui la documentazione disponibile è infinita.

Il wiki ti offre una quantità di soluzioni.
L'altro giorno ho fatto una cosa piccolina io che ti potrebbe bastare.
_________________
vu vu vu
gentù
mi piaci tu
Back to top
View user's profile Send private message
LastHope
Apprentice
Apprentice


Joined: 11 May 2005
Posts: 237
Location: Mordor

PostPosted: Wed Jan 17, 2007 6:01 pm    Post subject: Re: Apache2 e php Reply with quote

ermes87 wrote:
Ho un problema con apache. HO installato i moduli per php 5, ma quando inserisco una pagina in php, la fà salvare, nn la apre.

Sono nello stesso problema...
Ho appena aggiornato PHP alla versione 5 (utilizzo solo quello) e apache alla 2.58-r2...ma continua a volermi salvare i file php, non interpretarmeli...
Code:

root@dani_lap dani # php-select apache2
php5
root@dani_lap dani # php-select php
/usr/bin/php is set to /usr/lib/php5/bin/php
root@dani_lap dani # cat /etc/conf.d/apache2|grep OPTS
# and other features of apache using the APACHE2_OPTS line. Every module should
APACHE2_OPTS="-D DEFAULT_VHOST -D SSL -D PHP5"
root@dani_lap dani #

Ovviamente ho compilato PHP5 con la flag per apache2:
Code:

root@dani_lap dani # emerge -pv php

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

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

Total size of downloads: 0 kB

Io penso che il problema sia proprio che non mi carica il modulo, o che non capisce che quei file devono essere interpretati...nel vhost di default ho aggiunto la location:
Code:

<IfDefine DEFAULT_VHOST>
<VirtualHost *:80>
    #
    # DocumentRoot: The directory out of which you will serve your
    # documents. By default, all requests are taken from this directory, but
    # symbolic links and aliases may be used to point to other locations.
    #
    DocumentRoot "/var/www/localhost/htdocs"
    ServerName localhost
    #
    # This should be changed to whatever you set DocumentRoot to.
    #
    <Directory "/var/www/localhost/htdocs">

        #
        # Possible values for the Options directive are "None", "All",
        # or any combination of:
        #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
        #
        # Note that "MultiViews" must be named *explicitly* --- "Options All"
        # doesn't give it to you.
        #
        # The Options directive is both complicated and important.  Please see
        # http://httpd.apache.org/docs-2.0/mod/core.html#options
        # for more information.
        #
        Options Indexes FollowSymLinks

        #
        # AllowOverride controls what directives may be placed in .htaccess files.
        # It can be "All", "None", or any combination of the keywords:
        #   Options FileInfo AuthConfig Limit
        #
        AllowOverride None

        #
        # Controls who can get stuff from this server.
        #
        Order allow,deny
        Allow from all
    </Directory>

    <IfModule peruser.c>
        # this must match a Processor
        ServerEnvironment apache apache

        # these are optional - defaults to the values specified in httpd.conf
        MinSpareProcessors 4
        MaxProcessors 20
    </IfModule>

    <IfModule itk.c>
        # The userid and groupid this VirtualHost will run as
        AssignUserID apache apache

        # Optional: A separate MaxClients for the VirtualHost,
        # to limit the maximum number of processes
        MaxClientsVHost 50

        # Note that if you do not assign a user ID for your
        # VirtualHosts, none will be assigned by default,
        # ie. you'll run as root. Don't forget this!
    </IfModule>
    <Location /php5>
        AddHandler application/x-httpd-php .php
    </Location>

</VirtualHost>
</IfDefine>

Ho provato a seguire la guida (il link dato sopra non funziona :( ) per configurare PHP5 globalmente, ma sia non modificando il file /etc/apache2/modules.d/70_mod_php5.conf che seguendo la guida, non mi cambia...
Code:
<IfDefine PHP5>

        # Load the module first
        <IfModule !mod_php5.c>
                LoadModule php5_module    modules/libphp5.so
        </IfModule>

        # Set it to handle the files
        <IfModule mod_mime.c>
                AddType application/x-httpd-php .php
                AddType application/x-httpd-php .phtml
                AddType application/x-httpd-php .php3
                AddType application/x-httpd-php .php4
                AddType application/x-httpd-php .php5
                AddType application/x-httpd-php-source .phps
        </IfModule>

        AddDirectoryIndex index.php index.phtml
</IfDefine>

Code:
<IfDefine PHP5>

        # Load the module first
        <IfModule !sapi_apache2.c>
                LoadModule php5_module    modules/libphp5.so
        </IfModule>

        # Set it to handle the files
        <IfModule mod_mime.c>
                AddType application/x-httpd-php .php
                AddType application/x-httpd-php .phtml
                AddType application/x-httpd-php .php3
                AddType application/x-httpd-php .php4
                AddType application/x-httpd-php .php5
                AddType application/x-httpd-php-source .phps
        </IfModule>

        AddDirectoryIndex index.php index.phtml
</IfDefine>

Cos'altro dovrei fare?
Ciao a tutti

LastHope
Back to top
View user's profile Send private message
LastHope
Apprentice
Apprentice


Joined: 11 May 2005
Posts: 237
Location: Mordor

PostPosted: Thu Jan 18, 2007 2:08 pm    Post subject: Reply with quote

Ho "risolto": stranamente, il tutto funziona se lancio con
Code:

/etc/init.d/apache start

Invece che con il solito comando che utilizzavo:
Code:

apache -k start

Cosi' mi interpreta il PHP...ora ho altri problemi, ma prima cerco e poi al massimo scrivo ;)
Ciao a tutti

LastHope
_________________
[img]http://counter.li.org/cgi-bin/certificate.cgi/398459[/img]
DON'T SUPPORT BELGIUM AND BOYCOTT SWITZERLAND ...IS STUPID THIS SIGN, ISN'T IT? UNFORTUNATELY, SOME PEOPLE DON'T GET IT...:roll:
Back to top
View user's profile Send private message
cloc3
Advocate
Advocate


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

PostPosted: Thu Jan 18, 2007 2:18 pm    Post subject: Reply with quote

LastHope wrote:

Invece che con il solito comando che utilizzavo:
Code:

apache -k start

ma guarda. neanche a me:
Code:

s939 ~ # apache -k start
-su: apache: command not found

tutto è bene quel che finisce bene. :wink:

mi sono scervellato un po' per capire cosa ti stesse accadendo, perché le impostazioni di default di gentoo sono oramai sistemate da alcuni anni. ma credo proprio che, se lo avessi detto prima, il tuo problema, la cosa sarebbe emersa subito. tra l'altro, il mio script di init si chiama apache2. trovo persino strano che a te funzioni senza il 2.
_________________
vu vu vu
gentù
mi piaci tu
Back to top
View user's profile Send private message
LastHope
Apprentice
Apprentice


Joined: 11 May 2005
Posts: 237
Location: Mordor

PostPosted: Thu Jan 18, 2007 2:23 pm    Post subject: Reply with quote

cloc3 wrote:
mi sono scervellato un po' per capire cosa ti stesse accadendo, perché le impostazioni di default di gentoo sono oramai sistemate da alcuni anni. ma credo proprio che, se lo avessi detto prima, il tuo problema, la cosa sarebbe emersa subito. tra l'altro, il mio script di init si chiama apache2. trovo persino strano che a te funzioni senza il 2.

Ho sbagliato a scrivere, scusa...in entrambi i casi c'e' il 2 :P, ma il comportamento e' quello descritto precedentemente :?:
Boh, mi abituero' a chiamarlo cosi', al momento mi interessa che funzioni ;)
Ciao a tutti

LastHope
_________________
[img]http://counter.li.org/cgi-bin/certificate.cgi/398459[/img]
DON'T SUPPORT BELGIUM AND BOYCOTT SWITZERLAND ...IS STUPID THIS SIGN, ISN'T IT? UNFORTUNATELY, SOME PEOPLE DON'T GET IT...:roll:
Back to top
View user's profile Send private message
mose
Guru
Guru


Joined: 04 Jun 2005
Posts: 313
Location: Piacenza

PostPosted: Fri Jan 19, 2007 8:25 pm    Post subject: Reply with quote

...anche perchè è il modo corretto di chiamarlo: è un daemon!
Back to top
View user's profile Send private message
LastHope
Apprentice
Apprentice


Joined: 11 May 2005
Posts: 237
Location: Mordor

PostPosted: Fri Jan 19, 2007 8:45 pm    Post subject: Reply with quote

mose wrote:
...anche perchè è il modo corretto di chiamarlo: è un daemon!

Beh, non e' che mi invento i comandi inutilmente io :? : prima di aggiornare PHP e Apache a queste versioni, avevo i miei BASH scripts per far partire Apache e Postgres...e non era un problema per me far partire e lavorare cosi' con Apache.
Nessuna modifica strana alla configurazione o versione particolare...
Ciao a tutti

LastHope
Back to top
View user's profile Send private message
mose
Guru
Guru


Joined: 04 Jun 2005
Posts: 313
Location: Piacenza

PostPosted: Fri Jan 19, 2007 9:14 pm    Post subject: Reply with quote

non intendevo dire questo, solo che apache è un servizio di sistema che andrebbe chiamato, fermato e riavviato utilizzando gli script in init.d
Nulla vieta di personalizzare questi script secondo le tue eisgenze, io per esempio l'ho fatto con il demone amuled
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
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