Sign in to follow this  

[web] Help with PHP error

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
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 TravisMarshall
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


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 this post


Link to post
Share on other sites

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

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this