f



Keeping window open after running php file from the command line ?

Hi all,

I was getting a 500 error and someone adviced me to run the php file 
from the command line to check what errors that would come up with.

Great idea which I'd like to use, but when I use the Windows "run" box 
to do this, I see a window open and close so quickly that there's no way 
for me to read what's come up.

How can I force the window to stay open after the program has finished ?

Just in case it's needed, I run the tests on a Win XP machine with Apache.

Thanks in advance,
Juliette

0
jrf
11/13/2004 2:41:22 AM
comp.lang.php 32646 articles. 0 followers. Post Follow

8 Replies
1133 Views

Similar Articles

[PageSpeed] 1

That's what the "DOS" /K switch is for.

-- 

"jrf[no]" <"jrf[no]"@[spam]jokeaday.net> wrote in message
news:419573ea$0$23087$ee9da40f@news.wanadoo.nl...
> Hi all,
>
> I was getting a 500 error and someone adviced me to run the php file
> from the command line to check what errors that would come up with.
>
> Great idea which I'd like to use, but when I use the Windows "run" box
> to do this, I see a window open and close so quickly that there's no way
> for me to read what's come up.
>
> How can I force the window to stay open after the program has finished ?
>
> Just in case it's needed, I run the tests on a Win XP machine with Apache.
>
> Thanks in advance,
> Juliette
>


0
jebhunter (8)
11/13/2004 3:05:27 AM
Jeb Hunter wrote:

> That's what the "DOS" /K switch is for.
> 

Hi Jeb,

Thanks for your quick reply.

Just wondering how to use it...

If I enter the following in the run box, the window still closes:
C:\apache\php\php.exe "I:\_Website\index.php?id=testing" /K

What am I doing wrong ?

Thx again,
Juliette
0
jrf
11/13/2004 3:12:42 AM
jrf[no] <"jrf[no]"@[spam]jokeaday.net> wrote:
> If I enter the following in the run box, the window still closes:
> C:\apache\php\php.exe "I:\_Website\index.php?id=testing" /K
> 
> What am I doing wrong ?

Start a command shell first (cmd IIRC) or take a look at the start
command.
0
spam206 (250)
11/13/2004 3:31:37 AM
Daniel Tryba wrote:

> jrf[no] <"jrf[no]"@[spam]jokeaday.net> wrote:
> 
>>If I enter the following in the run box, the window still closes:
>>C:\apache\php\php.exe "I:\_Website\index.php?id=testing" /K
>>
>>What am I doing wrong ?
> 
> 
> Start a command shell first (cmd IIRC) or take a look at the start
> command.


Hmm... I guess I'm too much of a newbie at running php through the 
command line to understand what you mean...

Could you give me some examples maybe ? or point me to some webpages 
with more information on running php through the command line on windows ?
I looked at the php manual but the information there doesn't seem to 
answer my question.

Thx, Juliette
0
jrf
11/13/2004 3:49:38 AM
"jrf[no]" wrote:
> > Start a command shell first (cmd IIRC) or take a look at the start
> > command.
> 
> Hmm... I guess I'm too much of a newbie at running php through the
> command line to understand what you mean...

In the run box you just have to enter "cmd".

A command window will open and there you enter

C:\apache\php\php.exe "I:\_Website\index.php?id=testing"

The window will stay open until you manually close it.
0
11/13/2004 5:45:37 AM
Anonymous wrote:

> "jrf[no]" wrote:
> 
>>>Start a command shell first (cmd IIRC) or take a look at the start
>>>command.
>>
>>Hmm... I guess I'm too much of a newbie at running php through the
>>command line to understand what you mean...
> 
> 
> In the run box you just have to enter "cmd".
> 
> A command window will open and there you enter
> 
> C:\apache\php\php.exe "I:\_Website\index.php?id=testing"
> 
> The window will stay open until you manually close it.


Ok, thanks for the advice.

Question remains then: why don't I see anything when I've done that, no 
messages, nothing but a new prompt....

I entered something that should give a 500 and so should throw some php 
errors...

Help very welcome....

Thx, Juliette
0
jrf
11/13/2004 2:06:01 PM
jrf[no] <"jrf[no]"@[spam]jokeaday.net> wrote:
> Question remains then: why don't I see anything when I've done that, no 
> messages, nothing but a new prompt....
> 
> I entered something that should give a 500 and so should throw some php 
> errors...

