473,406 Members | 2,352 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

exec, passthru disabled so how to call C++ .exe file?

I am at my wit's end trying to get information out of Streamline.net's
support dept about my problem. They reply quickly enough, but seem to try
and give out the least possible amount of info each time. The transcript so
far is reproduced for your amusement below.

To summarise:

I've put up a Sudoku-solving program called Sudoku.exe. I want to call it in
a php script to solve a puzzle and output the solution. It works fine with
Apache/php on my own machine, but it seems Streamline.net disable exec,
passthru etc. They eventually say, cryptically: ' CGI executables are
supported, however this is very different from executing a program from
within a PHP script'. So how would I call my Sudoko.exe file?

Any help appreciated

Greg Chapman

The 'dialog':

My last question seems to have been 'fixed' before being answered, so I'll
have another go.
I'm trying to call an .exe file on the server but get an 'unable to fork'
error message. I have Apache/php installed locally and it works fine. Do you
have to turn on 'cmd.exe' permissions or something? Try it yourself at:
http://www.ramseyarts.co.uk/sudoku.shtml

Warning: passthru(): Unable to fork [Sudoku.exe (argument...)] in (.php
file...)
It's the same with exec() as well.
Regards
Greg Chapman
Hi Greg,

Thanks for your query.

We do not support passthru or exec functions.

Kind Regards,
StreamlineNet
Streamline.Net - The home of good value web hosting

So how would I call my Sudoku.exe program from a php script?
Hi Greg,

Thanks for your query.

Unfortunately we do not provide scripting help, we suggest searching on
google for scripting help sites.
Kind Regards,
StreamlineNet
Streamline.Net - The home of good value web hosting
I do not want 'scripting help', I just want to use some of the functions
that you offer as a host and which I have paid for.
As I have said what I am trying to do works perfectly on my machine, so it
must be a question of something you have to enable your end. What do you
mean you don't support passthru or exec? They are both standard php
commands.
Please read my questions properly and do me the courtesy of giving a proper,
non-automatic reply.

Greg Chapman
Hi Greg,

Thanks for your query.

You asked "how would I call my Sudoku.exe program from a php script?"
clearly this is asking us how you can use scripting?

Certain functions are disabled in PHP for security reasons.

Kind Regards,
StreamlineNet
Streamline.Net - The home of good value web hosting
Which functions are 'disabled in PHP for security reasons' ?
Hi Greg,

Thanks for your query.

You can find this out with the inbuilt php function phpinfo()

Kind Regards,
StreamlineNet
Streamline.Net - The home of good value web hosting
Could you tell me where on the page that phpinfo() produces these functions
are listed? For example, passthru() does not appear to be on the page.

Hi Greg,

Thanks for your query.

search for "disable_functions" on that page.

Kind Regards,
StreamlineNet
Streamline.Net - The home of good value web hosting

disable_functions lists 'no value'. So again, could you tell me where I can
find the list of standard php functions which you have disabled?

Hi Greg,

Thanks for your query.

Please can you provide a link to your phpinfo file so we can investigate
this further.

Kind Regards,
StreamlineNet
Streamline.Net - The home of good value web hosting
The link is:
http://www.ramseyarts.co.uk/info.php

Thanks for your query.

We had previously checked this on a linux server, which showed the functions
that have been disabled. We've passed this on to an engineer to investigate
further.

For your information the following are disabled:

shell_exec,exec,system,passthru,popen

Kind Regards,
StreamlineNet
Streamline.Net - The home of good value web hosting

Your knowledge base says:
Q. Are CGI (Common Gateway Interface) executables supported?

A. Yes these are supported on either the Windows and Linux servers

But you are telling me that the only php functions which can call my
executable are disabled. Will you clarify once and for all if I can call my
exe file or not. I AM NOT ASKING FOR SCRIPTING HELP, I have books about
that. I just want to know if I can do ON YOUR SERVER what you say I can do,
and if not why not.

Hi Greg,

Thanks for your query.

