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. ;) Quote Link to comment 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 Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
oldmanice Posted September 6, 2006 Share Posted September 6, 2006 You also try downloading a diffrant version. Quote Link to comment 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. Quote Link to comment 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. :) Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.