usr-local-ΕΨΗΕΛΩΝ usr-local-ΕΨΗΕΛΩΝ - 1 year ago 194
PHP Question

Reintroduce $HTTP_POST_VARS in PHP 5.3

I need to run a legacy PHP application in a shared hosting environment. I have promised my customer I'll support that legacy application for some time but I found that it doesn't work because it widely uses the deprecated


Downgrading PHP is not an option. Patching the application could be infeasible because the PHP files are generated from a Windows executable file (I'm not kidding!) and every time the site is regenerated from desktop we could lose modifications.

I'm asking if there is a way to tell PHP to reintroduce
for all websites on a host or just for a particular vhost. Any other option/suggestion is appreciated

Answer Source

You can do this




php_value auto_prepend_file /path/to/config.php

PHP doc auto_prepend_file string

Specifies the name of a file that is automatically parsed before the main file. The file is included as if it was called with the require function, so include_path is used.

The special value none disables auto-prepending.

EDIT: To be extra thorough, these are the other superglobals that could also be aliased:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download