php-windows Digest 18 Jan 2002 23:04:55 -0000 Issue 959

Topics (messages 11504 through 11520):

Scripts keep refreshing
        11504 by: Michel van Westen

Re: command line are -c doesn't work on win2k?
        11505 by: DL Neil
        11510 by: Jeff D. Hamann

Re: PHP Extension in INI
        11506 by: Philippe Saladin

Is ISAPI stable ?
        11507 by: Steen Rabol
        11509 by: Ertan Tike

Re: All php files keep refreshing.
        11508 by: Nicole Amashta
        11520 by: Rubén Gutiérrez

Re: WAP
        11511 by: LaserJetter
        11513 by: Ross Fleming
        11514 by: LaserJetter

Re: [PHP] Re: [PHP-WIN] command line are -c doesn't work on win2k?
        11512 by: DL Neil

Re: VBA to Word - Syntax Question
        11515 by: J Wynia
        11518 by: J Wynia
        11519 by: alain samoun

Redirection Question.
        11516 by: Curtis
        11517 by: Shrock, Court

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 ---
Hi all,

i got a serious problem: I got php3 running for quit a while and it was
running fine with all my scripts. About a week ago i decided my time had
come and i had to update to php4, now all my scripts keep on refreshing
without having loaded the whole script, it just refreshes over and over it
looks like it has some sort of time or data limit. I've tried both the ISAPI
module and the CGI executable but it just doesn't work. I can't find
anything in php.ini that isn't right either.

Please, please help me

Michel van Westen
[EMAIL PROTECTED]

For an example on what happens see:
http://dekas.dyndns.org/guest/guest.php3?action=view&guestbookid=0



--- End Message ---
--- Begin Message ---
Jeff,

The following batch files works for me (WinNTWS 4.0 SP6a):-

cd c:\program files\php
php.exe -q c:\.path.\w.php >>c:\.path.\webute.log

NB the first line reflects my PHP config - your mileage may vary!

Of course the other possibility is to add the PHP folder into the PATH environment 
variable...

Regards,
=dn


----- Original Message ----- 
From: "Jeff D. Hamann" <[EMAIL PROTECTED]>
To: <>; <[EMAIL PROTECTED]>
Sent: 18 January 2002 07:00
Subject: [PHP-WIN] command line are -c doesn't work on win2k?


> I've been trying to figure out what was wrong with my script...
> 
> <?
> mail("[EMAIL PROTECTED]", "Subject", "command line mail() test");
> ?>
> 
> from the command line,
> 
> php mail_test.php
> 
> and getting,
> 
> X-Powered-By: PHP/4.0.6
> Content-type: text/html
> 
> attempting to deliver the mail<br>
> <b>Warning</b>:  Unknown error in <b>mail_test.php</b> on line <b>3</b><br>
> 
> Then I found a solution at http://bugs.php.net/bug.php?id=6742 ,
> 
> [22 Nov 2000 5:21am] [EMAIL PROTECTED]
> After a few emails this really got solved.
> Adding -c/path/to/phpini/ (command line)
> was the solution.
> 
> --Jani
> but, when I tried it,
> php -c c:\php mail_test.php,
> Again, the results were,
> X-Powered-By: PHP/4.0.6Content-type: text/html
> 
> attempting to deliver the mail
> <br><b>Warning</b>:  Unknown error in <b>mail_test.php</b> on line
> <b>3</b><br>
> 
> 
> So, I tried a gazillion permitations on -c, -c /php, -c
> c:/php -c:\php\php.ini, etc, etc, etc, to no avail...
> 
> I finally moved the script into the same dir as php.exe and it worked fine.
> The problem is that I need to run the script from the "normal" path and not
> from c:\php...
> 
> Does the -c switch actually work? How can I run this script from another
> dir? Is this a bug?
> 
> Thanks,
> Jeff.
> 
> 
> --
> Jeff D. Hamann
> Hamann, Donald & Associates, Inc.
> PO Box 1421
> Corvallis, Oregon USA 97339-1421
> Bus. 541-753-7333
> Cell. 541-740-5988
> [EMAIL PROTECTED]
> www.hamanndonald.com
> 
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 

--- End Message ---
--- Begin Message ---
the path to php is already in the PATH variable...

I'm not doing anything different that http://bugs.php.net/bug.php?id=6742
,but for some reason the -c doesn't make a difference...

Jeff.


