How to convert wma files to mp3 at runtime in my website that builts by php, mysql

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pranoy
    New Member
    • Feb 2010
    • 2

    How to convert wma files to mp3 at runtime in my website that builts by php, mysql

    HI,

    I am also facing this problem. I have XAMPP runing on Windows system and i have php 5.0 installed and GD library too.

    I have got the ffmpeg_new.rar from a weblink (http://sourceforge.net/project/downl...e_mirror=jaist ) got from this thread. And i have also the same content in that folder.

    In common folder

    1) avcodec.dll
    2) avformat.dll

    In php5 folder

    1) php_ffmpeg_2005 0618_nogif.dll
    6) php_ffmpeg.dll

    i followed and copied the avcodec.dll and
    avformat.dll files to system32 folder.and i copied ffmpeg file into php\ext folder.Then i added tha extension = php_ffmpeg in php.ini file extension. And restarted XAMPP services.

    I also tried keeping this php code in a file under this folder : ../xampp/htdocs/myprojectdir/ffmpeg/test.php

    Code:
    $extension = "ffmpeg";
    $extension_soname = $extension . "." . PHP_SHLIB_SUFFIX;
    $extension_fullname = PHP_EXTENSION_DIR . "/" . $extension_soname;
    
    # // load extension
    if(!extension_loaded($extension)) {
    dl($extension_soname) or die("Can't load extension $extension_fullname\n");
    }

    When i run this page from the Browser i got this warning:

    Warning: dl() [function.dl]: Not supported in multithreaded Web servers - use extension=ffmpe g.dll in your php.ini in D:\xampp\htdocs \myband\ffmpeg\ ffmpeg.php on line 9
    Can't load extension C:\php5/ffmpeg.dll
    Any help/suggestion is greatly appreciated.

    Cheers,
    pranoy
    Last edited by Atli; Feb 18 '10, 08:55 AM. Reason: Added [code] and [quote] tags.
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    well, try what the error message suggests.

    Comment

    • Atli
      Recognized Expert Expert
      • Nov 2006
      • 5062

      #3
      Hey.

      You can't (shouldn't) use the dl() function on a web-server. It only works in CGI and CLI. - If you need to add modules, you should do it via the configuration.

      If a extension_loade d call indicates that your extension is not loaded, there is something wrong with the configuration. You can't fix that at run-time; it needs to be fixed in the php.ini file.

      Comment

      Working...