php-windows Digest 1 Nov 2002 03:55:55 -0000 Issue 1417

Topics (messages 16634 through 16644):

PHP 4.3.0pre2
        16634 by: erythros

starting a program without waiting for it to terminate
        16635 by: patrick
        16636 by: J Wynia
        16637 by: David Elliott

Session Persistance (urgent help required)
        16638 by: Raheel Hussain
        16639 by: Dash McElroy

shell_exec not working with PHP as CGI, but does work as ISAPI
        16640 by: benjamin delman

Chmod in windows XP and NT
        16641 by: Ikke

mail function in IIS 5
        16642 by: Omar

fopen, fputs, fwrite, fclose, fdammit
        16643 by: Max Graham

help in installation in PHP
        16644 by: freeman.vcu.org

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
were can i find info about PHP 4.3.0pre2?


--- End Message ---
--- Begin Message ---
hi

i'm running apache 2.0.43 and php4.2.3 on win2k. what i need to do in my php
script is to start some windows executable. but as it's taking quite a bit
until it terminates i want php to continue without waiting for it. i tried
lots of stuff but nothing worked and i'm quite desperate now. is there any
way or am i trying in vain ?

thx,
  patrick


--- End Message ---
--- Begin Message ---
Patrick wrote:

hi

i'm running apache 2.0.43 and php4.2.3 on win2k. what i need to do in my php
script is to start some windows executable. but as it's taking quite a bit
until it terminates i want php to continue without waiting for it. i tried
lots of stuff but nothing worked and i'm quite desperate now. is there any
way or am i trying in vain ?

thx,
patrick

This only works on Windows and requires the Windows Scripting Host, but tends to work better than messing with the exec, execshell etc. commands in PHP.

The second argument is whether it should be launched normally (1), minimized (2), or maximized (3). The 3rd argument is whether to wait or not. 0 is to NOT wait.

$shell = new COM("WScript.Shell");
$shell -> Run('c:/windows/notepad.exe',2,0);

--- End Message ---
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Greetings patrick

On 30 October 2002 at 23:36:27 +0100 (which was 22:36 where I live) patrick
might have written

> i'm running apache 2.0.43 and php4.2.3 on win2k. what i need to do in my php
> script is to start some windows executable. but as it's taking quite a bit
> until it terminates i want php to continue without waiting for it. i tried
> lots of stuff but nothing worked and i'm quite desperate now. is there any
> way or am i trying in vain ?

Yes there is a way.

Create a shortcut use php to run the short cut.

- --
 See you in Cyber space,   _______________________________________________
  David                   |    David  Elliott    |   Software Engineer    |
 _________________________| [EMAIL PROTECTED] | PGP Key ID 0x650F4534  |
| I'm a thinker, I think, but I may be wrong.                             |

-----BEGIN PGP SIGNATURE-----
Version: 6.5.8ckt http://www.ipgpp.com/

iQA/AwUBPcFwO/mK8eZlD0U0EQJTiwCgmQ4Vp8jSBPaHxRpAx/MPaGGDUIEAn079
W27K0a80yEoIVnXOwvNZZAZj
=6LFH
-----END PGP SIGNATURE-----


--- End Message ---
--- Begin Message ---
function SetDomain(d) { document.domain = d; }Hi,
I m a new bie programmer in PHP , but have strong background in ASP 

here i m having a problem with session persistance

at one page i m starting the session, with 
session_start();
$_SESSION['count']="1";
print($_SESSION['count']); // this works all fine


but when i navigate to second pages, and write the following code, then creates 
problem,

print($_SESSION['count']); // this doesnt work fine, 

it gives "undefined variables _SESSION prblem,

may b i m making some mistake in the session configuration of php.ini file, 
so plz guide me to default configuration , so that i can be able to continue with my 
work.


regards
raheel




---------------------------------
Do you Yahoo!?
HotJobs - Search new jobs daily now
--- End Message ---
--- Begin Message ---
Raheel,

Have you done a session_start() on each page that requires session
variables? Or set the php.ini Session Auto Start to 1 (true, if I recall
correctly) if you want sessions enabled on all your page calls, then
restart your http server.

-Dash

Heaven, n.:
        A place where the wicked cease from troubling you with talk of
their personal affairs, and the good listen with attention while you
expound your own.
                -- Ambrose Bierce, "The Devil's Dictionary"