"Dl Neil" <[EMAIL PROTECTED]> wrote in message
0d4f01c1a00e$87036ee0$2916100a@jrbrown">news:0d4f01c1a00e$87036ee0$2916100a@jrbrown...
> Jeff,
>
> The following batch files works for me (WinNTWS 4.0 SP6a):-
>
> cd c:\program files\php
> php.exe -q c:\.path.\w.php >>c:\.path.\webute.log
>
> NB the first line reflects my PHP config - your mileage may vary!
>
> Of course the other possibility is to add the PHP folder into the PATH
environment variable...
>
> Regards,
> =dn
>
>
> ----- Original Message -----
> From: "Jeff D. Hamann" <[EMAIL PROTECTED]>
> To: <>; <[EMAIL PROTECTED]>
> Sent: 18 January 2002 07:00
> Subject: [PHP-WIN] command line are -c doesn't work on win2k?
>
>
> > I've been trying to figure out what was wrong with my script...
> >
> > <?
> > mail("[EMAIL PROTECTED]", "Subject", "command line mail() test");
> > ?>
> >
> > from the command line,
> >
> > php mail_test.php
> >
> > and getting,
> >
> > X-Powered-By: PHP/4.0.6
> > Content-type: text/html
> >
> > attempting to deliver the mail<br>
> > <b>Warning</b>:  Unknown error in <b>mail_test.php</b> on line
<b>3</b><br>
> >
> > Then I found a solution at http://bugs.php.net/bug.php?id=6742 ,
> >
> > [22 Nov 2000 5:21am] [EMAIL PROTECTED]
> > After a few emails this really got solved.
> > Adding -c/path/to/phpini/ (command line)
> > was the solution.
> >
> > --Jani
> > but, when I tried it,
> > php -c c:\php mail_test.php,
> > Again, the results were,
> > X-Powered-By: PHP/4.0.6Content-type: text/html
> >
> > attempting to deliver the mail
> > <br><b>Warning</b>:  Unknown error in <b>mail_test.php</b> on line
> > <b>3</b><br>
> >
> >
> > So, I tried a gazillion permitations on -c, -c /php, -c
> > c:/php -c:\php\php.ini, etc, etc, etc, to no avail...
> >
> > I finally moved the script into the same dir as php.exe and it worked
fine.
> > The problem is that I need to run the script from the "normal" path and
not
> > from c:\php...
> >
> > Does the -c switch actually work? How can I run this script from another
> > dir? Is this a bug?
> >
> > Thanks,
> > Jeff.
> >
> >
> > --
> > Jeff D. Hamann
> > Hamann, Donald & Associates, Inc.
> > PO Box 1421
> > Corvallis, Oregon USA 97339-1421
> > Bus. 541-753-7333
> > Cell. 541-740-5988
> > [EMAIL PROTECTED]
> > www.hamanndonald.com
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>


--- End Message ---
--- Begin Message ---
If you have installed PHP with "PHP 4.1.1 installer" for example, there
isn't any external extension installed. You have to download the "PHP 4.1.1
zip package" [4,953Kb], which contains all the extensions. After that, just
uncomment in php.ini the extension needed.
Regards,
Philippe

"Jeb" <[EMAIL PROTECTED]> a écrit dans le message news:
000201c1a007$90276280$[EMAIL PROTECTED]
> This is a very newbish question, but there are some .dll extension for PHP
> that I would like to have (bzip2, crypt functions, etc) ?  Does anybody
know
> where I can find them? or do I even need them?  I have search the net, but
> no luck.  This is for IIS 5 on windows 2000.  Sorry if this email makes no
> sense, it is late...
>
> Jeb
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>


--- End Message ---
--- Begin Message ---
Hi

According to the install.txt of php, the ISAPI version is not stable, but.... that 
statement have been there for about 1 year, so my question is: Is ISAPI version 
considered stable ?

Thanks in advance.

Best
Steen

--- End Message ---
--- Begin Message ---
no, cause i have live some problems (random) with isapi mod. (memory leaks,
cpu times.. exceptions.. etc.)
but i think this is problem of IIS.
some times you have to use module version of php..

