|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[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
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 06:00:02 2025 UTC |
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