Fatal error non-object

This is a discussion on Fatal error non-object within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Thanks for your patience, What would be the object? The filename, the $buf variable dont work. I have the php_id3....


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-27-2007
Jean Pierre Daviau
 
Posts: n/a
Default Fatal error non-object

Thanks for your patience,


What would be the object? The filename, the $buf variable dont
work. I have the php_id3.dll in my extensions folder...



Fatal error: Call to a member function id3_get_tag() on a
non-object in C:\Documents and Settings\Jean
Pierre\Bureau\id3\IDTAG.php on line 42
----
$fichier = "Zaytoun.mp3";
$f=fopen($fichier,"r");
fseek($f,filesize($fichier)-125);
$buf = fgets($f, 125);

$tag = id3_get_tag($buf, ID3_V2_3 ); //line 42

fclose($f);

print_r($tag);
--
Thanks for your attention.

Jean Pierre Daviau
--
windows Xp
asus p4 s533/333/133
Intel(R) Celeron (R) CPU 2.00 GHz
Processor Radeon7000 0x5159 agp


Reply With Quote
  #2 (permalink)  
Old 11-27-2007
Erwin Moller
 
Posts: n/a
Default Re: Fatal error non-object

Jean Pierre Daviau wrote:
> Thanks for your patience,
>
>
> What would be the object? The filename, the $buf variable dont
> work. I have the php_id3.dll in my extensions folder...
>
>
>
> Fatal error: Call to a member function id3_get_tag() on a
> non-object in C:\Documents and Settings\Jean
> Pierre\Bureau\id3\IDTAG.php on line 42
> ----
> $fichier = "Zaytoun.mp3";
> $f=fopen($fichier,"r");
> fseek($f,filesize($fichier)-125);
> $buf = fgets($f, 125);
>
> $tag = id3_get_tag($buf, ID3_V2_3 ); //line 42
>
> fclose($f);
>
> print_r($tag);


Hi,

Line 42 is maybe not the problem.
Are you sure $f returns a valid filehandler?
Maybe you need to give a full path to the mp3.
And also check if PHP-user has read-rights on that file.

Regards,
Erwin Moller
Reply With Quote
  #3 (permalink)  
Old 11-27-2007
Norman Peelman
 
Posts: n/a
Default Re: Fatal error non-object

Jean Pierre Daviau wrote:
> Thanks for your patience,
>
>
> What would be the object? The filename, the $buf variable dont
> work. I have the php_id3.dll in my extensions folder...
>
>
>
> Fatal error: Call to a member function id3_get_tag() on a
> non-object in C:\Documents and Settings\Jean
> Pierre\Bureau\id3\IDTAG.php on line 42
> ----
> $fichier = "Zaytoun.mp3";
> $f=fopen($fichier,"r");
> fseek($f,filesize($fichier)-125);
> $buf = fgets($f, 125);
>
> $tag = id3_get_tag($buf, ID3_V2_3 ); //line 42
>
> fclose($f);
>
> print_r($tag);


The function expects a filename. You are trying to do the work of the
function yourself. Leave the other code out and add in some error checking.

$tag = id3_get_tag($fichier, ID3_V2_3 );

Please see: http://us.php.net/manual/en/function.id3-get-tag.php

and:

http://us.php.net/manual/en/function...et-version.php

Norm
Reply With Quote
  #4 (permalink)  
Old 11-29-2007
Jean Pierre Daviau
 
Posts: n/a
Default Re: Fatal error non-object

Nobody knows?


Reply With Quote
  #5 (permalink)  
Old 11-29-2007
FD
 
Posts: n/a
Default Re: Fatal error non-object

"Jean Pierre Daviau" <Once@WasEno.ugh> schreef in bericht
news:WUn3j.72322$_V.62711@weber.videotron.net...
> Nobody knows?
>


Norman already gave the right answer!

Frank


Reply With Quote
  #6 (permalink)  
Old 11-29-2007
6eWmA67gxAebq@jeanpierredaviau.com
 
Posts: n/a
Default Re: Fatal error non-object

On 27 nov, 07:03, Norman Peelman <npeel...@cfl.rr.com> wrote:
> Jean Pierre Daviau wrote:
> > Thanks for your patience,

>
> > What would be the object? The filename, the $buf variable dont
> > work. I have the php_id3.dll in my extensions folder...

>
> > Fatal error: Call to a member functionid3_get_tag() on a
> > non-object in C:\Documents and Settings\Jean
> > Pierre\Bureau\id3\IDTAG.php on line 42
> > ----
> > $fichier = "Zaytoun.mp3";
> > $f=fopen($fichier,"r");
> > fseek($f,filesize($fichier)-125);
> > $buf = fgets($f, 125);

>
> > $tag = id3_get_tag($buf, ID3_V2_3 ); //line 42

>
> > fclose($f);

>
> > print_r($tag);

>
> The function expects a filename. You are trying to do the work of the
> function yourself. Leave the other code out and add in some error checking..
>
> $tag = id3_get_tag($fichier, ID3_V2_3 );
>
> Please see:http://us.php.net/manual/en/function.id3-get-tag.php
>
> and:
>
> http://us.php.net/manual/en/function...et-version.php
>
> Norm- Masquer le texte des messages précédents -
>
> - Afficher le texte des messages précédents -


It seems my newsreader has problem . . .

I tried to change for a newer dll without success.
As I am on windows XP it is probably the specified bug even though
nothing crashes.
Thanks

Reply With Quote
  #7 (permalink)  
Old 11-29-2007
Jean Pierre Daviau
 
Posts: n/a
Default Re: Fatal error non-object

I putted php_id3.dll version 5.2.1.1 [jeudi 29 novembre
2007, 09:30:12 ]and it works :o) with the CLI and the browser.
echo dl('php_id3.dll');
print_r(get_loaded_extensions());

Thanks to Stephan Schmidt
---------------

What is a tif?

Parse error: syntax error, unexpected T_IF


Reply With Quote
  #8 (permalink)  
Old 11-29-2007
FD
 
Posts: n/a
Default Re: Fatal error non-object

"Jean Pierre Daviau" <Once@WasEno.ugh> schreef in bericht
news:hFA3j.1623$By5.892@wagner.videotron.net...
>I putted php_id3.dll version 5.2.1.1 [jeudi 29 novembre 2007,
>09:30:12 ]and it works :o) with the CLI and the browser.
> echo dl('php_id3.dll');
> print_r(get_loaded_extensions());
>
> Thanks to Stephan Schmidt
> ---------------
>
> What is a tif?
>
> Parse error: syntax error, unexpected T_IF
>
>


It means: unexpected "if".
You have an if-statement and just before this there is a syntax error.
Probably a forgotten semicolon (;) or curly-brace (})

Frank


Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:24 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0