How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask Shawn Your Own Question
Shawn
Shawn, Computer Engineer
Category: Mac
Satisfied Customers: 275
Experience:  15 years of Mac software and hardware troubleshooting experience, 10 years of programming experience
13058298
Type Your Mac Question Here...
Shawn is online now
A new question is answered every 9 seconds

in my terminal i typed php phpinfo(); .....and i got

Customer Question

in my terminal i typed <?php phpinfo(); ?> .....and i got this error....   -bash: syntax error near unexpected token `('       .... how can i fix this?
Submitted: 8 years ago.
Category: Mac
Expert:  Shawn replied 8 years ago.
HelloCustomer

The code that you typed is PHP code, which bash doesn't directly recognize. Try putting it into a text file (e.g., test.php) in a web-accessible directory on your web server and navigate to the file with your web browser. Then you should get the information that you're looking for.

Here's a pretty good tutorial on how to do this:

http://www.htmlgoodies.com/beyond/php/article.php/3472431


I hope this helps! Let me know if you have any more questions. Kind regards,

Shawn