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....
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
"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 |
![]() |
| Thread Tools | |
| Display Modes | |
|
|