• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
$mp3config['encrypt_name'] = TRUE not encoding?

#21
[eluser]stevenazari[/eluser]
yep running apache Smile I just stuck up a .htaccess file and if it works I'll do a search for the httpd.conf file although I'm a lill stumped as to why it would let some people upload mp3s and not others?

#22
[eluser]stevenazari[/eluser]
just got a message from a user that it still wasn't uploading...

did I make the .htaccess file right?

all it had in the file was:

Code:
AddType audio/mpeg .mp3

what else could it be?

#23
[eluser]rogierb[/eluser]
Did you create a list of files in the temp dir on upload?
Like suggested, it might be the file gets uploaded but not processed for whatever reason.

First make sure that is not the case...

#24
[eluser]stevenazari[/eluser]
[quote author="rogierb" date="1255086685"]Did you create a list of files in the temp dir on upload?
Like suggested, it might be the file gets uploaded but not processed for whatever reason.

First make sure that is not the case...[/quote]

Not sure what you mean by a list of files on upload?

when I upload the file I don't get the oppertunity to see if it's there but I know the file is being moved to amazon s3 and then dropped from the server - think I'll remove the drop so I can check. then re-enable it to see if any of the failures end up on there. if they don't go on there it means file isnt uploading, if it is up on there, it means the file is not being renamed.

#25
[eluser]stevenazari[/eluser]
Ok I'm pretty sure it's not uploading.

The only unlink command is when the file is successfully uploaded to the Amazon S3

Code:
$filename = $bandtrackupload['file_name'];
$contents = file_get_contents($bandtrackupload['full_path']);

if ($filename)
   {
   print('success on filename if statement');
   if ($this->s3->putObject($filename, $contents, $this->config->item('audios3bucket'), 'public-read', $bandtrackupload['file_type']))
      {
      print('success on s3 upload!');
      $data = array(
        'band_id'   => $band_id,
        'title'     => $this->input->post('bandtracktitle'),
        'text'      => $this->input->post('bandtracktext'),
        'upload'    => $bandtrackupload,
        'hidden'    => '0'
        );
      $track_id = $this->tracks->create($data);
      unlink($bandtrackupload['full_path']);
      }
   else
       {
       print('Failed to do S3 upload - please inform the web master!');
       $data = array(
                      'band_id'   => $band_id,
                      'title'     => $this->input->post('bandtracktitle'),
            'text'      => $this->input->post('bandtracktext'),
            'upload'    => $bandtrackupload,
            'hidden'    => '1'
                    );
      $track_id = $this->tracks->create($data);
      }
   }

I commented out the unlink so I can see what files are being uploaded for now, but I haven't seen any files that were NOT encoded... which only suggests they didn't go up in the first place.

#26
[eluser]rogierb[/eluser]
Have you logged $this->upload->display_errors()? And $_FILES?

#27
[eluser]stevenazari[/eluser]
[quote author="rogierb" date="1255111131"]Have you logged $this->upload->display_errors()? And $_FILES?[/quote]

No, do I put that in the !is_file statement to output? not really sure how - I'm new to this area of code igniter...

after some testing I can't seem to see the files I uploaded... only when I comment out the amazon s3 if statement can I then see the files in the upload directory... so is this moving or copying the file?

**EDIT**

Ok I just added

Code:
if (!is_file($bandtrackupload['full_path']))
    {
        echo "An error has occured please inform the web master on [email protected] and send the below information:<br><br>";
    $this->upload->display_errors('<p>', '</p>');
    echo "<br><br>Bandtrackupload:<br>";
    print_r ($bandtrackupload);
        echo "<br><br>Date Uploaded: $date <br><br>";
    echo "Bandtrackfile:<br>";
    print_r ($bandtrackfile);
    die();
         }

will that do? Not sure what you mean by the $_FILE part

#28
[eluser]rogierb[/eluser]
As far as my knowledge of uploads go:

a: multipart form submits
b: the $_FILES array contains info on that file
c: The actual upload takes place and stores the upload in a tmp dir (php,ini tmp_upload_dir)
d: The file gets moved to the locations you have specified, I dont know what happens if the file cannot be moved, maybe it is removed. Maybe it is still in the tmp dir.

You check if the file exists after the upload. But does it get to the tmp folder?

#29
[eluser]stevenazari[/eluser]
just running a remote search through the server now and can't see any mp3s in the tmp folder indicated in the php.ini

Code:
file_uploads = On
upload_tmp_dir = /tmp
upload_max_filesize = 32M

doing a search through all the servers folders for any .mp3 extensions and not getting any returns in the admin area (where the tmp folder is located as well as other folders)

so I'm a little confused why the $bandtrackupload array shows

Code:
Bandtrackupload:
Array (
     [file_name] => millionaire.mp3
     [file_type] => audio/mp3
     [file_path] => /home/gq36staa/web/public/media/audio/
     [full_path] => /home/gq36staa/web/public/media/audio/millionaire.mp3
     [raw_name] => millionaire
     [orig_name] =>
     [file_ext] => .mp3
     [file_size] => 4356.42
     [is_image] =>
     [image_width] =>
     [image_height] =>
     [image_type] =>
     [image_size_str] => )

so all this data is taken from $_file while the file is being sent to the temp directory, php then moves the file to the folder.

I know I'm using an old version of code igniter, from august 2008, perhaps I should upgrade this? maybe that will solve a upload bug? but how do I find out which version I have? I didn't install codeigniter, a previous developer did.

**EDIT**
I can see the files I upload in the target directory before being sent to amazon, So I'm just waiting for some of the users with problems to upload and tell me... But when I checked the tmp folder, there was no audio files there. So they are either not being uploaded at all, or not getting to the target destination and being deleted for being in the tmp folder for to long? that possible? or would php leave it in the tmp folder?

#30
[eluser]rogierb[/eluser]
I think the tmp files are there as long a the script is running. To my knowledge they are deleted.
Read http://nl.php.net/features.file-upload for more info.

Directly after upload, before you check the bandtrackupload. Print out a list of all the files in the tmp dir.
Just to make sure the file get's uploaded


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.