Hi list,
I'm developing an CMS, and I started a session with PHP 4.1.1
With I use this in javascript "alert(document.forms[0].elements[0].name)"
it returns "PHPSESSID" and if i use
"alert(document.forms[0].elements[0].value)", it returns a number.
It's a bug???
I'm using IE5 in macos 9.2.2
Tha
Does anybody know of a common bug where a variable contains what seems to be
a generated random number
instead of the input data that was given?
I'm inputting all sorts of info and only one variable is acting
strange..hmmm
--
PHP General Mailing List (http://www.php.net/)
T
Hi!
I just came across this weird thing. Bug? You tell me!
print (int)((8.85-8)*100);
I would think the line above would print "85". But for some reason, it
prints "84"?? Can anyone tell me why that is?
--
Intent A/S
Tais M. Hansen
Web Developer
--
PHP General Mailing List (http://www
For those with error_reporting set to E_ALL, this affects you.
After seeing this: "Warning: No file uploaded in unknown on line 0",
probably the least useful error message I've ever seen, I did some
investigation.
The PHP developers seem to think that if you have a form upload on your
page, a
> Hi , does anyone know if there is a " bug database" php project . My goal
> is a small database like php already have in their own site.
Otherwise i must write one
J.Faria
_
Do You Yahoo!?
Get your free @yahoo.com address at
> -Original Message-
> From: Jeremy Morano [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 19, 2001 4:07 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] bug?
>
>
> Does anybody know of a common bug where a variable contains
> what seems to be a generated r
you must use float not int :D
- Original Message -
From: "Maxim Maletsky" <[EMAIL PROTECTED]>
To: "'[Intent A/S] Tais M. Hansen'" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, August 08, 2001 7:01 PM
Subject: RE: [PHP] Bug?
&
On Wed, Aug 08, 2001 at 07:06:13PM +1000, ReDucTor wrote:
> you must use float not int :D
Using float doesn't solve the problem, does it? Point is that when
using int, the damn thing doesn't get it straight. And that's WEIRD.
I mean the result of (8.85-8)*100 is already an integer and not
convert
TED]>
Sent: Wednesday, August 08, 2001 7:14 PM
Subject: Re: [PHP] Bug?
> On Wed, Aug 08, 2001 at 07:06:13PM +1000, ReDucTor wrote:
> > you must use float not int :D
>
> Using float doesn't solve the problem, does it? Point is that when
> using int, the damn thing doesn
t;Darius Ivanauskas" <[EMAIL PROTECTED]>
To: "Maxim Maletsky" <[EMAIL PROTECTED]>
Cc: "'[Intent A/S] Tais M. Hansen'" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, August 08, 2001 7:18 PM
Subject: RE: [PHP] Bug?
> Hello,
>
On Wed, Aug 08, 2001 at 07:18:26PM +1000, ReDucTor wrote:
> if you use
> echo (float)((8.85-8)*100);
> it works because 8.85 go's to 0.85 and times that by 100, and you get 85
> which is what you get...
Maybe you've heard about dynamic pages and stuff...
Say:
$a = 8.85;
$b = 8;
$c = 100;
$res
Hello,
I remember there was a warning in the PHP Manual about
this. This is it:
** Never cast an unknown fraction to integer, as this
can sometimes lead to unexpected results.
** echo (int) ( (0.1+0.7) * 10 ); // echoes 7!
So do your calculations first, and then echo the
results. This way
Hi again,
I can't really see much difference in the example you gave?
But if it may have something to do with the "casting of an unknown fraction
to int", I'll use floor() instead of casting. Same result:
floor((8.85-8)*100) = 84
I find that quite odd. I tried a few variations:
floor((8.85-8.
Hi,
I assume that it is not a normal behavior of PHP to get crashed together
with Apache by a simple script.
I tried to set up PHPGroupWare and at the second setup step (when I try to
enter my password at the "Setup/Config Admin Login") I got no answer from
Apache. After a little investigation I
Hi!
This is a code
function Test()
{
static $count = 0;
$count++;
echo $count;
if ($count < 10) {
Test ();
}
echo "j";
}
test();
Output is
12345678910jj
Why is there 10 j at the and. If this would work it can be
only one. If $count is grater than 10 it
Hello,
i discovered bug in sessions:
when using unset($_SESSION[...]) insted session_unregister(...) and
before calling read _$SESSION[...] variable WILL NOT unset.
please try these examples and see result.
here is method how to produce this bug (you must have cookies enabled):
1. run script
2
I've looked into bug tracking software at hotscripts: mantis
http://mantisbt.sourceforge.net/mantis/main_page.php3
is promising but has too many bugs itself still (I fixed three in the past
20 minutes of playing with it, it's still in beta, but I can't afford the
estimated x days of debugging it
First File - index.php
Problem detected!" .
"Your browser does not support cookies!" .
"Enable cookies and try again.");
die;
}
else {
$page = "login.php";
header("Location: $page");
}
}
?>
Second File - login.php
Forecast Tool - ATL Key Account
Login:
Password:
Everything works
Hi,
output: Value is NULL!
is it a bug or expected behaviour? tested it on 4.0.4pl1.
i got around it by using strcasecmp(), but just wondering. :)
Rgds,
Tfr
--==< [EMAIL PROTECTED] >==< http://tfr.cafe.ee/ >==< +372-50-17621 >==--
--
PHP General Mailing List (http://www.php.net/)
To
Dear Sir
i am getting a bug in php where by i can't pass the values of the data
entered by the user into the database
pls help
--akhil
Get free email and a permanent address at http://www.netaddress.com/?N=1
Bug in str_replace(), PHP 4.0.6
$text = "hello world";
$out = str_replace(" "," ",$text);
echo $out;
Expected output:
"hello world"
Actual output:
"hello world"
Of course, this is what happens if str_replace() does replacements on input,
but not o
I ran across a curious bug in the echo function this morning. My PHP is
Debian binary 4.1.1-1.
The first example below does not work (it should draw a
checkerboard-like table):
-
Chess
";
for ($j=0 ; $j<8 ; $j++) {
echo "" . ($i*8)+$j . "";
}
echo "\n";
}
?>
-
Howev
Hello,
can someone test this code and send me results ?
http://www.php.net/";);
exit();
}
?>
?>
XXX
" method="post">
i want to know if apache fails (returns no response) or if it passed.
And then try please again but with this line in function: /
On Sat, 2002-03-30 at 15:59, Uros Gruber wrote:
> Hi!
>
> This is a code
>
> function Test()
> {
> static $count = 0;
>
> $count++;
> echo $count;
> if ($count < 10) {
> Test ();
> }
> echo "j";
> }
> test();
>
> Output is
>
> 12345678910jj
>
> Why is
Hi
One way is to use a variable to track the recursion llike this:
$y will always be 1 as long as it is in recursion only going to 0 on the
last one.
Tom
At 09:59 AM 31/03/2002, Uros Gruber wrote:
>Hi!
>
>This is a code
>
>function Test()
>{
> static $count = 0;
>
> $count++;
> ec
No, this is NOT a bug. You recurse 10 times down into the function.
Therefore, as you come back up and exit the previous call to test(), you
complete Test's processing, which is to print j
The recursion process is as expected and correct
==
At 09:59 AM 31/03/2002, Ur
Dunno if this has been mentioned or fixed in the latest release (I'm using
PHP version 4.1.1) -- but, a script will not timeout until the sleep()
function has finished it's duration -- for example:
In my script, if I set "set_time_limit(30)" -- then later in the script I
call a "sleep(45)" -- the
e the documentation.
---John Holmes...
> -Original Message-
> From: Michal Dvoracek [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, June 30, 2002 7:37 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] bug in sessions
>
> Hello,
>
> i discovered bug in sessions:
>
> w
Many people recommend bugzilla from netscape.
Rick
At 10:49 AM 3/6/01 +, Peter Van Dijck wrote:
>I've looked into bug tracking software at hotscripts: mantis
>http://mantisbt.sourceforge.net/mantis/main_page.php3
>is promising but has too many bugs itself still (I fixed three in the past
>2
We had NASTY problems with cookies on different servers. I've even seen code
work on one linux/apache machine and not another. This is usually due to the
fact that the server's clock is off from the browsers clock (or vice versus)
and the browser sees that the cookie has passed and destroys it wi
indrek siitan wrote:
>
> Hi,
>
>$value=0;
> if ($value=="NULL")
> echo "Value is NULL!";
> else
> echo "Value is not null.";
> ?>
>
> output: Value is NULL!
>
> is it a bug or expected behaviour? tested it on 4.0.4pl1.
> i got around it by using strcasecmp(), but just wondering
I think perhaps a bit more detail is needed :-)
What's the error, can we see your code, what database are you using, etc.
Cheers
Jon
-Original Message-
From: akhil chugh [mailto:[EMAIL PROTECTED]]
Sent: 19 June 2001 05:30
To: [EMAIL PROTECTED]
Subject: [PHP] php bug reporting
At 19.06.2001 05:29, you wrote:
>Dear Sir
> i am getting a bug in php where by i can't pass the values of the data
>entered by the user into the database
> pls help
> --akhil
Show us your code, as more than 9 out of 10 times the error is in chair->screen
section aka. operator/user and not in t
akhil, do you have a database server installed ?
> -Original Message-
> From: Andreas D. Landmark [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 19, 2001 1:18 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] php bug reporting
>
>
> At 19.06.2001 05:29, you wrot
Hi all. I have just been writing some fairly simple PHP code when I cam
across a problem. The following if statement always claims to be false.
However, I print out the variables in the if (which are strings) and they
are identical. Here it is:
if($reqcat["indexname"] == $row["maincat"]){
Although I have a solution to my script, I would rest at ease if someone
could confirm that I have erred and perhaps if I had read some particular
part of the manual I'd never have had the problem.
http://www.php.net/bugs.php?id=13055&edit=2
rgds
Mal
--
PHP General Mailing List (http://www.p
GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948
-Original Message-
From: Billy Harvey [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 18, 2002 11:44 AM
To: php
Subject: [PHP] bug in echo function?
I ran across a curious bug in the echo function this morning. My PHP is
De
is.
Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948
-Original Message-
From: Billy Harvey [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 18, 2002 12:07 PM
To: Darren Gamble
Cc:
On Fri, 2002-01-18 at 13:54, Darren Gamble wrote:
> Good day,
>
> The reason that the first statement doesn't work as intended is due to the
> order that the operands are processed.
>
> The operands in the line:
>
> "" . ($i*8)+$j . ""
>
> are being processed like this:
>
> ("" . ($i*8))+($j
"Billy Harvey" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Fri, 2002-01-18 at 13:54, Darren Gamble wrote:
> > Good day,
> >
> > The reason that the first statement doesn't work as intended is due to
the
> > order that the operands are processed.
> >
> >
Hi!
This I simply don't understand why this code executes that
way. So there is only inportant to put return after recursive
call and it works like i wan't. I sometimes write small C
programs and I don't remeber that code like this have to work
that way Hm.
--
bye,
Uros
Hi,
Ok, no I understand why. So this explains why every function
must have return. But how can i program for example one
recursion or where to put return so that test would not be
waiting for return but at the end of this recursion i would
like to do something with that $count for example.
Hmm i
Hello,
I'm trying to generate this list of letters A..Z, using this
for ($l='A'; $l<='Z'; $l++)
echo $l."-";
And it doesn't work. It generates the output included at the end of
this message (I used to be shorter)
But this works
for ($l='A'; $l<='Y'; $l++)
echo $l."-";
ge
This is well-documented. Right out of the set_time_limit() docs:
Note: The set_time_limit() function and the configuration directive
max_execution_time only affect the execution time of the script itself.
Any time spent on activity that happens outside the execution of the
script such as sy
Hello php-gen'ers,
I've been whacking my head against this for a day or so and I'm fairly
certain I've discovered a bug in the way user-defined output buffering
handlers work when not explicitly triggered by a call to ob_end_flush().
See the attached sample2.php and mysheet.xsl, both of which s
Please respond to php-dev
To: Thomas Seuring/DEBIS/debis/DCX@WK-EMEA1
bcc:
Subject: Bug #14360: Script ends on >
From: [EMAIL PROTECTED]
Operating system: Windows 2000
PHP version: 4.0.6
PHP Bug Type:
I've found out what's wrong with PHP4 partially.
It might help people who are getting errors - document contains no data or
like.
You may get various strange PHP4 behavior with (possibly without)
combination of reference, foreach and array if you don't pass expected
values to functions.
I've
How come sometimes I get this message and sometimes I dont?
[Fri Apr 6 13:49:15 2001] [error] PHP Warning: 3 is not a valid
PostgreSQL lin
k resource in /usr/local/apache/htdocs/ltt-dev/htdocs/formproc.php3
on line 134
It worked fine until I upgraded to PHP4 and now a bunch of code is
broke
Hi!
$astrData = file($astrCounterFile[$i]);
echo "|\n|";
echo "|" . $astrData[0] . "|";
echo "|" . $astrData[1] . "|";
//$astrData[1] = "\n";
//echo "|" . $astrData[1] . "|";
echo "|" . $astrData[2] . "|";
for($k = 0; strcmp($astrData[$k] , "\n") && ($k < 50); $k++)
// for($k = 0; ($astrData[$
I wonder if there is any further info available on this? I have
encountered the same problem, for the apparent same reasons, on a Linux
2.0.29 kernel Slackware system.
Compile error is, for php 4.0.6
filestat.c: In function `php_if_diskfreespace':
filestat.c:157: storage size of `buf' isn't kn
> if($reqcat["indexname"] == $row["maincat"]){
Well, something is different about them. Are you sure there are no
leading or trailing spaces? Do a strlen() on each and make sure they are
the same lengths or trim() each one before the compare.
-Rasmus
--
PHP General Mailing List (http:
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] ("Adam Charnock") wrote:
> The following if statement always claims to be false.
> However, I print out the variables in the if (which are strings) and they
> are identical. Here it is:
>
> if($reqcat["indexname"] == $row["maincat"])
It w
Hi list,
I'm developing an CMS, and I started a session with PHP 4.1.1
With I use this in javascript "alert(document.forms[0].elements[0].name)"
it returns "PHPSESSID" and if i use
"alert(document.forms[0].elements[0].value)", it returns a number.
It's a bug???
I'm using IE5 in macos 9.2.2
Tha
On Sat, 2002-03-30 at 16:16, Uros Gruber wrote:
> Hi!
>
> This I simply don't understand why this code executes that
> way. So there is only inportant to put return after recursive
> call and it works like i wan't. I sometimes write small C
> programs and I don't remeber that code like this have
$i=0; $i
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 16, 2002 11:27 AM
Subject: [PHP] BUG?: for loop using chars
> Hello,
>
> I'm trying to generate this list of letters A..Z, using this
>
>for ($l='A'; $l<='Z'; $l++)
> echo $l.&quo
Hi,
Can somebody take a look at this bug and tell me if that is a real bug or
what i do wrong?
http://bugs.php.net/bug.php?id=17305
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi
It seems that it loses path information, it will work if you use an
absolute path like this:
function my_output_handler($string) {
$arguments = array('/_xml' => $string,'/_xsl'=>$xsl);
$xsltproc = xslt_create();
$html = xslt_process($xsltproc, 'arg:/_xml',
"/usr/lo
Here is my SQL(used in a PHP script so this isn't ot)
SELECT
extract(year FROM time),
extract(month FROM time),
count(*) as monthly_views,
time
FROM
tececo_stats
group by
extract(year FROM time),
extract(month FROM time)
order by
monthly_views desc
limit 1
the problem
echo date( "r h:ia" );
returns:
Tue, 3 Apr 2001 13:45:46 +0500 12:875903540pm
What's up with the minutes? Does anyone else get
this problem? It seems the minutes are only screwed
up with the "r" format specifier is used...
Chris
On Friday 06 April 2001 21:44, Kristopher Yates wrote:
> How come sometimes I get this message and sometimes I dont?
>
> [Fri Apr 6 13:49:15 2001] [error] PHP Warning: 3 is not a valid
> PostgreSQL lin
> k resource in /usr/local/apache/htdocs/ltt-dev/htdocs/formproc.php3
> on line 134
>
> It wor
on my linux based system
echo ord("\n");
is 10 which is 0A in hex. windows machings usually consider newline to be 0A0D or 0D0A
mac's usually are 0D I would convert your file. I have to do this often with file
uploads.
// convert all 0A0D and 0D0A to 0A0A
$data = str_replace(chr(13), chr(10)
Ok, now I got it.
I already knew that the newline is coded differently in Unix/Win/Mac. But I
did not know, that in PHP on Win32 "\n" is 0D 0A when outputed, but 0A
otherwise. Confusing...
Hannes
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For a
Hi
I just rewrote a website to use sessions all over the site. on one page
i used
output-compression just to test it. if i use MSIE everything just works
fine, BUT:
if i use Netscape WITHOUT cookies the PHP does not rewrite the relative
urls
here is the code of the page :
session_start();
fu
On Tuesday 09 July 2002 18:32, JJ Harrison wrote:
> Here is my SQL(used in a PHP script so this isn't ot)
Aside from the fact that this has _nothing_ to do with php, you would most
likely get a better response from the php-db list where, hopefully, the sql
experts hangout.
> SELECT
> extra
> -Original Message-
> From: JJ Harrison [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 09, 2002 12:33 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Bug in SQL can you help?
>
>
> Here is my SQL(used in a PHP script so this isn't ot)
PHP-script or not, i
Thanks
"Jason Wong" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Tuesday 09 July 2002 18:32, JJ Harrison wrote:
> > Here is my SQL(used in a PHP script so this isn't ot)
>
> Aside from the fact that this has _nothing_ to do with php, you would most
> likel
On Wed, 4 Apr 2001 04:24, Boget, Chris wrote:
> > echo date( "r h:ia" );
>
> returns:
>
> Tue, 3 Apr 2001 13:45:46 +0500 12:875903540pm
>
> What's up with the minutes? Does anyone else get
> this problem? It seems the minutes are only screwed
> up with the "r" format specifier is used...
>
> C
If I do echo($HTTP_SERVER_VARS["SERVER_ADDR"])
I get the expected server address ***WITHOUT A SLASH AT THE END***
eg. "my.server.address"
---
If I do echo($PHP_SELF)
I get the expeted URL relative the the server ***WITH O-N-E SLASH** at
beginning.
eg. "/expected/url/relative/doc_name"
-
ng 'PHP
4.0.3pl1' as an apache module (apache 1.3.14) on FreeBSD it looses the
contence of the cart object. All other (no object) session varables seem
to work fine.
Has anybody come across this, is it a PHP bug fixed between 4.0.3 and
4.0.6? Has anybody got a fix.
Regards,
Ben
--
I have a download script on IIS 5 and Php 4.0.6 as cgi:
$filename=PDF_PATH.$codfile.".pdf";
$fp=fopen($filename,"rb");
if ($fp)
{
header("Content-type: application/octet-stream\n" );
header("Content-transfer-encoding: binary\n");
header("Content-length: " . filesize($filename) . "
There seems to be a bug in php 4.0.4pl1, would someone please verify
this script below. If you paste this script into a file called bug.php and
you just call it you will see "Http post Vars Set". However you will not
find that variable it in the output of PHPINFO. I tried this under
ph
Please, look this little script, and what he prints.
Am I doing something wrong or I "found" a bug??
thanks a lot.
";
$data = mysql_query($sql) or die ("Erro crypt 1.");
$row = mysql_fetch_row($data);
return $row[0];
}
function decode($decode_str, $pass_str)
{
$encode_str = addslashes($e
I've recently been banging my head against the wall because I was getting a number of
selects that would occasionally return zero rows, even though 1 or more rows should
have been returned.
I cannot reproduce the problem with pg_connect. The problem only occurs when I am
using pg_pconnect.
Ha
ssage -
From: Krznaric Michael <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 04, 2001 11:02 AM
Subject: [PHP] BUG - Someone else please verify B4 I file
> There seems to be a bug in php 4.0.4pl1, would someone please verify
> this script below. If you paste
In article <81A3043681E6824EBE672F7421C30E7E2A19A7
@SRVTORONTO.RAND.COM>, [EMAIL PROTECTED] says...
}if (isset ($HTTP_POST_VARS)){
} echo "Http Post Vars Set";
Remember, just because a variable is "set", it doesn't imply that the
variable has any data stored in it. In this case, while the
on 4/4/01 5:14 PM, Data Driven Design at [EMAIL PROTECTED] wrote:
> I've noticed that and had to rewrite several scripts when hosts upgraded
> from PHP3 to PHP4. $HTTP_POST_VARS is considered set even when it is empty.
i have also noticed this. we run 4.0.3pl1 here.
have a great day
andy
--
"Data Driven Design" <[EMAIL PROTECTED]> wrote:
> I've noticed that and had to rewrite several scripts when hosts upgraded
> from PHP3 to PHP4. $HTTP_POST_VARS is considered set even when it is
empty.
For those that can't guess the solution to this problem I suspect this will
do the trick:
! emp
O.k. I understand that, now why would HTTP_POST_VARS be set if no data is
posted? Is this desired operation?
Mike
-Original Message-
From: Jeff Carnahan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 04, 2001 2:18 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] BUG - Someone else please
han [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 04, 2001 2:18 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] BUG - Someone else please verify B4 I file
>
>
> In article <81A3043681E6824EBE672F7421C30E7E2A19A7
> @SRVTORONTO.RAND.COM>, [EMAIL PROTECTED] says...
> }if (
PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, September 12, 2001 4:10 PM
> Subject: [PHP] Is it a mysql AND/OR php BUG???
>
>
> > Please, look this little script, and what he
> prints.
> > Am I doing something wrong or I "found"
> -Original Message-
> From: Augusto Cesar Castoldi [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 12, 2001 9:46 AM
> To: Schill, Johannes
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Is it a mysql AND/OR php BUG???
>
>
> the function isn't d
Hi.
I'm running Apache 1.3.19/php 4.06 under OpenBSD.
I have 30 virtual domains... all plain html (or w/ little php), some
date functions and mysql queries.
But one of them has a lot of php.
It's giving me a strange problem...
Here is index.php
Simple (the commonHeader / commonFooter idea
82 matches
Mail list logo