Code Comments
Programming Forum and web based access to our favorite programming groups.Not sure if this is the right group for this but here goes anyway. 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
Post Follow-up to this messageIn article <1117980723.10681.0@sabbath.news.uk.clara.net>, "Greg Chapman" <gc@freeuk.com> wrote: > Not sure if this is the right group for this but here goes anyway. > > 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 s o > 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 y ou > 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 prope r, > 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 function s > 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 ca n > 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 functio ns > that have been disabled. We've passed this on to an engineer to investigat e > 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 m y > 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 executi ng > a program from within a PHP script. > > Kind Regards, > StreamlineNet > Streamline.Net - The home of good value web hosting With your current ISP's configuration, you are not able to call external programs like Sudoku.exe from a php program. Their configuration won't allow it. If they're unwilling to change their configuration to offer you shell_exec, exec, system, passthru, or popen functions, you have two options: (1) write a perl script which calls system('Sudoku.exe'). (2) find another ISP that offers services that better suit your needs (you may end up getting a dedicated Linux system that you'll have to configure and administer yourself) If you can't code in perl or it turns out they've disabled the system() function in perl, you really only have option (2) available to you. Good luck. -- DeeDee, don't press that button! DeeDee! NO! Dee...
Post Follow-up to this messageThanks Michael 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 > With your current ISP's configuration, you are not able to call external > programs like Sudoku.exe from a php program. Their configuration won't > allow it. If they're unwilling to change their configuration to offer > you shell_exec, exec, system, passthru, or popen functions, you have two > options: > > (1) write a perl script which calls system('Sudoku.exe'). > > (2) find another ISP that offers services that better suit your needs > (you may end up getting a dedicated Linux system that you'll have to > configure and administer yourself) > > If you can't code in perl or it turns out they've disabled the system() > function in perl, you really only have option (2) available to you. > Good luck. > > -- > DeeDee, don't press that button! DeeDee! NO! Dee... > > >
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.