PHP4 - Web stream links dead

Events happening in the community are now at Drupal community events on www.drupal.org.
pavlos.g's picture

Hello all,

I'm using the station module on a PHP 4.4.4 / D5.12 installation.

When setting up the module, i get the following error on the browser:

Parse error: parse error, unexpected '&', expecting T_VARIABLE or '$' in ......\schedule\station_schedule.module on line 874

That line contains the following:

foreach ($streams as $key => &$stream) {

which i've found that probably is a PHP5 code line as the '&' character references the $streams array and this is not possible in PHP4.

I'm not a coder, so i could be wrong.

If i delete the ampersand, the site works ok, but the stream links are dead and are instead replaced by just my '//' (when viewing the source html produced).

Is there anyway to bypass this, besides hardcoding the streams?

Thanks in advance.

And BTW, are there anywhere written info about the PHP versions the module works on?

Comments

I think i have found a

pavlos.g's picture

I think i have found a solution:

*** from line 874: ***
foreach ($streams as $key => $stream) { <-- ampersand removed
$stream =& $streams[$key]; <--added line
// Add in the M3U URL.
$stream['m3u_url'] = url('node/'. $schedule_nid .'/'. $key .'.m3u', NULL, NULL, TRUE);
unset ($stream); <--added line
}

Just to help if anyone else is facing the same issue.

This fix works for me.

cookiesunshinex's picture

This fix works for me.

Thanks!

Symetrik Design
Drupal Consulting
http://www.symetrkdesign.com

I'm glad i helped ;-)

pavlos.g's picture

I'm glad i helped ;-)

ie

michel3's picture

thank you!

Radio

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week