php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56848 id3 dll crashes php/apache
Submitted: 2006-02-19 13:19 UTC Modified: 2015-07-26 18:09 UTC
Votes:3
Avg. Score:2.3 ± 0.9
Reproduced:1 of 2 (50.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: awmckay at gmail dot com Assigned:
Status: Suspended Package: id3 (PECL)
PHP Version: 5.1.1 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
40 + 36 = ?
Subscribe to this entry?

 
 [2006-02-19 13:19 UTC] awmckay at gmail dot com
Description:
------------
PECL version: 5.1.2

When using the id3 dll with php, it repeatedly crashes either apache or cli (no matter which way it is ran). The php_id3.dll is been put in the php.ini file as an extension as follows:
extension=php_id3.dll
When reviewing the error report from the crash, it lists the module php_id3.dll as the cause.

Reproduce code:
---------------
Foreach ($files as $value) {
$info=id3_get_tag($value);
$query="SELECT * FROM music Where Artist='$info[0]' AND Title='$info[2]'";
$result = mysql_query($query) or die(mysql_error());
$num = mysql_num_rows($result);
if ($num=0) {
$query="INSERT INTO music VALUES ('','$info[0]','$info[2]','$info[1]','$info[4]')";
mysql_query($query) or die(mysql_error());
}
}
/* the code above is passing through an array of mp3 files and retrieving their id3 tag info. */

Expected result:
----------------
The code should retrieve the id3 tag info for each element in the array and perform the query on the mysql tables using the id3 info it just retrieved.

Actual result:
--------------
php cli/apache crashes

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-19 14:22 UTC] mike@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PECL better.

Recategorizing from tidy to id3.
 [2006-02-20 00:46 UTC] awmckay at gmail dot com
When running php.exe (the cli version) with the  path to the php file passed to it through GDB, I am getting:

Starting program: c:/php/php.exe "c:/documents and settings/hp_owner/my document
s/website/test11.php"
Program received signal SIGSEGV, Segmentation fault.
0x003829ca in ?? () 
(gdb) bt
#0 0x003829ca in ?? () 
Cannot access memory at address 0x3a4 

I hope this helps. This could be a problem on my end, just not sure. Thanks.
 [2006-04-12 01:01 UTC] woogley at gmail dot com
I am having the exact same problem as the original bug submitter. has there been a fix for this?
 [2006-11-01 19:37 UTC] jbwalker at telus dot net
Have had a similar problem. It isn't crashing the server yet but am having strange results when I try to run this simple script:

<?
$m = id3_get_tag("01-Cognac Blues.mp3");
$v = id3_get_version("01-Cognac Blues.mp3");
print_r($m);
print $v;	
if (id3_set_tag($m,"01a-Cognac Blues.mp3")) print "OK!"
?>

[NB I believe the results below are also true for just the id3_get_tag() function, so it isn't any particular combination]

Here's my configuration: Windows XP/Apache 2/PHP5.16/256Mb memory;

[I do notice the following error in the Apache error log when I'm trying to load the extension (php_id3.dll) in PHP.INI

FATAL:  emalloc():  Unable to allocate 721434881 bytes

This error does not appear when I restart without this extension.]

What happens with the extension
-------------------------------
Using PSPad as an editor, I get a "Can't find site" page error from the internal browser (IE) when I try to run the code. When I try to access the page by entering the address of the script in Firefox

http://localhost/medialib/tstid3.php

It goes the bizarre loop of trying to find  http://www.localhost.com/medialib/tstid3.php

Yet if I then try a known script (using localhost) everything works fine.

Hope this helps
 [2015-07-26 18:09 UTC] cmb@php.net
-Status: Open +Status: Suspended
 [2015-07-26 18:09 UTC] cmb@php.net
The id3 extension is unmaintained (no release for more than 10
years). I'm suspending this report until a new maintainer is
found.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 13:01:30 2024 UTC