This is absolutely not necessary. PHP can do a silent fail.

So you get get no output whatsoever running the phpscript from the
commandline? Next step would be to check the returnvalue from php.exe (I
have no idea where that is stored in win32) and run the script in a
debugger. But since you had problems opening a commandline I don't think
you are ready for this level of programming :)



0
spam206 (250)
11/13/2004 2:27:33 PM
"jrf[no]" <jrf[no]@[spam]jokeaday.net> wrote:
> How can I force the window to stay open after the program has finished ?

Sending output to STDERR should do the trick...
-- 
Simon Stienen <http://dangerouscat.net> <http://slashlife.de>
�What you do in this world is a matter of no consequence,
 The question is, what can you make people believe that you have done.�
-- Sherlock Holmes in "A Study in Scarlet" by Sir Arthur Conan Doyle
0
11/26/2004 1:47:40 AM
Reply:

Similar Artilces:

Failed opening required 'PEAR.php' (include_path='F:\www\include') in F:\Program Files\PHP\PEAR\Text\CAPTCHA.php on line 22
Hi, Guys=EF=BC=8Cwhen I run my site ,I got some errors: Warning: require_once(PEAR.php) [function.require-once]: failed to open stream: No such file or directory in F:\Program Files\PHP\PEAR \Text\CAPTCHA.php on line 22 Fatal error: require_once() [function.require]: Failed opening required 'PEAR.php' (include_path=3D'F:\www\include') in F:\Program Files \PHP\PEAR\Text\CAPTCHA.php on line 22 It appears that it cann't find the pear.php ,but i checked my dir,and this file was there,and also I have my php.ini file checked,the include_path=3Dinclude_path=3D".;F:\Program Files\PHP\pear;F:\www \include" ,it looks all right,was there anything I have missed in the config file?Or something wrong ? Wish somebody can help me out. Thanks, Mikay >Warning: require_once(PEAR.php) [function.require-once]: failed to >open stream: No such file or directory in F:\Program Files\PHP\PEAR >\Text\CAPTCHA.php on line 22 >Fatal error: require_once() [function.require]: Failed opening >required 'PEAR.php' (include_path='F:\www\include') in F:\Program Files >\PHP\PEAR\Text\CAPTCHA.php on line 22 So where is the pear.php file? >It appears that it cann't find the pear.php ,but i checked my dir,and >this file was there,and also I have my php.ini file checked,the >include_path=include_path=".;F:\Program Files\PHP\pear;F:\www >\include" ,it looks all right,was there anything I have missed in the >config...

How to run a .php file without having the window opening up
Hi, Is it possible to run a .php file without having the window opening up? (I am automatically submitting a form to a .php page, but don't want that page's empty window to pop up). Thanks. I noticed that Message-ID: <283297b2.0408031531.157256cf@posting.google.com> from Copperwire contained the following: >Is it possible to run a .php file without having the window opening >up? (I am automatically submitting a form to a .php page, but don't >want that page's empty window to pop up). There will be no html output, just use header() to redirect back. Alternatively, put the code that does the stuff in the same page. -- Geoff Berrow (put thecat out to email) It's only Usenet, no one dies. My opinions, not the committee's, mine. Simple RFDs http://www.ckdog.co.uk/rfdmaker/ "Copperwire" <hennier@telkomsa.net> wrote in message news:283297b2.0408031531.157256cf@posting.google.com... > Hi, > Is it possible to run a .php file without having the window opening > up? (I am automatically submitting a form to a .php page, but don't > want that page's empty window to pop up). > > Thanks. header("HTTP/1.0 204 No Content"); Thanks for your help, Geoff. ...

Open .php file with PHP Designer 2007 by clicking the file in XP
In windows XP, I want to be able to click on a .php file and have it opened in PHP Designer 2007, Or right-click on it and have an "edit" menu option presented to me. I know how to tweak the registry to do this in general, but what would the command line look like in this specific case ? PHP Designer does not do this automatically. It is as if the program does not allow commandline options. It only opens with the last file used or a menu of recently opened files. ...

