| View previous topic :: View next topic |
| Author |
Message |
Anonymous Guest
|
Posted: Tue Jan 23, 2007 3:13 am Post subject: |
|
|
Still having a problem installing PECL and we used the LX commands you gave me... we're back trying to do it on LX... i thought it was installed but it wasnt. now we're back to the first error: no http_get() defined. My server root admin used the commands you said and it still didnt work--i mentioned the possibility he forgot to change the file name in the tar xzvf php_pecl-x.x.tgz command to the file name our PECL tgz file was.
I'm trying to get him to post here...so he can tell you the problems he's having, as I know nothing with SSH and Linux commands. |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Tue Jan 23, 2007 3:25 am Post subject: |
|
|
Ok I am posting
I ran the commands you posted and it seems not to be working.
BUT when I did run the SU -c command - it gave me an error- maybe cause I was already logged in as root.
But other then that it seemed to install correctly.
I also did a restart on httpd.
Any help would be great!
Thanks,
Adam |
|
| Back to top |
|
 |
jcr Modérateur français

Joined: 14 Apr 2006 Posts: 544 Location: France, Auvergne
|
Posted: Tue Jan 23, 2007 8:02 am Post subject: |
|
|
Did you try examining the result of a simple php script with:
| Code: |
<?php
phpinfo() ;
?>
|
Scan yhrough phpinfo results. You should see a HTTP section with many informations, such as shown in our test page http://www.lab-project.net/cx/cx.php
If HTTP section is not present, refer to some messages in this thread, it could be you didn' add a section entry in your php.ini for this extension.
BTW, which Linux distribution do you use ? _________________ Epsilon Friends Radio Icecast Radio on CentovaCast admin panel. Icecast hosting |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Tue Jan 23, 2007 4:51 pm Post subject: |
|
|
I am speaking with impactgc over IM right now, and he appears to be trying something with it...
The server's PHPINFO is http://www.officialfreedom.com/phpinfo.php
There is no http section, but when I asked impactgc if he remembered to add your said changes to php.ini, he said he did...so either he didn't and he just forgot or PHP is malfunctioning.
Does this require a minimum version of PHP (like, PHP 5 required? we run 4.4.4, you guys appear to run 5.2.0). Would old PHP be interfering?
Is an upgrade to PHP 5 necessary? (If it's not absolutely necessary, then we probably won't do it, as that server not only hosts the radio station web site, but hundreds other hosting customers, and the more things we update, the more we put the customers at risk [even though none of them are paying, its free]. [impactgc = host ceo person...])
Thank you for your help, and we're sorry this is so time consuming for you guys. He should be posting shortly if he hasn't already posted before my post here. |
|
| Back to top |
|
 |
jcr Modérateur français

Joined: 14 Apr 2006 Posts: 544 Location: France, Auvergne
|
Posted: Tue Jan 23, 2007 5:08 pm Post subject: |
|
|
| Quote: |
There is no http section, but when I asked impactgc if he remembered to add your said changes to php.ini, he said he did...so either he didn't and he just forgot or PHP is malfunctioning.
|
I saw the page, and, yes, php http extension is either not installed or not declared in php.ini.
| Quote: |
Does this require a minimum version of PHP (like, PHP 5 required? we run 4.4.4, you guys appear to run 5.2.0). Would old PHP be interfering?
|
Most PECL extensions are compatible with PHP 4.4. (Except the new SPL extensions which only work with php 5 mechanism). So you should not have problems installing it.
| Quote: |
Is an upgrade to PHP 5 necessary? (If it's not absolutely necessary, then we probably won't do it, as that server not only hosts the radio station web site, but hundreds other hosting customers, and the more things we update, the more we put the customers at risk [even though none of them are paying, its free]. [impactgc = host ceo person...]) |
We upgraded all of our servers to PHP 5.2 for oerformance, and to propose the latest products to our customers. For most, such an upgrade is not useful, except when using some very recent frameworks, built around new possibilitties  _________________ Epsilon Friends Radio Icecast Radio on CentovaCast admin panel. Icecast hosting |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Tue Jan 23, 2007 6:16 pm Post subject: |
|
|
So is there any idea what is wrong with it, regarding the error impactgc got after that one LX command ("SU -c" or something..?) ?
Which is why it's not installing properly? |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Tue Jan 23, 2007 7:26 pm Post subject: |
|
|
Ok, new problem. According to impactgc, he somehow reinstalled PECL and it installed without error. I do not know if he remembered to add the stuff to php.ini this time, but now, every time we get the Fatal Error page regarding that http_get() does not exist as a function, the server goes insane---I don't have server load details on me, but it takes forever for pages to load...and then after some time, they don't load at all. Our control panel, CPanel, took 1 minute 50 seconds to load.
could PECL possibly be overloading the server? |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Tue Jan 23, 2007 8:04 pm Post subject: |
|
|
yes I followed exactly what he put in for the configuration/install.
Itis also slow cause I am doing an apache update.
Thanks for the help.. Still getting the errors though
Thanks,
Adam |
|
| Back to top |
|
 |
