php-windows Digest 25 Oct 2002 14:54:12 -0000 Issue 1406
Topics (messages 16542 through 16557):
Re: Notice: Undefined variable:
16542 by: Thoenen, Peter Mr. EPS
16544 by: Hornig at NOSPAM artshock2d dot de
16545 by: neil smith
Problem with set_time_limit() and uploading large files
16543 by: derek fong
16557 by: derek fong
Session timeOut
16546 by: Sichta Daniel
MS Access
16547 by: Douglas F. Keim
MySQL Query
16548 by: James Meers
16549 by: Ignatius Reilly
16551 by: James Meers
16553 by: Ignatius Reilly
Login from another page
16550 by: Douglas F. Keim
Re: COM gurus... please help
16552 by: Asendorf, John
16554 by: Scott Carr
16555 by: Scott Carr
Re: Print data
16556 by: Dan Koken
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 ---
RTFM would fix this in 2 minutes but trying to avoid work.
First off, make that <form><div>....</div></form> ... <form> is not a block
element and you can't place <input>'s in it ... eg <form><input/></form> ...
you can but its a) illegal b) bad form. But I digress. All your form
variables are in the enviromental arrays $_POST and $_GET .... try <?php
echo $_GET['guest_name']?>
-Peter
> -----Original Message-----
> From: Richard West [mailto:ice_dog76@;hotmail.com]
> Sent: Friday, October 25, 2002 05:01
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Notice: Undefined variable:
>
>
> Hey, I just installed apache and php on my desktop and everything was
> working great. I went to go make a form and I am getting these errors
> everytime I try to access one of the variables in the form
>
> Notice: Undefined variable: guest_name in
> C:\www\book_add.php on line 18
>
> anyone got an idea why its doing it. this is what my form looks like.
> <form method=get action="book_add.php">
> Your Name: <input name="guest_name" type="text"><br>
> Your e-mail: <input name="address" type="text"><br>
> Your comments:<br> <TextArea name="comments" cols="50" rows="5">
> </textarea>
> <br>
> <br>
> <input type=submit>
> </form>
> and my out put it this
> <?php $guest_name; ?>
> any ideas why I can't access my query variables??
>
> Richard West
> [EMAIL PROTECTED]
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
"Richard West" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:20021025015917.6473.qmail@;pb1.pair.com...
> Hey, I just installed apache and php on my desktop and everything was
> working great. I went to go make a form and I am getting these errors
> everytime I try to access one of the variables in the form
>
> Notice: Undefined variable: guest_name in C:\www\book_add.php on line 18
>
> anyone got an idea why its doing it. this is what my form looks like.
> <form method=get action="book_add.php">
> Your Name: <input name="guest_name" type="text"><br>
> Your e-mail: <input name="address" type="text"><br>
> Your comments:<br> <TextArea name="comments" cols="50" rows="5">
> </textarea>
> <br>
> <br>
> <input type=submit>
> </form>
> and my out put it this
> <?php $guest_name; ?>
> any ideas why I can't access my query variables??
>
> Richard West
> [EMAIL PROTECTED]
>
>
ahm, which version of php you're using?
from version 4.2.3 the get and post requests changed because of a security
problem. now you have to access the post and get variables with
$HTTP_GET_VARS[] or
the short $_GET[] or for post variables $HTTP_POST_VARS[] or the same in
short $_POST[].
i think that would be the problem...
an other advice could be: go into your php.ini and set "register_globals"
on. ... but it isn't recommend...
i hope i could help you!? :)
--- End Message ---
--- Begin Message ---
Yeah sure - there is a setting called 'register_globals' which is available
to acquire variables from post or get vars but its off by default for
security reasons. You can set this to On in php.ini file
The better way though is to explicitly state where you want to acquire user
iinput : in your case it would be
$HTTP_GET_VARS['guest_name'] or $_GET['guest_name'] depending on the
version of PHP you run. Form values sent using POST rather than GET are
exactly the same, use $HTTP_POST_VARS or $_POST to access the array of
variables. GET and POST variables are arrays. Theres also
$HTTP_POST_FILES[] which is populated when you use a file upload field in
your form.
You will need to read the manual more for posting files, there are a few
gotchas.
Good luck
Neil Smith.
At 02:14 25/10/2002 +0000, you wrote:
Message-ID: <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Reply-To: "Richard West" <[EMAIL PROTECTED]>
From: "Richard West" <[EMAIL PROTECTED]>
Date: Thu, 24 Oct 2002 22:01:05 -0500
Subject: Notice: Undefined variable:
Hey, I just installed apache and php on my desktop and everything was
working great. I went to go make a form and I am getting these errors
everytime I try to access one of the variables in the form
Notice: Undefined variable: guest_name in C:\www\book_add.php on line 18
anyone got an idea why its doing it. this is what my form looks like.
<form method=get action="book_add.php">
Your Name: <input name="guest_name" type="text"><br>
Your e-mail: <input name="address" type="text"><br>
Your comments:<br> <TextArea name="comments" cols="50" rows="5">
</textarea>
<br>
<br>
<input type=submit>
</form>
and my out put it this
<?php $guest_name; ?>
any ideas why I can't access my query variables??
--- End Message ---
--- Begin Message ---
Hi,
I am having a major problem getting set_time_limit() to work at all
with PHP 4.2.3 running as a CGI program under IIS. I have a script
that accepts large files for upload, with the following lines at the
top of the script:
<?php
// let this script take as long as it needs to complete its work
// and ignore if user hits stops button in his browser
set_time_limit(0);
ignore_user_abort(true);
// include site-wide configs and other include files
require_once('../includes/site.php');
...
If the file upload takes longer than 30 seconds, PHP bombs out with the
following error:
"Fatal error: Maximum execution time of 30 seconds exceeded in
D:\InetPub\test.php on line 3"
I've also tried adding:
ini_set('max_execution_time', 60000);
before the set_time_limit() function, but to no avail. PHP is not
running in safe mode. Does anyone have any ideas why this is not
working as expected? I'm sure it's something obvious, but I don't know
what it is.
Thanks in advance,
-f
--
Derek Fong
Web Application Developer
subtitle designs inc. <http://www.subtitled.com/>
"Mistakes are the portals of discovery." --James Joyce
>> GPG key/fingerprint available upon request <<
--- End Message ---
--- Begin Message ---
Hi Michael,
Unfortunately, that is not the case. The site is using custom-built
code and functions from the PEAR repository, and this is the only
occurrence of a set_time_limit() function call. :( I don't think PEAR
uses set_time_limit() anywhere either, but I'll do a grep for that and
see what turns up...
-f
On Friday, October 25, 2002, at 03:43 am, Michael Hazelden wrote:
Derek - I was battling with this very problem myself ... but in the
end - I
discovered that in a module I'd downloaded - there was (buried under
5000
lines of code) another set_time_limit function. I removed that and my
problem went away.
Check over site.php - follow the code path exactly and I'm sure you'll
find
one.
Michael.
-----Original Message-----
From: derek fong [mailto:php-win@;subtitled.com]
Sent: 25 October 2002 03:55
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Problem with set_time_limit() and uploading large
files
Hi,
I am having a major problem getting set_time_limit() to work at all
with PHP 4.2.3 running as a CGI program under IIS. I have a script
that accepts large files for upload, with the following lines at the
top of the script:
<?php
// let this script take as long as it needs to complete its work
// and ignore if user hits stops button in his browser
set_time_limit(0);
ignore_user_abort(true);
// include site-wide configs and other include files
require_once('../includes/site.php');
...
If the file upload takes longer than 30 seconds, PHP bombs out with the
following error:
"Fatal error: Maximum execution time of 30 seconds exceeded in
D:\InetPub\test.php on line 3"
I've also tried adding:
ini_set('max_execution_time', 60000);
before the set_time_limit() function, but to no avail. PHP is not
running in safe mode. Does anyone have any ideas why this is not
working as expected? I'm sure it's something obvious, but I don't know
what it is.
Thanks in advance,
-f
--
Derek Fong
Web Application Developer
subtitle designs inc. <http://www.subtitled.com/>
"Mistakes are the portals of discovery." --James Joyce
GPG key/fingerprint available upon request <<
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_____________________________________________________________________
This message has been checked for all known viruses by the
MessageLabs Virus Control Centre.
This message has been checked for all known viruses by the MessageLabs
Virus Control Centre.
*********************************************************************
Notice: This email is confidential and may contain copyright material
of Ocado Limited (the "Company"). Opinions and views expressed in this
message may not necessarily reflect the opinions and views of the
Company.
If you are not the intended recipient, please notify us immediately
and delete all copies of this message. Please note that it is your
responsibility to scan this message for viruses.
Company reg. no. 3875000. Swallowdale Lane, Hemel Hempstead HP2 7PY
*********************************************************************
--- End Message ---
--- Begin Message ---
Hi,
cfg: w2k prof, apache 1.3, php 4.2.3
Is there any way to set %subject% ? I need to take some action when client
do not touch keyboard for specific amount of time
THX
Dan
--- End Message ---
--- Begin Message ---
I have been kicking around using MS Access for the BBS, is there a way to do
this? Through ODBC?
--- End Message ---
--- Begin Message ---
i want to update a field and add an array, this is what i have so far, however it
doesnt work, can anyone help?
update user_table set categories in ('5','6') where userid='1'
James
--- End Message ---
--- Begin Message ---
arrays are not a datatype for MySQL.
You have to serialize your array into a string. You must choose a suitable
delimitor that will not conflict with your data. Taking as an example ",":
$to_feed = implode( "," , my_array ) ;
$query = " update user_table set categories in '({$to_feed})' where
userid='1' " ;
HTH
Ignatius
____________________________________________
----- Original Message -----
From: "James Meers" <[EMAIL PROTECTED]>
To: "PHP Helplist Windows" <[EMAIL PROTECTED]>
Sent: Friday, October 25, 2002 1:39 PM
Subject: [PHP-WIN] MySQL Query
> i want to update a field and add an array, this is what i have so far,
however it doesnt work, can anyone help?
>
> update user_table set categories in ('5','6') where userid='1'
>
>
>
> James
>
>
--- End Message ---
--- Begin Message ---
Ok, solved that problem, can anyone help me on my last query, i need to select
categories that are not the following id's, this is what i have:
select * from category_table where catid ! in ('2','4')
Can anyone help me?
James
-----Original Message-----
From: Ignatius Reilly [mailto:ignatius.reilly@;free.fr]
Sent: Fri 25/10/2002 12:57
To: James Meers; PHP Helplist Windows
Cc:
Subject: Re: [PHP-WIN] MySQL Query
arrays are not a datatype for MySQL.
You have to serialize your array into a string. You must choose a suitable
delimitor that will not conflict with your data. Taking as an example ",":
$to_feed = implode( "," , my_array ) ;
$query = " update user_table set categories in '({$to_feed})' where
userid='1' " ;
HTH
Ignatius
____________________________________________
----- Original Message -----
From: "James Meers" <[EMAIL PROTECTED]>
To: "PHP Helplist Windows" <[EMAIL PROTECTED]>
Sent: Friday, October 25, 2002 1:39 PM
Subject: [PHP-WIN] MySQL Query
> i want to update a field and add an array, this is what i have so far,
however it doesnt work, can anyone help?
>
> update user_table set categories in ('5','6') where userid='1'
>
>
>
> James
>
>
--- End Message ---
--- Begin Message ---
select * from category_table where catid not in ('2','4')
You have an excellent function index in the MySQL manual. I would recommend
to reading it thoroughly.
HTH
Ignatius
____________________________________________
----- Original Message -----
From: "James Meers" <[EMAIL PROTECTED]>
To: "Ignatius Reilly" <[EMAIL PROTECTED]>; "PHP Helplist Windows"
<[EMAIL PROTECTED]>
Sent: Friday, October 25, 2002 2:30 PM
Subject: RE: [PHP-WIN] MySQL Query
> Ok, solved that problem, can anyone help me on my last query, i need to
select categories that are not the following id's, this is what i have:
>
> select * from category_table where catid ! in ('2','4')
>
> Can anyone help me?
>
> James
>
> -----Original Message-----
> From: Ignatius Reilly [mailto:ignatius.reilly@;free.fr]
> Sent: Fri 25/10/2002 12:57
> To: James Meers; PHP Helplist Windows
> Cc:
> Subject: Re: [PHP-WIN] MySQL Query
>
>
>
> arrays are not a datatype for MySQL.
>
> You have to serialize your array into a string. You must choose a suitable
> delimitor that will not conflict with your data. Taking as an example ",":
>
> $to_feed = implode( "," , my_array ) ;
>
> $query = " update user_table set categories in '({$to_feed})' where
> userid='1' " ;
>
> HTH
> Ignatius
> ____________________________________________
> ----- Original Message -----
> From: "James Meers" <[EMAIL PROTECTED]>
> To: "PHP Helplist Windows" <[EMAIL PROTECTED]>
> Sent: Friday, October 25, 2002 1:39 PM
> Subject: [PHP-WIN] MySQL Query
>
>
> > i want to update a field and add an array, this is what i have so far,
> however it doesnt work, can anyone help?
> >
> > update user_table set categories in ('5','6') where userid='1'
> >
> >
> >
> > James
> >
> >
>
>
>
>
--- End Message ---
--- Begin Message ---
I installed php, mysql and phpbb on my web site. The bbs is great and a
wonderful way to communicate with clients and family.
However, there is an area on my web that I have password protected earlier
with a MS Access database. Now I have two databases to maintain and two
areas that I have to set up users. Though relatively easy to do, it is a
duplication of effort.
What I think that I would like to do is use one or the other for both
functions. Since the BBS is working so well in the PHP world, I am leaning
towards MySQL as the preferred database of choice.
My question is this.
How do I access the mysql database from a web page that is not going to go
into the bbs?
I would also like to allow a user to update his/her own profile. Maybe even
change their own password on occasion if they would like.
Anyone help?
--- End Message ---
--- Begin Message ---
UPDATE
Well, I've got it working now, KINDA. Here's the problem, when I call the
script the first time, it runs fine and displays the map properly. BUT, if
I call the script again, it won't run. If I wait for the $objMapSvr object
to timeout, it will run again, or if I stop and start the Map Service it
will run again.
Any information or suggestions? I'm wondering if there is a problem since
the $objMapSvr object is made from the $objMapSvrMngr object? Can I make a
COM object from a COM object? (Or for that matter, SHOULD I?)
Thanks,
John
---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Nullum magnum ingenium sine mixtura dementiae fuit
> -----Original Message-----
> From: Asendorf, John [mailto:JAsendorf@;lcounty.com]
> Sent: Thursday, October 24, 2002 9:47 AM
> To: Php-Windows (E-mail)
> Subject: [PHP-WIN] COM gurus... please help
>
>
> Hello all,
>
> PHP 4.2.3, NT4, IIS4
>
> I finally have a practical application to use COM and I'm
> trying to port
> some ASP scripting. I'm getting an error (Warning: Invoke() failed:
> Exception occurred. Source: Unavailable Description: Unavailable in
> D:\spoof\gis\file.php on line 66 and then the timeout error).
> The second
> uncommented line is line 66 ($objMapSvr = ...). If someone
> knows the ASP
> code, it's commented above the PHP lines. Any help would be
> appreciated.
> The ASP file runs fine. I have a feeling once I get past
> this hump... the
> rest should run smoothly. Thanks, John
>
> //Set objMapSvrMngr = Server.CreateObject("GMWebMap.MapServerManager")
> $objMapSvrMngr = new COM("GMWebMap.MapServerManager") or die("Couldn't
> create COM");
>
> //set objMapSvr = objMapSvrMngr.MapServer("")
> $objMapSvr = $objMapSvrMngr->MapServer("");
>
>
> ---------------------
> John Asendorf - [EMAIL PROTECTED]
> Web Applications Developer
> http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> Licking County, Ohio, USA
> 740-349-3631
> Nullum magnum ingenium sine mixtura dementiae fuit
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
What OS are you running this on?
--
Scott Carr
OpenOffice.org
Documentation Maintainer
http://documentation.openoffice.org/
Quoting "Asendorf, John" <[EMAIL PROTECTED]>:
> UPDATE
>
> Well, I've got it working now, KINDA. Here's the problem, when I call the
> script the first time, it runs fine and displays the map properly. BUT, if
> I call the script again, it won't run. If I wait for the $objMapSvr object
> to timeout, it will run again, or if I stop and start the Map Service it
> will run again.
>
> Any information or suggestions? I'm wondering if there is a problem since
> the $objMapSvr object is made from the $objMapSvrMngr object? Can I make a
> COM object from a COM object? (Or for that matter, SHOULD I?)
>
> Thanks,
>
> John
>
> ---------------------
> John Asendorf - [EMAIL PROTECTED]
> Web Applications Developer
> http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> Licking County, Ohio, USA
> 740-349-3631
> Nullum magnum ingenium sine mixtura dementiae fuit
>
>
> > -----Original Message-----
> > From: Asendorf, John [mailto:JAsendorf@;lcounty.com]
> > Sent: Thursday, October 24, 2002 9:47 AM
> > To: Php-Windows (E-mail)
> > Subject: [PHP-WIN] COM gurus... please help
> >
> >
> > Hello all,
> >
> > PHP 4.2.3, NT4, IIS4
> >
> > I finally have a practical application to use COM and I'm
> > trying to port
> > some ASP scripting. I'm getting an error (Warning: Invoke() failed:
> > Exception occurred. Source: Unavailable Description: Unavailable in
> > D:\spoof\gis\file.php on line 66 and then the timeout error).
> > The second
> > uncommented line is line 66 ($objMapSvr = ...). If someone
> > knows the ASP
> > code, it's commented above the PHP lines. Any help would be
> > appreciated.
> > The ASP file runs fine. I have a feeling once I get past
> > this hump... the
> > rest should run smoothly. Thanks, John
> >
> > //Set objMapSvrMngr = Server.CreateObject("GMWebMap.MapServerManager")
> > $objMapSvrMngr = new COM("GMWebMap.MapServerManager") or die("Couldn't
> > create COM");
> >
> > //set objMapSvr = objMapSvrMngr.MapServer("")
> > $objMapSvr = $objMapSvrMngr->MapServer("");
> >
> >
> > ---------------------
> > John Asendorf - [EMAIL PROTECTED]
> > Web Applications Developer
> > http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> > Licking County, Ohio, USA
> > 740-349-3631
> > Nullum magnum ingenium sine mixtura dementiae fuit
> >
> > --
> > 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
>
>
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
--- End Message ---
--- Begin Message ---
Sorry, you already stated that in your first email.
What user is IIS running as? You need to set it to a user of the system, the
system user will not work. Also, you may need to look into the DCOM config
settings to make sure all users have access to COM on the system.
Most of my problems with COM have been Security related. Even if I think there
is no way they can be security related, it turns out they were. So check,
recheck and double check.
Have fun...
--
Scott Carr
OpenOffice.org
Documentation Maintainer
http://documentation.openoffice.org/
Quoting "Asendorf, John" <[EMAIL PROTECTED]>:
> UPDATE
>
> Well, I've got it working now, KINDA. Here's the problem, when I call the
> script the first time, it runs fine and displays the map properly. BUT, if
> I call the script again, it won't run. If I wait for the $objMapSvr object
> to timeout, it will run again, or if I stop and start the Map Service it
> will run again.
>
> Any information or suggestions? I'm wondering if there is a problem since
> the $objMapSvr object is made from the $objMapSvrMngr object? Can I make a
> COM object from a COM object? (Or for that matter, SHOULD I?)
>
> Thanks,
>
> John
>
> ---------------------
> John Asendorf - [EMAIL PROTECTED]
> Web Applications Developer
> http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> Licking County, Ohio, USA
> 740-349-3631
> Nullum magnum ingenium sine mixtura dementiae fuit
>
>
> > -----Original Message-----
> > From: Asendorf, John [mailto:JAsendorf@;lcounty.com]
> > Sent: Thursday, October 24, 2002 9:47 AM
> > To: Php-Windows (E-mail)
> > Subject: [PHP-WIN] COM gurus... please help
> >
> >
> > Hello all,
> >
> > PHP 4.2.3, NT4, IIS4
> >
> > I finally have a practical application to use COM and I'm
> > trying to port
> > some ASP scripting. I'm getting an error (Warning: Invoke() failed:
> > Exception occurred. Source: Unavailable Description: Unavailable in
> > D:\spoof\gis\file.php on line 66 and then the timeout error).
> > The second
> > uncommented line is line 66 ($objMapSvr = ...). If someone
> > knows the ASP
> > code, it's commented above the PHP lines. Any help would be
> > appreciated.
> > The ASP file runs fine. I have a feeling once I get past
> > this hump... the
> > rest should run smoothly. Thanks, John
> >
> > //Set objMapSvrMngr = Server.CreateObject("GMWebMap.MapServerManager")
> > $objMapSvrMngr = new COM("GMWebMap.MapServerManager") or die("Couldn't
> > create COM");
> >
> > //set objMapSvr = objMapSvrMngr.MapServer("")
> > $objMapSvr = $objMapSvrMngr->MapServer("");
> >
> >
> > ---------------------
> > John Asendorf - [EMAIL PROTECTED]
> > Web Applications Developer
> > http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> > Licking County, Ohio, USA
> > 740-349-3631
> > Nullum magnum ingenium sine mixtura dementiae fuit
> >
> > --
> > 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
>
>
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
--- End Message ---
--- Begin Message ---
We faced this problem, and decided if we couldn't get a good solution to
eliminate the printer. Turns out the users liked it better, and we
eliminated a lot of paper.
- First we wrote a report writer.
- All reports go to the database.
- We wrote a report file system.
- The report output title shows up in the user report file system in the
IN BASKET.
- The user can click the file and it displays the first 5 pages to the
screen. They can change the start page and number of pages.
- The user can file it into other files like WEEKLY REPORTS.
- They can send the report to others and it shows up in their IN BASKET.
- If they delete the report it sits in the WASTE BASKET file for 10
days. This gives them the ability to file it back somewhere if it was
deleted by mistake.
This is fast because the reports are run on the server. Only one copy of
the report is kept in the database, and the user report file system
points to it.
Anyway this was our solution and the users love it since they no longer
have to file paper, but file reports electronically. They can carbon
copy anyone. They can look at any section of the report any time. They
can still print the report if they want by using the print button.
HTH... Have a great day... Dan
José Moreira wrote:
hello, at my company we have several network printers and i was was
wondering if it's possible to print directly to them using PHP, instead
of showing on the screen or both ...
to gain more control on what is printed, because of the nasty browsers
header and footer ... whom i now how to remove ...
i know that the printer IP is 192.192.1.100 and the port is 9005 ...
--- End Message ---