I have a small project in local. I'm working under Windows and with XAMPP. My file directory structure is:
Root directory:
C:\xampp\htdocs\routesUnder this folder, I have my bootstrap.php with the configuration I want to initialize my project.
Public folder:
C:\xampp\htdocs\routes\htdocsUnder this folder I have my index.php and my .htaccess.
Inside this .htaccess I have the following configuration:
php_value include_path .:/routes
php_value auto_prepend_file bootstrap.php
If I do a get_include_path() inside the index.php, it shows ".:/routes".
But the message I get on my web browsers (after typing http://localhost/routes/htdocs) all the time is:
Fatal error: Unknown: Failed opening required 'bootstrap.php' (include_path='.:/routes') in Unknown on line 0
I have tried a lot of combinations of include_path inside the .htaccess:
php_value include_path ".:/routes" php_value include_path .:../routes php_value include_path ".:./routes" php_value include_path ".:routes" ...
The configuration of my httpd.conf is:
DocumentRoot "C:/xampp/htdocs"
<Directory />
AllowOverride none
Require all denied
</Directory>
<Directory /routes>
AllowOverride all
</Directory>
If I hard code the info in bootstrap inside the index.php, it works (at least this tells me the requirements inside bootstrap are well configured). I don't know what to do for my project to recognize the bootstrap.php.
What am I missing? What am I doing wrong?
Thank you in advance for your help
Require all denied? if it's trying to include a file from the root folder then this may be preventing it from doing so - verbumSapienti