PHP only runs from command line
Hi there, I know very little about PHP, but I was just curious to know why exactly would some PHP code run fine from the command line but not from the browser? I'm just curious. I was working with someone else's PHP code that supposedly created MySQL tables in a database and for some reason it just wouldn't create the tables at all (no specific error message). Someone suggested I run from the command line and when I did, it worked... Any help is truly appreciated. thanks CoralineSage CoralineSage wrote: > Hi there, I know very little about PHP, but I was just curious to kno...

cron jobs in PHP admin to run a PHP file
I want to run a php script every day. The page goes to a directory and parses a file and adds data to the database. Where it says "command" in cron jobs I don't know what it is looking for? Can I put the name of my php file? This is what I have: Minute Hour Day Month Weekday Command 1 8 1-7 1-31 * myPage.php The reason I am asking is I don't have a clue what PHPadmin wants in the command box. All I want to do is run the php script. Thanks, janis JRough wrote: >I want to run a php script every day. The page goes to a directory > and > parses a file and adds data to the database. Where it says "command" > in cron jobs I don't know what it is looking for? Can I put the name > of my php file? > > This is what I have: > > Minute Hour Day Month Weekday Command > 1 8 1-7 1-31 > * myPage.php > > The reason I am asking is I don't have a clue what PHPadmin wants in > the command box. All I want to do is run the php script. > > Thanks, > janis usually you would put the path to the php interpreter followed by any required options followed by the script file name On May 27, 12:17 pm, JRough <jlro...@yahoo.com> wrote: > I want to run a php script every day. The page goes to a directory > and > parses a file and add...

PHP is looking for php.ini file in c:\windows
As the installation txt suggests, I have left my php.ini file inside the c:\php directory... but running phpinfo() shows that my php.ini file is in c:\windows as shown below. Configuration File (php.ini path) - C:\WINDOWS Well there is no php.ini file in my windows directory, so I'm not sure where it's getting it's configuration settings from... unless I suppose they're built into the executable somewhere if no php.ini file is found. My questions is - why php is not locating my php.ini file that is located in the c:\php directory? I'd rather not move it to the windows directory so I can keep everything nice and tidy like the installation file suggests. BTW - This is a brand new laptop I'm installing PHP on so there is (I just double checked) no PHP.ini file in the c:\windows directory. The path is set to include c:\php... and opening a DOS prompt and typing "php" is a recognizable command regardless of my current directory. This is the 2nd machine I have had this same problem with. I'm still confused... Any thoughts? thanks ~john wrote: > As the installation txt suggests, I have left my php.ini file inside > the c:\php directory... but running phpinfo() shows that my php.ini > file is in c:\windows as shown below. > > Configuration File (php.ini path) - C:\WINDOWS > > Well there is no php.ini file in my windows directory, so I'm not sure > where it's getting it's configuration settings from... ...

newbie: how to run php from command line?
I need to test a script and want to do so on a Linux box (logged in via SSH from another machine). I tried creating a test script (called "test.php") like this: #!/usr/bin/php <?php print "test"; ?> and tried running this from the command line like this: ../test.php but nothing happens. I also tried this: ../test > test.txt and the text in test.txt is this: X-Powered-By: PHP/4.2.2 Content-type: text/html Why is "test" not appearing in the test.txt file? How do I get "test" to appear on my screen, rather than having to use test.txt? Do I have to redirect STDOUT? How do I do this? Thanks in advance. On Tue, 19 Sep 2006 12:27:19 -0700, "deko" <deko@nospam.com> wrote: >I need to test a script and want to do so on a Linux box (logged in via SSH from >another machine). > >I tried creating a test script (called "test.php") like this: > >#!/usr/bin/php ><?php > print "test"; >?> > >and tried running this from the command line like this: > >./test.php > >but nothing happens. > >I also tried this: > >./test > test.txt > >and the text in test.txt is this: > >X-Powered-By: PHP/4.2.2 >Content-type: text/html But you said your script was called "test.php", not "test"? WHat did you actually do? What files did you actually create? >Why is "test" not appearing in the test....

