Title: PHP code shown only as text
Last modified: August 21, 2016

---

# PHP code shown only as text

 *  [jenzen](https://wordpress.org/support/users/jenzen/)
 * (@jenzen)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/php-code-shown-only-as-text/)
 * Hi WordPress people,
 * I’ve installed succesfully MySQL and Apache to my MacBook Pro (I’d like to run
   WordPress first locally). But there’s obviously something wrong with the PHP 
   settings (or something) because PHP code is shown only as text in web pages. 
   It’s the same with `wb-config.php` and simple `hello world` stylish php files.
 * I edited the `httpd.conf` file – deleted the `#` in front of the line `LoadModule
   php5_module libezec/apache2/libphp5.so`. I copied `php.ini.default` file to `
   php.ini` file without making any changes.
 * Any ideas how to fix this?
 * Thank you for your time and help already in advance!

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Siobhan](https://wordpress.org/support/users/siobhyb/)
 * (@siobhyb)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/php-code-shown-only-as-text/#post-3970140)
 * Hey. Have you followed all the instructions given in the [PHP.net docs](http://www.php.net/manual/en/install.macosx.bundled.php)
   for this? – [http://www.php.net/manual/en/install.macosx.bundled.php](http://www.php.net/manual/en/install.macosx.bundled.php)
 *  Thread Starter [jenzen](https://wordpress.org/support/users/jenzen/)
 * (@jenzen)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/php-code-shown-only-as-text/#post-3970158)
 * Hi Siobhyb,
 * ok, good. There’s still something not exactly right… The second step in the php.
   net instructions asks to uncomment the first line here below, and in my `/private/
   etc/apache2/httpd.conf` file I can only find the following line (which I have
   uncommented).
    `# LoadModule php5_module libexec/httpd/libphp5.so` `LoadModule
   php5_module libexec/apache2/libphp5.so`
 * I can’t find anything related to this line. Should I add it somewhere in the 
   file?
    # AddModule mod_php5.c
 * And should I also add the `mod_php5.c` code in the step 3?
 * I followed the instructions in this page
    [http://php.about.com/od/phpbasics/ss/installMac_2.htm](http://php.about.com/od/phpbasics/ss/installMac_2.htm)
 * Thank you!
 *  [Suzette Franck](https://wordpress.org/support/users/mt_suzette/)
 * (@mt_suzette)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/php-code-shown-only-as-text/#post-3970244)
 * Not sure which tools you are using to install everything, but Desktop Server 
   will install everything and install WordPress and has a blueprint feature. The
   dev is super helpful with any issues.
 *  [Eric Amundson](https://wordpress.org/support/users/sewmyheadon/)
 * (@sewmyheadon)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/php-code-shown-only-as-text/#post-3970245)
 * Hey jenzen,
 * I never mess with setting up PHP and MySQL directly on the Mac; only on Linux.
   I tend to ‘cheat’ and use MAMP or XAMMP.
    - MAMP: [http://www.mamp.info/en/index.html](http://www.mamp.info/en/index.html)
    - XAMMP: [http://www.apachefriends.org/en/xampp.html](http://www.apachefriends.org/en/xampp.html)
 * IMO, it’s much easier. If you’re a tinkerer, and feeling ambitious, you could
   also try Vagrant:
 * [https://github.com/10up/varying-vagrant-vagrants](https://github.com/10up/varying-vagrant-vagrants)
 * I think MAMP’s your easiest bet, though.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘PHP code shown only as text’ is closed to new replies.

## Tags

 * [gnome-opw](https://wordpress.org/support/topic-tag/gnome-opw/)
 * [only text](https://wordpress.org/support/topic-tag/only-text/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Localhost Installs](https://wordpress.org/support/forum/localhost-installs/)
 * 4 replies
 * 4 participants
 * Last reply from: [Eric Amundson](https://wordpress.org/support/users/sewmyheadon/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/php-code-shown-only-as-text/#post-3970245)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