-----Original Message-----
From: Steen Rabol [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 18, 2002 3:21 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Is ISAPI stable ?


Hi

According to the install.txt of php, the ISAPI version is not stable,
but.... that statement have been there for about 1 year, so my question is:
Is ISAPI version considered stable ?

Thanks in advance.

Best
Steen

--- End Message ---
--- Begin Message ---
can you post some code from one of the scripts that you say keeps
refreshing?


"Michel Van Westen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi all,
>
> i got a serious problem: I got php3 running for quit a while and it was
> running fine with all my scripts. About a week ago i decided my time had
> come and i had to update to php4, now all my scripts keep on refreshing
> without having loaded the whole script, it just refreshes over and over it
> looks like it has some sort of time limit. I've tried both the ISAPI
> module and the CGI executable but it just doesn't work. I can't find
> anything in php.ini that isn't right either.
>
> Please, please help me
>
> Michel van Westen
> [EMAIL PROTECTED]
>
> For an example on what happens see:
> http://dekas.dyndns.org/guest/guest.php3?action=view&guestbookid=0
>
>
>


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

On Fri, 18 Jan 2002 10:03:07 +0100
"Michel van Westen" <[EMAIL PROTECTED]> wrote:

> Hi all,
> 
> i got a serious problem: I got php3 running for quit a while and it was
> running fine with all my scripts. About a week ago i decided my time had
> come and i had to update to php4, now all my scripts keep on refreshing
> without having loaded the whole script, it just refreshes over and over it
> looks like it has some sort of time limit. I've tried both the ISAPI
> module and the CGI executable but it just doesn't work. I can't find
> anything in php.ini that isn't right either.

Try adding this line to one of your scripts and see if it still happens:
set_time_limit (0);

It will make the script never time-out.

Cheers,

Ruben.

--- End Message ---
--- Begin Message ---
Thanks! They've been useful.

How do I detect whether a WAP browser is being used? I know how to check
whether Netscape or IE is being used via JavaScript. Is this how to do it
with WAP?


"Ross Fleming" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> This is part of my final year project at university, so hopefully I'll be
> able to help you.  Some pointers...
>
> 1. visit http://www.allnetdevices.com/faq/ for wml info
> 2. never assume the size of a WAP phone screen, no two are alike.
> 3. keep the pages TINY! WAP phones have very little memory, and don't
handle
> big pages at all.
> 4. generating wml pages from php.  Basically, you have to have a .php file
> that creates html content.  At the above webpage there is a php script
that
> determines whether a wap browser is opening the page and directs it
> accordingly.
> 5. atart any php/wml pages with <?
header("Content-type=text/vnd.wap.wml");
> ?> and it's now a page a phone will accept.
> 6. as for the porting all your files to wml, then that is VERY difficult
to
> do.  I'm not even sure PHP could do it.  This is what my project is all
> about and I'm not using PHP for the conversion.  It's harder than you
might
> think to do.  Professional software can do this for you (I believe IBM has
a
> solution but it costs a bomb) but I'd consider having a wap site and web
> site, with an index.php file at the root that sends the user to the
correct
> version (using the script at 1.)
>
> Good luck with it, let me know how you get on as I'd really like to hear
> other peoples opinions on this, seeing as I'll have to write an 80 page
> dissertation on it!!!
>
> Regards
>
> Ross Fleming
>
> -----Original Message-----
> From: LaserJetter [mailto:[EMAIL PROTECTED]]
> Sent: 17 January 2002 17:27
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: [PHP-WIN] WAP
>
>
> I was fiddling around with the Nokia WAP toolkit the other day and I've
> created a pretty little WAP site - just listing dates and it has a WBMP
> image as a welcome screen.
>
> Whilst looking for someone to host the site, I noticed a review for  f2s
> which said "allows PHP to be combined with WML" That would be a pretty
neat
> thing to do - I could have a PHP script automatically port every page to
WML
> and WBMP images.
>
> The problem is, how do you include PHP in a WML file?  Do you have to use
> <SCRIPT LANGUAGE="php"></SCRIPT> in a .wml file or can you use .php files?
> (I can't just fidddle about because I don't have a WAP phone yet!)
>
> Also, and I know this isn't really anything to do with PHP, what are the
> dimensions in pixels of a typical WAP phone screen?
> I checked my site using the emulator in the Nokia Toolkit and the one at
> TagTag.com and my WBMP image fitted nicely in the middle of the screen.
But
> when my girlfriend showed it me on her phone, only about a third of the
> image fitted on!!   Making the image smaller wouldn't be a problem but I
> dont really know what size to make it.
> Any directions to some useful info would be greatly appreciated.
>
> LJ
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


--- End Message ---
--- Begin Message ---
I'd personally do it in PHP.  But there aren't standard wap browsers
unfortunately (ie in real PC's, you'd only really ever see IE, Netscape,
Mozilla etc).  I don't know of a fully comprehensive list of browser
identities, but these should get you started: from
http://allnetdevices.com/faq

<?
$browser=substr(trim($HTTP_USER_AGENT),0,4);
 if($browser=="Noki")      // Nokia phones and emulators
 if($browser=="Eric")      // Ericsson WAP phones and emulators
 if($browser=="WapI")      // Ericsson WapIDE 2.0
 if($browser=="MC21")      // Ericsson MC218
 if($browser=="AUR ")      // Ericsson R320
 if($browser=="R380")      // Ericsson R380
 if($browser=="UP.B")      // UP.Browser
 if($browser=="WinW")      // WinWAP browser
 if($browser=="UPG1")      // UP.SDK 4.0
 if($browser=="upsi")      // another kind of UP browser
 if($browser=="QWAP")      // unknown QWAPPER browser
 if($browser=="Jigs")      // unknown JigSaw browser
 if($browser=="Java")      // unknown Java based browser
 if($browser=="Alca")      // unknown Alcatel-BE3 browser (UP based?)
 if($browser=="MITS")      // unknown Mitsubishi browser
 if($browser=="MOT-")      // unknown browser (UP based?)
 if($browser=="My S")      // unknown Ericsson devkit browser ?
 if($browser=="WAPJ")      // Virtual WAPJAG www.wapjag.de
 if($browser=="fetc")      // fetchpage.cgi Perl script from
www.wapcab.de
 if($browser=="ALAV")      // yet another unknown UP based browser ?
 if($browser=="Wapa")      // another unknown browser (Web based
"Wapalyzer"?)
?> 
This is only a selection of browsers though, and the browser type
wouldn't help u I don't think.  For example, I take it you are asking
with means to identify the screen size etc?  Nokias use the same browser
I believe but have different screen sizes for different models.  In the
same respect, you can't find out a PC users screen size through PHP,
javascript, or anything else you please.

