|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general Digest 12 Feb 2004 18:35:56 -0000 Issue 2586
php-general-digest-help
lists.php.net
Date: Thu Feb 12 2004 - 12:35:56 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 12 Feb 2004 18:35:56 -0000 Issue 2586
Topics (messages 177478 through 177536):
Re: weird header() (bug may be)
177478 by: Eric Bolikowski
177479 by: Jason Wong
177480 by: joel boonstra
177481 by: Chris Shiflett
177483 by: Richard Davey
177492 by: Richard Davey
177498 by: adwinwijaya
177499 by: Richard Davey
177505 by: adwinwijaya
177506 by: Richard Davey
177507 by: Marek Kilimajer
177510 by: memoimyself.yahoo.com.br
177513 by: Marek Kilimajer
177528 by: Chris Shiflett
177535 by: Anil Kumar K.
Re: PHp Books
177482 by: rush
Re: Zlib - Insert files?
177484 by: Till Krüss
getting month from date variable
177485 by: Angelo Zanetti
177486 by: Vincent Jansen
find some application
177487 by: Poltak Reynold Priyadi
177488 by: Jonathan Wilkes
177491 by: Angelo Zanetti
177493 by: Richard Davey
177501 by: Richard Davey
Re: [Q]PHP not taking input values from forms
177489 by: Ford, Mike [LSS]
177526 by: Dan Aloma
177527 by: Philip Olson
177530 by: Dan Aloma
Imagejpeg and image size question
177490 by: John
177521 by: Tom Rogers
bar code scaning in intranet ap
177494 by: Michal Strnad
177502 by: Andrew Séguin
177514 by: Michal
177515 by: Michal
177516 by: Michal
177517 by: Michal
177520 by: James E Hicks III
Unique ID - again
177495 by: Alex
177496 by: Richard Davey
177529 by: Galen
Re: Please help me understand gmmktime()
177497 by: Ford, Mike [LSS]
Re: mutliple select form not passing multiple values
177500 by: Ford, Mike [LSS]
Re: Running Apache in one machine and php in another
177503 by: Harry Sufehmi
Call to a member function on a non-object
177504 by: Angelo Zanetti
177508 by: Richard Davey
177509 by: adwinwijaya
{ot help needed} mod_auth_mysql
177511 by: Jay Blanchard
Re: form array
177512 by: memoimyself.yahoo.com.br
Re: I think this is a mysql question
177518 by: Marek Kilimajer
177519 by: Marek Kilimajer
Problem with SQL Server.
177522 by: Juan Torres
Re: Problem with XSLT Sablotron
177523 by: Raditha Dissanayake
PHP and DDE
177524 by: Manuel Ochoa
recode segmentation fault
177525 by: mehdi
Re: A dumb question
177531 by: David T-G
177532 by: Alex Hogan
177533 by: John Nichel
177534 by: Jeremy Schroeder
Using date() with the function fileatime() doesn't return accurate timestamp...
177536 by: Scott Fletcher
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
Headers have to be pretty accurate, or it will cause trouble.
And your redirect header is not quite correct.
It should be this:
header("Location: another_page.php");
and NOT header("Location:another_page.php");
What you need here is a space between "Location:" and the URL.
"Adwinwijaya" <adwinwijaya
yahoo.com.au> wrote in message
news:1889621761.20040212172029
yahoo.com.au...
> Hello php-generaler's ,
>
> I have a script like this :
>
> if($foo == 'something'){
> header('Location:to_another_page.php') ;
> }else
> {
> do another thing in here
> }
>
> header('Location:to_previous_page.php');
>
>
> I got a problem ... when $foo == 'something' .. it wont redirect me
> to to_another_page.php .... but if I put die(); after calling
> header(); .. it will work ...
>
> is this the bug ?
>
> I use php 4.3.4 ... and Apache 2.x
>
> thanks
>
>
> --
> Best regards,
> adwinwijaya mailto:adwinwijaya
yahoo.com.au
attached mail follows:
On Thursday 12 February 2004 14:40, Eric Bolikowski wrote:
> Headers have to be pretty accurate, or it will cause trouble.
> And your redirect header is not quite correct.
> It should be this:
> header("Location: another_page.php");
> and NOT header("Location:another_page.php");
>
> What you need here is a space between "Location:" and the URL.
Also it should be an absolute URL otherwise it might break on some (standards
compliant only) browsers:
header("Location: http://www.example.tld/another_page.php");
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Honesty is the best policy, but insanity is a better defense.
*/
attached mail follows:
On Thu, Feb 12, 2004 at 05:20:29PM +1100, adwinwijaya wrote:
> Hello php-generaler's ,
>
> I have a script like this :
>
> if($foo == 'something'){
> header('Location:to_another_page.php') ;
> }else
> {
> do another thing in here
> }
>
> header('Location:to_previous_page.php');
>
>
> I got a problem ... when $foo == 'something' .. it wont redirect me
> to to_another_page.php .... but if I put die(); after calling
> header(); .. it will work ...
The reason it works after you put die() after calling your first
header() is because once you send the location header, you can't send
other stuff. Using die() causes script execution to end, which lets the
header work. So put something in there that causes script execution to
end (e.g., exit()).
The proper code (including the properly-formed URL mentioned by others)
is something like:
if($foo == 'something'){
header('Location: http://www.example.com/to_another_page.php') ;
exit();
}else
{
do another thing in here
}
header('Location: http://www.example.com/to_previous_page.php');
exit(); // for good measure
joel
--
[ joel boonstra | gospelcom.net ]
attached mail follows:
--- adwinwijaya <adwinwijaya
yahoo.com.au> wrote:
> if($foo == 'something'){
> header('Location:to_another_page.php') ;
> }else
> {
> do another thing in here
> }
>
> header('Location:to_previous_page.php');
>
>
> I got a problem ... when $foo == 'something' .. it wont redirect me
> to to_another_page.php .... but if I put die(); after calling
> header(); .. it will work ...
>
> is this the bug ?
Nope. As others have pointed out, your Location header is improperly
formed.
However, your immediate problem is that, regardless of whether $foo ==
'something', you *always* set the Location header to to_previous_page.php.
So, even if you set it to to_another_page.php previously, you're
overwriting it.
Hope that helps.
Chris
=====
Chris Shiflett - http://shiflett.org/
PHP Security - O'Reilly
Coming mid-2004
HTTP Developer's Handbook - Sams
http://httphandbook.org/
PHP Community Site
http://phpcommunity.org/
attached mail follows:
Hello Jason,
Thursday, February 12, 2004, 6:38:05 AM, you wrote:
>> It should be this:
>> header("Location: another_page.php");
>> and NOT header("Location:another_page.php");
JW> Also it should be an absolute URL otherwise it might break on some (standards
JW> compliant only) browsers:
While I totally agree with both these pieces of advice, they're
unlikely to be the cause of the problem. YES you should have a space
after the Location: part and YES you should have an absolute URL,
*but* most modern browsers won't care if you haven't - the following
works perfectly on IE6/Opera7/Firefox - no matter how malformed it
looks:
Header("Location:page2.php");
Chris provided the solution to the original problem in his reply, but
I just wanted to bring this up. The OP should of course modify his
header statements, but its unlikely to resolve his problem on its own.
--
Best regards,
Richard mailto:rich
launchcode.co.uk
attached mail follows:
Hello Jason,
Thursday, February 12, 2004, 6:38:05 AM, you wrote:
>> It should be this:
>> header("Location: another_page.php");
>> and NOT header("Location:another_page.php");
JW> Also it should be an absolute URL otherwise it might break on some (standards
JW> compliant only) browsers:
While I totally agree with both these pieces of advice, they're
unlikely to be the cause of the problem. YES you should have a space
after the Location: part and YES you should have an absolute URL,
*but* most modern browsers won't care if you haven't - the following
works perfectly on IE6/Opera7/Firefox - no matter how malformed it
looks:
Header("Location:page2.php");
Chris provided the solution to the original problem in his reply, but
I just wanted to bring this up. The OP should of course modify his
header statements, but its unlikely to resolve his problem on its own.
--
Best regards,
Richard mailto:rich
launchcode.co.uk
attached mail follows:
Hello Chris,
Thursday, February 12, 2004, 5:57:55 PM, you wrote:
CS> Nope. As others have pointed out, your Location header is improperly
CS> formed.
CS> However, your immediate problem is that, regardless of whether $foo ==
CS> 'something', you *always* set the Location header to to_previous_page.php.
CS> So, even if you set it to to_another_page.php previously, you're
CS> overwriting it.
CS> Hope that helps.
CS> Chris
CS> =====
CS> Chris Shiflett - http://shiflett.org/
CS> PHP Security - O'Reilly
CS> Coming mid-2004
CS> HTTP Developer's Handbook - Sams
CS> http://httphandbook.org/
CS> PHP Community Site
CS> http://phpcommunity.org/
--> ok guys ... thanks for your answer .... and my another question
--> why the php didnt stop processing after sending the header ?
--> because in my logic ... after sending the (redirect) to another
--> page .. the process shall be stopped .... and thanks for your
--> advise ... I just know that I have to write location: with space
--> ... I am get used to do that for almost 1 year :)
--
Best regards,
adwinwijaya mailto:adwinwijaya
yahoo.com.au
attached mail follows:
Hello adwinwijaya,
Thursday, February 12, 2004, 11:11:48 AM, you wrote:
-->> because in my logic ... after sending the (redirect) to another
-->> page .. the process shall be stopped
In PHP's logic however, it doesn't stop :)
(Unless you tell it to by either using an exit() call or just making
the header function the last line of your script).
--
Best regards,
Richard mailto:rich
launchcode.co.uk
attached mail follows:
Hello Eric,
Thursday, February 12, 2004, 10:57:57 PM, you wrote:
EB> That's pretty wierd....
EB> Think i'll do some research on headers, need more info anyway ;)
EB> But did my tip work in your script when you took a space there?
EB> Just wondering...
EB> Eric
No.... it still doesnt work ... I have to put die() or exit() after
calling the header(); .... and whether I put space and not using space
.. the result still same .. ( I am get used not to use space for
almost 1 year .. and suddenly I just know that I should put space :) )
In my logic, after we call header('location: foo.php'); the php
processor should terminated and open the page foo.php instead ...
cmmiw
--
Best regards,
adwinwijaya mailto:adwinwijaya
yahoo.com.au
attached mail follows:
Hello adwinwijaya,
Thursday, February 12, 2004, 12:27:07 PM, you wrote:
a> In my logic, after we call header('location: foo.php'); the php
a> processor should terminated and open the page foo.php instead ...
Except that doesn't happen. See my other reply on this subject.
--
Best regards,
Richard mailto:rich
launchcode.co.uk
attached mail follows:
adwinwijaya wrote:
> --> ok guys ... thanks for your answer .... and my another question
> --> why the php didnt stop processing after sending the header ?
> --> because in my logic ... after sending the (redirect) to another
> --> page .. the process shall be stopped .... and thanks for your
> --> advise ... I just know that I have to write location: with space
> --> ... I am get used to do that for almost 1 year :)
>
You might still want to do some processing after the redirect header.
attached mail follows:
On 12 Feb 2004 at 17:20, adwinwijaya wrote:
> Hello php-generaler's ,
>
> I have a script like this :
>
> if($foo == 'something'){
> header('Location:to_another_page.php') ;
> }else
> {
> do another thing in here
> }
>
> header('Location:to_previous_page.php');
>
>
> I got a problem ... when $foo == 'something' .. it wont redirect me to
> to_another_page.php .... but if I put die(); after calling header(); ..
> it will work ...
>
> is this the bug ?
You're joking, right? Your second "header" statement is outside the if/else loop, so it's
executed every time, obviously. This in turn means that your script will always redirect to
"previous_page.php", unless, of course, you kill it before it gets to the second "header"
statement. Suggestion: read up on control structures (chapter 11 in the PHP manual).
attached mail follows:
adwinwijaya wrote:
> Hello php-generaler's ,
>
> I have a script like this :
>
> if($foo == 'something'){
> header('Location:to_another_page.php') ;
> }else
> {
> do another thing in here
> }
>
> header('Location:to_previous_page.php');
>
>
> I got a problem ... when $foo == 'something' .. it wont redirect me
> to to_another_page.php .... but if I put die(); after calling
> header(); .. it will work ...
>
> is this the bug ?
>
> I use php 4.3.4 ... and Apache 2.x
>
> thanks
Another thing you need to know, header checks if the same header was
output before, if yes, it is owerwriten by the second one. So if you write:
header('Location: foo.php');
header('Location: bar.php');
only one header is output.
You can pass false as the second parameter to header (replace
parameter), in this case both headers are output.
attached mail follows:
--- adwinwijaya <adwinwijaya
yahoo.com.au> wrote:
> why the php didnt stop processing after sending the header? because
> in my logic ... after sending the (redirect) to another page .. the
> process shall be stopped
This might make sense to you, but only because you're thinking of header()
as a redirect function. First, you must realize that it is not. It is a
function that sets an HTTP header.
If you've worked with headers much before, you may have run into an error
that says something like this:
Warning: Cannot add header information - headers already sent by (output
started at ...) in ... on line ...
To avoid this error, people must either set the headers they want prior to
any output (often by placing calls to header() at the top), or they use
output buffering.
So, consider that you use header() at the top of your script. Now, you
want to generate an image, so your script begins like this:
<?
header('Content-Type: image/png');
The rest of the script generates the image. Wouldn't you be frustrated if
PHP decided to stop at the header() call? That would certainly frustrate
me.
Now, PHP could identify when the header() call is going to change the
status code of the response. Perhaps, if the response is going to be a
300-level response, PHP should exit afterward. But, why make such a
dangerous assumption when the developer can exit if he/she wants?
It would also break things like this:
<?
header('Location: http://default.org/');
if ($foo)
{
header('Location: http://foo.org/');
}
elseif ($bar)
{
header('Location: http://bar.org/');
}
?>
While this may not be eloquent, hopefully it is clear that the author
intends for the user to only get redirected to http://default.org/ if both
$foo and $bar are false. If PHP exited immediately after the first line,
this script would not behave as the developer intendend. PHP's assumption
would be wrong.
Hope that helps.
Chris
=====
Chris Shiflett - http://shiflett.org/
PHP Security - O'Reilly
Coming mid-2004
HTTP Developer's Handbook - Sams
http://httphandbook.org/
PHP Community Site
http://phpcommunity.org/
attached mail follows:
This is not a bug. Here you expect that the script should end executing
after the statement:header('Location:to_another_page.php') if the "if"
statement is true. But it won't and it proceeds to the next statement;
the next header statement:header('Location:to_previous_page.php');
An "exit" statement after the first header will solve the problem. With
most browsers, if multiple redirect headers are received, the last
instruction is followed. I'm not sure what the RFC says about this.
Anil
On Thu, 12 Feb 2004, adwinwijaya wrote:
> Hello php-generaler's ,
>
> I have a script like this :
>
> if($foo == 'something'){
> header('Location:to_another_page.php') ;
> }else
> {
> do another thing in here
> }
>
> header('Location:to_previous_page.php');
>
>
> I got a problem ... when $foo == 'something' .. it wont redirect me
> to to_another_page.php .... but if I put die(); after calling
> header(); .. it will work ...
>
> is this the bug ?
>
> I use php 4.3.4 ... and Apache 2.x
>
> thanks
>
>
>
--
Linuxense Information Systems Pvt. Ltd., Trivandrum, India
http://www.linuxense.com/
attached mail follows:
"Rajani Anand Iyer" <rajani_21
yahoo.com> wrote in message
news:20040210203639.31541.qmail
web40904.mail.yahoo.com...
> Can someone recommend some good books on PHP Advanced topics.
here is my (amazon) list
http://www.templatetamer.org/index.php?RecommendedBooks
rush
--
http://www.templatetamer.com/
attached mail follows:
Thanks
But how can i put it into an tar archive before?
rgds Till
attached mail follows:
HI,
I have looked the php manual and cannot find a function where I can extract
the month (in words) from a variable which contains a date.
eg:
I input :
2004-01-26
and the function must return:
January
Is there a php function like this? I dont want to reinvent the wheel. If
there isnt i will have to write my own.
Thanx in advance.
Angelo
--------------------------------------------------------------------
Disclaimer
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is
intended for the attention and use only of the addressee.
Should you have received this e-mail in error, please delete
and destroy it and any attachments thereto immediately.
Under no circumstances will the Cape Technikon or the sender
of this e-mail be liable to any party for any direct, indirect,
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911
attached mail follows:
Don't reinvent....
http://www.php.net/manual/en/function.strftime.php
-----Original Message-----
From: Angelo Zanetti [mailto:binc2
ctech.ac.za]
Sent: donderdag 12 februari 2004 10:13
To: Php-General
Lists.Php.Net
Subject: [PHP] getting month from date variable
HI,
I have looked the php manual and cannot find a function where I can
extract the month (in words) from a variable which contains a date.
eg:
I input :
2004-01-26
and the function must return:
January
Is there a php function like this? I dont want to reinvent the wheel. If
there isnt i will have to write my own.
Thanx in advance.
Angelo
--------------------------------------------------------------------
Disclaimer
This e-mail transmission contains confidential information, which is the
property of the sender. The information in this e-mail or attachments
thereto is
intended for the attention and use only of the addressee.
Should you have received this e-mail in error, please delete
and destroy it and any attachments thereto immediately.
Under no circumstances will the Cape Technikon or the sender
of this e-mail be liable to any party for any direct, indirect,
special or other consequential damages for any use of this e-mail. For
the detailed e-mail disclaimer please refer to
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
dear all,
i'm new in php programming
i would like to find some sample application to increase my knowledge.
would you tell me where will i find a sample application
or maybe some of you want to sent me anything about php or the sample code
thank you
best regards
--
Poltak Reynold Priyadi
Student of PI-DEL
Address : Jl Sisingamangaraja, Sitoluama, Laguboti,
Tobasa, North Sumatera,Indonesia
e-mail : rey17051985
yahoo.com or if02076
students.del.ac.id
web : http://students.del.ac.id/~if02076
phone : (061) 7871533
attached mail follows:
How lazy are you ?
Just look up "PHP" on the web, give www.google.com a go - you might just learn something.
-----Original Message-----
From: Poltak Reynold Priyadi [mailto:if02076
students.del.ac.id]
Sent: 12 February 2004 09:58
To: php-general
lists.php.net
Subject: [PHP] find some application
dear all,
i'm new in php programming
i would like to find some sample application to increase my knowledge.
would you tell me where will i find a sample application
or maybe some of you want to sent me anything about php or the sample code
thank you
best regards
--
Poltak Reynold Priyadi
Student of PI-DEL
Address : Jl Sisingamangaraja, Sitoluama, Laguboti,
Tobasa, North Sumatera,Indonesia
e-mail : rey17051985
yahoo.com or if02076
students.del.ac.id
web : http://students.del.ac.id/~if02076
phone : (061) 7871533
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
This message has been scanned for viruses by MailController - www.MailController.altohiway.com
attached mail follows:
go to www.php.net and www.phpfreaks.com
and look at the manual and on the NET!!!
-----Original Message-----
From: Poltak Reynold Priyadi [mailto:if02076
students.del.ac.id]
Sent: Thursday, February 12, 2004 11:58 AM
To: php-general
lists.php.net
Subject: [PHP] find some application
dear all,
i'm new in php programming
i would like to find some sample application to increase my knowledge.
would you tell me where will i find a sample application
or maybe some of you want to sent me anything about php or the sample code
thank you
best regards
--
Poltak Reynold Priyadi
Student of PI-DEL
Address : Jl Sisingamangaraja, Sitoluama, Laguboti,
Tobasa, North Sumatera,Indonesia
e-mail : rey17051985
yahoo.com or if02076
students.del.ac.id
web : http://students.del.ac.id/~if02076
phone : (061) 7871533
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--------------------------------------------------------------------
Disclaimer
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is
intended for the attention and use only of the addressee.
Should you have received this e-mail in error, please delete
and destroy it and any attachments thereto immediately.
Under no circumstances will the Cape Technikon or the sender
of this e-mail be liable to any party for any direct, indirect,
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911
attached mail follows:
Hello Poltak,
Thursday, February 12, 2004, 9:58:09 AM, you wrote:
PRP> i would like to find some sample application to increase my knowledge.
PRP> would you tell me where will i find a sample application
PRP> or maybe some of you want to sent me anything about php or the sample code
http://www.hotscripts.com
and learn to use Google.
--
Best regards,
Richard mailto:rich
launchcode.co.uk
attached mail follows:
Hello Poltak,
Thursday, February 12, 2004, 9:58:09 AM, you wrote:
PRP> i would like to find some sample application to increase my knowledge.
PRP> would you tell me where will i find a sample application
PRP> or maybe some of you want to sent me anything about php or the sample code
http://www.hotscripts.com
and learn to use Google.
--
Best regards,
Richard mailto:rich
launchcode.co.uk
attached mail follows:
On 11 February 2004 18:01, Dan Aloma wrote:
> Sorry about not including code the first time. Here is a
> snippet of code I
> am fairly certain should be doing something. Thank you SOOO
> much for the
> help. I've been working on setting up php for four days now
> and EVERYTHING
> else works (phpinfo() calls, etc), but for some reason forms,
> even ones that
> I know should be working don't take values. They just return
> you to the same
> screen.
>
> CODE:
> <html>
> <body>
>
> <br><br>
> <?=$errormessage?>
> <br>
>
> <form action="<?=$_SERVER['PHP_SELF']?>" method="post">
> <table width="500" border="0" cellpadding="5" cellspacing="0"> <tr>
> <td>Your name:</td>
> <td><input type="text" name="name"value="<?=$_POST['name']?>"></td>
> </tr> <tr>
> <td>Your email:</td>
> <td><input type="text" name="email" value="<?=$_POST['email']?>"><td>
> <tr> <tr>
> <td>Your message:</td>
> <td><textarea
> name="message"><?=$_POST['message']?></textarea></td></tr> </table>
> <input type="hidden" name="required" value="name,email,message">
> <input type="submit" name="submit" value="submit">
>
> </body></html>
H'mmm -- one other thought in addition to all the other good pointers: is short_open_tag On or Off? Because if it's off, none of those <?= snippets will fire anyway.
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford
leedsmet.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
attached mail follows:
that tag is working fine and shows me the info. For some reason php will
take input values only from the URL, not from the html code. any ideas?
>From: André Cerqueira <accerqueira
superig.com.br>
>To: php-general
lists.php.net
>Subject: Re: [PHP] [Q]PHP not taking input values from forms
>Date: Wed, 11 Feb 2004 23:56:37 -0300
>
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>time() is only echo'ed if $_POST['submit'] is something on this case
>maybe he has a really old version of php...
>$HTP_POST_VARS...?
>
>do what Richard Davey is saying, <?=phpinfo()?> on the top
>
>Richard Davey wrote:
>
>>Hello Dan,
>>
>>Wednesday, February 11, 2004, 6:39:35 PM, you wrote:
>>
>>DA> they're being tested on a testing machine we use. I know PHP is
>>(rather
>>DA> appears to be) working fine. Why would it be parsing files fine and
>>calling
>>DA> phpinfo() fine, but not being able to take input values. that's
>>strange....
>>
>>echo time() isn't an input value.
>>
>>If it can't even do that then it's not surprising it can't handle
>>$_POST values either, there is something else at play here and it's
>>not your code.
>>
>>Stick "echo phpinfo()" at the top of your form code - does it work?
>>
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.2.4 (MingW32)
>Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
>iD8DBQFAKutoaxdA/5C8vH8RAo1WAJ9MZMtBAvXcJDizOVXblxp1DlCqSgCeNDdm
>rmE+jBIlMe4Hb6qaIUObCiQ=
>=NvxC
>-----END PGP SIGNATURE-----
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
_________________________________________________________________
Plan your next US getaway to one of the super destinations here.
http://special.msn.com/local/hotdestinations.armx
attached mail follows:
On Thu, 12 Feb 2004, Dan Aloma wrote:
> that tag is working fine and shows me the info. For some reason php will
> take input values only from the URL, not from the html code. any ideas?
A few questions:
a) What's the exact version of PHP?
b) Please post the smallest possible form that creates this
problem.
c) And how are you attempting to access these form values?
If you're interested in some working examples and related
information, have a look at the following manual page:
http://www.php.net/variables.external
Regards,
Philip
attached mail follows:
Thanks for the suggestions, first of all. I tried that exact code from the
code you included and I cut and pasted the "Simple HTML Form", and below
that I pasted the "Accessing Data..." php code. When I go to the page, all
it does after I hit the submit button with data in the fields, is say "no
input file specified". But when I run it through the url giving the input
names with values, it returns them. I tried getting it working with like ten
people so far, and no one's been able to figure out... I am running PHP
4.3.4, btw.
>From: Philip Olson <philip
cornado.com>
>To: Dan Aloma <digistuff1
hotmail.com>
>CC: accerqueira
superig.com.br, php-general
lists.php.net
>Subject: Re: [PHP] [Q]PHP not taking input values from forms
>Date: Thu, 12 Feb 2004 16:44:37 +0000 (GMT)
>
>On Thu, 12 Feb 2004, Dan Aloma wrote:
>
> > that tag is working fine and shows me the info. For some reason php will
> > take input values only from the URL, not from the html code. any ideas?
>
>A few questions:
>
> a) What's the exact version of PHP?
> b) Please post the smallest possible form that creates this
> problem.
> c) And how are you attempting to access these form values?
>
>If you're interested in some working examples and related
>information, have a look at the following manual page:
>
> http://www.php.net/variables.external
>
>Regards,
>Philip
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
_________________________________________________________________
Find great local high-speed Internet access value at the MSN High-Speed
Marketplace. http://click.atdmt.com/AVE/go/onm00200360ave/direct/01/
attached mail follows:
Hi,
I am new to manipulating JPGs using PHP. But i managed to create an
application that displays an JPG image in the browser (see below).
I have boiled the code down to the most nesesary.
My problem is that when i load the file "c:\file.jpg" directly in the
IE browser (using <IMG SRC='c:\file.jpg'>), and then get properties on the
image by
right clicking in the browser. the size is the same as it is on the HD
(83Kb).
However when i use the PHP code and get properties on the image by
right clicking in the browser. the image size is 264Kb.
How come the picture is bigger when loaded trough PHP as it is when
loaded trough the browser directly ?
best regards
John
<-----generate_jpg_picture.php starts------->
<?php
header("Content-type: image/jpeg", true);
$path = $_GET['filepath'];
$im = imagecreatefromjpeg($path);
Imagejpeg($im, '', 100);
ImageDestroy($im);
?>
<-----generate_jpg_picture.php ends------->
<-----some_file.php starts------->
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<IMG SRC='generate_jpg_picture.php?filepath=<?php echo
urlencode("c:\\file.jpg"); ?>'>
<IMG SRC='c:\file.jpg'>
</body>
</html>
<-----some_file.php ends------->
attached mail follows:
Hi,
Tuesday, February 10, 2004, 9:50:20 PM, you wrote:
J> Hi,
J> I am new to manipulating JPGs using PHP. But i managed to create an
J> application that displays an JPG image in the browser (see below).
J> I have boiled the code down to the most nesesary.
J> My problem is that when i load the file "c:\file.jpg" directly in the
J> IE browser (using <IMG SRC='c:\file.jpg'>), and then get properties on the
J> image by
J> right clicking in the browser. the size is the same as it is on the HD
J> (83Kb).
J> However when i use the PHP code and get properties on the image by
J> right clicking in the browser. the image size is 264Kb.
J> How come the picture is bigger when loaded trough PHP as it is when
J> loaded trough the browser directly ?
J> best regards
J> John
J> <-----generate_jpg_picture.php starts------->
J> <?php
J> header("Content-type: image/jpeg", true);
J> $path = $_GET['filepath'];
J> $im = imagecreatefromjpeg($path);
J> Imagejpeg($im, '', 100);
J> ImageDestroy($im);
?>>
J> <-----generate_jpg_picture.php ends------->
J> <-----some_file.php starts------->
J> <html>
J> <head>
J> <title>PHP Test</title>
J> </head>
J> <body>
J> <IMG SRC='generate_jpg_picture.php?filepath=<?php echo
J> urlencode("c:\\file.jpg"); ?>'>
J> <IMG SRC='c:\file.jpg'>
J> </body>
J> </html>
J> <-----some_file.php ends------->
Because you are sending it at 100% quality which is no compression, try
backing it off to 30%. Probably the original was not at 100% quality
anyway.
--
regards,
Tom
attached mail follows:
Hi,
I would like to make an application for DVD,VHS rental with PHP,MySQL, but I
don't know how to connect it with bar code scaner. Do you have an idea? I
hope, that I can use PHP for it :-)
Thanks
Michal
attached mail follows:
Programming bar code reader from PHP?
It truly largely depends on the brand of bar code reader, and even then,
the model.
For example, I programed for an Intermec Antares 24xx series handheld
(that model is made for standalone/independant operation). For your
operations, this isn't very good model (not counting expensive).
Bar code readers work in serveral possible ways...
1. RF/networked (more advanced models)
2. serial port, where the reader streams what has been read in
3. keyboard port, and when it reads a bar code, it sends the proper
characters back to the computer.
I'd recommend baseing your design on models where the computer can have a
driver that does direct translation and the bar code reader acts like a
keyboard. Then you just have to make a standard webapp, and your text
input fields are populated by the values that are read in from the bar
codes.
I don't have any links off the top of my head to help you get a better
foundation in this, but google must have plenty ;)
To visit a company that works in bar code equipement, find Intermec's
website.
HTH,
Andrew
> Hi,
> I would like to make an application for DVD,VHS rental with PHP,MySQL, but
> I
> don't know how to connect it with bar code scaner. Do you have an idea? I
> hope, that I can use PHP for it :-)
> Thanks
> Michal
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
attached mail follows:
Great idea. Can I use a keyboard and bar code scanner together? How to use a
keyboard, if i connect a scanner into a keyboard port?
Michal
"Andrew Séguin" <asegu_php
borgtech.ca> píse v diskusním príspevku
news:2395.69.28.224.68.1076585378.squirrel
borg.darktech.org...
> Programming bar code reader from PHP?
>
> It truly largely depends on the brand of bar code reader, and even then,
> the model.
>
> For example, I programed for an Intermec Antares 24xx series handheld
> (that model is made for standalone/independant operation). For your
> operations, this isn't very good model (not counting expensive).
>
> Bar code readers work in serveral possible ways...
> 1. RF/networked (more advanced models)
> 2. serial port, where the reader streams what has been read in
> 3. keyboard port, and when it reads a bar code, it sends the proper
> characters back to the computer.
>
> I'd recommend baseing your design on models where the computer can have a
> driver that does direct translation and the bar code reader acts like a
> keyboard. Then you just have to make a standard webapp, and your text
> input fields are populated by the values that are read in from the bar
> codes.
>
> I don't have any links off the top of my head to help you get a better
> foundation in this, but google must have plenty ;)
> To visit a company that works in bar code equipement, find Intermec's
> website.
>
> HTH,
> Andrew
>
> > Hi,
> > I would like to make an application for DVD,VHS rental with PHP,MySQL,
but
> > I
> > don't know how to connect it with bar code scaner. Do you have an idea?
I
> > hope, that I can use PHP for it :-)
> > Thanks
> > Michal
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
attached mail follows:
Great idea. Can I use a keyboard and bar code scanner together? How to use a
keyboard, if i connect a scanner into a keyboard port?
Michal
"Andrew Séguin" <asegu_php
borgtech.ca> píse v diskusním príspevku
news:2395.69.28.224.68.1076585378.squirrel
borg.darktech.org...
> Programming bar code reader from PHP?
>
> It truly largely depends on the brand of bar code reader, and even then,
> the model.
>
> For example, I programed for an Intermec Antares 24xx series handheld
> (that model is made for standalone/independant operation). For your
> operations, this isn't very good model (not counting expensive).
>
> Bar code readers work in serveral possible ways...
> 1. RF/networked (more advanced models)
> 2. serial port, where the reader streams what has been read in
> 3. keyboard port, and when it reads a bar code, it sends the proper
> characters back to the computer.
>
> I'd recommend baseing your design on models where the computer can have a
> driver that does direct translation and the bar code reader acts like a
> keyboard. Then you just have to make a standard webapp, and your text
> input fields are populated by the values that are read in from the bar
> codes.
>
> I don't have any links off the top of my head to help you get a better
> foundation in this, but google must have plenty ;)
> To visit a company that works in bar code equipement, find Intermec's
> website.
>
> HTH,
> Andrew
>
> > Hi,
> > I would like to make an application for DVD,VHS rental with PHP,MySQL,
but
> > I
> > don't know how to connect it with bar code scaner. Do you have an idea?
I
> > hope, that I can use PHP for it :-)
> > Thanks
> > Michal
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
attached mail follows:
Great idea. Can I use a keyboard and bar code scanner together? How to use a
keyboard, if i connect a scanner into a keyboard port?
Michal
"Andrew Séguin" <asegu_php
borgtech.ca> píse v diskusním príspevku
news:2395.69.28.224.68.1076585378.squirrel
borg.darktech.org...
> Programming bar code reader from PHP?
>
> It truly largely depends on the brand of bar code reader, and even then,
> the model.
>
> For example, I programed for an Intermec Antares 24xx series handheld
> (that model is made for standalone/independant operation). For your
> operations, this isn't very good model (not counting expensive).
>
> Bar code readers work in serveral possible ways...
> 1. RF/networked (more advanced models)
> 2. serial port, where the reader streams what has been read in
> 3. keyboard port, and when it reads a bar code, it sends the proper
> characters back to the computer.
>
> I'd recommend baseing your design on models where the computer can have a
> driver that does direct translation and the bar code reader acts like a
> keyboard. Then you just have to make a standard webapp, and your text
> input fields are populated by the values that are read in from the bar
> codes.
>
> I don't have any links off the top of my head to help you get a better
> foundation in this, but google must have plenty ;)
> To visit a company that works in bar code equipement, find Intermec's
> website.
>
> HTH,
> Andrew
>
> > Hi,
> > I would like to make an application for DVD,VHS rental with PHP,MySQL,
but
> > I
> > don't know how to connect it with bar code scaner. Do you have an idea?
I
> > hope, that I can use PHP for it :-)
> > Thanks
> > Michal
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
attached mail follows:
Great idea. Can I use a keyboard and bar code scanner together? How to use a
keyboard, if i connect a scanner into a keyboard port?
Michal
"Michal Strnad" <michal_strnad
wunderman.cz> pí¹e v diskusním pøíspìvku
news:MLEGLBBAPDKIHLEBLCOFEECMCCAA.michal_strnad
wunderman.cz...
> Hi,
> I would like to make an application for DVD,VHS rental with PHP,MySQL, but
I
> don't know how to connect it with bar code scaner. Do you have an idea? I
> hope, that I can use PHP for it :-)
> Thanks
> Michal
attached mail follows:
On Thursday 12 February 2004 08:26 am, Michal wrote:
> Great idea. Can I use a keyboard and bar code scanner together? How to use
> a keyboard, if i connect a scanner into a keyboard port?
>
> Michal
You use a thing called a wedge. It plugs into your keyboard port on your
computer. Then you plug in the keyboard and the scanner into the wedge. You
must program your PHP to not look for "submit" buttons. You also need a
browser that will submit a page when you press enter in a field.
You can also get scanners with USB connections that work like keyboards.
We've written a Warehouse Management System using these devices and a barcode
printer. It's written in PHP and uses MySQL database. We use walkabout
computers connected to the forklifts and cherrypickers. It's been working
great now for almost a year now.
James Hicks
attached mail follows:
Hi folks,
I'm using usual md5(microtime()); to create IDs, but now I've encountered a
problem with that. I need to create explicitly 6 digit unique
number(decimal). Yes, I know I can use for/while loop to fill a string with
digits, but is it ABSOLUTELY sure that the random will never return same
number when seed is microtime()? It is very important as the number will
identify a bank transfer...
Is there any other way than checking with all previous IDs? Or some MySQL
function to do this for me?
thank you
Alex
attached mail follows:
Hello Alex,
Thursday, February 12, 2004, 11:00:41 AM, you wrote:
A> I'm using usual md5(microtime()); to create IDs, but now I've encountered a
A> problem with that. I need to create explicitly 6 digit unique
A> number(decimal). Yes, I know I can use for/while loop to fill a string with
A> digits, but is it ABSOLUTELY sure that the random will never return same
A> number when seed is microtime()? It is very important as the number will
A> identify a bank transfer...
If the data is so important - why are you restricting it to a 6 digit
key? You should ideally use the uniqid() function perhaps with a
combined lcg entropy at the end. That will give you a 13 character
long unique id - or md5 it for a 32 character one (see the manual for
examples).
A> Is there any other way than checking with all previous IDs? Or some MySQL
A> function to do this for me?
For something so important I would use (a) a longer unique ID and (b)
I'd still run a SQL check to see if the ID has been already used or
not. A simple MySQL count will bring that result back very quickly.
--
Best regards,
Richard mailto:rich
launchcode.co.uk
attached mail follows:
MySQL (or another SQL database) is the answer. You can check for an
existing OR use it's auto_increment or whatever else you like.
Create a field to track all this stuff. There is no other way to
guarantee that an ID is unique than to check it against existing.
"Random" functions yield random results, so each time, there is ALWAYS
a chance of a number being repeated. Microtime works pretty well, but
there is STILL a chance two people could have a transaction at the same
time. Yes, the odds can be insanely, insanely small for various
functions (i.e. MD5) but as you shorten the length of your number, the
odds get higher.
And yes, it's important to realize that a 6 digit unique identifier is
limited to 1 million possible combinations, not nearly enough for most
banks.
I might suggest you do some more PHP learning before you go and develop
an online bank application - this stuff is pretty fundamental
programming and database concepts. If your overall skill level isn't
very high, you're likely to make mistakes, and either have errors,
problems in functionality, or, worse, security problems.
-Galen
On Feb 12, 2004, at 3:00 AM, Alex wrote:
> Hi folks,
> I'm using usual md5(microtime()); to create IDs, but now I've
> encountered a
> problem with that. I need to create explicitly 6 digit unique
> number(decimal). Yes, I know I can use for/while loop to fill a string
> with
> digits, but is it ABSOLUTELY sure that the random will never return
> same
> number when seed is microtime()? It is very important as the number
> will
> identify a bank transfer...
>
> Is there any other way than checking with all previous IDs? Or some
> MySQL
> function to do this for me?
>
> thank you
> Alex
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
attached mail follows:
On 11 February 2004 20:26, Richard Day wrote:
> Hello:
>
>
> Environment:
> Linux server
> PHP 4.3.4
>
> This code:
>
> echo '<br>'.strftime('%T %Z',mktime()).', Timestamp='.mktime();
> echo '<br>'.strftime('%T GMT',gmmktime()).',
> Timestamp='.gmmktime();
>
> yields this result:
>
> 23:52:08 EST, Timestamp=1076475128
> 18:52:08 GMT, Timestamp=1076457128
>
> Why? GMT should be 5 hours ahead of EST, not 5 behind. Right?
> What am I
> missing here??
Well, that looks very suspicious, and probably not for the reasons you're
thinking.
I can explain why you get that result, but it means that either (a) there's
a bug in gmmktime(), or (b) the documentation for gmmktime() is wrong (or,
at least, misleading). So, let's take it step-by-step:
1. gmmktime(), according to the manual, should use the "current
corresponding GMT value" for it's omitted arguments.
2. In my book, at 23:52:08 EST that means it should be using 04:52:08 GMT on
the following day (we'll discuss this later, since, whilst giving a
different result, it still wouldn't produce what you're expecting!).
3. However, let's guess that gmmktime() is actually using the *local* time
value of 23:52:08, but treating it as if it were GMT.
4. In which case, you'll get a timestamp for 23:52:08 GMT.
5. Because timestamps are absolute (not adjusted for timezone), this is also
the timestamp for 18:52:08 EST.
6. 18:52:08 is what you're getting printed.
7. QED.
This behaviour is *not* what the manual says should happen, and in my
opinion is counter-intuitive. However, if gmmktime() were to behave as the
manual, at least how I read it, suggests, this is what would happen:
1. gmmktime() would calculate a timestamp for 04:52:08 GMT (next day).
2. Because timestamps are absolute, this is also the timestamp for 23:52:08
EST.
3. So strftime() still outputs 23:52:08.
Ergo, this is not the way to produce an adjusted time. One way to do what
you're looking for is to feed the same timestamp to date('%H:%i:%s') and
gmdate('%H:%i:%s). If you want something you can feed to strftime() for the
GMT date, you need to acquire your timezone's offset from GMT in seconds
(e.g. with date('Z');) and subtract that from the timestamp.
HTH
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford
leedsmet.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
attached mail follows:
On 11 February 2004 21:39, Ben Ramsey wrote:
> Ah-ha! I missed that, and I always do. Let's hope I don't anymore.
> While we're on the subject, why is PHP set up this way? Why can't it
> just add the elements to the array automatically, since adding the
> square brackets to one's HTML form name is not a standard practice?
Well, then you would get the tradeoff that you have to test whether the value supplied is a simple scalar (because only one option was checked) or an array, before you could work with it. IIRC, that's what you do in perl and ASP. PHP takes the attitude that the code should be as simple as possible, and therefore it's the FORM's responsibility to indicate where POSTed values should be treated as arrays.
Personally, I think I could live with having to write code such as $checkboxes = (array)$checkboxes, but this is a choice the PHP implementers have taken, and I don't see it changing in the foreseeable future.
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford
leedsmet.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
attached mail follows:
On 06/02/2004 at 11:55 Mrs. Geeta Thanu wrote:
>This is in addition to my previous mail.
>I feel the PHP script and the C program should be in one machine
>and apache in another.
>When a user click the link the php script should upload a form get the
>input and show the result.
>So apache should support running PHP in another machine.Is it possible.
It's possible.
The easiest way to do this is:
# On the webserver, you just need Apache, with a redirection setup.
So if a user entered http://webserver/genome-processing/ then it'll be redirected to http://application-server/genome-processing/
Example (put these in httpd.conf):
================
<IfModule mod_proxy.c>
ProxyPass /genome-processing/ http://application-server/genome-processing/
ProxyPassReverse /genome-processing/ http://application-server/genome-processing/
</IfModule>
================
# On the application server, you'll need Apache+PHP and that C program.
genome-processing/index.php in this box should process all user input, and then execute the C program with system() function:
http://uk.php.net/manual/en/function.system.php
# Ensure that the output from the C program can be easily parsed in PHP, or better yet, already HTML-tagged properly so you don't need to process it any further in your PHP script - just printf() the whole of its output straightaway.
There are other ways to do this, but as I said I think this is the easiest way.
CMIIW of course.
regards,
-HS
>On Fri, 6 Feb 2004, Jason Wong wrote:
>> On Saturday 07 February 2004 02:57, Mrs. Geeta Thanu wrote:
>> > I have configured Apache webserver executing PHP scripts on sun machine
>> > and everything is working fine.
>> >
>> > Now I want the web server to pass on the PHP executions to
>> > another machine and once done should get the result and display it.
>> >
>> > Is it possible .
--
Kampanye open-source Indonesia - http://www.DariWindowsKeLinux.com
Solusi canggih, bebas ikatan, dan bebas biaya
v0sw6Chw5ln3ck4u6Lw5-2Tl6+8Ds5MRr5e7t2Tb8TOp2/3en5+7g5HC - hackerkey.com
attached mail follows:
HI,
I used my scripts yesterday and suddenly today they dont work and I get this
error: Call to a member function on a non-object
it points to erroneous line that calls a function in 1 of my classes. The
class and this particular file have not been changed since i used them yest.
I also checked my DB and all is perfect. I read somewhere on the net that it
could have something to do with cache. But i couldnt find any helpful info.
perhaps someone has experienced this error before and what could cause it
and how do i fix it?
thanx in advance
Angelo
--------------------------------------------------------------------
Disclaimer
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is
intended for the attention and use only of the addressee.
Should you have received this e-mail in error, please delete
and destroy it and any attachments thereto immediately.
Under no circumstances will the Cape Technikon or the sender
of this e-mail be liable to any party for any direct, indirect,
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911
attached mail follows:
Hello Angelo,
Thursday, February 12, 2004, 12:33:39 PM, you wrote:
AZ> I used my scripts yesterday and suddenly today they dont work and I get this
AZ> error: Call to a member function on a non-object
If you have changed *nothing* at all that could influence the outcome
of this script then I would suggest you just upload your original
files again and over-write what is on the server. It's possible they
have been corrupted somehow.
Failing that it's time to start debugging - if you use a decent IDE
like Zend then start slapping breakpoints and watches all over the
place. If you don't, start echo'ing out values left right and centre
as you enter key parts of your script.
--
Best regards,
Richard mailto:rich
launchcode.co.uk
attached mail follows:
Hello Angelo,
Thursday, February 12, 2004, 11:33:39 PM, you wrote:
AZ> HI,
AZ> I used my scripts yesterday and suddenly today they dont work and I get this
AZ> error: Call to a member function on a non-object
AZ> it points to erroneous line that calls a function in 1 of my classes. The
AZ> class and this particular file have not been changed since i used them yest.
AZ> I also checked my DB and all is perfect. I read somewhere on the net that it
AZ> could have something to do with cache. But i couldnt find any helpful info.
AZ> perhaps someone has experienced this error before and what could cause it
AZ> and how do i fix it?
AZ> thanx in advance
AZ> Angelo
--> may be you have to check whether you have already include the file
--> or not .. sometimes, include_once (or require_once) could lead to
--> this error .. so try to use include or require .. hope it work :)
--
Best regards,
adwinwijaya mailto:adwinwijaya
yahoo.com.au
attached mail follows:
Does anyone here use mod_auth_mysql for authentication? I am STFW like
crazy, but I cannot find a solution for connecting to another mysql
server on the network. TVMIA!
attached mail follows:
On 12 Feb 2004 at 0:29, Matthew Oatham wrote:
> I have a form on page1 that i want to submit to another php page - page2
>
> the form has the fields
>
> <input type="hidden" name="image[one]" value="one">
> <input type="hidden" name="image[two]" value="two">
> <input type="hidden" name="image[three]" value="three">
>
> Basically I want to have these form field values as an array of values I
> can loop through on page 2 but what do I put on page 2 too get the array
> and loop through ?
On page two you'll have $_POST['image'] as an array containing elements 'one', 'two'
and 'three' ($_POST['image']['one'] etc). This is *pretty* basic, so I'm guessing you'll
have to learn some more PHP before you can actually do anything with this array.
If you have some experience with other programming languages, you'll probably find
that the first few chapters of the official PHP manual (http://www.php.net/manual/en/ )
will get you up and running in no time flat.
Good luck,
Erik
attached mail follows:
Ronald Ramos wrote:
> create table oras(
> Name VARCHAR(30),
> TimeIn DATETIME,
> TimeOut DATETIME,
> Total DATETIME
> );
>
> insert into oras values('Nhadie','2004-10-10 10:10:00','2004-11-11
> 12:12:00','TIMEDIFF(TimeIn,TImeOut)');
>
> Hi,
>
> Are those correct? Because the value on the Total field is 000-00-00
> 00:00:00.
> I think there's something wrong. I'm using 4.0.
>
>
> mysql> select * from oras;
> +--------+---------------------+---------------------+------------------
> ---+
> | Name | TimeIn | TimeOut | Total
> |
> +--------+---------------------+---------------------+------------------
> ---+
> | Nhadie | 2004-10-10 10:10:00 | 2004-11-11 12:12:00 | 0000-00-00
> 00:00:00 |
> +--------+---------------------+---------------------+------------------
> ---+
> 1 row in set (0.01 sec)
>
> TIA
I would not use DATETIME column type for Total as it is dependable on
the number of days in the month. Use INT and store the number of seconds
instead. Then you can update the column using:
UPDATE oras SET Total = SELECT UNIX_TIMESTAMP(field1) -
UNIX_TIMESTAMP(field2) [WHERE where_condition]
attached mail follows:
Ronald Ramos wrote:
> create table oras(
> Name VARCHAR(30),
> TimeIn DATETIME,
> TimeOut DATETIME,
> Total DATETIME
> );
>
> insert into oras values('Nhadie','2004-10-10 10:10:00','2004-11-11
> 12:12:00','TIMEDIFF(TimeIn,TImeOut)');
>
> Hi,
>
> Are those correct? Because the value on the Total field is 000-00-00
> 00:00:00.
> I think there's something wrong. I'm using 4.0.
>
>
> mysql> select * from oras;
> +--------+---------------------+---------------------+------------------
> ---+
> | Name | TimeIn | TimeOut | Total
> |
> +--------+---------------------+---------------------+------------------
> ---+
> | Nhadie | 2004-10-10 10:10:00 | 2004-11-11 12:12:00 | 0000-00-00
> 00:00:00 |
> +--------+---------------------+---------------------+------------------
> ---+
> 1 row in set (0.01 sec)
>
> TIA
I would not use DATETIME column type for Total as it is dependable on
the number of days in the month. Use INT and store the number of seconds
instead. Then you can update the column using:
UPDATE oras SET Total = SELECT UNIX_TIMESTAMP(TimeIn) -
UNIX_TIMESTAMP(TimeOut) [WHERE where_condition]
attached mail follows:
Hello,
I'm working with a DB SQL Server. This DB has a table with Japanese
characters.
When I read a field (with Japanese characters) with function
mssql_fetch_array(), always it return characters '?'.
If I put 'print("(Japanese characters)");', these Japanese characters are
shown correctly.
My PHP file has follow code to work with Japanese characters:
mb_internal_encoding("EUC-JP");
mb_http_output("EUC-JP");
mb_http_input("EUC-JP");
mb_language("Japanese");
My question: How can I show correctly the Japanese characters from a SQL
Server DataBase?
Thanks very much!
Juan Torres.
attached mail follows:
Hi,
I believe it's hiccuping at this:
<msxsl:script language="JScript" implements-prefix="user">
<![CDATA[
function EscapeURL(selection) {
if (selection(0) == null)
return "";
else if (selection(0).hasChildNodes())
return escape(selection(0).childNodes(0).nodeTypedValue);
else
return escape(selection(0).nodeTypedValue);
}
]]>
</msxsl:script>
not being an expert on the MS XML api i not in a position to help you further. you should send this to an XSLT list.
Juan Torres wrote:
>Hi,
>
>
>When I run my php file, this error message is shown:
>Warning: Sablotron error on line 27: function 'user:EscapeURL' not supported
>in c:\inetpub\wwwroot\projects_php\testing\test_xsl.php on line 7
>Sorry, sample.xml could not be transformed by sample.xsl into result.xml the
>reason is that function 'user:EscapeURL' not supported and the error code is
>51
>
>Can anybody help me? I cann't solve this error.
>
>Thanks very much!
>Juan Torres.
>
>PS: Excuse me, my english is bad :(
>
>
>
--
Raditha Dissanayake.
------------------------------------------------------------------------
http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB | with progress bar.
attached mail follows:
Can PHP interface with other programs through DDE?
attached mail follows:
hi,
I am having problems with recode extension for php 4.3.4.
this is the configure options :
'./configure' '--prefix=/usr/local/linkbynet/php'
'--with-gd=/usr/local/linkbynet/gd2' '--enable-gd-native-ttf'
'--with-freetype-dir=/usr/local/linkbynet/freetype2'
'--with-jpeg-dir=/usr/local/linkbynet/jpeg6b/'
'--with-pdflib=/usr/local/linkbynet/pdflib'
'--with-png-dir=/usr/local/linkbynet/libpng'
'--with-dom=/usr/local/linkbynet/libxml2'
'--with-zlib=/usr/local/linkbynet/zlib'
'--with-mysql=/usr/local/linkbynet/mysql'
'--with-apxs=/usr/local/linkbynet/apache/bin/apxs' '--with-imap'
'--with-recode' '--enable-ftp' '--enable-bcmath'
this sample code gives me a segmentation fault :
<?
$text =
"062806310648062D002006270644063306480642002006270630062"
."70631062C0639062A002006460643064506440020064A062706380"
."628064A00200627064406270645062706310627062A00200645064
."6002006280646062A0020062706440631064A06270636";
$text = pack("H*", $text);
$text = recode("ucs2..utf-8", $text);
echo "'$text'\n";
?>
$text is a ucs2 text in hexadecimal. so I just decode it with pack() and
then convert it into utf-8.
if I remove 4 digits at the end of the hexa or add 4 digits (0623 for
example) at the end, it works.
what can I do about this?
thanks for your help.
attached mail follows:
Jeremy --
You have started a new thread by taking an existing message and replying
to it while merely changing the Subject: line.
That is bad, because it breaks threading. Whenever you reply to a
message, your mail client generates a "References:" header that tells all
recipients to which posting(s) your posting refers. A mail client uses
this information to build a "thread tree" of the postings so that it is
easy to see just how they relate to each other.
With your posting style you successfully torpedoed this useful feature;
your posting shows up within an existing thread even though it is
completely unrelated.
Always do a fresh post when you want to start a new thread. That means
that you do not select any sort of "Reply" when you start your message.
You can save the list address in your address book (or equivalent) for
convenience.
...and then Jeremy Schroeder said...
%
% Hey Group
Hi!
%
% I am starting to write class and objects and came across some syntax
% that I dont understand.
%
% What does the ampersand do in the bottom example code, they both work.
%
% $n1 = $num1 -> function();
% $n1 = & $num1 -> function();
1) Search the manual.
2) Assigning by reference, as compared to the default assigning by value,
means that the variable on the left of the '=' now points to the very
same little chunk of memory as the variable on the right. This is
different from the usual assignment in that when you change the left var
you change the value for the right var, too.
$a = 1 ;
$b = $a ;
$c = &$a ;
$b++ ; $c-- ;
print "a = $a ; b = $b ; c = $c ;\n" ;
// a = 0 ; b = 2 ; c = 0
3) You can't, as far as I know, assign-by-reference a function, so your
code should generate a parse error.
%
% -Blake
HTH & HAND
:-D
--
David T-G * There is too much animal courage in
(play) davidtg
justpickone.org * society and not sufficient moral courage.
(work) davidtgwork
justpickone.org -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)
iD8DBQFAK7kDGb7uCXufRwARAjRjAJ40kQXkF9kf9yPfWbW2DSRBt9CBQgCgq5bp
yFnjMoPxQ4iKEMmN0cJmRaY=
=j3Wa
-----END PGP SIGNATURE-----
attached mail follows:
HAND?
I haven't seen that one...
> -----Original Message-----
> From: David T-G [mailto:davidtg-php
justpickone.org]
> Sent: Thursday, February 12, 2004 11:34 AM
> To: PHP General list
> Cc: Jeremy Schroeder
> Subject: Re: [PHP] A dumb question
>
> Jeremy --
>
> You have started a new thread by taking an existing message and replying
> to it while merely changing the Subject: line.
>
> That is bad, because it breaks threading. Whenever you reply to a
> message, your mail client generates a "References:" header that tells all
> recipients to which posting(s) your posting refers. A mail client uses
> this information to build a "thread tree" of the postings so that it is
> easy to see just how they relate to each other.
>
> With your posting style you successfully torpedoed this useful feature;
> your posting shows up within an existing thread even though it is
> completely unrelated.
>
> Always do a fresh post when you want to start a new thread. That means
> that you do not select any sort of "Reply" when you start your message.
> You can save the list address in your address book (or equivalent) for
> convenience.
>
> ...and then Jeremy Schroeder said...
> %
> % Hey Group
>
> Hi!
>
>
> %
> % I am starting to write class and objects and came across some syntax
> % that I dont understand.
> %
> % What does the ampersand do in the bottom example code, they both work.
> %
> % $n1 = $num1 -> function();
> % $n1 = & $num1 -> function();
>
> 1) Search the manual.
>
> 2) Assigning by reference, as compared to the default assigning by value,
> means that the variable on the left of the '=' now points to the very
> same little chunk of memory as the variable on the right. This is
> different from the usual assignment in that when you change the left var
> you change the value for the right var, too.
>
> $a = 1 ;
> $b = $a ;
> $c = &$a ;
> $b++ ; $c-- ;
> print "a = $a ; b = $b ; c = $c ;\n" ;
> // a = 0 ; b = 2 ; c = 0
>
> 3) You can't, as far as I know, assign-by-reference a function, so your
> code should generate a parse error.
>
>
> %
> % -Blake
>
>
> HTH & HAND
>
> :-D
> --
> David T-G * There is too much animal courage in
> (play) davidtg
justpickone.org * society and not sufficient moral courage.
> (work) davidtgwork
justpickone.org -- Mary Baker Eddy, "Science and
> Health"
> http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
******************************************************************
The contents of this e-mail and any files transmitted with it are
confidential and intended solely for the use of the individual or
entity to whom it is addressed. The views stated herein do not
necessarily represent the view of the company. If you are not the
intended recipient of this e-mail you may not copy, forward,
disclose, or otherwise use it or any part of it in any form
whatsoever. If you have received this e-mail in error please
e-mail the sender.
******************************************************************
attached mail follows:
Alex Hogan wrote:
> HAND?
>
> I haven't seen that one...
"Have A Nice Day"
--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
attached mail follows:
Sorry for the mistake.
I check the email I sent and I only sent it to the group, I changed the
subject an removed all the of the message.
Blake
David T-G wrote:
>Jeremy --
>
>You have started a new thread by taking an existing message and replying
>to it while merely changing the Subject: line.
>
>That is bad, because it breaks threading. Whenever you reply to a
>message, your mail client generates a "References:" header that tells all
>recipients to which posting(s) your posting refers. A mail client uses
>this information to build a "thread tree" of the postings so that it is
>easy to see just how they relate to each other.
>
>With your posting style you successfully torpedoed this useful feature;
>your posting shows up within an existing thread even though it is
>completely unrelated.
>
>Always do a fresh post when you want to start a new thread. That means
>that you do not select any sort of "Reply" when you start your message.
>You can save the list address in your address book (or equivalent) for
>convenience.
>
>...and then Jeremy Schroeder said...
>%
>% Hey Group
>
>Hi!
>
>
>%
>% I am starting to write class and objects and came across some syntax
>% that I dont understand.
>%
>% What does the ampersand do in the bottom example code, they both work.
>%
>% $n1 = $num1 -> function();
>% $n1 = & $num1 -> function();
>
>1) Search the manual.
>
>2) Assigning by reference, as compared to the default assigning by value,
>means that the variable on the left of the '=' now points to the very
>same little chunk of memory as the variable on the right. This is
>different from the usual assignment in that when you change the left var
>you change the value for the right var, too.
>
> $a = 1 ;
> $b = $a ;
> $c = &$a ;
> $b++ ; $c-- ;
> print "a = $a ; b = $b ; c = $c ;\n" ;
> // a = 0 ; b = 2 ; c = 0
>
>3) You can't, as far as I know, assign-by-reference a function, so your
>code should generate a parse error.
>
>
>%
>% -Blake
>
>
>HTH & HAND
>
>:-D
>
>
--
+-----------------+-----------------+----------------+
| Blake Schroeder | Owner/Developer | lhwd.net |
+--(http://www.lhwd.net)------------+--/3174026352\--+
attached mail follows:
I saw the article at http://us2.php.net/manual/en/function.fileatime.php and
gave it a shot with the timestamp for the file but it doesn't work correctly
because it only returned the current timestamp (as it is from our watch or
clock) but not the one from the file...
I had verify that the file is correct and that the date() is working
correctly and that the timeatime() is working correctly if they are tested
independantly, so it is just putting them all three together cause them not
to work right...
--snip--
$current_filename = "test.pdf";
echo (date('F j, Y, h:i a', (fileatime($current_filename))));
--snip--
What did I do wrong??
Scott F.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]