Some of my PHP files are missing the ?> at the end of the file

Symptom

The ending ?> seems to be missing in some of my files, esp since upgrading to v1.3.8.

With a Diff viewer I can see that in some cases the last line has changed from ?> to //EOF

Cause

This is completely acceptable and has been done intentionally.

As you may know, if you try to run a PHP file which has whitespace (spaces or blank lines etc) after the final ?> then it can cause problems, usually the dreaded headers already sent error.

Removing the ?> from php files is a way of mitigating against this error. PHP will quite happily work without it (automatically assuming the closing tag at the end of the file), and thus any whitespace at the end of the file will not cause errors.

More information can be found here...
http://www.php.net/basic-syntax.instruction-separation

Solution

There is no special action to be taken.
This is an ongoing process that will continue into future versions of Zen Cart.
  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

How can I find out what version of Zen Cart or PHP or MySQL I'm using?

To find out what version of Zen Cart or PHP or MySQL you are currently using, you can simply go...

Getting a BLANK PAGE? Here's the answer ...

If you're getting a blank page when trying to browse to a certain page on your store, or after...

What's New in the Upcoming v2.0 release?

Database Abstraction Layer and Sql CacheThe abstraction layer has been re-factored to include a...

Image Preparation - How-to

I've seen several posts where people obviously aren't quite sure about the best way to set up...

Some tips to modify stylesheet

1. Download Web Developer extension for FireFox here2. Install & restart FireFox. You should...