[Chugalug] LAMP problem

Dave Brockman dave at brockmans.com
Thu Feb 28 19:47:42 UTC 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2/28/2013 2:39 PM, Garrett Gaston wrote:
> I'M trying to learn a little php but my learning as been halted by
> some strange behavior when executing my html/php files. Within my
> html documents I am attaching them to php files via:
> 
> <form action="somefile.php" method="post">
> 
> When the html file executes the form, the browser downloads the 
> somefile.php file as if I were a picture or song I was downloading
> from a website rather than executing and displaying the php page in
> the browser. Executing phpinfo() from the browser via 
> 'localhost/phptest.php' is working just fine. This problem is only 
> occurring when a php script is called to be executed from an html
> file within the browser. Also note that I have tried this in two
> browsers with the same result.
> 
> I've removed php5 and apache2 and re-installed both of them and
> I'M still getting the same result.
> 
> Here's the info from /var/log/apache2/error.log
> 
> [Thu Feb 28 12:45:35 2013] [notice] Apache/2.2.22 (Ubuntu) 
> PHP/5.3.10-1ubuntu3.5 with Suhosin-Patch configured -- resuming 
> normal operations
> 
> 
> Any ideas. I've hit a brick wall here and I can't continue my php
> book until I get this resolved.

Sounds like PHP is not being loaded by apache.  If Ubuntu follows the
Debian playbook, you run a2enmod and enable PHP.  Beyond that, stumble
around in /etc/apache2 (or your apache config directory) and subdirs
and find the file that has <IfModule mod_php5.c> in it, and make sure
it's not commented out.

Regards,

dtb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRL7ReAAoJEMP+wtEOVbcdCfoH/A9QCHF+cab1s+ycXRDj6+Uc
eLcJI8+OQFm0gNu0imsRET/Ej+JQrelJv29smlf75jDbz1+vBOA2y0UiWmdl2JsH
F7CuSy9uGapSnhVvtI/qO636hspE6xryKHlOgND5xwAq8CTxESykrQCCaCMWdZhC
yBzisyjPJqcUUForMAq7XZfp8wGlCOffWhjvuybeiWeUzOZbBba2c2SS9HnISVkb
VVSwJfElxO+ezY1RXrIUMJo1veevg3LEInCiy3Y935mv7L/Hg5aniWnBJ4H1bwAv
RyC0V/OdQptLaWJy49rgPgUH7/qAe8u+7RGIWEiUMAyfoA+HxVeRh7WjyvCWKzk=
=4YNS
-----END PGP SIGNATURE-----


More information about the Chugalug mailing list