bition bition - 26 days ago 19
Ini Question

PHP.ini include_path on windows with different drives

I try to include PHP file from different places of my computer. So I have defined different include paths in my php.ini

include_path=".;C:\project\a;X:\project\b"


When I try to include a file X:\project\b\file_b.php from a PHP script on C:\project\a\file_a.php with

require_once("file_b.php");


or with

require_once("X:\project\b\file_b.php");


I get the error


Warning: require_once(X:\project\b\file_b.php): failed to open stream: No such file or directory in C:\project\a\file_a.php on line 2

Fatal error: require_once(): Failed opening required 'X:\project\b\file_b.php' (include_path='.;C:\project\a;X:\project\b') in C:\project\a\file_a.php on line 2

Abort Processing during Fatal-Error: require_once(): Failed opening required 'X:\project\b\file_b.php' (include_path='.;C:\project\a;X:\project\b') Error in Script C:\project\a\file_a.php on Line 2


I have tried everything I can do with my knowlegde, but nothing works.
I hope, that someone can hlep me with solving this problem. Is there a problem with include paths on different drives on a Windows system?

Best regards,
bition

Answer

After a long time, I have finally the answer for my special problem.

It is really ery special, because I use BoxCryptor to encrypt my D: drive. BoxCryptor creates the virtual device X:, but it is not present for Apache and PHP. But I can configure BoxCryptor the mount the device X: as a rwal harddrive. After I set this, everythings works fine.

Sorry for the confusion about my vortual and real harddrives and thank you for your help!

Best regards, bition

Comments