CGI executables are supported, however this is very different from executing
a program from within a PHP script.

Kind Regards,
StreamlineNet
Streamline.Net - The home of good value web hosting



Jul 17 '05 #1
2 5255
>I am at my wit's end trying to get information out of Streamline.net's
support dept about my problem. They reply quickly enough, but seem to try
and give out the least possible amount of info each time. The transcript so
far is reproduced for your amusement below.


It's quite apparent that, as a matter of policy, they don't allow
execution of .exe files from PHP, and if you find a way to do it,
they'll likely do their best to close it, and/or close your account.

As to why this is more dangerous than allowing execution of a CGI
executable, I don't know, and if you convince them the distinction
is stupid, they'll disallow execution of CGI executables.

Think about making the executable a CGI, and invoking it from PHP
with fopen() of a "remote" URL that refers to the host you're on.
(Chances are this is turned off also.)

Gordon L. Burditt
Jul 17 '05 #2
Thanks Gordon
Part of the problem was I got into php before doing any basic cgi stuff.
I wish support at Streamline were half as helpful.
I'm now calling my program outside of php and it works fine:
http://www.ramseyarts.co.uk/sudoku.shtml

(Actually it's a crap program and only works on easy puzzles...)
Greg Chapman
"Gordon Burditt" <go***********@burditt.org> wrote in message
news:11*************@corp.supernews.com...
I am at my wit's end trying to get information out of Streamline.net's
support dept about my problem. They reply quickly enough, but seem to try
and give out the least possible amount of info each time. The transcript
so
far is reproduced for your amusement below.


It's quite apparent that, as a matter of policy, they don't allow
execution of .exe files from PHP, and if you find a way to do it,
they'll likely do their best to close it, and/or close your account.

As to why this is more dangerous than allowing execution of a CGI
executable, I don't know, and if you convince them the distinction
is stupid, they'll disallow execution of CGI executables.

Think about making the executable a CGI, and invoking it from PHP
with fopen() of a "remote" URL that refers to the host you're on.
(Chances are this is turned off also.)

Gordon L. Burditt

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Rafal 'Raf256' Maj | last post by:
Hi, Warning: passthru() has been disabled for security reasons in ... how can I change my php.ini file (php4/apache/winxp server) to enable this function? How can I best work around if I can't...
3
by: Jerry | last post by:
I've found a problem with exec, passthru, shell_exec & system. I'm trying to run the following exec("sort -r -n -k2,2 r1.txt > r2.txt") with r1.txt being a numeric file. The file looks like...
17
by: Piotr Wolski | last post by:
can anyone help me: using exec() function in PHP i can execute linux programms like ls,who and other, however i can not execute C programms and i really don't know why. Please help me, Peter
2
by: rickcasey | last post by:
I cannnot seem to get exec() or passthru() to execute a perl script; here's the code snippet: if ($debug) { echo "username1 = ".$username1."<br>"; echo "dbname = ".$dbname."<br>"; echo...
4
by: Tom | last post by:
I have a script which allows a user to upload a file. The script does some filename editing, mimetype checking, etc., and it's then supposed to send the file to a remote server, without any...
1
by: rickcasey | last post by:
I wonder if anyone has experienced something like this, as it seems truly bizarre and is causing me to tear out my hair (what little there is left of it).... The exec() function just suddenly...
9
by: melmack3 | last post by:
Hi I have a big problem with shell commands execution via PHP. I have written a very short PHP script ilustrating the problem: <?php for($i=0;$i<1000;$i++) { exec("test.bat");
7
by: JahMic | last post by:
I'm having a problem with exec on my hosting server. Unfortunately, the hosting support seems to be anything but helpful. The following works fine on my localhost: <?php $MaskData =...
3
by: dinek | last post by:
I am trying to call a Matlab file from PHP. I beleive that using exec() I can call the matlab file. But this does not work I tried exec('matlab -r sample'); I also tried the same with the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
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,...
0
tracyyun
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...
0
agi2029
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.