Jump to content

Recommended Posts

This has literally been driving me crazy for 4 hours.

 

I am on a Linux Server and want to access the command prompt.

 

<?php

shell_exec('home/accountname/MP4Box.exe -hint filename.3gp');

?>

 

Surely this should work? But it doesn't.

 

How do I access the command prompt on a Linux Server?

 

Or, how do I see any error message etc. that this is reporting - just shows blank screen.

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/118735-how-do-i-access-command-line-from-php/
Share on other sites

Yeah, can you even run that command from the shell normally?  What happens when you do?

 

Just so I am not a complete idiot:

 

I access it via the "Command prompt" (I asume this is "Shell")

 

In Windows XP using the Command Prompt it works perfectly.

 

There is no support for Vista.

 

My web host says that it wont work on Linux if it is Windows based - but I am sure the program says it does work on Linux.

 

I am not some lazy arse who just wants you lot to do all the work - I have honestly tried everything. Although I suppose this is my first day at even looking at the command prompt - but I know an "ok" amount of php.

 

The program is a great tool - may be of use to others if not know already.

http://gpac.sourceforge.net/doc_mp4box.php

http://www.softpedia.com/progDownload/MP4Box-Download-80065.html

 

Somebody else said I may have permission problem? I wouldn't know what to do with this either !!??

 

 

Does the path home/accountname/ even exist?  I highly doubt that it exists like that.  And yeah, .exe will not run on Linux.  Maybe there's a separate download for Linux?  And this has no GUI, right?  It's just a command line tool?  (Because PHP won't open GUI programs).

I am a linux user and to make sure i wasn't mistaken i tried to run that .exe file.

It will not run in linux unless you use some kind of windows emulator.

how ever ......here is I think your mistake there is both a zip file and a .tar.gz  on the sourceforge link

 

http://gpac.sourceforge.net/home_download.php

 

you need the tar.gz file which does not contain a exe file but the stuff you would expect for a linux app.

you need that stuff not the  MP4Box.exe

I am a linux user and to make sure i wasn't mistaken i tried to run that .exe file.

It will not run in linux unless you use some kind of windows emulator.

how ever ......here is I think your mistake there is both a zip file and a .tar.gz  on the sourceforge link

 

http://gpac.sourceforge.net/home_download.php

 

you need the tar.gz file which does not contain a exe file but the stuff you would expect for a linux app.

you need that stuff not the  MP4Box.exe

 

Thanks for looking into this.

 

However, I cant see anything relating to mp4box in the download link you gave.

 

My download was called MP4Box, not GPAC

 

Thanks anyway.

I think the problem is - I haven't got a clue how to install it.

 

I know what to type in directly to shell, and I know what to type in php, but without it being installed I suppose it aint gonna work (!!).

 

I use hostmonster.com (shared server) and they allow you to install certain things - but not root access.

 

I also have manual shell access via a terminal in a control panel when I log in on the hostmonster site.

 

Where do I install it? I have  4 ".c" files I think it is.

 

They dont really help enough.

You need to compile it.  I'll assume it has a Makefile, otherwise you'll need to write one up yourself (not fun if you don't know what you're doing).

 

./configure

make

make install

 

That's the general "install" sequence for MOST programs these days on Linux that require you to compile.  If it doesn't have a configure tool or a Makefile....>_> You'll need to research them and write it yourself.

no change to run .exe files on linux directly ^_^ even in you have wine

you need to specify another arguments,but i doubt it will work.

if you did buy the hosting (not home machine) than you can forget exes ^_^

what are you trying to do actually? geting file info or play it?

After many hours doing this - my research is complete - I think I now know what I am doing.

 

Problem is, I have now found that my web host "hostmonster.com" dont allow me to use MP4Box because it is too processor intensive.

 

Thanks Hostmonster.

 

---

 

Thanks for all the help with this.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.