mysql 1054 error only occurs when running query via PHP script, but the same query is okay when running from command line.
Hello, I've been stuck on this problem and I don't know what the cause is. I have a table with the following format (see below). When I run a query via PHP script, I keep getting error# 1054. INSERT INTO uut_build (`id`, `uut_s_n`, `pn_260`, `rev_260`, `date_260`, `pn_700`, `rev_700`, `date_700`, `pn_800`, `rev_800`, `date_800`) VALUES ('02daa9de-d414-43d2-b6b3-b8c1a6551f8b', 'peter', '26009123-02', '01', '2009-07-28', '', '', '0000-00-00', '', '', '0000-00-00') MySQL Error: 1054 (Unknown column 'pn_260' in 'field list') However, when I past the exact query from the mysql command line, it works every time. I'm very baffled. Appreciate the advices in advance. -peter +----------+--------------+------+-----+------------+-------+ | Field | Type | Null | Key | Default | Extra | +----------+--------------+------+-----+------------+-------+ | id | varchar(255) | | PRI | | | | uut_s_n | varchar(40) | | UNI | | | | pn_260 | varchar(15) | | | | | | rev_260 | char(2) | | | | | | date_260 | date | YES | | 0000-00-00 | | | pn_700 | varchar(15) | | | | | | rev_700 | char(2) | | | | | | date_700 | date | | | 0000-00-00 | | | pn_800 | varch...

PHP Runs In WinXP Command Window But Not In Browser
I am using Windows XP have installed WAMP and PHP as outlined here http://www.wampserver.com/en/ and have set my search path so that I need only type php -f PHPExamples.php and the PHP code runs fine. However, I have not managed to get it to run in my FireFox/3.5.9 browser. When I make a simple file with the following contents <html> <body> <?php $txt1="Hello World!"; $txt2="What a nice day!"; echo $txt1 . " " . $txt2 . " " . strlen("Hello world!") . " " . strpos("Hello world!","world"); ?> </body> </html> name it Examples.php and call it with a button thus <a href="Examples.php">PHP</a> I just get a blank page. I would be grateful if someone could tell me what I am doing wrong. Thanks, Peter. On 03-04-2011 13:54, Peter Lauren wrote: > I am using Windows XP have installed WAMP and PHP as outlined here > http://www.wampserver.com/en/ > and have set my search path so that I need only type > php -f PHPExamples.php > and the PHP code runs fine. However, I have not managed to get it to > run in my FireFox/3.5.9 browser. When I make a simple file with the > following contents > <html> > <body> > > <?php > $txt1="Hello World!"; > $txt2="What a nice day!"; > > echo $txt1 . " " . $txt2 . " " . strlen("Hello world!") . " " . >...

[windows] PHP.GTK and popuped command line
i compile php.gtk file with roadsend php compiler. Is here possiblity to have windows program without starting command line window? the_foe wrote: > i compile php.gtk file with roadsend php compiler. Is here possiblity > to have windows program without starting command line window? > The DOS box can be suppressed by calling the php-win executable: PHP4.x\php-win script.php JW ...

PHP does not parse .PHP files
I have this problem with PHP that someone might be able to help. With CLI, I am able to execute my .php files. For example, if I type "php phpinfo.php" , this works fine on my system. If I put the phpinfo.php file is in /var/www/html and I try to access it through the browser, I get the content of the file and not the execution of the file. Instead of display the info of PHP, I got the text of the file as: <?php phpinfo(); ?> Why? Thanks Phong Ho wrote: >I have this problem with PHP that someone might be able to help. > >With CLI, I am able to execute my .php files. For example, if I type >"php phpinfo.php" , this works fine on my system. > >If I put the phpinfo.php file is in /var/www/html and I try to access >it through the browser, I get the content of the file and not the >execution of the file. Instead of display the info of PHP, I got the >text of the file as: > ><?php > phpinfo(); >?> > > >Why? >Thanks Do you have a webserver such as Apache running on the machine where you expect this to happen? Because it's the webserver, not the browser, that needs to know about php. The browser only does html. Margaret -- (To mail me, please change .not.invalid to .net, first. Apologies for the inconvenience.) "Phong Ho" wrote: > I have this problem with PHP that someone might be able to help. > > With CLI, I am able to execute my .php files. For exam...

