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

search for in the

Migrarea fișierelor de configurare> <Schimbări incompatibile în sens invers
[edit] Last updated: Fri, 24 May 2013

view this page in

CLI și CGI

În PHP 5 au survenit unele modificări ale denumirilor fișierelor CLI și CGI. În PHP 5 versiunea CGI a fost redenumită în php-cgi.exe (anterior php.exe) și versiunea CLI acum se află în directorul principal (anterior cli/php.exe).

În PHP 5 a fost introdus un mod nou: php-win.exe. Acesta este echivalent cu versiunea CLI, cu excepția că php-win nu afișează nimic și astfel nu oferă o consolă (pe ecran nu apare "cutia DOS"). Acest comportament este similar cu cel al php-gtk.

În PHP 5, versiunea CLI întotdeauna va popula variabilele globale $argv și $argc indiferent de careva setări ale directivelor php.ini. Chiar având register_argc_argv stabilit off nu va avea efect în CLI.

Accesați de asemenea referința liniei de comandă.



add a note add a note User Contributed Notes CLI și CGI - [1 notes]
up
-1
shoebappa at gmail dot com
5 years ago
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 | sitemap | contact | advertising | mirror sites