fluffycat Posted May 4, 2009 Share Posted May 4, 2009 I have tried installing PHP+Apache on WinXP through this tutorial. I have done it all except change hosts file in drivers/etc because I can't edit it. I tried as suggested elsewhere to open via search-then pick users:admin but I can't save changed file. Now I have run into this problem. I created test.php page in order to run phpinfo() and I get this error in localhost: Parse error: parse error in C:\server\www\****\public_html\test.php on line 2 Which confuses me. I used Notepad++ and saved simple php file and it says it's wrong syntax. Can this not editing hosts file be the cause of the problem or is it something else? (( on hosts file it says it was created by Spybot S&D and just won't allow to be saved once changed. If anybody knows a solution for that it would be appreciated as well)) Thanks in advance Quote Link to comment Share on other sites More sharing options...
jlhaslip Posted May 4, 2009 Share Posted May 4, 2009 Can you post the code for the file, please? <?php phpinfo() ?> should work Quote Link to comment Share on other sites More sharing options...
fluffycat Posted May 4, 2009 Author Share Posted May 4, 2009 <? php phpinfo(); ?> That is the code in the file. That is why I posted this as a problem. I have run another php script I have and this one works with no errors so it seems everything works fine...but this parse error for phpinfo still stays...should I enable something in php.ini? Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted May 4, 2009 Share Posted May 4, 2009 No it's not, the code you posted has a space between the <? and the php. In programming, extra spaces matter in a single keyword, like the <?php tag, because computers only do exactly what you tell them to do. Quote Link to comment Share on other sites More sharing options...
fluffycat Posted May 4, 2009 Author Share Posted May 4, 2009 Hm... Tried. Tested. It works now!!!! 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.