On Thu, 31 Oct 2002, Raheel Hussain wrote:

>
> function SetDomain(d) { document.domain = d; }Hi,
> I m a new bie programmer in PHP , but have strong background in ASP
>
> here i m having a problem with session persistance
>
> at one page i m starting the session, with
> session_start();
> $_SESSION['count']="1";
> print($_SESSION['count']); // this works all fine
>
>
> but when i navigate to second pages, and write the following code, then creates 
>problem,
>
> print($_SESSION['count']); // this doesnt work fine,
>
> it gives "undefined variables _SESSION prblem,
>
> may b i m making some mistake in the session configuration of php.ini file,
> so plz guide me to default configuration , so that i can be able to continue with my 
>work.
>
>
> regards
> raheel
>
>
>
>
> ---------------------------------
> Do you Yahoo!?
> HotJobs - Search new jobs daily now

--- End Message ---
--- Begin Message ---
Win2K Server SP3
IIS 5
PHP 4.2.3

this code only works if php is ISAPI. any ideas? all help is greatly
appreciated.

ben

-----------------

<?

$postie_str =
"d:\inetpub\scripts\postie\postie.exe -host:mail.autodesk.com -s:\"Form
Processor
Results\" -to:\"[EMAIL PROTECTED],[EMAIL PROTECTED]\" -cc:
\"[EMAIL PROTECTED]\" -replyto:\"[EMAIL PROTECTED]\" -
from:\"[EMAIL PROTECTED]\" -file:\"d:\inetpub\scripts\postie\post
ie_temp_54130.txt\" -html";

$returnit = shell_exec($postie_str);

echo("$postie_str<hr>$returnit");

?>



--- End Message ---
--- Begin Message ---
How do i chmod a textfile, serverside? I got an apache server, running under
windows (XP, but later im gonna move it to a pc with winNT)

thx


--- End Message ---
--- Begin Message ---
I work in a Win2k server
Is there any way I could see how many resources the 'mail' function consumes
in the server?
I use web forms and send them by email, but they've became really slow and i
guess it could be the mail function (maybe the sql querys, but i don't think
that could be).

Thank you for your help.

Omar


--- End Message ---
--- Begin Message ---
I'm trying to put a comment page on my weblog. I have the link displayed in
the format of date first, then a link to bookmark the entry, and then a link
to post a comment. I want to write the comments to a text file. My comment
page accepts a default value of "target", which is set to the date to be
commented on. Then it opens (or creates) a text file in the format of the
variable set by $pctarget.

$pctarget = "/blogbits/".substr($target,0,6)."/_".$target."_bc.txt";
if ($newpost == "yes") {
  $addrecord =
$newpostname."\n".$newpostemail."\n".$newposturl."\n".date("l, F jS,
Y")."\n".$newpostcomments."\n<br>";
  $fullcomments .= "-----splitcomment-----\n";
  $getcomments = fopen($pctarget, "a");
  fputs($getcomments, $addrecord);
  fclose($getcomments);
}

I've tried assigning fputs() and fclose() to variables (which I infer is the
right way to do things but the manual isn't clear on it, i.e.
$gc=fputs($getcomments, $addrecord); but that doesn't work either. When the
page loads I get a blank page and this for the source:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html;
charset=windows-1252"></HEAD>
<BODY></BODY></HTML>

It's not even the header source I told it to put out. As I understand it,
this is the source put out by an error page, when the code won't run. I
haven't been able to figure out what simple thing I'm missing, and I know
it's simple because it invariably is. (Law of Murphy, don't ya know.)

Any suggestions? Would lack of file permissions cause this? Server is a
Linux box.

Thanks in advance

--- End Message ---
--- Begin Message ---
Hello,

i have a question about installing and making PHP work with window IE, i
installed the latest PHP application onto a WINDOW XP pro version OS. i am
not even sure i installed it right or not plus i don't know how to get
window IE to recognize the php extension after i made a small script in
php. the WINDOW IE won't read it.

i downloaded the 5 meg zip file and exploded and also i download the
installer. i am very stuck. should i get a book about php, i think i need
to  and i hope the book will help on explaining better than the web site,
but i doubt that. 

SIncerely,

christian

--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .


--- End Message ---

Reply via email to