jcr Modérateur français

Joined: 14 Apr 2006 Posts: 544 Location: France, Auvergne
|
Posted: Wed Jan 24, 2007 9:20 am Post subject: |
|
|
For the problems you meet, I can only guess things, as configs may widely vary depending both on apache builds, php version and general php.ini settings.
However, if you cannot install extension, there is still a solution. You can use PHP Curl interface functions to achive the same result, grabbing result page from icecast, instead of the very handy http_get() function in extension.
Something like:
| Code: |
$ch = curl_init("http://your.ip:8000");
$fp = fopen("radiostatus.xsl", "r");
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);
$msg = curl_exec($ch);
curl_close($ch);
fclose($fp);
|
Then process msg as in previous post. _________________ Epsilon Friends Radio Icecast Radio on CentovaCast admin panel. Icecast hosting |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Thu Jan 25, 2007 12:09 am Post subject: |
|
|
JCR: Now updated page with this new code, bascially just replacing $msg = bla bla bla with your provided code.
http://cyber-fm.com/now_playing.php
Now it doesn't show any stats. Even if we have Winamp, on connected, and even on our icecast status page it shows it. Perhaps I replaced the wrong code or such? All I replaced was $msg = http_get ("...") with the code you gave me.
It does have the right link for the Listen Live Now though.
But, any idea why it's not showing any stats? Firstly, it didn't read the file location.... I had to add my IP and port number before getradiostatus.xsl in the fopen command-- just putting it in curl init didn't work. After that it worked. but before then, i got an error, firstly the file not found thing, and then something else about curl_setopt is not a valid...er something i forget.
Thank you for all your help, I think we're getting close to a break through  |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Sat Jan 27, 2007 1:26 pm Post subject: |
|
|
| Hi, does anyone have any idea what is wrong with the CURL script??? |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Sat Feb 03, 2007 11:02 am Post subject: |
|
|
| On our station we got a php script running in background which gets listener count / now playing title every 10 seconds. Now playing title is saved in a plain text file, which can be accessed from web. Listener count stats can be used for generating graphs with rrdtool |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Sun Feb 04, 2007 12:38 am Post subject: |
|
|
| aspin wrote: |
| On our station we got a php script running in background which gets listener count / now playing title every 10 seconds. Now playing title is saved in a plain text file, which can be accessed from web. Listener count stats can be used for generating graphs with rrdtool |
You should post it
 |
|
| Back to top |
|
 |
jasonrhl
Joined: 03 Jan 2008 Posts: 18
|
Posted: Sun Jan 06, 2008 12:14 pm Post subject: |
|
|
does anyone know how to change the format jcr joomla script?
aspin - can you post your script please or direct me to it. |
|
| Back to top |
|
 |