multiple files in command line arguments or adding command line arguments to a running application
Hi, &nbsp; I want to be able to open more than one data file in my stand-alone labview application. I can open one file by using cmdarg variable just fine. I want to be able to either a) have multiple files in the cmdarg variable (I can parse them if they are appended into one string, but now windows is just giving me one file that i clicked even though I may have 3 of them selected in explorer) or b) add files one at a&nbsp;time by clicking them, but I want these files to be going to the same labview application (to be appended to the cmdarg?), not starting a new copy of the Labview application every time. &nbsp; I am not 100% that these things are not Windows problems, but there should be something that my application can do to change the way things work out. Thanks! &nbsp; Egor ...

Running a Unix Command-Line App via PHP?
I'm developing a web site in PHP for an Apache server. I have a particular stand-alone application that takes a text file as input, and produces a text-file as output. It's usually run from the Unix command line. I'd like my PHP code to provide the input text file, run the stand-alone application, and then read the output text file and reformat it for display on the site. Is there a way for my PHP app, to cause this Unix command-line application to run? Thanks in advance to all for any info. In our last episode, <vikr-1ED27C.01253918092007@earthlink.vsrv-sjc.supernews.net>, the lovely and talented Vik Rubenfeld broadcast on comp.lang.php: > I'm developing a web site in PHP for an Apache server. > I have a particular stand-alone application that takes a text file as > input, and produces a text-file as output. It's usually run from the > Unix command line. I'd like my PHP code to provide the input text file, > run the stand-alone application, and then read the output text file and > reformat it for display on the site. > Is there a way for my PHP app, to cause this Unix command-line > application to run? > Thanks in advance to all for any info. see the system() function in the manual. If your application can write to STDOUT instead of writing to an output file, you can use the backtick operator (see execution operators in chapter 15). -- Lars Eighner <http://larseighner.com/> &l...

Can PHP run from command line render HTML?
I am reading that a PHP script can be run from a command line ( vs on the web server via a browser ). Can such a script render HTML? The idea being that the PHP script would startup a browser session when the script it is running contains HTML. I am looking to code desktop GUI apps in Linux in the same language and way I would a web application. I am new to Linux and researching what language and whatever to focus on. Just as a learning device I would like to write some GUI apps to be used for system management. thanks, -Steve StephenRichter@gmail.com writes: > I am reading that a ...

How to run Mathematica nb file in command line in windows?
How to run Mathematica nb file in command line in windows? For example, you can autorun a file.nb after double click a .bat file in windows I can not handle it well. Thanks On Sep 19, 2:38 am, timedcy <time...@gmail.com> wrote: > How to run Mathematica nb file in command line in windows? > For example, you can autorun a file.nb after double click a .bat file > in windows > I can not handle it well. > Thanks "C:\Program Files\Wolfram Research\Mathematica\7.0\Mathematica.exe" G: \data\birthday.nb "C" would be the drive where your programs are stored, it might be different if you have Mathematica installed somewhere other than its default installation. You need the quotes because of the spaces in the pathing to the executable file. G:\data\birthday.nb is the path and file name you want the executable to open. If this is not clear please contact me directly and I can explain in greater detail. Steven Shippee Olympia, Washington On 20 Sep, 10:41, shippee <slship...@gmail.com> wrote: > On Sep 19, 2:38 am, timedcy <time...@gmail.com> wrote: > > > How to run Mathematica nb file in command line in windows? > > For example, you can autorun a file.nb after double click a .bat file > > in windows > > I can not handle it well. > > Thanks > > "C:\Program Files\Wolfram Research\Mathematica\7.0\Mathematica.exe" G: > \data\birthday.nb &...

Keyboard input using command line PHP under Windows
I can't get any of the various examples of keyboard input to work using command line PHP. I have Windows XP Pro SP 2 and PHP 5.1.6 (cli) (built: Aug 23 2006 16:35:53). I can't find any info about why it doesn't work, or a way that does work. Any suggestions? examples of attempted variations: (and I've tried others) $psLine = fgets (STDIN, 1024); // phpa.php at http://david.acz.org/phpa/ stdin = fopen("php://stdin", "r"); // PHP_Shell-0.3.1 $l = fgets(stdin); BDthatsme wrote: > I can't get any of the various examples of keyboard input to work > using command line PHP. > > I have Windows XP Pro SP 2 and PHP 5.1.6 (cli) (built: Aug 23 2006 > 16:35:53). > > I can't find any info about why it doesn't work, or a way that does > work. Any suggestions? > > examples of attempted variations: (and I've tried others) > > $psLine = fgets (STDIN, 1024); // phpa.php at http://david.acz.org/phpa/ > > stdin = fopen("php://stdin", "r"); // PHP_Shell-0.3.1 > $l = fgets(stdin); Under Windows you have to hit <ENTER> to complete the input. Windows does not support character by character entry/processing without installing ncurses. Even then i'm not positive but I think so. Thing is you'll have to compile it yourself. I have found it works out of the box under Linux but have not done much testing. -- Norman Registered Linux user #461062 On Sun, 20 ...

