Monday, September 26, 2016

Why My PHP Code Showing in Browser?

This is my small notes for self-reminder. I've been experiencing this problem after setup new environment for web development. Although I'll always found the solution, I'm blaming myself once this same problem raise again: why I don't remember this super basic principle? So, I'll leave this tips here, hopefully will be useful to others.

What's actually happen here? So, basically, after installing apache and php, if you open your PHP file, you'll hope that browser will execute it and display rendered HTML. Then, you surprised that browser display PHP code instead. So, if you're facing this problem right now, try to run this command in terminal/console: (in this case, I'm using Debian. It's should be compatible with Ubuntu, for example).
sudo apt-get install php5 libapache2-mod-php5
Once finished, restart apache. Your problem should be fixed by now (hopefully).

Related Articles

5 comments:

  1. Play Sultan Casino - Shootercasino
    Play deccasino Sultan Casino, a non-progressive online casino game with 메리트 카지노 쿠폰 progressive 제왕 카지노 jackpots. Get instant access to exclusive bonuses and free spins.Casino Promotion: Sultan Casino: 100% up to FS

    ReplyDelete
  2. seiko titanium - Titanium Arts
    SEGA TINN. Made in Germany. Item 1 ti 89 titanium calculator - 20 of 2017 ford fusion energi titanium 120 — Manufacturer: titanium gr 5 SEGA. Type: For sale. Used. Sega Titanium is made in Germany. Material: metal,  Rating: 4.3 apple watch titanium vs aluminum · titanium charge ‎20 reviews

    ReplyDelete