Home > Archive > PHP Language > November 2007 > Fatal error non-object
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Fatal error non-object
|
|
| Jean Pierre Daviau 2007-11-27, 3:59 am |
| 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");
fs ($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
| |
| Erwin Moller 2007-11-27, 7:59 am |
| 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");
> fs ($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
| |
| Norman Peelman 2007-11-27, 7:59 am |
| 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");
> fs ($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/functio...get-version.php
Norm
| |
| Jean Pierre Daviau 2007-11-28, 7:00 pm |
| Nobody knows?
| |
|
| "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
|
|
|
|
|