rack-legacy icon indicating copy to clipboard operation
rack-legacy copied to clipboard

PHP: `include_path` and `auto_prepend_file`cannot be set

Open momolog opened this issue 9 years ago • 4 comments

I am using rack-legacy to run a PHP app under pow.

Now rack-legacy does not parse .htaccess and it seems there is no way I can set include_path and auto_prepend_file so all scripts include my standard lib.

momolog avatar Mar 04 '15 20:03 momolog

I think you can use a .user.ini file right?

eric1234 avatar Mar 04 '15 21:03 eric1234

It seems like no, I can't. I am on PHP 5.4.38 I provided a .user.ini with

include_path="/Users/aljoscha/Sites/theater.local/httpdocs/lib/php/"
auto_prepend_file="init.php"

but phpinfo() still says

include_path    .:/usr/local/Cellar/php54/5.4.38/lib/php

momolog avatar Mar 04 '15 22:03 momolog

I'll take a closer look when I get a chance to find out why .user.ini is not working.

In the meantime you could monkey-patch php_process_parameters to include some extra php options to set those command line options.

eric1234 avatar Mar 06 '15 21:03 eric1234

Thanks a lot for your attention. If I can help in any way, let me know.

momolog avatar Mar 08 '15 14:03 momolog