Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #5193

Re: Forum displays PHP code, not website

From "M. Strobel" <sorry_no_mail_here@nowhere.dee>
Newsgroups comp.lang.php
Subject Re: Forum displays PHP code, not website
Date 2012-03-22 10:29 +0100
Message-ID <9t09olFdviU1@mid.uni-berlin.de> (permalink)
References <jkdtdr$ktn$1@dont-email.me> <jkdv3n$s61$1@dont-email.me> <jke5pr$ovd$1@dont-email.me>

Show all headers | View raw


Am 22.03.2012 04:20, schrieb P E Schoen:
> "Dave Pyles"  wrote in message news:jkdv3n$s61$1@dont-email.me...
> 
>> P E Schoen wrote:
>>> Last night I wanted to check out a forum http://www.mytractorforum.com/,
>>> but instead of showing the forum, it displays the PHP code. I thought it
>>> was a temporary glitch, but it's going on almost 24 hours now. I don't
>>> really know how to contact them. But I'm wondering what may have
>>> happened. Hacked?
>>>
>>> Thanks,
> 
>> Seems to be working correctly now.
> 
> I tried again, and still saw the problem, but it was reloading the page from the
> cache. A refresh cleared it up. I still wonder what could have caused the source to
> be displayed. Would this happen if the PHP application on the server was missing or
> defective?
> 
> Thanks,
> 
> Paul

Even with a correctly installed and "working" PHP the web server will show you the
source code if (Apache on Ubuntu) file /etc/apache2/mods-available/php5.conf is not
linked into mods-enabled/!

php5.conf:
<IfModule mod_php5.c>
    <FilesMatch "\.ph(p3?|tml)$">
        SetHandler application/x-httpd-php
    </FilesMatch>
    <FilesMatch "\.phps$">
        SetHandler application/x-httpd-php-source
    </FilesMatch>
    # To re-enable php in user directories comment the following lines
    # (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
    # prevents .htaccess files from disabling it.
    <IfModule mod_userdir.c>
        <Directory /home/*/public_html>
            php_admin_value engine Off
        </Directory>
    </IfModule>
</IfModule>

/Str.

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Forum displays PHP code, not website "P E Schoen" <paul@peschoen.com> - 2012-03-21 20:57 -0400
  Re: Forum displays PHP code, not website Dave Pyles <dave@user.invalid> - 2012-03-21 21:26 -0400
    Re: Forum displays PHP code, not website "P E Schoen" <paul@peschoen.com> - 2012-03-21 23:20 -0400
      Re: Forum displays PHP code, not website "J.O. Aho" <user@example.net> - 2012-03-22 06:46 +0100
      Re: Forum displays PHP code, not website "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-03-22 10:29 +0100
      Re: Forum displays PHP code, not website Erwin Moller <erwinmollerusenet@xs4all.nl> - 2012-03-22 10:41 +0100
      Re: Forum displays PHP code, not website Tim Streater <timstreater@greenbee.net> - 2012-03-22 11:12 +0000
      Re: Forum displays PHP code, not website The Natural Philosopher <tnp@invalid.invalid> - 2012-03-22 11:30 +0000
      Re: Forum displays PHP code, not website Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-03-22 20:38 +0100
        Re: Forum displays PHP code, not website "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-03-22 21:43 +0100
          Re: Forum displays PHP code, not website The Natural Philosopher <tnp@invalid.invalid> - 2012-03-22 21:25 +0000
          Re: Forum displays PHP code, not website Jerry Stuckle <jstucklex@attglobal.net> - 2012-03-22 17:42 -0400
            Re: Forum displays PHP code, not website "P E Schoen" <paul@peschoen.com> - 2012-03-22 22:23 -0400
              Re: Forum displays PHP code, not website Jerry Stuckle <jstucklex@attglobal.net> - 2012-03-22 22:51 -0400
              Re: Forum displays PHP code, not website gordonb.vi9et@burditt.org (Gordon Burditt) - 2012-03-22 23:37 -0500
                Re: Forum displays PHP code, not website "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-03-23 18:13 +0100
                Re: Forum displays PHP code, not website "P E Schoen" <paul@peschoen.com> - 2012-03-23 21:07 -0400
                Re: Forum displays PHP code, not website Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-03-24 10:44 +0100
                Re: Forum displays PHP code, not website Jerry Stuckle <jstucklex@attglobal.net> - 2012-03-24 09:07 -0400
                Re: Forum displays PHP code, not website Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-03-24 10:35 +0100
              Re: Forum displays PHP code, not website Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-03-24 10:24 +0100

csiph-web