Tech Tip: PHP Execute: 'failed to open stream' on Windows Vista & 7
PRODUCT: 4D | VERSION: 12 | PLATFORM: Win
Published On: June 29, 2010
Depending on system configuration, the command PHP EXECUTE could return an error, where the return value looks like:
<br /> <b>Warning</b>: Unknown: failed to open stream: No such file or directory in <b>Unknown</b> on line <b>0</b><br /> <br /> <b>Fatal error</b>: Unknown: Failed opening required 'FULL_PATH_TO _4D_Execute_PHP.php' (include_path='.;C:Perforcephp5.3.2php_for_4dphp-finalWindowspear') in <b>Unknown</b> on line <b>0</b><br /> |
or as an Alert like this:
Solving this issue is easy: Simply launch 4D once as Administrator and use PHP EXECUTE.
To launch 4D as Administrator do a right-click on 4D.exe and select "Run as Administrator". You may need to enter an administrator password to do so.
On the first launch with Admin rights 4D corrects the path to the executable inside PHP.INI and following launches can run with standard user rights.
You can also choose to always launch 4D as an Administrator by selecting the "Run this program as an administrator" on the Compatibility tab of the 4D.exe propteries window: