Apache2 php als CGI & suexec sowie register_globals

Apache, Lighttpd, nginx, Cherokee
Post Reply
alexander newald
Posts: 1117
Joined: 2002-09-27 00:54
Location: Hannover
Contact:
 

Apache2 php als CGI & suexec sowie register_globals

Post by alexander newald »

Hi,

wie kann ich für einen Apache2 mit php als CGI und suexec nur für einen vhost register_globals = 1 setzen?

Mit

php_admin_value, php_value oder php_flag

im vhost Abschnitt geht es nicht (ist ja auch nicht als Modul gebaut)
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: Apache2 php als CGI & suexec sowie register_globals

Post by Joe User »

Alexander Newald wrote:wie kann ich für einen Apache2 mit php als CGI und suexec nur für einen vhost register_globals = 1 setzen?
Mit Boardmitteln gar nicht, ansonsten suPHP...
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
alexander newald
Posts: 1117
Joined: 2002-09-27 00:54
Location: Hannover
Contact:
 

Re: Apache2 php als CGI & suexec sowie register_globals

Post by alexander newald »

Hm, aber bei einem Server mit einer grösseren Anzahl von vhost scheint das sicht das nicht realisieren zu lassen, da anscheinend für jeden vhost eigene fcgi Prozesse gestartet werden?
Roger Wilco
Posts: 5923
Joined: 2004-05-23 12:53
 

Re: Apache2 php als CGI & suexec sowie register_globals

Post by Roger Wilco »

Eigentlich sollte der PHP-Interpreter, wenn er als CGI eingesetzt wird, im gleichen Verzeichnis, in dem das Skript ausgeführt wird, nach einer php.ini suchen. Da kannst du dann deine Einstellungen reinpacken.
alexander newald
Posts: 1117
Joined: 2002-09-27 00:54
Location: Hannover
Contact:
 

Re: Apache2 php als CGI & suexec sowie register_globals

Post by alexander newald »

Jep, aber das habe ich rausgenommen, damit nicht jeder seine eigenen Einstellungen vornehmen kann.

Ich habe es jetzt so gelöst, dass ein wrapper nachschaut, ob im Homedir des Benutzers eine Datei liegt und dann jenachdem eine PHP mit oder ohne startet. Mal sehen, ob das was an der Performance macht
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: Apache2 php als CGI & suexec sowie register_globals

Post by Joe User »

Roger Wilco wrote:Eigentlich sollte der PHP-Interpreter, wenn er als CGI eingesetzt wird, im gleichen Verzeichnis, in dem das Skript ausgeführt wird, nach einer php.ini suchen. Da kannst du dann deine Einstellungen reinpacken.
Geil, dann kann ich also bei Shared-Hosting-Paketen einfach sockets und andere bewusst deaktivierte Optionen durch eine angepasste php.ini aktivieren?
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Roger Wilco
Posts: 5923
Joined: 2004-05-23 12:53
 

Re: Apache2 php als CGI & suexec sowie register_globals

Post by Roger Wilco »

http://www.php.net/manual/en/configuration.php wrote:The configuration file

The configuration file (called php3.ini in PHP 3, and simply php.ini as of PHP 4) is read when PHP starts up. For the server module versions of PHP, this happens only once when the web server is started. For the CGI and CLI version, it happens on every invocation.

php.ini is searched in these locations (in order):

* SAPI module specific location (PHPIniDir directive in Apache 2, -c command line option in CGI and CLI, php_ini parameter in NSAPI, PHP_INI_PATH environment variable in THTTPD)
* HKEY_LOCAL_MACHINESOFTWAREPHPIniFilePath (Windows Registry location)
* The PHPRC environment variable
* Current working directory (for CLI)
* The web server's directory (for SAPI modules), or directory of PHP (otherwise in Windows)
* Windows directory (C:windows or C:winnt) (for Windows), or --with-config-file-path compile time option
Ok, trifft doch nur bei der CLI-Version zu, dafür kann man aber mit PHPRC ein wenig tricksen.
alexander newald
Posts: 1117
Joined: 2002-09-27 00:54
Location: Hannover
Contact:
 

Re: Apache2 php als CGI & suexec sowie register_globals

Post by alexander newald »

Bei mir tat es auch die CGI Version, deshalb habe ich das rausgebaut... Oder habe ich einen Schalter beim Configure übersehen?

@Joe User: Ja... ich denke schon
Post Reply