Javascript doesn't work on WAP phones.  Forget that.  You're thinking of
WMLscript, not too sure about that side of things.

There should be enough there to get u going, either way, it ain't PHP
anymore so you'll probably find better help on wap/wml forums instead.

Good luck

R

LaserJetter wrote:
> 
> Thanks! They've been useful.
> 
> How do I detect whether a WAP browser is being used? I know how to check
> whether Netscape or IE is being used via JavaScript. Is this how to do it
> with WAP?
> 
> "Ross Fleming" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > This is part of my final year project at university, so hopefully I'll be
> > able to help you.  Some pointers...
> >
> > 1. visit http://www.allnetdevices.com/faq/ for wml info
> > 2. never assume the size of a WAP phone screen, no two are alike.
> > 3. keep the pages TINY! WAP phones have very little memory, and don't
> handle
> > big pages at all.
> > 4. generating wml pages from php.  Basically, you have to have a .php file
> > that creates html content.  At the above webpage there is a php script
> that
> > determines whether a wap browser is opening the page and directs it
> > accordingly.
> > 5. atart any php/wml pages with <?
> header("Content-type=text/vnd.wap.wml");
> > ?> and it's now a page a phone will accept.
> > 6. as for the porting all your files to wml, then that is VERY difficult
> to
> > do.  I'm not even sure PHP could do it.  This is what my project is all
> > about and I'm not using PHP for the conversion.  It's harder than you
> might
> > think to do.  Professional software can do this for you (I believe IBM has
> a
> > solution but it costs a bomb) but I'd consider having a wap site and web
> > site, with an index.php file at the root that sends the user to the
> correct
> > version (using the script at 1.)
> >
--- End Message ---
--- Begin Message ---
Thanks, that would probably work.
What I wanted to do was distinguish between a web browser and a WAP browser
so that

if (isWAP) {
    echo "WAP content";
} else {
    echo "HTML content";
}

