Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] PHP won't execute
Date: Fri, 14 Jan 2011 06:28:06
Message-Id: 201101140626.46455.michaelkintzios@gmail.com
In Reply to: [gentoo-user] PHP won't execute by Michael Sullivan
1 On Friday 14 January 2011 04:00:12 Michael Sullivan wrote:
2 > A several years ago I ran a public network out of my apartment. I had
3 > email, www, etc. etc. It all worked fine. Then one day a couple of
4 > years ago we decided that we could not afford to pay for a public IP
5 > address anymore, so we had it turned off. I haven't touched apache
6 > since then, but we still run that box as it's faster than all the others
7 > and runs distcc well. We had a picture page that I wrote back in 2005
8 > and occassionally when we have company over we use it to show them
9 > pictures that we've taken. I went to the site in my web browser this
10 > evening, and saw only PHP code printed on the background image. I've
11 > checked the usual suspects:
12 >
13 > carter apache2 # cat /etc/conf.d/apache2
14 > # /etc/conf.d/apache2: config file for /etc/init.d/apache2
15 >
16 > # When you install a module it is easy to activate or deactivate the
17 > modules
18 > # and other features of apache using the APACHE2_OPTS line. Every module
19 > should
20 > # install a configuration in /etc/apache2/modules.d. In that file will
21 > be an
22 > # <IfDefine NNN> where NNN is the option to enable that module.
23 > # Here are the options available in the default configuration:
24 > # USERDIR Enables /~username mapping to /home/username/public_html
25 > # INFO Enables mod_info, a useful module for debugging
26 > # PROXY Enables mod_proxy
27 > # DAV Enables mod_dav
28 > # DAV_FS Enables mod_dav_fs (you should enable this when you enable
29 > DAV
30 > # unless you know what you are doing)
31 > # SSL Enables SSL
32 > # SSL_DEFAULT_VHOST Enables default vhost for SSL (you should enable
33 > this
34 > # when you enable SSL unless you know what you are
35 > doing)
36 > # LDAP Enables mod_ldap
37 > # AUTH_LDAP Enables authentication through mod_ldap
38 > # DEFAULT_VHOST Enables the default virtual host
39 > in /var/www/localhost/htdocs
40 > APACHE2_OPTS="-D DEFAULT_VHOST -D PHP5 -D MAILMAN -D USERDIR"
41 >
42 > # Extended options for advanced uses of Apache ONLY
43 > # You don't need to edit these unless you are doing crazy Apache stuff
44 > # As not having them set correctly, or feeding in an incorrect
45 > configuration
46 > # via them will result in Apache failing to start
47 > # YOU HAVE BEEN WARNED.
48 >
49 > # ServerRoot setting
50 > #SERVERROOT=/usr/lib/apache2
51 >
52 > # Configuration file location
53 > # - If this does NOT start with a '/', then it is treated relative to
54 > # $SERVERROOT by Apache
55 > #CONFIGFILE=/etc/apache2/httpd.conf
56 >
57 > # Location to log startup errors to
58 > # They are normally dumped to your terminal.
59 > #STARTUPERRORLOG="/var/log/apache2/startuperror.log"
60 >
61 > # Environment variables to keep
62 > # All environment variables are cleared from apache
63 > # Use this to preserve some of them
64 > # NOTE!!! It's very important that this contains PATH
65 > # Also, it will fail if the _value_ of any of these variables contains a
66 > space
67 > KEEPENV="PATH"
68 >
69 > carter apache2 # cat error_log
70 > [Tue Jan 11 03:15:22 2011] [notice] Apache/2.2.16 (Unix) configured --
71 > resuming normal operations
72 > [Wed Jan 12 03:00:12 2011] [notice] Graceful restart requested, doing
73 > restart
74 > [Wed Jan 12 03:00:13 2011] [notice] Apache/2.2.16 (Unix) configured --
75 > resuming normal operations
76 > [Thu Jan 13 19:24:28 2011] [error] [client 192.168.2.3] File does not
77 > exist: /home/michael/public_html/camera/$filename, referer:
78 > http://carter.espersunited.com/~michael/camera/
79 > [Thu Jan 13 19:43:23 2011] [notice] caught SIGTERM, shutting down
80 > [Thu Jan 13 19:43:26 2011] [notice] Apache/2.2.16 (Unix) configured --
81 > resuming normal operations
82 > [Thu Jan 13 19:43:44 2011] [error] [client 192.168.2.3] File does not
83 > exist: /home/michael/public_html/camera/$filename, referer:
84 > http://carter.espersunited.com/~michael/camera/
85 > [Thu Jan 13 19:48:06 2011] [error] [client 192.168.2.3] File does not
86 > exist: /home/michael/public_html/camera/$filename, referer:
87 > http://carter.espersunited.com/~michael/camera/index.php
88 > [Thu Jan 13 19:49:53 2011] [error] [client 192.168.2.3] File does not
89 > exist: /home/michael/public_html/camera/$filename, referer:
90 > http://carter.espersunited.com/~michael/camera/index.php
91 > [Thu Jan 13 19:49:56 2011] [error] [client 192.168.2.3] File does not
92 > exist: /home/michael/public_html/camera/$filename, referer:
93 > http://carter.espersunited.com/~michael/camera/index.php
94 > [Thu Jan 13 19:49:59 2011] [error] [client 192.168.2.3] File does not
95 > exist: /home/michael/public_html/camera/$filename, referer:
96 > http://carter.espersunited.com/~michael/camera/index.php
97 > [Thu Jan 13 19:50:02 2011] [error] [client 192.168.2.3] File does not
98 > exist: /home/michael/public_html/camera/$filename, referer:
99 > http://carter.espersunited.com/~michael/camera/index.php
100 >
101 > (that $filename reference would have resolved if PHP were executed AS
102 > PHP instead of plain text)
103 >
104 > carter apache2 # ls /home/michael/public_html/camera/
105 > 010105 031706 050706 070707 080905 100304 110804 121107 current
106 > thumbnail.php
107 > 010506 032008 051610 070905 081710 100507 111108 121210
108 > current.php thumbnail.php~
109 > 011305 032907 060509 071006 090205 101004 112004 121809
110 > directory.php.bak
111 > 011409 042608 061608 071405 091105 101405 112206 122404
112 > index.php
113 > 020705 042810 063005 072005 092208 102304 112504 122405
114 > oldindex.html
115 > 022807 050307 070405 080605 100206 110604 120205 123106 test.php
116 >
117 >
118 > See? There ARE files there.
119 >
120 > What am I missing here? I looked at
121 > http://www.gentoo.org/proj/en/apache/doc/troubleshooting.xml
122 >
123 > and it said that the browser cache might be full, so I closed the
124 > browser, deleted the cache directory files, and reopened the browser.
125
126 Have you had a look at this thread?
127
128 http://article.gmane.org/gmane.linux.gentoo.user/237217
129
130 --
131 Regards,
132 Mick

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] PHP won't execute Michael Sullivan <msulli1355@×××××.com>