URL: https://linuxfr.org/forums/programmation-perl/posts/appel-un-script-php-dans-un-code-cgi Title: appel un script php dans un code CGI Authors: linuxesti Date: 2006年05月31日T13:28:14+02:00 Tags: Score: 0 je fais un appel d'un script php dans un script cgi a l'aide de la ligine suivante ..... { exec "php -f connect.php"; } else { .... } lors de l'execution il me declenche l'erreur suivante 400 Content-type: text/html Security Alert! The PHP CGI cannot be accessed directly. This PHP CGI binary was compiled with force-cgi-redirect enabled. This means that a page will only be served up if the REDIRECT_STATUS CGI variable is set, e.g. via an Apache Action directive. For more information as to why this behaviour exists, see the manual page for CGI security. For more information about changing this behaviour or re-enabling this webserver, consult the installation file that came with this distribution, or visit the manual page. pour cela j'ai consulté mon fichier php.ini et j 'ai modifie les deux lignes suivantes ;cgi.force_redirect devient cgi.force_redirect=0 et l'autre ligne est ;cgi.redirect_status_env= devient cgi_direct_status_env=yes a ce moment la cet erreur est disparu mais il n'execute pas le code convenablement lorsque il arrive à l'instruction (" exec 'connect.php') il n'execute pas le code de fichier connect.php mais il affiche le contenu de script cgi comme il est (le code source) svp une solution pour ça !!! j 'attends ...

AltStyle によって変換されたページ (->オリジナル) /