I'll try those things anyway - The WAP site is working anyway and I've set
up a redirect from my main site using header ("Location:
http://wapsite.com";);

LJ


"Ross Fleming" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'd personally do it in PHP.  But there aren't standard wap browsers
> unfortunately (ie in real PC's, you'd only really ever see IE, Netscape,
> Mozilla etc).  I don't know of a fully comprehensive list of browser
> identities, but these should get you started: from
> http://allnetdevices.com/faq
>
> <?
> $browser=substr(trim($HTTP_USER_AGENT),0,4);
>  if($browser=="Noki")      // Nokia phones and emulators
>  if($browser=="Eric")      // Ericsson WAP phones and emulators
>  if($browser=="WapI")      // Ericsson WapIDE 2.0
>  if($browser=="MC21")      // Ericsson MC218
>  if($browser=="AUR ")      // Ericsson R320
>  if($browser=="R380")      // Ericsson R380
>  if($browser=="UP.B")      // UP.Browser
>  if($browser=="WinW")      // WinWAP browser
>  if($browser=="UPG1")      // UP.SDK 4.0
>  if($browser=="upsi")      // another kind of UP browser
>  if($browser=="QWAP")      // unknown QWAPPER browser
>  if($browser=="Jigs")      // unknown JigSaw browser
>  if($browser=="Java")      // unknown Java based browser
>  if($browser=="Alca")      // unknown Alcatel-BE3 browser (UP based?)
>  if($browser=="MITS")      // unknown Mitsubishi browser
>  if($browser=="MOT-")      // unknown browser (UP based?)
>  if($browser=="My S")      // unknown Ericsson devkit browser ?
>  if($browser=="WAPJ")      // Virtual WAPJAG www.wapjag.de
>  if($browser=="fetc")      // fetchpage.cgi Perl script from
> www.wapcab.de
>  if($browser=="ALAV")      // yet another unknown UP based browser ?
>  if($browser=="Wapa")      // another unknown browser (Web based
> "Wapalyzer"?)
> ?>
> This is only a selection of browsers though, and the browser type
> wouldn't help u I don't think.  For example, I take it you are asking
> with means to identify the screen size etc?  Nokias use the same browser
> I believe but have different screen sizes for different models.  In the
> same respect, you can't find out a PC users screen size through PHP,
> javascript, or anything else you please.
>
> Javascript doesn't work on WAP phones.  Forget that.  You're thinking of
> WMLscript, not too sure about that side of things.
>
> There should be enough there to get u going, either way, it ain't PHP
> anymore so you'll probably find better help on wap/wml forums instead.
>
> Good luck
>
> R
>
> LaserJetter wrote:
> >
> > Thanks! They've been useful.
> >
> > How do I detect whether a WAP browser is being used? I know how to check
> > whether Netscape or IE is being used via JavaScript. Is this how to do
it
> > with WAP?
> >
> > "Ross Fleming" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > This is part of my final year project at university, so hopefully I'll
be
> > > able to help you.  Some pointers...
> > >
> > > 1. visit http://www.allnetdevices.com/faq/ for wml info
> > > 2. never assume the size of a WAP phone screen, no two are alike.
> > > 3. keep the pages TINY! WAP phones have very little memory, and don't
> > handle
> > > big pages at all.
> > > 4. generating wml pages from php.  Basically, you have to have a .php
file
> > > that creates html content.  At the above webpage there is a php script
> > that
> > > determines whether a wap browser is opening the page and directs it
> > > accordingly.
> > > 5. atart any php/wml pages with <?
> > header("Content-type=text/vnd.wap.wml");
> > > ?> and it's now a page a phone will accept.
> > > 6. as for the porting all your files to wml, then that is VERY
difficult
> > to
> > > do.  I'm not even sure PHP could do it.  This is what my project is
all
> > > about and I'm not using PHP for the conversion.  It's harder than you
> > might
> > > think to do.  Professional software can do this for you (I believe IBM
has
> > a
> > > solution but it costs a bomb) but I'd consider having a wap site and
web
> > > site, with an index.php file at the root that sends the user to the
> > correct
> > > version (using the script at 1.)
> > >


--- End Message ---
--- Begin Message ---
Jeff,

Let's start 'casting around' then. If you've already done these (I may not have read 
all of your posts) please
discuss the results of the following:

1 what happens when you run the script in a browser?
2 with/without the -c and/or -q options, what happens when you run another PHP script 
from the command line?
3 if PHP is in the PATH, what happens if C:\ is the current directory and you attempt 
to run PHP (with or
without an argument/script filename)?

Do you have another PHP script that has sent email/used the mail() function 
successfully?

Please advise,
=dn