cron or command line: run a very long php script
Hi there, I have a list of links which point to e.g. thescript.php?album=somePictures1 thescript.php?album=somePictures2 This list is about 3000 links. Each album may have 500 or more pictures in it. the script looks in the specified dir, and creates thumbnails if they are not present. So, displaying a particular album often takes quite a while. I've set the proper php.ini stuff to accomodate the long script_execution's. Thats all working fine. Now, I dont want the end user to have to wait for the thumbs if they land on an album that has not yet had thumbnails created. So the question is, what is the best way to run all those links automatically, thereby creating all the thumbs? Thanks for your time, > I have a list of links which point to e.g. > thescript.php?album=somePictures1 > thescript.php?album=somePictures2 > > This list is about 3000 links. Each album may have 500 or more pictures in it. > the script looks in the specified dir, and creates thumbnails if they are not > present. So, displaying a particular album often takes quite a while. I've set > the proper php.ini stuff to accomodate the long script_execution's. Thats all > working fine. > > Now, I dont want the end user to have to wait for the thumbs if they land on an > album that has not yet had thumbnails created. > > So the question is, what is the best way to run all those links automatically, > thereby creating all the thumbs? &...

php script behaves differently when it run in command line
I found that the php script behaves differently when it run in command line rather than runing over web server. Program includes the code like <?php function send_email($from_address, $to_address, $bcc_address, $subject, $msg, $attachments,$reminder_id) { $headers = ...; .... mail($to_address, $subject, $msg, $headers); ... } #main body of code here to grap info from database and call send_mail() function here ... send_email($newarry[FROM_ADDRESS], $newarry[TO_ADDRESS], $newarry [BCC_ADDRESS], $newarry[SUBJECT], $newarry[BODY],$attachments, $newarry[ID]); ?> I can not use lynx since it doesn't support https on my machine. The values are from database and feed in send_mail() function which will form the body message and header and pass to php mail() function. The problem is that "mail($to_address, $subject, $msg, $headers)" can not access the values passed over to it when i use 'php' command to run the script. But I can use 'print' to print out all the values but mail()function just can't get them. However, this program works fine when I use broswer to access it. Any help will be greatly appreciated. Runner *** rchen8080@yahoo.com escribi�/wrote (3 Apr 2007 19:21:45 -0700): > I found that the php script behaves differently when it run in command > line rather than runing over web server. That's right. Differences include access to $_SERVER variables and different PHP settings. It...

How to run php file in browser using windows Scheduled Task
Dear Friends, I need help i need to run php file in browser or command-line using windows scheduled task. if you know please help me. Thanks Vasanth On 5/28/2011 1:31 AM, rrvasanth wrote: > Dear Friends, > > I need help i need to run php file in browser or command-line using > windows scheduled task. if you know please help me. > > Thanks > Vasanth Browsers do not run PHP code. They request a page from a web server which then executes the PHP script and sends the output to the browser. To run in a browser, you would have to start the browser, request the page from the web server (which may be on the same machine) and display the results. You can also have PHP run from the command line, but it won't run in a browser. But this is the wrong place to ask about Windows scheduled tasks. Try a Windows newsgroup. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== El 28/05/2011 7:31, rrvasanth escribi�/wrote: > I need help i need to run php file in browser or command-line using > windows scheduled task. if you know please help me. Do you have a specific PHP-related problem or are you looking for a tutorial on how to use the scheduler wizard? As about the "browser", I'll assume you want a grabber to do some HTTP stuff. You can write one in PHP or use wget for Windows: - http://php.net/curl - http://gnuwin32.so...

