I am trying to determine if something is happening to unpacked zip files OMM, or if there is something else going on. After experiencing some odd errors, it came to my attention that certain files in the unzipped 4.7.2 and 4.7.3 releases are missing a final ending "?>" PHP closing tag. For example, 'index.php' looks exactly like this (4.7.3): =======<code> <?php // $Id: index.php,v 1.90 2006/01/27 18:51:51 dries Exp $ /** * @file * The PHP page that serves all page requests on a Drupal installation. * * The routines here dispatch control to the appropriate handler, which then * prints the appropriate page. */ require_once './includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); $return = menu_execute_active_handler(); switch ($return) { case MENU_NOT_FOUND: drupal_not_found(); break; case MENU_ACCESS_DENIED: drupal_access_denied(); break; case MENU_SITE_OFFLINE: drupal_site_offline(); break; default: // Print any value (including an empty string) except NULL or undefined: if (isset($return)) { print theme('page', $return); } break; } drupal_page_footer(); =======</code> That document ends (OMM) with the final code line at line 34, then is followed by two blank lines. The final line is numbered 36, that is, but 35 and 36 are line feeds/new lines only. [Note the missing ?> after that final function call.] Is this something happening during MY unzip, or is this also true for others? I really find this interesting, and will clearly explore any issues which might be affecting my machine. Thanks for any insight. -- inkfree P.S. 'My machine' = Mac OS X.3.9 (Panther) and I've been unpacking and testing Drupal here since before version 4.6, with no problems at all.
This is absolutely correct. We are omitting the closing ?> to prevent "headers already sent" problems caused by spaces after the ?>. The PHP manual states, that these are optional. 2006/8/18, inkfree press <inkfree@gmail.com>:
I am trying to determine if something is happening to unpacked zip files OMM, or if there is something else going on.
After experiencing some odd errors, it came to my attention that certain files in the unzipped 4.7.2 and 4.7.3 releases are missing a final ending "?>" PHP closing tag.
For example, 'index.php' looks exactly like this (4.7.3):
=======<code>
<?php // $Id: index.php,v 1.90 2006/01/27 18:51:51 dries Exp $
/** * @file * The PHP page that serves all page requests on a Drupal installation. * * The routines here dispatch control to the appropriate handler, which then * prints the appropriate page. */
require_once './includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
$return = menu_execute_active_handler(); switch ($return) { case MENU_NOT_FOUND: drupal_not_found(); break; case MENU_ACCESS_DENIED: drupal_access_denied(); break; case MENU_SITE_OFFLINE: drupal_site_offline(); break; default: // Print any value (including an empty string) except NULL or undefined: if (isset($return)) { print theme('page', $return); } break; }
drupal_page_footer();
=======</code>
That document ends (OMM) with the final code line at line 34, then is followed by two blank lines. The final line is numbered 36, that is, but 35 and 36 are line feeds/new lines only. [Note the missing ?> after that final function call.]
Is this something happening during MY unzip, or is this also true for others?
I really find this interesting, and will clearly explore any issues which might be affecting my machine.
Thanks for any insight. -- inkfree
P.S. 'My machine' = Mac OS X.3.9 (Panther) and I've been unpacking and testing Drupal here since before version 4.6, with no problems at all.
"Konstantin Käfer" wrote:
This is absolutely correct. We are omitting the closing ?> to prevent "headers already sent" problems caused by spaces after the ?>. The PHP manual states, that these are optional.
Whew. Okay. That's good. (I have no idea how I've missed that "optional-ness" before, but it is a very good thing to know -- and just a little freaky to get my head around, from a 'style' perspective. But that's all me.) Mucho gusto and many thanks.
On 8/18/06, inkfree press <inkfree@gmail.com> wrote:
I am trying to determine if something is happening to unpacked zip files OMM, or if there is something else going on.
After experiencing some odd errors, it came to my attention that certain files in the unzipped 4.7.2 and 4.7.3 releases are missing a final ending "?>" PHP closing tag.
The closing tag is omitted on purpose. Please see http://drupal.org/node/545 -- Arto Bendiken | arto.bendiken@gmail.com | http://bendiken.net/
participants (3)
-
Arto Bendiken -
inkfree press -
Konstantin Käfer