Tue Oct 25 06:05:09 2005

Ticket #1498 (Closed: fixed)

PHP Notices in autopublish


Priority: normal Reporter: john
Severity: minor Assigned to: john
Component: Campsite Server Status: closed
Version: 2.3.0 Resolution: fixed
Milestone: 2.3.3 Keywords:  

Description by john:

PHP Notice: Undefined index: SERVER_PORT in /usr/share/campsite/www-common/html/configuration.php on line 32 Content-type: text/html X-Powered-By: PHP/4.3.11

<br /> <b>Notice</b>: Undefined index: SERVER_PORT in <b>/usr/share/campsite/www-common/html/configuration.php</b> on line <b>32</b><br /> PHP Notice: Undefined index: SERVER_NAME in /usr/share/campsite/www-common/html/configuration.php on line 33 <br /> <b>Notice</b>: Undefined index: SERVER_NAME in <b>/usr/share/campsite/www-common/html/configuration.php</b> on line <b>33</b><br /> PHP Notice: Undefined index: SERVER_PORT in /usr/share/campsite/www-common/html/configuration.php on line 34 <br /> <b>Notice</b>: Undefined index: SERVER_PORT in <b>/usr/share/campsite/www-common/html/configuration.php</b> on line <b>34</b><br /> PHP Notice: Undefined index: SERVER_PORT in /usr/share/campsite/www-common/html/configuration.php on line 34 <br /> <b>Notice</b>: Undefined index: SERVER_PORT in <b>/usr/share/campsite/www-common/html/configuration.php</b> on line <b>34</b><br /> PHP Notice: Undefined index: SERVER_PORT in /usr/share/campsite/www-common/html/configuration.php on line 35 <br /> <b>Notice</b>: Undefined index: SERVER_PORT in <b>/usr/share/campsite/www-common/html/configuration.php</b> on line <b>35</b><br /> PHP Notice: Undefined index: SERVER_PORT in /usr/share/campsite/www-common/html/configuration.php on line 32 Content-type: text/html X-Powered-By: PHP/4.3.11

Attachments

  • campsite-2.3.2.patch (37 kB) - Patch includes fix for verbage in autopublish cron script, added by john on Wed Oct 26 05:07:00 2005.

Changelog

Tue Oct 25 16:06:03 2005: Modified by paul

  • milestone changed from 2.4.0 to 2.3.3

Wed Oct 26 05:07:00 2005: Modified by john

  • attachment added: campsite-2.3.2.patch

Wed Oct 26 05:09:23 2005: Modified by john

  • owner changed from anonymous to mugur

The attached file fixes this verbosity. Also invokes php with the '-q' command to suppress HTTP headers in output. FC3's implementation of PHP doesn't havea separate CLI version of PHP, so the -q options is required in all commandline interface usage of PHP.

I'll assign this to you, Mugur, hopefully you can take a look over my patch and incorporate it.

JP

Wed Oct 26 19:20:41 2005: Modified by paul

  • owner changed from mugur to john

John, please check in this patch as well to the 2.3 branch. We're also going to need these changes for the trunk (i.e. 2.4) as well.

Thu Oct 27 14:34:21 2005: Modified by mugur

  • resolution set to fixed
  • status changed from new to closed

changeset:4048 and changeset:4049

The patch file is not ok, it contains the RPM patch too so I could not use it.

I guess it's the last time I fix a PHP NOTICE bug. First, PHP notices do not belong in a production environment and second, when enabling PHP notices I get lots of them on each page, even from external libraries like adodb:

Notice: Only variables should be assigned by reference in /usr/local/campsite23/www-common/html/classes/IssuePublish?.php on line 211

Notice: Only variables should be assigned by reference in /usr/local/campsite23/www-common/html/classes/IssuePublish?.php on line 222

Notice: Only variables should be assigned by reference in /usr/local/campsite23/www-common/html/classes/ArticlePublish?.php on line 240

Notice: Only variables should be assigned by reference in /usr/local/campsite23/www-common/html/classes/ArticlePublish?.php on line 251

Thu Oct 27 16:28:00 2005: Modified by john

    Sorry, mugur, what's the problem with the RPM patch? I thought I wrote it in such a way that it won't break non-RPM builds... please take another look if you get a chance.

    I also think it's important to fix the php notices bugs, since these notices help to improve coding style. I don't see the once you're mentioning though, but what version of PHP are you on there?

    JP