keep the DOS window open after running Call Shell command
I recently resolved an issue I had with passing a variable to a call shell command, but now I need it to pause or leave the window open so I can manually close it. Below is my code, and I am not sure where to begin to keep the DOS window from closing. Dim stAppName As String Dim stIPAddress As String stAppName = "C:\WINDOWS\system32\ping.exe " stIPAddress = [IPAddress] Call Shell(stAppName & stIPAddress, 1) So what happens is a DOS window opens up and pings the ip address that is listed in the form field, and once the command finishes the DOS window closes. I would like for the DOS window to stay open. Thanks, Tripwire tripyre@gmail.com wrote: > I recently resolved an issue I had with passing a variable to a call > shell command, but now I need it to pause or leave the window open so I > can manually close it. Below is my code, and I am not sure where to > begin to keep the DOS window from closing. > > Dim stAppName As String > Dim stIPAddress As String > > stAppName = "C:\WINDOWS\system32\ping.exe " > stIPAddress = [IPAddress] > Call Shell(stAppName & stIPAddress, 1) > > So what happens is a DOS window opens up and pings the ip address that > is listed in the form field, and once the command finishes the DOS > window closes. I would like for the DOS window to stay open. > > Thanks, > > Tripwire > Shell Environ$("COMSPEC")...

I need to create html files from php files using php
I am very new to PHP, although I have been using ASP for a few years. I use a product in ASP called ASPTear, it's a small dll that my hosting company happens to have loaded. Basically you can set up a function that you can pass an ASP page to and it will read the ASP and write out an HTML file. I use this to save load on the server and speed up my site, I have a few include files that look up data and then present it, this data does not change very often, so I run a routine called rebuildhtml.asp that will call a few ASP files and create HTML versions. I am now converting the site to PHP as I want to use mod_rewrite, what I need is a routine that I can pass a php file to and end up with an HTML version. For example rewrite(somefile.php) Will create somefile.html I am sure this can't be too difficult, but as a newbie I cannot find out how to do it. Any help appriciated. Dennis Dennis wrote: > what > I need is a routine that I can pass a php file to and end up with an > HTML version. > > For example > > rewrite(somefile.php) http://www.php.net/ob_start Happy Coding :-) -- USENET would be a better place if everybody read: | to mail me: simply | http://www.catb.org/~esr/faqs/smart-questions.html | "reply" to this post, | http://www.netmeister.org/news/learn2quote2.html | *NO* MIME, plain text | http://www.expita.com/nomime.html | and *NO* attachments. | Dennis wrote: > I am now converti...

Newbie: MySql is loaded when PHP runs from command line, but not through IIS
Hello, Sorry for the newbie question, but I've been searching and searching and haven't found an answer to this one yet. I installed PHP and MySql (both latest versions) yesterday on a machine running Windows 2003 Server with IIS6. I followed the instructions at: http://www.tjitjing.com/blog//2006/05/php5-with-iis6-on-windows-server-2003.html to install PHP, and all seemed to go fine. I can run PHP pages through IIS. Installation of MySql also went OK, and that seems to be running. I can use the command line to create databases, create users, run select statements, etc. I then configured PHP to be able to use MySql. I uncommented the two extension line in php.ini, and set the extension_dir to be the folder where the DLLs live. This is where things started to go wrong ;-) If I open a command prompt and run php_info(), then MySql is shown as a loaded extension. I can use mysql_connect() and it will open a connection to MySql fine. However, if I run php_info() from a page loaded under IIS, then MySql is NOT shown as loaded. If I try to use mysql_connect(), then I get an error telling me that mysql_connect() is undefined - presumably because IIS does not think the extension is loaded. I have stopped and restarted IIS, and even rebooted the machine, but it didn't make any difference. When called from IIS, PHP doesn't think that MySql is loaded, even though it works fine when run from a command line. All required DLLs are present, and the exte...

