HWD
HWD

Reputation: 1629

GoDaddy include_path and auto_prepend_file

I'm working in a GoDaddy shared hosting environment (Linux, PHP 7.1). I want to automatically prepend a file, globally, but I can't seem to get it working with an .htaccess or php.ini file.

I've tried variations on the following to no avail:

php.ini

include_path = ".:/home/username/public_html"
auto_prepend_file = "./includes/autoload.php"

.htaccess

php_value include_path ".:/home/username/public_html"
php_value auto_prepend_file "./includes/autoload.php"

What am I doing wrong?

Upvotes: 2

Views: 1187

Answers (1)

HWD
HWD

Reputation: 1629

I was able to get this working by using a .user.ini file:

Since PHP 5.3.0, PHP includes support for configuration INI files on a per-directory basis.

I also found this documentation from GoDaddy useful.

Upvotes: 2

Related Questions