# [web] Help with PHP error

This topic is 3847 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Ok so I am now working for a web development company, and everyone is having problems getting php to work properly on the localhost. I already installed Apache, PHP, and MySQL and installed it like all the tutorials say. But everyone has done the same thing, and we all have the same problem. I can get simple PHP commands like <?php echo hello ?> to work but more advanced php commands such as calculators aren't working. These commands work on a remote server but not locally, anyone know why? The main problem is that we can use Dreamweaver to add php in code and then upload it to the enter and check it to make sure it worked, but because we can't get localhost to work we can't use a test server to check it.

##### Share on other sites
It would really help to have an example of what functions aren't working and what error you get trying to use them.

well simple things such as: <? echo $CalcBox; ?> aren't working. CalcBox is already defined and it works but it only will show up remotely, not locally. Basically, I thought I did everything in the PHP installation process correctly. I can go to localhost/phpinfo.php and that will display. But if I go to localhost/index.php then the html coding will display but the php coding won't #### Share this post ##### Link to post ##### Share on other sites Quote:  Original post by TravisMarshallwell simple things such as: aren't working.CalcBox is already defined and it works but it only will show up remotely, not locally.Basically, I thought I did everything in the PHP installation process correctly.I can go to localhost/phpinfo.php and that will display.But if I go to localhost/index.php then the html coding will display but the php coding won't Mmh, the only obvious difference is in the tags: <? versus <?php. Are the short tags enabled? And are you absolutely sure$CalcBox is assigned to? You didn't forget to include a script?
Is there output when you do $CalcBox = "Foo"; echo$CalcBox; ?

##### Share on other sites
ya wan that was what was wrong, I didn't have shorttags on.

Thank you :)

1. 1
Rutin
24
2. 2
3. 3
JoeJ
20
4. 4
5. 5

• 9
• 46
• 41
• 23
• 13
• ### Forum Statistics

• Total Topics
631746
• Total Posts
3002022
×