libapache2-mod-php5 should provide LAMP test page

Bug #135624 reported by Jamie Strandboge
6
Affects Status Importance Assigned to Milestone
php5 (Debian)
Fix Released
Unknown
php5 (Ubuntu)
Confirmed
Wishlist
Unassigned

Bug Description

Binary package hint: libapache2-mod-php5

As per the ubuntu-server team, libapache2-mod-php5 should provide a test page so users can see that the newly installed LAMP server is working. Should include php5, mysql and postgresql tests.

Revision history for this message
Mathias Gug (mathiaz) wrote : Re: [Bug 135624] should provide LAMP test page

 status triaged
 importance low

Changed in php5:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Developed a test page. It isn't pretty, but it isn't any worse the Apache's test page. It is user friendly, so that if php5-mysql or php5-pgsql is not installed, it gives a helpful error. It does not need a username and password, but rather just checks for the connection. It is HTML 4.01 Transitional compliant.

Changed in php5:
assignee: nobody → jamie-strandboge
status: Triaged → In Progress
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

updated test page to add localhost to the HTML output

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

debdiff against gutsy attached

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Attached is an updated lamp-test.php. Per Soren Hansen's recommendations, I changed the mysql_connect() call to have no arguments and use extension_loaded() instead of register_shutdown_function().

I also made the PHP comment in the raw HTML more clear. I considered using something like this:
 <td>PHP</td><td><!-- <?php print("-->Works<!--"); ?> --></td>

but decided against it for several reasons. It doesn't do what is intended. While it works fine if PHP is installed and operating correctly, if PHP is disabled and the page happens to be rendered as HTML (a non-default apache configuration), then the user sees 'PHP Works', as the HTML comments just comment out the php parts. Also if PHP is disabled and the page is sent as raw text for download as lamp-test.php (which is what apache does when it doesn't recognize the mime type), then when the user reads the page, the above code snippet may not be clear (and may even make the user think it did 'work', if they don't understand the code).

As such, I just made the message clearer:
      If you were prompted to download this page as lamtp-test.php and/or
      are viewing this as raw HTML in your browser, then php is not properly installed.

      To install, do (as root):
      apt-get install libapache2-mod-php5
      a2enmod php5
      /etc/init.d/apache2 force-reload

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

hrmm...

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Here is an update that incorporates more changes from Soren Hansen and myself.

Changed in php5:
status: Unknown → New
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Submitted to Debian. Hopefully they can include it and Hardy can get it when merging.

Changed in php5:
status: In Progress → Triaged
Changed in php5:
assignee: jdstrand → nobody
Changed in php5 (Ubuntu):
importance: Low → Wishlist
Revision history for this message
zaki (gwe-gituloe) wrote :

download

Changed in php5 (Ubuntu):
status: Triaged → Confirmed
Mathias Gug (mathiaz)
tags: added: patch patch-forwarded-debian
Changed in php5 (Debian):
status: New → Fix Released
Revision history for this message
Joshua Powers (powersj) wrote :

This bug was updated this weekend by the bug water tool and marked the Debian bug as "Fix Released". This however is incorrect, the Debian bug was closed as "Won't fix" because php5 was removed from Debian unstable.

If we want to continue to provide something like this I would recommend adding php7.0 to the affects or close this rather old bug out.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.