hi,
i've written a c++ program that converts one file type to another via
two arguments (the input and output filenames).
i want to execute this on my server, using something like
exec("myprogram .exe $arg1 $arg2");
but then I realized my server is linux, and my program was compiled for
windows.
so I uploaded the .cpp instead, and now i'm trying to compile it doing
something like
exec("gccp hello.cpp");
which returns an exit code 127... not really sure what that means.
I'm guessing I probably don't have permission to be creating files on
my server...is there anyway I can change this permissions or anything?
(or what group should I be posting this in??) 2 1844
On 10 Oct 2006 14:43:41 -0700, "Mark" <mn*******@gmai l.comwrote:
>i've written a c++ program that converts one file type to another via two arguments (the input and output filenames).
i want to execute this on my server, using something like
exec("myprogra m.exe $arg1 $arg2");
but then I realized my server is linux, and my program was compiled for windows.
so I uploaded the .cpp instead, and now i'm trying to compile it doing something like
exec("gccp hello.cpp");
which returns an exit code 127... not really sure what that means.
What is gccp? Did you mean gcc (or g++)? 127 is (usually) "command not found".
There's more options you'll need to pass as well - at least "-o" to specify
the name of the final executable (else it'll come out as "a.out" for historical
reasons).
>I'm guessing I probably don't have permission to be creating files on my server...is there anyway I can change this permissions or anything?
Trying to compile code by executing shell commands through PHP is going to be
a total nightmare. It can be done but it's an incredibly awkward way to work.
Do you not have a shell login to the server, so you can run commands normally?
>(or what group should I be posting this in??)
A general Linux group most likely - comp.os.linux.m isc ?
--
Andy Hassall :: an**@andyh.co.u k :: http://www.andyh.co.uk http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Andy Hassall wrote:
On 10 Oct 2006 14:43:41 -0700, "Mark" <mn*******@gmai l.comwrote:
i've written a c++ program that converts one file type to another via
two arguments (the input and output filenames).
i want to execute this on my server, using something like
exec("myprogram .exe $arg1 $arg2");
but then I realized my server is linux, and my program was compiled for
windows.
so I uploaded the .cpp instead, and now i'm trying to compile it doing
something like
exec("gccp hello.cpp");
which returns an exit code 127... not really sure what that means.
What is gccp? Did you mean gcc (or g++)? 127 is (usually) "command not found".
There's more options you'll need to pass as well - at least "-o" to specify
the name of the final executable (else it'll come out as "a.out" for historical
reasons).
I'm guessing I probably don't have permission to be creating files on
my server...is there anyway I can change this permissions or anything?
Trying to compile code by executing shell commands through PHP is going to be
a total nightmare. It can be done but it's an incredibly awkward way to work.
Do you not have a shell login to the server, so you can run commands normally?
(or what group should I be posting this in??)
A general Linux group most likely - comp.os.linux.m isc ?
--
Andy Hassall :: an**@andyh.co.u k :: http://www.andyh.co.uk http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
err.. found gccp on some linux tutorial site. it's supposed to create
"a.out"
it seems to return 1 if the command doesn't exist. i'll go snoop around
the linux group you suggested. thanks. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Brian Burgess |
last post by:
Hi all,
Anyone know of any special issues with Server.Execute?
Specifically for me it simply is not executing ... the server does not
transfer to the page specified. The calling ASP just continues as if
it had gone to the page and returned ... with no error code.
This ASP had been working actually. I made a change to a <FORM>
element on the calling page, then the Execute call stopped working.
|
by: Morten Frederiksen |
last post by:
Hi
I am trying to execute a ping command from ASP, and I am really not getting
anywhere. I wrote the following code based on what I found on the subject on
the Internet:
Dim sh, result
Set sh = CreateObject("WScript.Shell")
cmd = "ping 192.168.1.5 -n 1 -w 200"
result = sh.Run(cmd, 1, true)
|
by: Phil |
last post by:
Hi,
I have my create statments for tables, procedures, views, etc in
individual Transact-SQL script files (.sql).
I wnat to write another script file that executes these scripts in the
correct order to create the database.
What is the syntax for executing script files from Transact-SQL?
|
by: chris.dunigan |
last post by:
I'm looking for an example of how to execute an existing DTS package
from an
ASP (VB)script and would appreciate any and all response. I don't
even
know if it's possible
Thanks
- Chuck Gatto
Dan Guzman Apr 27 2000, 12:00 am show options
|
by: Chakkaradeep |
last post by:
Hi all,
i have written a Service,now i want to execute another application (for
eg;calc.exe) in the service....how will i perform it??...
i tried using this....
/**************Executing a Process code starts here**************/
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents=false;
| |
by: Cédric Rossé |
last post by:
Hello,
I have a web application (asp.net, c#) and I'd like to execute an external
program (.exe or .cmd) in the server side (which runs the iis server) when
the client press a simple button on a web page.
I'm using impersonalisation and the class "Process", but I can't execute my
external program...
The process is created (I try to execute notepad.exe) and I can see it in
the windows task manager but then nothing appends and my...
|
by: robin1983 |
last post by:
Hi, good morning everyone, i have a file called attendence.php The problem is that some part of code is executing properly and half of the code is not and i dont get any warning or error message. For more information i m giving the whole code below. please give me the solution, the code is executing upto line no 95 (echo $halfday;) and after this line not a single code is executing. i am not able to get solution. So plaease help me in solving...
|
by: mdshafi01 |
last post by:
Hello,
My problem is i want to execute many perl programs but i do do not want to wait for for any of these programs. Let these programs execute independently.
i have totally 10 perl scripts. I will start these scrpt by using system("file.pl").....
these should not wait for other to complete . Just i should execute as usuall . like parally i want to start the scripts.
these scripts should not wait for ther scripts..
|
by: wstach |
last post by:
Hi,
I'm using Windows XP, IIS & ASP to develop a web service that executes
several programs (command line .exe files) on a server, shows next
webpage with info on progress in execution, and presents the results
page. Basically, on the first webpage (html) user chooses which
programs are to be executed, and then an asp script runs the programs
on the server.
The problem is that I don't know how to run these programs in
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |