Jump to content
Karaethon

Using php_value include_path in .htaccess

Recommended Posts

I am trying to set my include path in my .htaccess file but anything i put after the

 php_value include_path

such as

php_value include_path "../includes"

causes a server error. Anyone know what I'm doing wrong, and can enlighten me?

Share this post


Link to post
Share on other sites

What does the server error message say?

Share this post


Link to post
Share on other sites

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Share this post


Link to post
Share on other sites

And i know you'll probably ask, the log says...

	httpd log:
	[Thu Feb 07 23:45:05 2019] [alert] [client 127.0.0.1] /storage/615F-8AC8/Android/data/com.twoseventwodev.icodego/files/external/Split Infinitive Software Website/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration

Edited by Karaethon

Share this post


Link to post
Share on other sites

php_value is only available if you're running PHP as an Apache module. That's less and less common to find.

You're probably using php-fpm. You can specify INI settings in its pool configuration.

Share this post


Link to post
Share on other sites

Ok, so my localhost isnt using it as a module? It works in my live (hosted) site, so i guess i cannot test that part then.

Share this post


Link to post
Share on other sites

Apparently not. Change your configuration so that it more closely matches your real site - so you can avoid problems like this in the future.

Share this post


Link to post
Share on other sites

It's not a setting. It's how your server/PHP was set up.

Set it up again but this time install PHP as an Apache module.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.