Jump to content
  • Advertisement
Sign in to follow this  
TravisMarshall

[web] Help with PHP error

This topic is 3938 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
Advertisement
It would really help to have an example of what functions aren't working and what error you get trying to use them.

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!