Oliver Nassar

"Comments starting with '#' are deprecated"

July 07, 2011

Way over due for some posts (including 2 monthly-summaries.. woops..) but ran into the following issue:

Comments starting with '#' are deprecated in /etc/php5/apache2/php.ini

Every now-and-then (seemingly random), php generates a warning on a request with the above logged. Looking into it, it seems to be a bug (https://bugs.launchpad.net/ubuntu/+source/php5/+bug/573436). But the problem is that my mini-framework (more to come) is programmed to bail on any-and-all errors (including notices, warnings, fatals, deprecations, etc.).

Thus, every now-and-then, my app dies. Gracefully, but nonetheless, dies. I'm going to look for a workaround (hopefully that doesn't involve rewriting my php.ini file), and will post shortly a resolution.

Follow up

Ya, so just remove the comments that are leading with the hash #. Replacing them with the semi-colon ; seems to have fixed the issue. There are some comments on the thread linked to above that the issue has been resolved in a php-path, but the easiest seemed to be manually editing the file.

Success!