#415 closed Defect (fixed)
php errors in show_log.php
Reported by: | mweltin | Owned by: | Rytis |
---|---|---|---|
Priority: | Minor | Milestone: | Undetermined |
Component: | Web - Project | Version: | |
Keywords: | showlog php patch | Cc: |
Description (last modified by )
Some php.ini files will cause the following errors to appear when viewing logs from in $PROJECT/html/ops/show_log.php
Notice: Undefined index: f in /home/mweltin/projects/tsp/html/ops/show_log.php on line 11 Notice: Undefined index: s in /home/mweltin/projects/tsp/html/ops/show_log.php on line 12 Notice: Undefined index: l in /home/mweltin/projects/tsp/html/ops/show_log.php on line 13 Notice: Undefined variable: lines in /home/mweltin/projects/tsp/html/ops/show_log.php on line 38
By first testing for the variable with php's isset function the errors on lines 11-13 can be avoided. E.g.
if( isset($_GET!["f"]) ){ $f = $_GET!["f"]; } else { $f = ""; } if( isset($_GET!["s"]) ){ $s = $_GET!["s"]; } else { $s = ""; } if( isset($_GET!["l"]) ){ $l = (int)$_GET!["l"]; } else { $l = 0; }
Adding that code pushes the error from line 38 to 54, but I'm not sure what $lines is needed for. My perl is not so good, and I was not sure what the grep_logs script would use that parameter for.
-Markus
Attachments (1)
Change History (9)
comment:1 Changed 17 years ago by
Component: | Server - Web - Forums → Server - Other |
---|---|
Description: | modified (diff) |
Owner: | changed from Rytis to davea |
comment:2 Changed 17 years ago by
Component: | Server - Other → Server - Web - Project |
---|---|
Owner: | changed from davea to Rytis |
Whoops.
comment:3 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [13627]) - Added new script "update_versions_v6"; use this instead of
update_versions to add version 6 apps. It looks for API_VERSION string in main executable, adds the API version to the app_version XML, and sets min_core_version to 6 for version 6+ apps
- API: include API_VERSION string
- convert tabs to spaces here and there
- scheduler: parse unused elements in <net_stats>
- ops/show_log.php: if no URL args, just show form (fixes #415)
- client: parse and store api_version (not used yet)
comment:4 Changed 17 years ago by
Ugh... totally unrelated changes in a single commit again. </smallrant>
comment:5 Changed 17 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
The fix introduces some bugs. I attached a patch to get it working again.
comment:7 follow-up: 8 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Formatted code correctly.