PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Migrazione dei file di configurazione> <Cambiamenti non compatibili
Last updated: Fri, 18 Jul 2008

view this page in

CLI e CGI

In PHP 5 sono avvenute modifiche dei nomi dei file di CLI e CGI. In PHP 5, la versione CGI è stata rinominata php-cgi.exe (prima era php.exe) e la versione CLI ora è posizionata nella cartella principale (prima era cli/php.exe).

In PHP 5 è stato inoltre introdotta una nuova modalità: php-win.exe. Questa è uguale alla versione CLI, eccetto il fatto che php-win non manda niente in output e quindi non crea console (nessuna "finestra dos" appare sullo schermo). Questo comportamento è simile a php-gtk.

In PHP 5, la versione CLI riempie sempre le variabili globali $argv e $argc a prescindere da qualsiasi direttiva php.ini. Anche l'impostazione di register_argc_argv a off non avrà effetto in CLI.

Vedere anche la documentazione della linea di comando.



add a note add a note User Contributed Notes
CLI e CGI
shoebappa at gmail dot com
12-Mar-2008 09:41
I pulled my hair out for 10 hours trying to figure out why my CGI Wrappers would spit out the shell script and not run the code.

From: http://ubuntuforums.org/showthread.php?t=341164&highlight=apache+php

"PHP4 needs a specific configuration so that it won't try to execute the starter script.
Edit /etc/php4/cgi/php.ini, search for cgi.fix_pathinfo and set it to 1.

If you don't do this, PHP5 will work fine (it has cgi.fix_pathinfo compiled right in), but PHP4 will simply output the starter script. (You can even put <?php phpinfo (); ?> inside the starter script and will see the PHP information.)"

 
show source | credits | stats | sitemap | contact | advertising | mirror sites