Search code examples
phpfile-permissionschmod

PHP files does not execute in windows machine


i created the application in PHP on my mac osx. and after the development i zipped and transferred to the windows 7 machine. and when i tried opening it i get this error.

Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0

Fatal error: Unknown: Failed opening required 'C:/wamp/www/app/index.php' (include_path='.;C:\php\pear') in Unknown on line 0

the above error suggest, the error is caused because of the file permission issue, is there any possible way i can fix this error in windows itself.?

thank you..


Solution

  • I had this and found that it was because the index.php file was set with encryption.

    For anyone that wants to rule it out - right click the php file, select 'properties' then click the 'advanced' button and uncheck the 'Encrypt contents to secure data' check box and click 'O.K'. This worked for me, so just putting it out there.