Link to home
Start Free TrialLog in
Avatar of zorba111
zorba111

asked on

using .htaccess to configure PHP

We use a 3rd party hosting service to host our PHP-enabled websites. They have blocked access to php.ini, so I read up on php.net about using .htaccess files to set configuration directives.

In a directory I use for learning PHP, called _learning, i created a .htaccess file with the following contents, in order to override values in PHP.ini (see code window):

..but when I accessed a php script in this directory, I got a server error.
There was no entry in the error_log afterwards
If I comment out the last line in .htaccess, the script works as normal.

any ideas?
Is use of .htaccess disabled? I don't think so because I think a colleague used them before, but how can I tell?
Am i using correct format?
#php_value name value
#php_value pcre.backtrack_limit "100001"
php_flag session.auto_start on

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Beverley Portlock
Beverley Portlock
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of zorba111
zorba111

ASKER

This is what the hosting ppl said:

Our servers do not support PHP directives in .htaccess due to suPHP that we have to used in a shared environment.

so that's that !

I found a way around the immediate need to configure include_path (i.e. just specify the library with complete path)