jasonrhl
Joined: 03 Jan 2008 Posts: 18
|
Posted: Wed Jan 09, 2008 10:25 am Post subject: |
|
|
Can I get this file from you /icestats
<xsl:template match = "/icestats" >
I cant seem to get anything that resembles what you have.
I get all this
1721805Icecast 2.3.1Wed, 09 Jan 2008 21:05:04 Cen. Australia Daylight Time1011000unlimitedice-samplerate=44100;ice-bitrate=96;ice-channels=296Rock9624410021http://192.168.0.5:8000/listenunlimited1i-m.net and scb radiojfradioaudio/mpeghttp://jfradio.servemp3.com0127.0.0.1Wed, 09 Jan 2008 21:05:13 Cen. Australia Daylight TimeJohn Frusciante - A Loop 83226734776 DJ:
| jcr wrote: |
Here is a sample getradiostatus.xsl page we use for FlyDance Radio:
| Code: |
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0" >
<xsl:output omit-xml-declaration="no" method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes" encoding="UTF-8" />
<xsl:template match = "/icestats" >
<pre>
MountPoint,Server Name,Description,Data Type,Bitrate,Quality,Video Quality,Frame Size,Frame Rate,Listeners,Peak Listeners,Genre,Server URL,Artist,Title
<xsl:for-each select="source">
<xsl:value-of select="@mount" />|<xsl:value-of select="server_name" />|<xsl:value-of select="server_description" />|<xsl:value-of select="server_type" />|<xsl:value-of select="bitrate" />|<xsl:value-of select="quality" />|<xsl:value-of select="video_quality" />|<xsl:value-of select="frame_size" />|<xsl:value-of select="frame_rate" />|<xsl:value-of select="listeners" />|<xsl:value-of select="listener_peak" />|<xsl:value-of select="genre" />|<xsl:value-of select="server_url" />|<xsl:value-of select="artist" />|<xsl:value-of select="title" />
_END_
</xsl:for-each>
</pre>
</xsl:template>
</xsl:stylesheet>
|
This builds a very simple response page we then parse with some php and display in a module on site. Here is a sample PHP 5 script wich has the job done.
As we use a fallback stream to an internally managed ices playlist, ironically named DJ Robot, we have some chak code included. You might have to adjust the script if you're not running it as a Joomla module
| Code: |
<?php
# Don't allow direct acces to the file
# mamboserver/Joomla specific
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
$radioname = 'FlyDance' ; // Your radio name here
$host = 'www.flydance.eu' ; // Icecast host to connect to
$port = '8020' ; // Icecast port
$pic = '<img src="/images/stories/djmix.png" align="center" border=0 width="64" height="64" alt="Ecoutez Flydance" title="Cliquez pour écoutez FlyDance" />'; // This sis the Listen to the radio icon
$djrobot = '/jrplay'; // Our playlist fallback mount..
$realdj = '/jrlive' ; // On air DJ stream
$listen = '<a href="http://www.flydance.eu:8020/jrlive.m3u">' . $pic . '</a><br />'; // Direct listen to us link
/**
* Lab Radio
*/
// Get server stream status...
$msg = http_get( "http://$host:$port/getradiostatus.xsl" ) ;
// Clean up response and fill an array with active streams.
$spl = explode( '<pre>', $msg ) ;
$spl = str_replace( '</pre>', '', $spl[1] ) ;
$spl = explode( "<br/>", $spl ) ;
$flds = $spl[0] ;
$spl = explode( "\n", $flds ) ;
array_shift( $spl ) ;
// Build stations information.
$stations = array() ;
foreach ( $spl as $e ) {
if ( ( $e !== '_END_' ) && !empty( $e ) ) {
// Only for valid stations, reject empty and marker tags
$p = explode( '|', $e ) ;
$stations[$p[0]]['Name'] = $p[1] ;
$stations[$p[0]]['Description'] = $p[2] ;
$stations[$p[0]]['Listeners'] = $p[9] ;
$stations[$p[0]]['Peak'] = $p[10] ;
$stations[$p[0]]['Artist'] = $p[14] ;
$stations[$p[0]]['Title'] = $p[13] ;
}
}
// Get Fallback playlist information first...
$curtitle = $stations[$djrobot]['Title'] ;
$curartist = $stations[$djrobot]['Artist'] ;
$listeners = $stations[jrobot]['Listeners'] ;
$peak = $stations[$djrobot]['Peak'] ;
$stream = $stations[$djrobot]['Name'] ;
echo $listen . "\n" ;
if ( !empty( $stations[$realdj]['Name'] ) ) {
$curtitle = $stations[$realdj]['Title'] ;
$curartist = $stations[$realdj]['Artist'] ;
$listeners = $stations[$realdj]['Listeners'] ;
$peak = $stations[$realdj]['Peak'] ;
$stream = str_replace( 'on FlyDance', '', $stations[$realdj]['Name'] ) ;
}
// Sanitize information, just for being sure it looks nice
$curtitle = str_replace( '_', '', $curtitle ) ;
$curartist = str_replace( '_', '', $curartist ) ;
echo '<font size="+1"><strong>' . $listeners .'</strong></font> (' . $peak . ') auditeurs écoutent<br />' ;
echo "DJ: <strong>$stream</strong><br />" ;
echo "$curartist<br />" ;
?>
</center> <br/>
</div> |
Result can be seen on Radio home page |
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2002 phpBB Group subRebel style by ktauber
|