Save of tag edits never finishes

Post Reply
justinh
User
Posts: 6
Joined: Wed Jan 09, 2013 3:17 am
Are you a spambot?: no

Save of tag edits never finishes

Post by justinh » Wed Jan 09, 2013 3:24 am

Hi,
I just got getID3() able to show the MP3 files on my web site hosted by bluehost. I learned of this script from this tutorial:
http://www.codewalkers.com/c/a/Miscella ... Using-PHP/

To get the demo.browse.php page to render and get past the magic_quotes_gpc enabled error, I had to set this flag to off in my PHP.ini file and copy it to my MP3 folder.

Now the problem is that after I edit a file's tags and hit 'save changes', the page shows "starting to write tag(s)" and nothing else happens. The changes are not written to the file. Where do I start debugging?

I'm green when it comes to Linux, PHP, and working on a host box. Bluehost is using PHP version 5.2.17.

I'd appreciate the help!

Justin

James Heinrich
getID3() v1 developer
Posts: 1476
Joined: Fri May 04, 2001 4:00 pm
Are you a spambot?: no
Location: Northern Ontario, Canada
Contact:

Re: Save of tag edits never finishes

Post by James Heinrich » Wed Jan 09, 2013 1:29 pm

Make sure that PHP is set to display errors (display_errors = On, error_reporting = E_ALL).
It's obviously failing silently somewhere, most likely your server config is suppressing a PHP error of some kind.

justinh
User
Posts: 6
Joined: Wed Jan 09, 2013 3:17 am
Are you a spambot?: no

Re: Save of tag edits never finishes

Post by justinh » Fri Jan 11, 2013 12:43 am

Thanks, James. I set the flags you mentioned. This is the result:

Fatal error: Uncaught exception 'Exception' with message '$this->overwrite_tags=false is known to be buggy in this version of getID3. Will be fixed in the near future, check www.getid3.org for a newer version.' in /home7/bb2/public_html/getid3/write.php:422 Stack trace: #0 /home7/bb2/public_html/getid3/write.php(478): getid3_writetags->MergeExistingTagData('id3v1', Array) #1 /home7/bb2/public_html/getid3/write.php(268): getid3_writetags->FormatDataForID3v1() #2 /home7/bb2/public_html/3John/demo.write.php(101): getid3_writetags->WriteTags() #3 {main} thrown in /home7/bb2/public_html/getid3/write.php on line 422

I could not find the overwrite_tags flag in PHP.ini. I don't know what to do with the rest of the errors. I'm using getID3() 1.9.3.

James Heinrich
getID3() v1 developer
Posts: 1476
Joined: Fri May 04, 2001 4:00 pm
Are you a spambot?: no
Location: Northern Ontario, Canada
Contact:

Re: Save of tag edits never finishes

Post by James Heinrich » Fri Jan 11, 2013 12:50 am

Wherever you've instantiated your getid3_writetags object, make sure to set overwrite_tags=true:

Code: Select all

$tagwriter = new getid3_writetags;
... other settings ...
$tagwriter->overwrite_tags = true;
True is the default value in the class, but you're apparently overriding it somewhere to false.

justinh
User
Posts: 6
Joined: Wed Jan 09, 2013 3:17 am
Are you a spambot?: no

Re: Save of tag edits never finishes

Post by justinh » Fri Jan 11, 2013 2:45 am

I modified the value in demo.write.php and I can modify the tags on my MP3! I don't know how that value could have been changed, since I didn't change it.

Now the problem is that after I modify a tag, the tag values don't rotate/scroll in Windows Media Player any more. It just displays the title continuously. I can compare properties on the file (from Win Explorer) and nothing looks different (besides the modified value). getID3() is saying it is using id3v2.3 tags.

justinh
User
Posts: 6
Joined: Wed Jan 09, 2013 3:17 am
Are you a spambot?: no

Re: Save of tag edits never finishes

Post by justinh » Fri Jan 11, 2013 8:37 pm

I may have found the problem with the tag 'corruption'. Some of the files had data in the Comment field and some had data in the Album field. When I edit the Comment field the corruption occurs, but if edit only the Album field, there is no corruption.

However, all the files have something in the Album Artist field, and this field seems to get wiped out (value becomes null) after editing the properties.

getID3 would be a beautiful solution for me if it would either show all fields or at least not wipe out not-shown fields. Is there a way I can expose more tag fields?

James Heinrich
getID3() v1 developer
Posts: 1476
Joined: Fri May 04, 2001 4:00 pm
Are you a spambot?: no
Location: Northern Ontario, Canada
Contact:

Re: Save of tag edits never finishes

Post by James Heinrich » Fri Jan 11, 2013 8:57 pm

The idea behind "overwrite_tags = false" is that non-exposed values are retained and only the new values you supply are updated. With "overwrite_tags = true" then the original tag is wiped out and a new tag is generated with only the entered data.

You are free to experimentally disable the exception warning about overwrite_tags=false and see if it works fine for your application. There is some outstanding tag-writing oddness I haven't yet been able to explain or track down, hence the warning and disabled functionality. But feel free to experiment.

justinh
User
Posts: 6
Joined: Wed Jan 09, 2013 3:17 am
Are you a spambot?: no

Re: Save of tag edits never finishes

Post by justinh » Sat Jan 12, 2013 4:14 am

OK. How do I disable the exception warning about overwrite_tags=false?

I was looking at this in demo.write.php:

Code: Select all

		$tagwriter->overwrite_tags = true;
		$tagwriter->tag_encoding   = $TaggingFormat;
		if (!empty($_POST['remove_other_tags'])) {
			$tagwriter->remove_other_tags = true;
What is remove_other_tags about? It *sounds* like the same thing as overwrite_tags=false, but I get the same result if it is false.

"overwrite_tags" is also in demo.mysql.php and demo.simple.write.php (I renamed to remove from the equation). Will this setting in these files interfere with my setting in demo.write.php?

James Heinrich
getID3() v1 developer
Posts: 1476
Joined: Fri May 04, 2001 4:00 pm
Are you a spambot?: no
Location: Northern Ontario, Canada
Contact:

Re: Save of tag edits never finishes

Post by James Heinrich » Sat Jan 12, 2013 3:27 pm

justinh wrote:OK. How do I disable the exception warning about overwrite_tags=false?
In function MergeExistingTagData, write.php around line 422. Just comment out the obvious line.

justinh
User
Posts: 6
Joined: Wed Jan 09, 2013 3:17 am
Are you a spambot?: no

Re: Save of tag edits never finishes

Post by justinh » Sun Jan 13, 2013 1:49 am

Is this some of the oddness you are talking about? I get this above the edit box after I his save for my changes:
Failed to write tags!
WriteID3v2() failed with message(s):
•Frame not allowed in ID3v2.3: BAND
•Frame "BAND" is NOT allowed•
$this->GenerateID3v2FrameData() failed for "BAND"•
$this->GenerateID3v2Tag() failed


In the Comment field, I had "Comment_1". I added some text to get: "Comment_1+2". What showed up in the edit box Comment field after save:
Comment_1+2
Comment_1

So it is trying to append the new line with the old line.

Post Reply