When I upload a new mp3 or try and update one by editing it, the page doesn't forward, the page just goes blank. If I click reload, or back it ask me to resubmit post data, but if I do it errors out because everything uploaded correctly. Everything is uploading correctly, it isn't forwarding back to the audio page. Any help would greatly be appreciated.

Comments

yched’s picture

I have that also.

In fact there's a php warning issued, which is approx. : can't send headers - headers already sent in ???

unfortunately I'm away from home for a few days so I couldn't tell which file and line number.

Probably easy to fix, though - misplaced ?> maybe ?

drewish’s picture

sorry but i really need more to go on to help you. an error/warning message with line number would be very helpful.

yched’s picture

I do realize that :-)

I should be able to be more specific in 48 hours...

xamox’s picture

If I click reload this is the error I get:
warning: Cannot modify header information - headers already sent in C:\Program Files\xampp\htdocs\website\includes\common.inc on line 266.
warning: Cannot modify header information - headers already sent in C:\Program Files\xampp\htdocs\website\includes\common.inc on line 266.

Hope this helps. Thanks for the quick response.

drewish’s picture

humm, i really don't think this is specific to the audio module. the quickest way to debug this would be to disable all your modules and then try adding/editing an audio node. keep enabling your modules until it breaks. the last module you enable is going to be the problem.

drewish’s picture

i should clarify that you could probably start by just disabling any contrib modules and trying it. i doubt that the core modules are the problem. additionally, for laughs you might want to try it with a different theme, say bluemarine.

yched’s picture

Ok, this was in fact not easy to track down, and for the moment I don't have any fix for it.

It happens only on windows (my local dev install), and is caused by the getid3 library.
The following lines in the getid3 object contructor in getid3.php (from line 129 on) :

ob_start();
system($CLIdir.' && dir /ad /x');
(...)
ob_end_clean();

happen to send HTTP headers to the browser.

After the form submission is handled, the form system redirects the user to the node page with a drupal_goto, which tries to re-send headers, and fails with :
Warning: Cannot modify header information - headers already sent in (...)\includes\common.inc on line 266

Note : this seems to be triggered by the "dir" command - if you replace (just for the sake of testing...) :

system($CLIdir.' && dir /ad /x');

with a "dummy" command, say :

system('cd .');

the error disappears.
The ob_start / ob_end_clean thing should prevent any output to the browser, but the dir command seems to fool that.

Problem is : for the moment I don't get how we can fix that, and even if we could, a patch for the external getid3 lib is probably not the best solution...

Temporary hack :
The involved code sequence deals with windows helper apps for getid3.
These apps don't seem to be needed for mp3 files (not 100% sure about that, though)
So I guess I'll just comment out line 112 to 147 in getid3.php

yched’s picture

edit : replacing the lines between ob_start and ob_end_flush (included) with :

exec($CLIdir.' && dir /ad /x', $subdirsraw);

MIGHT do the trick.

I filed a bug report about that for the getid3 lib.

xamox’s picture

Title: page not fowarding after upload or edit. » Now working with above edit....

changing the line to what is mentioned above worked for me!

Thanks a lot!

-xamox

xamox’s picture

Using the above edit fixes the problem for me.

Thanks a lot!

xamox’s picture

Title: Now working with above edit.... » audio page not fowarding after upload or edit.

sorry, overwrote the title, changed it back.

drewish’s picture

Status: Active » Fixed
Anonymous’s picture

We are having a problem somewhat similar to that mentioned here, but it is different enough that I'm not sure if it requires a different solution.

After trying to create audio, we get a blank page with the following after our standard drupal URL: /?q=node/add/audio

When we navigate to our Drupal Homepage, we see an entry called "by" The artist and title do not appear. When we click on the entry, we see the correct title, but the file itself is not attached anywhere. The information box shows - "Length: minutes ( bytes)" and "Format: 0kHz 0Kbps ()"

We're running Drupal 4.7.2 on a Debian server with apache2, php 5.1.4, and mysql 5.0.20. We think we have everything in the right place and the tables set up correctly - no errors appeared during the installation, and when we examine the mysql tables they match your setup code. However, we are unable to upload audio files. The rest of the site appears to be working appropriately.

When we do a "select *" statement from the audio Mysql tables (audio, audio_file, and audio_metadata), we receive an empty set, 0 rows. This may explain why the information box appears as it does. However, the audio file actually does upload into the appropriate directory on the server. So it's there, but the database doesn't seem to correlate that.

Thanks in advance for your help!

Doug

drewish’s picture

dougw, you should open a new issue

xamox’s picture

did you make sure to include the id3 library?

Anonymous’s picture

Thanks for the advice. I started a new thread.

We did install getID and it seems to be in the correct directory.

Early in the upload process, it grabs the meda-data, but something goes awry after that.

I'll watch the new thread and hope for a solution.

Thanks for your help!

Doug

sun’s picture

Trick in #8 worked for me, too.

Anonymous’s picture

Status: Fixed » Closed (fixed)
yched’s picture

Status: Closed (fixed) » Active

I'm sorry, drewish, I can't remember why you closed this - it seems the problem is still around (reported here http://drupal.org/node/85970 - marked as a dupe of this one)
I'm reopening this, please close it agaon if I missed something :-)

drewish’s picture

Category: bug » support

i'd closed it because people had found a fix and the bug is in getid3 not in the audio module.

sun’s picture

Can we add a hint to the installation instructions of README.TXT?

drewish’s picture

if you write up a concise paragraph i'd love to add it to the Audio module FAQ. i'll put a note in the readme file to check there.