PHP file 'Hello.php" is not writing anything when run through IE 6.0.2
Hi ! Out there, anybody could help tell me what could be the reason that my php scripting is not giving output in IE6. Which I'm trying from my webserver itself, having IIS 5 on W2k Advanced server. I have updated registry HKLM\SOFTWARE\PHP with Per se directory with value of C:\Inetpub\wwwroot. Still it's not saying 'Hello' to the world :) Can anybody guide me to the correct reason / resolution. Thanks in anticipation. Vasu Vasu wrote: > Hi ! > > Out there, anybody could help tell me what could be the reason that my > php scripting is not giving output in IE6. Which I'm trying from my > webserver itself, having IIS 5 on W2k Advanced server. > > I have updated registry HKLM\SOFTWARE\PHP with Per se directory with > value of C:\Inetpub\wwwroot. > > Still it's not saying 'Hello' to the world :) > > Can anybody guide me to the correct reason / resolution. Are you using "C:\Inetpub\wwwroot" as address for the browser? -- Freundliche Gr��e, Franz Marksteiner On Feb 24, 3:55=A0pm, "Franz Marksteiner" <franzmarkstei...@gmail.com> wrote: > Vasu wrote: > > Hi ! > > > Out there, anybody could help tell me what could be the reason that my > > php scripting is not giving output in IE6. =A0Which I'm trying from my > > webserver itself, having IIS 5 on W2k Advanced server. > > > I have updated registry HKLM\SOFTWARE\PHP with Per se directory...

Run background process from PHP on Windows with window
Hi all! Windows XP, Apache 2.2, PHP 5.2.5 as apache module (php5apache2_2.dll) I need to run background process and see output but for current moment all methods runs it as process not as application (visible in task manager but no window attached). I tried exec, ``, popen(), with and without start and psexec. Is here any way to run it as separate process, without waiting (psexec -d) and with visible window? Small example running 'cmd' in separate window will be great. Thanks! Greetings, Alexey Kulentsov. In reply to Your message dated Sunday, June 15, 2008, 13:54:10, > Windows XP, Apache 2.2, PHP 5.2.5 as apache module (php5apache2_2.dll) > I need to run background process and see output but for current moment > all methods runs it as process not as application (visible in task > manager but no window attached). I tried exec, ``, popen(), with and > without start and psexec. > Is here any way to run it as separate process, without waiting (psexec > -d) and with visible window? Small example running 'cmd' in separate > window will be great. I think that wintty.exe is what you're looking for. But it was long time I have played with it. I'm sorry if it is not what i think. -- Sincerely Yours, AnrDaemon <anrdaemon@freemail.ru> Alexey Kulentsov wrote: > Hi all! > > Windows XP, Apache 2.2, PHP 5.2.5 as apache module (php5apache2_2.dll) > > I need to run background process and see output but fo...

Web resources about - Keeping window open after running php file from the command line ? - comp.lang.php

A Tribe Called Quest’s Phife Dawg Was a Hip-Hop Original
In his 2010 memoir, “Decoded,” Jay Z defined the central subject of hip-hop in three words: “why I’m dope.” A simplification, to be sure, but ...

Google Maps for iOS gets more ridesharing options
Google Maps has added new ridesharing options to its iOS app, a week after they first became available on Android. Uber was the sole choice for ...

McCrory signs bill overturning transgender ordinance
The North Carolina legislature reconvened Wednesday to consider halting Charlotte&#39;s new ordinance that lets transgender people use the bathroom ...

DA recommends no prison for NYPD officer in fatal stairwell shooting
CBS News DA recommends no prison for NYPD officer in fatal stairwell shooting CBS News NEW YORK A prosecutor said Wednesday he has recommended ...

Google launches service to make machine learning easier
Google is making it easier for businesses to take advantage of the machine learning revolution with a new product for building models that predict ...

Ben Affleck's Batman takes on Ben Affleck's Superman in recut trailer
While most reviews of Batman v Superman have been, well, not super great , a new mashup trailer has figured out a way to make the film a bit ...

PornHub Jumps On The VR Bandwagon With Dedicated Channel
While 3D was initially thought to offer up an immersive experience, if anything it does feel like it paved the road for virtual reality to become ...

Star Wars: The Force Awakens Blu-ray leaks online early available for torrent download
The Star Wars franchise is a runway train-like phenomenon, lasting decades and being enjoyed by several generations. When the newest such film, ...

Watch Philippines Vs. Uzbekistan Football Live Online: Start Time, Streaming Video For AFC World Cup ...
Fans can watch the Philippines vs. Uzbekistan football match live online and see if the Filipino team can meet their biggest challenge to date ...

Ken Howard, Actor, Dead At 71
Ken Howard, 71, died today in Los Angeles, according to the Associated Press . Howard had been an actor for four decades, starting his career ...

Resources last updated: 3/24/2016 3:09:39 AM