Lost Password?


Go Back   CodeCall Programming Forum > Web Development Forum > PHP Forum

PHP Forum Use this forum to discuss all aspects of PHP Development. PHP is a server-side, cross-platform, HTML embedded scripting language that lets you create dynamic web pages.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-06-2008, 07:18 AM
kmughal89 kmughal89 is offline
Newbie
 
Join Date: Sep 2008
Posts: 2
Rep Power: 0
kmughal89 is on a distinguished road
Default Calling Audio Conversion Tool with PHP on Win 2003

I am working on a web site where I have this requirement to convert audio files into mp3s. The following audio formats are to be converted into mp3: .wav, .wma, .aac, .vox, .aif, .amr, .ogg, .aiff

I am using an audio converter called AudioCommander,Command-line Audio Converter (MP3, WMA, WAV, OGG, CD, AMR, AAC, AC3, 3GP, MOV, AVI) - Encoder, Decoder[/url]), calling this tool on command line in PHP, this is the code:

PHP Code:
<?php
    
function convert($commander)
   {
       
$app_path="$commander /f c:\source\ /usfp /op c:\source\ /fmt MP3 /mp3f 1 /mp3c 2 /mp3m 0 /mp3b 5";
       echo 
exec($app_path);
   }
   
$commander "C:\BBox_Converter\AudioCommander.exe";
   
convert($commander);
?>
Now this code works just great and fine on Win XP and Vista, but running the same script on Win 2003 server yields no result at all. The web server on Win 2003 is Apache 2.2. I have to make it work on Windows 2003 server with PHP 5.2 and Apache 2.2.....I believe the problem on Win 2003 is the way the tool is invoked/called to work, something's wrong with the command in PHP, What am I doing wrong here? Any help or guidance at all will be highly appreciated.

Thanks in advance.
Khawar

Last edited by Jaan; 09-06-2008 at 10:04 AM. Reason: Please use code tags when you're posting your codes..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 09-06-2008, 11:16 AM
morefood2001's Avatar   
morefood2001 morefood2001 is offline
Guru
 
Join Date: Jan 2008
Location: Western New York
Posts: 1,415
Last Blog:
VPS Hosting with Revie...
Rep Power: 16
morefood2001 is just really nicemorefood2001 is just really nicemorefood2001 is just really nicemorefood2001 is just really nice
Send a message via AIM to morefood2001 Send a message via MSN to morefood2001 Send a message via Yahoo to morefood2001 Send a message via Skype™ to morefood2001
Default Re: Calling Audio Conversion Tool with PHP on Win 2003

I'm thinking your problem may be with permissions. Have you tried invoking the same command on the command line as a normal user on your server? That will give you clues to whats wrong.

If it doesn't work as a normal user, you might consider adding apache's user to the power users group (I wouldn't elevate it to admin because of a big security risk).

Hopefully this will help you get started at troubleshooting your problem.
__________________
Phil Matuskiewicz
My Personal Website My Other Website
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 09-06-2008, 08:57 PM
kmughal89 kmughal89 is offline
Newbie
 
Join Date: Sep 2008
Posts: 2
Rep Power: 0
kmughal89 is on a distinguished road
Default Re: Calling Audio Conversion Tool with PHP on Win 2003

ok, the command runs on command prompt very nice as a normal user, all good....

I think u're right, and I might consider adding apache's user to the power users group. But how do I do that?

Help me here.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 09-07-2008, 05:30 PM
morefood2001's Avatar   
morefood2001 morefood2001 is offline
Guru
 
Join Date: Jan 2008
Location: Western New York
Posts: 1,415
Last Blog:
VPS Hosting with Revie...
Rep Power: 16
morefood2001 is just really nicemorefood2001 is just really nicemorefood2001 is just really nicemorefood2001 is just really nice
Send a message via AIM to morefood2001 Send a message via MSN to morefood2001 Send a message via Yahoo to morefood2001 Send a message via Skype™ to morefood2001
Default Re: Calling Audio Conversion Tool with PHP on Win 2003

sure.

Goto the local users and groups (or active directory if its installed). Find apache (it should be under users with administrator, guest, etc. right click apache, goto the member of tab and add the user to the group power users.

Since its running ok as a normal user, make sure apache is a normal user. Also give the apache user permissions to your executable (right click, goto properties, then goto the security tab and add it with read/execute permissions).

Hope this helps.
__________________
Phil Matuskiewicz
My Personal Website My Other Website
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP 5 and OOP Jordan PHP Tutorials 11 09-22-2008 02:58 AM
Help with audio format conversion knightspider00000 C and C++ 6 07-05-2008 01:25 PM
PHP 4 end of life announcement Jordan Programming News 4 08-30-2007 10:55 AM


All times are GMT -5. The time now is 05:48 AM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 97%

Ads