Forum Moderators: coopster

Message Too Old, No Replies

unexpected T_DEFAULT on Win server but not Linux

         

Nutter

6:57 pm on Jun 15, 2006 (gmt 0)

10+ Year Member



I've got a script that works fine on the two different Linux servers I've tried it on, both PHP4. But when I copied it to a Windows server running WAMP with PHP5 I get an unexpected T_DEFAULT error. I think I understand what that error means, but I don't understand why it would be happening only on the Windows server. I can run the script through the command line PHP and it displays like it should, but not when called from the web server.

eelixduppy

7:04 pm on Jun 15, 2006 (gmt 0)



It's interesting how it works on one and not the other. Can you maybe give the line of code that is producing the error?

Nutter

7:26 pm on Jun 15, 2006 (gmt 0)

10+ Year Member



Like I've got a habit of, as soon as I posted it I went back and worked on it and figured it out within 5 minutes. It's amazing how often that happens.

I had a short php opening tag instead of the full <?php and apparently the Windows server wasn't set up to accept them. Turns out I've got the same problem in a few files because I've found several odd errors, but they've been clearing up pretty fast now that I know what to look for.

eelixduppy

7:31 pm on Jun 15, 2006 (gmt 0)



I'm glad you found it. To change this so that the short-hand form works, change your php.ini. Set short_open_tag = 1 Good luck!