rockxl1 Posted July 26, 2008 Share Posted July 26, 2008 I ppl. I have a login system. When i run on my computer (windows using wamp) give me this: Parse error: syntax error, unexpected '}' in C:\WebDesigN\Sites\LOGIN\paginaProtegida.php on line 37 And in my site on web (linux) no... What is the problem in my wamp? sothing is not active? THANKS. Rafael Rocha - Portugal ba the way the code is: <? //Inicia a sessão session_start(); //agora verifico se ele possui permissão para acessar a página if ($validacao != "crypto") { ?> <h1>Login<h1> <? } else { ?> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> </head> <body> THis is the page, protected. </body> </html> <?php } ?> Quote Link to comment Share on other sites More sharing options...
AndyB Posted July 26, 2008 Share Posted July 26, 2008 I see no error. I get no error running that script. Given that what you posted is much shorter than 37 lines, the error message suggests that you actually have more code than you posted. The problem likely originates from a missing loop start curly brace. Quote Link to comment Share on other sites More sharing options...
rockxl1 Posted July 26, 2008 Author Share Posted July 26, 2008 I see no error. I get no error running that script. Given that what you posted is much shorter than 37 lines, the error message suggests that you actually have more code than you posted. The problem likely originates from a missing loop start curly brace. give me the error on <?php } ?> ... but just on my computer, using wamp. there is any i can change on wamp to hide this problem? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted July 26, 2008 Share Posted July 26, 2008 The code you posted doesn't have 37 lines of code (the error is on line 37 according to your error), it has 29! Anyway, I think your problem could be related to your WAMP server not having a setting called short_open_tag enabled. short tags are disabled by default. You'll need to enable this setting in your php.ini file. After making any changes to the php.ini make sure you restart WAMP. Quote Link to comment Share on other sites More sharing options...
rockxl1 Posted July 26, 2008 Author Share Posted July 26, 2008 The code you posted doesn't have 37 lines of code (the error is on line 37 according to your error), it has 29! Anyway, I think your problem could be related to your WAMP server not having a setting called short_open_tag enabled. short tags are disabled by default. You'll need to enable this setting in your php.ini file. After making any changes to the php.ini make sure you restart WAMP. yes!! was that! i put short_opn_tag, and works! your guys are the best in world in php! thanks! 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.