PHP warning in cronjobs/rssimport.php

Author Message

Geoff Bentley

Sunday 12 October 2008 4:00:15 pm

When debugging cronjobs/rssimport.php I get:

<i>Warning: (PHP)
Undefined variable: linkURL in /var/www/ezpublish-4.0.1/cronjobs/rssimport.php on line 249</i>

I can't see where $linkURL comes from. Should it be $rssImport->attribute( 'url' ) instead?

Paul Wilson

Monday 13 October 2008 12:00:39 am

Hi Geoff,

This is just to rule something out rather than a definite answer...

Sometimes these types of errors come up when an incorrect version of PHP is running the cronjob. I've had multiple versions of PHP running on a server, with the default being an older version of PHP incompatible with eZ Publish 4.0.1.

To get the cronjob to run correctly, the correct version of PHP to run must be specified in the command line used to run the cronjob script.

If this is the problem, then some of the information here may help:
http://ez.no/developer/articles/how_to_import_and_export_rss_feeds/rss_import_ez_publish_cronjob_configuration

- Paul

Bruce Morrison

Monday 13 October 2008 1:03:33 am

Hi Geoff

It's only a warning triggered when an item that has already been imported is encountered, so apart from the annoying output the code should function correctly.

The quickest fix is to replace "$linkURL" with "$link->textContent||$guid->textContent".

Actually there is a bit of refactoring that could occur in this section of code.

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 11:34:13
Script start
Timing: Jan 18 2025 11:34:13
Module start 'layout'
Timing: Jan 18 2025 11:34:13
Module start 'content'
Timing: Jan 18 2025 11:34:14
Module end 'content'
Timing: Jan 18 2025 11:34:14
Script end

Main resources:

Total runtime1.6592 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 588.0156152.6250
Module start 'layout' 0.00600.0031 740.640639.4453
Module start 'content' 0.00911.6482 780.0859582.2734
Module end 'content' 1.65730.0019 1,362.359412.4688
Script end 1.6592  1,374.8281 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.2055160.0002
Check MTime0.00150.0922160.0001
Mysql Total
Database connection0.00080.045810.0008
Mysqli_queries1.593296.0209590.0270
Looping result0.00060.0373570.0000
Template Total1.625097.920.8125
Template load0.00300.183820.0015
Template processing1.621997.752920.8110
Template load and register function0.00020.009910.0002
states
state_id_array0.00100.062910.0010
state_identifier_array0.00150.091220.0008
Override
Cache load0.00230.1409250.0001
Sytem overhead
Fetch class attribute can translate value0.00110.063530.0004
Fetch class attribute name0.00090.055960.0002
XML
Image XML parsing0.00160.096030.0005
class_abstraction
Instantiating content class attribute0.00000.000660.0000
General
dbfile0.00110.0659280.0000
String conversion0.00000.000540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs