Jump to content


Photo

Having trouble with forcetype


  • Please log in to reply
6 replies to this topic

#1 Manipe

Manipe
  • New Members
  • Pip
  • Newbie
  • 2 posts
  • LocationIreland

Posted 14 August 2006 - 01:37 PM

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 246

But 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.  ;)

#2 oldmanice

oldmanice
  • Members
  • PipPipPip
  • Advanced Member
  • 134 posts
  • LocationIn Your Garden At Night

Posted 04 September 2006 - 11:52 PM

Your apache server might no allow that file
Join my Froums www.phpbbplanet.com/darkwinter

#3 Woolf

Woolf
  • Members
  • PipPipPip
  • Advanced Member
  • 41 posts

Posted 05 September 2006 - 09:20 PM

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 246

But 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.  ;)


Have you tried this? AddType application/x-httpd-php .myextension
'myextension' being whatever extension you are using

If 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.

#4 oldmanice

oldmanice
  • Members
  • PipPipPip
  • Advanced Member
  • 134 posts
  • LocationIn Your Garden At Night

Posted 06 September 2006 - 01:01 AM

You also try downloading a diffrant version.
Join my Froums www.phpbbplanet.com/darkwinter

#5 Manipe

Manipe
  • New Members
  • Pip
  • Newbie
  • 2 posts
  • LocationIreland

Posted 06 September 2006 - 12:23 PM

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.

#6 Woolf

Woolf
  • Members
  • PipPipPip
  • Advanced Member
  • 41 posts

Posted 06 September 2006 - 10:55 PM

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.


Excellent. Let us know if you have any more problems. :)

#7 oldmanice

oldmanice
  • Members
  • PipPipPip
  • Advanced Member
  • 134 posts
  • LocationIn Your Garden At Night

Posted 08 September 2006 - 02:14 AM

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.


Ok thanks for letting us know if you need any other help just ask mate.
Join my Froums www.phpbbplanet.com/darkwinter




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users