> the path to php is already in the PATH variable...
>
> I'm not doing anything different that http://bugs.php.net/bug.php?id=6742
> ,but for some reason the -c doesn't make a difference...
>
> Jeff.
>
>
> "Dl Neil" <[EMAIL PROTECTED]> wrote in message
> 0d4f01c1a00e$87036ee0$2916100a@jrbrown">news:0d4f01c1a00e$87036ee0$2916100a@jrbrown...
> > Jeff,
> >
> > The following batch files works for me (WinNTWS 4.0 SP6a):-
> >
> > cd c:\program files\php
> > php.exe -q c:\.path.\w.php >>c:\.path.\webute.log
> >
> > NB the first line reflects my PHP config - your mileage may vary!
> >
> > Of course the other possibility is to add the PHP folder into the PATH
> environment variable...
> >
> > Regards,
> > =dn
> >
> >
> > ----- Original Message -----
> > From: "Jeff D. Hamann" <[EMAIL PROTECTED]>
> > To: <>; <[EMAIL PROTECTED]>
> > Sent: 18 January 2002 07:00
> > Subject: [PHP-WIN] command line are -c doesn't work on win2k?
> >
> >
> > > I've been trying to figure out what was wrong with my script...
> > >
> > > <?
> > > mail("[EMAIL PROTECTED]", "Subject", "command line mail() test");
> > > ?>
> > >
> > > from the command line,
> > >
> > > php mail_test.php
> > >
> > > and getting,
> > >
> > > X-Powered-By: PHP/4.0.6
> > > Content-type: text/html
> > >
> > > attempting to deliver the mail<br>
> > > <b>Warning</b>:  Unknown error in <b>mail_test.php</b> on line
> <b>3</b><br>
> > >
> > > Then I found a solution at http://bugs.php.net/bug.php?id=6742 ,
> > >
> > > [22 Nov 2000 5:21am] [EMAIL PROTECTED]
> > > After a few emails this really got solved.
> > > Adding -c/path/to/phpini/ (command line)
> > > was the solution.
> > >
> > > --Jani
> > > but, when I tried it,
> > > php -c c:\php mail_test.php,
> > > Again, the results were,
> > > X-Powered-By: PHP/4.0.6Content-type: text/html
> > >
> > > attempting to deliver the mail
> > > <br><b>Warning</b>:  Unknown error in <b>mail_test.php</b> on line
> > > <b>3</b><br>
> > >
> > >
> > > So, I tried a gazillion permitations on -c, -c /php, -c
> > > c:/php -c:\php\php.ini, etc, etc, etc, to no avail...
> > >
> > > I finally moved the script into the same dir as php.exe and it worked
> fine.
> > > The problem is that I need to run the script from the "normal" path and
> not
> > > from c:\php...
> > >
> > > Does the -c switch actually work? How can I run this script from another
> > > dir? Is this a bug?
> > >
> > > Thanks,
> > > Jeff.
> > >
> > >
> > > --
> > > Jeff D. Hamann
> > > Hamann, Donald & Associates, Inc.
> > > PO Box 1421
> > > Corvallis, Oregon USA 97339-1421
> > > Bus. 541-753-7333
> > > Cell. 541-740-5988
> > > [EMAIL PROTECTED]
> > > www.hamanndonald.com
> > >
> > >
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>

--- End Message ---
--- Begin Message ---
Figured it out. Pulled out the ->Close() and had the quit() just override
the save. Here's the new function in case anyone cares.


function spellcheck($string){
$word = new COM("word.application") or die("Unable to instanciate Word");
$word->Visible = 0;
$word->Documents->Add();
$word->Selection->TypeText($string);
$word->ActiveDocument->CheckSpelling();
$word->Selection->WholeStory();
$corrected = $word->Selection->Text;
$word->Quit(false);
$word->Release();
$word = null;
return $corrected;
}

J Wynia
phpgeek.com


--- End Message ---
--- Begin Message ---
Hopefully this is my last reply on this thread. I discovered after opening
Word normally after a few dozen tests, that it tried to "recover" all those
"lost" documents. The following demo script has that fixed.


<?php

function spellcheck($string){
$word = new COM("word.application") or die("The spellcheck function requires
MS Word.");
$word->Visible = 0;
$word->Documents->Add();
$word->Selection->TypeText($string);
$word->ActiveDocument->CheckSpelling();
$word->Selection->WholeStory();
$corrected = $word->Selection->Text;
$word->ActiveDocument->Close(false);
$word->Quit(false);
$word->Release();
$word = null;
return $corrected;
}

if ($text) {

$checkedtext= spellcheck($text);

print($checkedtext);

} else {
?>
<form action="spellcheck.php" method="post">
 Enter Text<textarea name="text"></textarea>
 <input type="submit">
</form>

<?php

}

?>

J Wynia
phpgeek.com


--- End Message ---
--- Begin Message ---
$word->ActiveDocument->Close(0);
A+
Alain

-----Original Message-----
From: news.php.net [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 17, 2002 7:43 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] VBA to Word - Syntax Question


I'm working on a simple PHP spell check that uses Word as its engine. The
whole thing works, but I want to close the temp document without being
prompted to save the VBA to do this according to several VBA sites is:

ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges

I'm looking for the PHP syntax to do this.

Here's the whole function with the test print statement at the end. The
final version will just pass back the checked string.

function spellcheck($string){
$word = new COM("word.application") or die("Unable to instanciate Word");
$word->Visible = 0;
$word->Documents->Add();
$word->Selection->TypeText($string);
$word->ActiveDocument->CheckSpelling();
$word->Selection->WholeStory();
$corrected = $word->Selection->Text;
//the VBA sample code ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges
$word->ActiveDocument->Close();
$word->Quit();
$word->Release();
$word = null;
print($corrected);
}



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
I've got everything working except for one piece.  

I'm trying to authenticat users against a mySQL database and then 
once they are authenticated I'm trying to create a session that's the 
same as their username.  Once the session is established I want to 
redirect them to another page that requires the session to be 
established.  However I get everything except for the redirection to 
work. 

At this point I have already authenticated them by finding a row in 
the database with the username and password they entered through a 
form.  Now I want to establish a session with their authenticated 
username.  

Here is where the code is failing.  

if ($myrow = mysql_fetch_array($result)) {
//if there is a row in the database then the user
//must have submitted the username and matching password

session_start();
session_register($username);
header ("Location: ./myinfo.php"); //THIS IS NOT WORKING!!!!!
//exit; 
/* I tried with and without the exit.  
If I do without the exit nothing happens 
and the below is not shown on the screen.  
When I try it with the exit the below is 
shown and I'm still not redirected. 
*/
//echo "<b><i>We have located you in the database!</b><p>";
} 
else 
{echo "<b><i>No Records Found!</b><p>";}
 //Show login again



Any tips, ideas, or suggestions would be greatly appreciated.  

Thanks,
Curt


www.killerpigs.com
www.scdservices.com
www.angryland.com
Get your Free E-mail at http://scdservices.com
____________________________________________________________
Get your own FREE Web and POP E-mail Service in 14 languages at http://www.zzn.com.
--- End Message ---
--- Begin Message ---
Curtis,

the call to session_register needs a string that names the variable:

Instead of:
session_register($username);

You need:
session_register('username');

This would register the $username variable....

Court

-----Original Message-----
From: Curtis [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 18, 2002 12:08 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Redirection Question.


I've got everything working except for one piece.  

I'm trying to authenticat users against a mySQL database and then 
once they are authenticated I'm trying to create a session that's the 
same as their username.  Once the session is established I want to 
redirect them to another page that requires the session to be 
established.  However I get everything except for the redirection to 
work. 

At this point I have already authenticated them by finding a row in 
the database with the username and password they entered through a 
form.  Now I want to establish a session with their authenticated 
username.  

Here is where the code is failing.  

if ($myrow = mysql_fetch_array($result)) {
//if there is a row in the database then the user
//must have submitted the username and matching password

session_start();
session_register($username);
header ("Location: ./myinfo.php"); //THIS IS NOT WORKING!!!!!
//exit; 
/* I tried with and without the exit.  
If I do without the exit nothing happens 
and the below is not shown on the screen.  
When I try it with the exit the below is 
shown and I'm still not redirected. 
*/
//echo "<b><i>We have located you in the database!</b><p>";
} 
else 
{echo "<b><i>No Records Found!</b><p>";}
 //Show login again



Any tips, ideas, or suggestions would be greatly appreciated.  

Thanks,
Curt


www.killerpigs.com
www.scdservices.com
www.angryland.com
Get your Free E-mail at http://scdservices.com
____________________________________________________________
Get your own FREE Web and POP E-mail Service in 14 languages at
http://www.zzn.com.

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--- End Message ---

Reply via email to