Manipe Posted August 14, 2006 Share Posted August 14, 2006 I'm having major trouble with a PHP script which is accessed through a forcetype definition in a .htaccess file in the same folder.When I run the file through the forcetype file path, it gives me the following error:Parse error: parse error, unexpected $ in 'file' on line 246But then when i change the contents of the file to a normal PHP file, it works fine and as expected, with no errors at all.I have isolated the problem code, and have tried putting it in a function to bypass the error, but it still doesn't work.Because it works as a PHP file, I believe that the problem lies in the apache side of things.Can anyone help, or has anyone had a similar problem before.All help is greatly appreciated. ;) Link to comment https://forums.phpfreaks.com/topic/17508-having-trouble-with-forcetype/ Share on other sites More sharing options...
oldmanice Posted September 4, 2006 Share Posted September 4, 2006 Your apache server might no allow that file Link to comment https://forums.phpfreaks.com/topic/17508-having-trouble-with-forcetype/#findComment-86080 Share on other sites More sharing options...
Woolf Posted September 5, 2006 Share Posted September 5, 2006 [quote author=Manipe link=topic=104203.msg415425#msg415425 date=1155562630]I'm having major trouble with a PHP script which is accessed through a forcetype definition in a .htaccess file in the same folder.When I run the file through the forcetype file path, it gives me the following error:Parse error: parse error, unexpected $ in 'file' on line 246But then when i change the contents of the file to a normal PHP file, it works fine and as expected, with no errors at all.I have isolated the problem code, and have tried putting it in a function to bypass the error, but it still doesn't work.Because it works as a PHP file, I believe that the problem lies in the apache side of things.Can anyone help, or has anyone had a similar problem before.All help is greatly appreciated. ;)[/quote]Have you tried this? AddType application/x-httpd-php .myextension'myextension' being whatever extension you are usingIf that doesn't work, then it's a problem with your host (a problem I've had in the past). I believe it has something to do with the host not allowing you to override the extensions, or it could be a PHP safe mode protocol. If all comes to worse, you should switch your host. Link to comment https://forums.phpfreaks.com/topic/17508-having-trouble-with-forcetype/#findComment-86683 Share on other sites More sharing options...
oldmanice Posted September 6, 2006 Share Posted September 6, 2006 You also try downloading a diffrant version. Link to comment https://forums.phpfreaks.com/topic/17508-having-trouble-with-forcetype/#findComment-86819 Share on other sites More sharing options...
Manipe Posted September 6, 2006 Author Share Posted September 6, 2006 Thanks to you all, I've fixed it now. I re-uploaded everything and it just worked. Don't know how, but all I know now is that it's working fine. cheers for the help. Link to comment https://forums.phpfreaks.com/topic/17508-having-trouble-with-forcetype/#findComment-87041 Share on other sites More sharing options...
Woolf Posted September 6, 2006 Share Posted September 6, 2006 [quote author=Manipe link=topic=104203.msg429137#msg429137 date=1157545381]Thanks to you all, I've fixed it now. I re-uploaded everything and it just worked. Don't know how, but all I know now is that it's working fine. cheers for the help.[/quote]Excellent. Let us know if you have any more problems. :) Link to comment https://forums.phpfreaks.com/topic/17508-having-trouble-with-forcetype/#findComment-87450 Share on other sites More sharing options...
oldmanice Posted September 8, 2006 Share Posted September 8, 2006 [quote author=Manipe link=topic=104203.msg429137#msg429137 date=1157545381]Thanks to you all, I've fixed it now. I re-uploaded everything and it just worked. Don't know how, but all I know now is that it's working fine. cheers for the help.[/quote]Ok thanks for letting us know if you need any other help just ask mate. Link to comment https://forums.phpfreaks.com/topic/17508-having-trouble-with-forcetype/#findComment-88122 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.