PHP Producing Error Messages in Browser?!?
Hi all, :D
I have installed Apache2 and MySql according to the online instructions in chapter one and they work as expected. I have also installed PHP and configured it to the requirements in the same chapter however this is where my problem starts. I have used the code:
<?php
phpinfo();
?>
…to check that PHP works but get the following error messages displayed in my browser:
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in C:\Program Files\Apache Group\Apache2\htdocs\about.php on line 2
Parse error: syntax error, unexpected T_STRING in C:\Program Files\Apache Group\Apache2\htdocs\about.php on line 2
In attempting the first PHP example in chapter one I receive the same errors only the file name changes (of course) and the first error above is repeated twice. There is no backslash in either files or any out of the ordinary Strings so I’m completely stumped.
I use the following to display the file in the browser:
http://localhost/today.php
…and the file is stored in:
C:\Program Files\Apache Group\Apache2\htdocs\today.php
…as shown in the errors above.
Any help in fixing or reconfiguring PHP will be most appreciated as I’m totally new to web design, server management and databases.
Chrome
SYSTEM
OS: Window XP Pro
Text Editor: WordPad, Notepad or gvim
IE: v6
Apache2: v2.0.52
MySql: v4.1.7
PHP: v5.0.2
P.S. I have searched and read many of the posts for the same problem and was unable to find any help so please post a reply. :bawling:
Try not installing at all...
I can't solve your problem but I do have a suggestion. If in fact you are new to php/mysql and/or web develepoment in general it would be my suggestion to not get bogged down in the installation process when instead you should be learning good coding skills. Later in your developement you will need to understand the process of uploading to the web anyway and will only need the "install" skills in a developement environment. There are a number of myriad issues that could be causing your problem. When I started I wasted 4 months on getting the answers to my installation questions.
Instead you might try a hosted solution. There are several and they are cheap. My suggestion is www.1and1.com. They have 1-800 support that is friendly and curtious which you get for 10.00 per month. www.verio.com is one of the best of course but they are more expensive. The main thing is that you want to stay away from the webhosters that aren't going to help you with a live person. Later you will need to set up things like phpMyAdmin and the PEAR repository in your webspace. You will need someone to help you do it.
I hope this is a helpful suggestion....
Thanks Lats but Problem Persists
lol, sorry Pompompom.
Did a reinstall using different path, got same result, did it again to original path.
...and yes Im very lazy :lol:
Thanks Lats for the link mate, it made installation much easier! :D
Unfortunatley I continue to get the same error messages. :confused:
The about.php now works but the today.php still doesn't. Not only that, I get the same error messages no matter what I do to the code...including deleting all the code so that it's just a blank file.
What the hell is happening here? Why does one file work while the other just refuses to even aknowledge my changes to the code, spitting out the same errors? Could it be Windows SP2? My browser settings? The UFO people?
HELP.............. :bawling: