RE: [PHP-WIN] Re: I got a little confusion about mysql and php

2002-09-08 Thread Shawn Sellars

Possibly even easier would be to change the CREATE DB syntax to -

CREATE DATABASE /*!32312 IF NOT EXISTS*/ my_database_name

This assumes you don't really care about an error code being returned if
it does already exist.

Shawn Sellars
-Original Message-
> if ( database doesn't exists )
>  create db;

As far as I know, in mysql you cannot create a database that is allready
created So, the mysql_create_db() function *should* return an
error


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




php-windows Digest 8 Sep 2002 10:32:29 -0000 Issue 1328

2002-09-08 Thread php-windows-digest-help


php-windows Digest 8 Sep 2002 10:32:29 - Issue 1328

Topics (messages 15707 through 15707):

Re: I got a  little confusion about mysql and php
15707 by: Shawn Sellars

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 ---

Possibly even easier would be to change the CREATE DB syntax to -

CREATE DATABASE /*!32312 IF NOT EXISTS*/ my_database_name

This assumes you don't really care about an error code being returned if
it does already exist.

Shawn Sellars
-Original Message-
> if ( database doesn't exists )
>  create db;

As far as I know, in mysql you cannot create a database that is allready
created So, the mysql_create_db() function *should* return an
error


--- End Message ---


[PHP-WIN] exec() without waiting for completion in Win2k

2002-09-08 Thread Noel Llopis

Hello,

I'm working on a web front-end for our build system. One of the 
things I need to do is allow the user to start a lengthy build in the
back and continue using the web page.

Unfortunately, I can't find out how to do it. I can start the
build, but the web page won't complete loadinguntil the build 
finishes (which considering it can take up to 5 hours, it's 
not a good thing ;-)

I'm using Apache 1.3 under Win2k and PHP 4.2.3. I tried all 
combinations of exec ("cmd /c start build"), even doing
exec ("cmd /c start build.bat"), where build.bat contains
start build. Nothing. The web page always waits for the command
to finish.

I'm running PHP as an Apache module. I tried running it as
CGI but had no luck getting PHP to work at all.

Any suggestions? It's the most important thing this front 
end has to do. Without it, there would be no point to the program
in the first place.

Switching to Linux, unfortunately, is not an alternative I can 
consider right now since the build itself needs to happen 
in Win2k.

Thanks.


--Noel
[EMAIL PROTECTED]


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-WIN] . becomes _ when submitting page

2002-09-08 Thread Kjell Hansen

Hi,
In my HTML page I have a textarea called "filename.ext" when I submit
the page I get "filename_ext" in my $_POST array.

Anyone know why?!??!?

TIA
Kjell




-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-WIN] GET / POST

2002-09-08 Thread XXXPixie

hi! I'm a total newbie to php4 or web design and i (of course) have a
problem:
i'm using apache 2.x and php4 as a module.
so, when i use the GET method to pass data to my php script:

script.php?x=5


 i can't access it as a normal global variable:



the only way i can get to it is:



what's wrong?

by the way, what's the difference between GET and POST methods anyway?






-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-WIN] Re: exec() without waiting for completion in Win2k

2002-09-08 Thread Kurtis Harper

I am having problems as well with exec() but this may help in your case, try
single quotes, eg add this to your php script:

exec ('start C:\path\to\your\bat\file\build.bat');

Hope this helps.

"Noel Llopis" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> I'm working on a web front-end for our build system. One of the
> things I need to do is allow the user to start a lengthy build in the
> back and continue using the web page.
>
> Unfortunately, I can't find out how to do it. I can start the
> build, but the web page won't complete loadinguntil the build
> finishes (which considering it can take up to 5 hours, it's
> not a good thing ;-)
>
> I'm using Apache 1.3 under Win2k and PHP 4.2.3. I tried all
> combinations of exec ("cmd /c start build"), even doing
> exec ("cmd /c start build.bat"), where build.bat contains
> start build. Nothing. The web page always waits for the command
> to finish.
>
> I'm running PHP as an Apache module. I tried running it as
> CGI but had no luck getting PHP to work at all.
>
> Any suggestions? It's the most important thing this front
> end has to do. Without it, there would be no point to the program
> in the first place.
>
> Switching to Linux, unfortunately, is not an alternative I can
> consider right now since the build itself needs to happen
> in Win2k.
>
> Thanks.
>
>
> --Noel
> [EMAIL PROTECTED]
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.385 / Virus Database: 217 - Release Date: 9/4/2002



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-WIN] Re: exec() without waiting for completion in Win2k

2002-09-08 Thread Rich Gray

What does this do?

exec(getenv('COMSPEC').' /c c:\path\to\your\bat\file\build.bat >NUL');

Do you see any errors in the log file?

Rich
-Original Message-
From: Kurtis Harper [mailto:[EMAIL PROTECTED]]
Sent: 08 September 2002 15:33
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re: exec() without waiting for completion in Win2k


I am having problems as well with exec() but this may help in your case, try
single quotes, eg add this to your php script:

exec ('start C:\path\to\your\bat\file\build.bat');

Hope this helps.

"Noel Llopis" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> I'm working on a web front-end for our build system. One of the
> things I need to do is allow the user to start a lengthy build in the
> back and continue using the web page.
>
> Unfortunately, I can't find out how to do it. I can start the
> build, but the web page won't complete loadinguntil the build
> finishes (which considering it can take up to 5 hours, it's
> not a good thing ;-)
>
> I'm using Apache 1.3 under Win2k and PHP 4.2.3. I tried all
> combinations of exec ("cmd /c start build"), even doing
> exec ("cmd /c start build.bat"), where build.bat contains
> start build. Nothing. The web page always waits for the command
> to finish.
>
> I'm running PHP as an Apache module. I tried running it as
> CGI but had no luck getting PHP to work at all.
>
> Any suggestions? It's the most important thing this front
> end has to do. Without it, there would be no point to the program
> in the first place.
>
> Switching to Linux, unfortunately, is not an alternative I can
> consider right now since the build itself needs to happen
> in Win2k.
>
> Thanks.
>
>
> --Noel
> [EMAIL PROTECTED]
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.385 / Virus Database: 217 - Release Date: 9/4/2002



--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-WIN] GET / POST

2002-09-08 Thread Rich Gray

Comments below...

-Original Message-
From: XXXPixie [mailto:[EMAIL PROTECTED]]
Sent: 08 September 2002 09:52
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] GET / POST


hi! I'm a total newbie to php4 or web design and i (of course) have a
problem:
i'm using apache 2.x and php4 as a module.
so, when i use the GET method to pass data to my php script:

script.php?x=5


 i can't access it as a normal global variable:



the only way i can get to it is:



what's wrong?

RG> PHP v4.2.x has register_globals set to Off by default which is why you
have to access the _GET superglobal array - if security is not an issue then
either switch on register_globals again or do something like extract($_GET)
or extract($_REQUEST) at the top of your script...


by the way, what's the difference between GET and POST methods anyway?

RG> Very briefly  http get method passes data via the query string/url,
http post method data is sent via the http headers - post method is more
secure (can't be tampered with easily) and can handle large data
transmissions with binary data, get is bookmarkable but is limited in size
and can be easily modified by a user...

HTH
RIch


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-WIN] . becomes _ when submitting page

2002-09-08 Thread Ignatius Reilly

Your naming conflicts with javascript. Remember what dots are used for in
js.

Avoid using other characters than alphanum and underscore. There is no
reason you should need to use any other character.

I am not quite even sure that it is valid HTML to use dots in attributes
values.

HTH

Ignatius


- Original Message -
From: "Kjell Hansen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, September 08, 2002 7:12 PM
Subject: [PHP-WIN] . becomes _ when submitting page


> Hi,
> In my HTML page I have a textarea called "filename.ext" when I submit
> the page I get "filename_ext" in my $_POST array.
>
> Anyone know why?!??!?
>
> TIA
> Kjell
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-WIN] Re: exec() without waiting for completion in Win2k

2002-09-08 Thread Noel Llopis


On Sun, 08 Sep 2002 15:32:31 -0700
Kurtis Harper <[EMAIL PROTECTED]> wrote:

> I am having problems as well with exec() but this may help in your
> case, try single quotes, eg add this to your php script: exec ('start
> C:\path\to\your\bat\file\build.bat');

I'm afraid it didn't. Still the same problem. The page just waits for
the process to end.

On Sun, 08 Sep 2002 20:56:28 -0700
Rich Gray <[EMAIL PROTECTED]> wrote:

> What does this do?
> 
> exec(getenv('COMSPEC').' /c c:\path\to\your\bat\file\build.bat >NUL');
> 
> Do you see any errors in the log file?

No luck with that either. COMSPEC is defined as D:\WINNT\system32\cmd.exe ,
which is what I would expect.


Here's a simplified version. How about starting notepad from PHP? Can
anybody do that and have the web page finish generating before Notepad
is closed? It helps to try it out with the console version of Apache,
that way you can close Notepad by hand (instead of having to kill it
from the process list).

If anybody can get that to work, let me know. I would change my
configuration to match yours. 

Thanks for all the suggestions so far.


--Noel
[EMAIL PROTECTED]


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-WIN] mail() on W2K Pro

2002-09-08 Thread Ignatius Reilly

Hi,

I want to be able to use error_log() ( or mail() ) in a W2K Pro installation
(PHP 4.2). I suppose some kind of message queuing service or SMTP server has
to be installed.

I would appreciate if somebody who has done this successfully could give me
some indications.

Ignatius



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-WIN] Re: exec() without waiting for completion in Win2k

2002-09-08 Thread Rich Gray

Sorry ... I misunderstood (i.e. didn't bother to read your post fully!) -
look into running the AT command to run the command asyncronously

i.e.


Rich

-Original Message-
From: Noel Llopis [mailto:[EMAIL PROTECTED]]
Sent: 08 September 2002 13:43
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Re: exec() without waiting for completion in
Win2k



On Sun, 08 Sep 2002 15:32:31 -0700
Kurtis Harper <[EMAIL PROTECTED]> wrote:

> I am having problems as well with exec() but this may help in your
> case, try single quotes, eg add this to your php script: exec ('start
> C:\path\to\your\bat\file\build.bat');

I'm afraid it didn't. Still the same problem. The page just waits for
the process to end.

On Sun, 08 Sep 2002 20:56:28 -0700
Rich Gray <[EMAIL PROTECTED]> wrote:

> What does this do?
>
> exec(getenv('COMSPEC').' /c c:\path\to\your\bat\file\build.bat >NUL');
>
> Do you see any errors in the log file?

No luck with that either. COMSPEC is defined as D:\WINNT\system32\cmd.exe ,
which is what I would expect.


Here's a simplified version. How about starting notepad from PHP? Can
anybody do that and have the web page finish generating before Notepad
is closed? It helps to try it out with the console version of Apache,
that way you can close Notepad by hand (instead of having to kill it
from the process list).

If anybody can get that to work, let me know. I would change my
configuration to match yours.

Thanks for all the suggestions so far.


--Noel
[EMAIL PROTECTED]


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-WIN] Re: exec() without waiting for completion in Win2k

2002-09-08 Thread Noel Llopis


On Sun, 08 Sep 2002 22:42:44 -0700
Rich Gray <[EMAIL PROTECTED]> wrote:

> Sorry ... I misunderstood (i.e. didn't bother to read your post fully!) -
> look into running the AT command to run the command asyncronously
> 
> i.e.
>  $time=date("H:i");
> exec(getenv('WINDIR').'\\system32\\at.exe '.$time.'
> C:\MyPath\MyScript.bat');
> ?>

Hmmm... Tempting, but there is one big problem. I just found out that
commands executed with AT don't have access to network drives or
settings. Some of this build process involves fetching data over the
network, so it won't work.

I even wrote a C program that calls spawn() on the command you pass on
the command line, but it didn't work either. I can't believe how
frustrating this is. All of which could have been accomplished with a
sinmple & under Unix :-(

Any other ideas? I think I tried just about everything I could think of.
Thanks.


--Noel

> -Original Message-
> From: Noel Llopis [mailto:[EMAIL PROTECTED]]
> Sent: 08 September 2002 13:43
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] Re: exec() without waiting for completion in
> Win2k
> 
> 
> 
> On Sun, 08 Sep 2002 15:32:31 -0700
> Kurtis Harper <[EMAIL PROTECTED]> wrote:
> 
> > I am having problems as well with exec() but this may help in your
> > case, try single quotes, eg add this to your php script: exec ('start
> > C:\path\to\your\bat\file\build.bat');
> 
> I'm afraid it didn't. Still the same problem. The page just waits for
> the process to end.
> 
> On Sun, 08 Sep 2002 20:56:28 -0700
> Rich Gray <[EMAIL PROTECTED]> wrote:
> 
> > What does this do?
> >
> > exec(getenv('COMSPEC').' /c c:\path\to\your\bat\file\build.bat >NUL');
> >
> > Do you see any errors in the log file?
> 
> No luck with that either. COMSPEC is defined as D:\WINNT\system32\cmd.exe ,
> which is what I would expect.
> 
> 
> Here's a simplified version. How about starting notepad from PHP? Can
> anybody do that and have the web page finish generating before Notepad
> is closed? It helps to try it out with the console version of Apache,
> that way you can close Notepad by hand (instead of having to kill it
> from the process list).
> 
> If anybody can get that to work, let me know. I would change my
> configuration to match yours.
> 
> Thanks for all the suggestions so far.
> 
> 
> --Noel
> [EMAIL PROTECTED]
> 
> 
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




php-windows Digest 8 Sep 2002 23:27:05 -0000 Issue 1329

2002-09-08 Thread php-windows-digest-help


php-windows Digest 8 Sep 2002 23:27:05 - Issue 1329

Topics (messages 15708 through 15718):

exec() without waiting for completion in Win2k
15708 by: Noel Llopis
15711 by: Kurtis Harper
15712 by: Rich Gray
15715 by: Noel Llopis
15717 by: Rich Gray
15718 by: Noel Llopis

. becomes _ when submitting page
15709 by: Kjell Hansen
15714 by: Ignatius Reilly

GET / POST
15710 by: XXXPixie
15713 by: Rich Gray

mail() on W2K Pro
15716 by: Ignatius Reilly

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 ---

Hello,

I'm working on a web front-end for our build system. One of the 
things I need to do is allow the user to start a lengthy build in the
back and continue using the web page.

Unfortunately, I can't find out how to do it. I can start the
build, but the web page won't complete loadinguntil the build 
finishes (which considering it can take up to 5 hours, it's 
not a good thing ;-)

I'm using Apache 1.3 under Win2k and PHP 4.2.3. I tried all 
combinations of exec ("cmd /c start build"), even doing
exec ("cmd /c start build.bat"), where build.bat contains
start build. Nothing. The web page always waits for the command
to finish.

I'm running PHP as an Apache module. I tried running it as
CGI but had no luck getting PHP to work at all.

Any suggestions? It's the most important thing this front 
end has to do. Without it, there would be no point to the program
in the first place.

Switching to Linux, unfortunately, is not an alternative I can 
consider right now since the build itself needs to happen 
in Win2k.

Thanks.


--Noel
[EMAIL PROTECTED]


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

I am having problems as well with exec() but this may help in your case, try
single quotes, eg add this to your php script:

exec ('start C:\path\to\your\bat\file\build.bat');

Hope this helps.

"Noel Llopis" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> I'm working on a web front-end for our build system. One of the
> things I need to do is allow the user to start a lengthy build in the
> back and continue using the web page.
>
> Unfortunately, I can't find out how to do it. I can start the
> build, but the web page won't complete loadinguntil the build
> finishes (which considering it can take up to 5 hours, it's
> not a good thing ;-)
>
> I'm using Apache 1.3 under Win2k and PHP 4.2.3. I tried all
> combinations of exec ("cmd /c start build"), even doing
> exec ("cmd /c start build.bat"), where build.bat contains
> start build. Nothing. The web page always waits for the command
> to finish.
>
> I'm running PHP as an Apache module. I tried running it as
> CGI but had no luck getting PHP to work at all.
>
> Any suggestions? It's the most important thing this front
> end has to do. Without it, there would be no point to the program
> in the first place.
>
> Switching to Linux, unfortunately, is not an alternative I can
> consider right now since the build itself needs to happen
> in Win2k.
>
> Thanks.
>
>
> --Noel
> [EMAIL PROTECTED]
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.385 / Virus Database: 217 - Release Date: 9/4/2002



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

What does this do?

exec(getenv('COMSPEC').' /c c:\path\to\your\bat\file\build.bat >NUL');

Do you see any errors in the log file?

Rich
-Original Message-
From: Kurtis Harper [mailto:[EMAIL PROTECTED]]
Sent: 08 September 2002 15:33
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re: exec() without waiting for completion in Win2k


I am having problems as well with exec() but this may help in your case, try
single quotes, eg add this to your php script:

exec ('start C:\path\to\your\bat\file\build.bat');

Hope this helps.

"Noel Llopis" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> I'm working on a web front-end for our build system. One of the
> things I need to do is allow the user to start a lengthy build in the
> back and continue using the web page.
>
> Unfortunately, I can't find out how to do it. I can start the
> build, but the web page won't complete loadinguntil the build
> finishes (which considering it can take up to 5 hours, it's
> not a good thing ;-)
>
> I'm using Apache 1.3 under Win2k and PHP 4.2.3. I tried all
> combinations of exec ("cmd /c start build"), even doing
> exec ("cmd /c start build.bat"), where build.bat contains
> start build. Nothing. The web page always waits for the command
> to finish.
>
> I'm running PHP as an Apache module. I tried running it as
> CGI but had no luck getting PHP to work at all.
>
> Any suggestions

[PHP-WIN] Re: mail() on W2K Pro

2002-09-08 Thread Steve Yates

"Ignatius Reilly" <[EMAIL PROTECTED]> wrote in message
004e01c25778$8ce4c490$a04d933e@satellite">news:004e01c25778$8ce4c490$a04d933e@satellite...
> I want to be able to use error_log() ( or mail() ) in a W2K Pro
installation
> (PHP 4.2). I suppose some kind of message queuing service or SMTP server
has
> to be installed.
>
> I would appreciate if somebody who has done this successfully could give
me
> some indications.

What problems are you having?  I haven't used error_log() but mail()
works using either localhost (at least with recent versions of PHP) or your
ISP's SMTP server.  You have to set that setting in your PHP.INI file.

 - Steve Yates
 - For people who like peace and quiet:  a phoneless cord.

~ Do you like my taglines? Add them to your messages and
~ laugh through hundreds more by downloading Taglinator
~ at www.srtware.com today!





-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-WIN] Windows + mySQL + PHP4 question

2002-09-08 Thread Kerry Kobashi

If I recall, PHP4 has built in mySQL function calls.

On  a Windows NT 4.0/2000 server system:
   Is myODBC required to access mySQL with PHP?



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-WIN] Windows + mySQL + PHP4 question

2002-09-08 Thread php

Nope. MySQL support is built in. Give it a try.

-Dash

If you think last Tuesday was a drag, wait till you see what happens
tomorrow!

On Sun, 8 Sep 2002, Kerry Kobashi wrote:

> If I recall, PHP4 has built in mySQL function calls.
>
> On  a Windows NT 4.0/2000 server system:
>Is myODBC required to access mySQL with PHP?
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php