PHP4 - Web stream links dead

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by pavlos.g on December 11, 2008 at 11:50am

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

Posted by pavlos.g on December 11, 2008 at 12:35pm

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.

Posted by cookiesunshinex on December 22, 2008 at 10:58am

This fix works for me.

Thanks!

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

I'm glad i helped ;-)

Posted by pavlos.g on December 22, 2008 at 11:51am

I'm glad i helped ;-)

ie

Posted by michel3 on December 21, 2009 at 12:55pm

thank you!

Radio

Group organizers

Group notifications

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

AltStyle によって変換されたページ (->オリジナル) /