Hmmm... Didn't think about this, but % only works with int values
it was just future prof precaution since this statement is false for many
other languages.
In few words I am not sure PHP6 does the same ... never mind so far
Good to know. In that case, I would probably just use intval()
-Original Message-
From: Diogo Neves [mailto:dafne...@gmail.com]
Sent: Monday, October 12, 2009 9:19 AM
To: Andre Dubuc
Cc: php-general@lists.php.net
Subject: Re: [PHP] Need unrounded precision
A simple way to do that would be:
$elapsed = strval( 28.56018 );
$pos = strpos(
Couldn't this be done with just simple math functions?
indeed:
$a = 28.56018;
$b = $a * 10 % 10 0;
Hmmm... Didn't think about this, but % only works with int values, so
$b = $a * 10 % 10;
Should work as well.
Jaime
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
Leon,
This is really just a function of the browser. When a session cookie is
created, if the browser is setup for a single instance, that's the session
cookie it'll use for *any* request to that domain. This functions differently
depending on what browser you're using.
For example:
Ctrl-MouseWheel will increase or decrease the text size in an IE browser
window. I've found that I've accidentally increased the font size since I
use the Mouse Wheel quite a bit. (As well as CTRL-W to close an IE window
if one pops up)
Jaime Bozza
-Original Message-
From: Stephen
Hello,
By any chance, is your website named http://domain.com or is it
http://www.domain.com ?
Jaime Bozza
-Original Message-
From: Chad Day [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 8:09 AM
To: [EMAIL PROTECTED]; php general
Subject: RE: [PHP] Cookie handling
-Original Message-
From: Chad Day [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 8:17 AM
To: Jaime Bozza
Cc: 'php general'
Subject: RE: [PHP] Cookie handling, NS 4.x?
domain.com, but www is pointed to it as well. When I was setting the
cookies with Header calls
are horrible in NS4.x!)
Jaime
-Original Message-
From: Chad Day [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 9:11 AM
To: Jaime Bozza
Cc: 'php general'
Subject: RE: [PHP] Cookie handling, NS 4.x?
So, basically... cookies aren't going to work in NS 4.x if I specify
Except that https:// doesn't work with fopen until PHP 4.3.0.
Suggestions are only good if they work with a current version of PHP. :)
(No, I don't consider 4.3.0 current until it's at *least* released)
Regardless, until then, CURL support is probably the way to go.
Assuming you have curl
.
If not, you may need to change providers. :)
Jaime
-Original Message-
From: Ben C. [mailto:benc;cox.net]
Sent: Tuesday, November 05, 2002 12:19 PM
To: Jaime Bozza; 'Adam Voigt'
Cc: [EMAIL PROTECTED]
Subject: RE: Re: [PHP] Creating SSL Connection to Accept Credit Cards
run into any of the
problems above (and others that cause the IP Address to change during a
session)
Jaime Bozza
-Original Message-
From: Adam Voigt [mailto:adam;cryptocomm.com]
You could, on the page where it initially creates there session,
get there IP address and make
to go somewhere else than complain to a
website that I'm having problems with.
I'm just pointing out the issues, I'm not forcing anyone to listen. :)
Jaime Bozza
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
is one of the products) to combine
multiple upstream gateways (whether they be dialup/ISDN/DSL/T1's, etc)
in a simple round-robin form. Cisco routers even have the support (ip
load-sharing per-destination) that doesn't require BGP or to have the
routes be on the same provider.
Jaime Bozza
. (It
also has the ability to block the browser agent, but it's not on by
default)
I've seen others that change HTTP_REFERER into HTTP_WEFERER and hash the
data so you can't see what it was originally. I'm not sure which
product does this.
Jaime Bozza
--
PHP General Mailing List (http://www.php.net
Address is and
base it off of that)
Or, if you want to make it more difficult and only accept cookies (which
makes it harder for the average joe to accidentally hijack a session),
PHP 4.3 will have session.use_only_cookies as a variable.
Jaime Bozza
--
PHP General Mailing List (http
This may help with the specific formats. (And how to calculate the check
digit yourself to verify)
http://www.beachnet.com/~hstiles/cardtype.html
Jaime Bozza
-Original Message-
From: Kristopher Yates [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 1:42 PM
To: [EMAIL
PHP has heredoc capability, though it'll look a little strange since
you'll need the () around the parameters. It's also used a little bit
differently. Here's the code:
$fp = popen($Openssl_cmd req -new -config /usr/lib/openssl.cnf
. -key $cert_dir/key -days $days -out
in a new browser window.)
If you weren't hitting the shift-key, it could be possible that one
of your shift-keys are stuck, which is emulating the shift-click. Not
much more I can tell you other than that, since the link (and all
others) work just fine for me in Outlook XP.
Jaime Bozza
myfunc() {
$somevar = $_POST[somevar];
}
Sure you can extract the old ($HTTP_) arrays into the new, but you still
don't get the same functionality. (Yes, you could put a 'global
$_POST;' in the new way, but that defeats the purpose of having the new
superglobals)
Jaime Bozza
-Original
.
(Testing this with both IE and Netscape)
Jaime Bozza
-Original Message-
From: [ rswfire ] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 17, 2002 2:36 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] form posting to a fake page
Yes it works fine if I access it directly
end up only being a single line patch)
Let us know if you plan on requesting a new feature.
Jaime Bozza
-Original Message-
From: [ rswfire ] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 17, 2002 4:04 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] form posting
Read the NEWS file for PHP 4.2.0. (It should be located in the base
directory of the source distro)
If you're using the Windows package, try here:
http://cvs.php.net/co.php/php4/NEWS?r=1.885.2.17
Jaime Bozza
-Original Message-
From: Martín Marqués [mailto:[EMAIL PROTECTED
Hmmm... I'm not sure why that would be (unless, of course, your php.ini
has it there.) Either way, it sounds like a potential bug in either
phpinfo() or the register_globals code itself.
Jaime Bozza
-Original Message-
From: Martín Marqués [mailto:[EMAIL PROTECTED]]
Sent: Tuesday
around, just use the
function 'session_set_cookie_params()' and set the lifetime to be some
huge number, or use the session.cookie_lifetime setting in php.ini.
Jaime Bozza
-Original Message-
From: Nigel Gilbert [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 16, 2002 2:10 PM
To: Erik
Henrik,
Which session handler are you using? Files, mm, User?
Jaime Bozza
-Original Message-
From: Henrik Hudson [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 20, 2002 11:55 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Having a problem with sessions, Part Deux.
Just FYI. I
function. This assures me that the data is written.
Jaime Bozza
-Original Message-
From: Peter Lavender [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 15, 2002 7:35 PM
To: php-general
Subject: [PHP] session problems not finding my variables..
Hi everyone,
I'm not sure what I have done
. The session read function should return a blank value ('')
and not false when there's no data. This was never clear in the
documentation (and complaint I made) but is quite true. Once switching
over to using ('') instead of (false), I no longer had problems.
Jaime Bozza
-Original Message
Hmmm... So, there are yet more problems with the session functions. :)
Are you using 4.1.1 or 4.0.6?
Jaime
-Original Message-
From: Junior, Ricardo [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 03, 2002 9:34 AM
To: 'Jaime Bozza'; [EMAIL PROTECTED]
Subject: RE: [PHP] Session
I agree. Perhaps make a feature request that disallows session starting
if save_handler=user and you haven't defined a session handler?Then
it could spit out a more correct error message.
Jaime Bozza
-Original Message-
From: Sean LeBlanc [mailto:[EMAIL PROTECTED]]
Sent: Tuesday
What do you have for the return values for your session_read function?
(Specifically, what do you return when there's no data available?)
Jaime Bozza
-Original Message-
From: Sean LeBlanc [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 02, 2002 11:20 AM
To: [EMAIL PROTECTED
Returning false is invalid for the session read function, and has caused
*MANY* issues with PHP and Sessions. (Check the archives as well as the
bugs database. I have a couple in there myself)
Change:
return false;
To:
return '';
And things should start working as expected.
Jaime Bozza
Another way I validate input is by using settype();
For instance:
settype($id, integer);
I use addslashes and settype on all data coming from a browser that ends
up being using in a query.
(abs will convert negative numbers, which may be what you want, but then
again. G)
Jaime Bozza
John (and all),
I was using --with-mm on my system and immediately saw a jump in
memory usage and I wasn't even using the mm session support! The memory
doubled from 4.0.6 to 4.1.0. I've since removed it from my compile.
Jaime Bozza
GeoComm International Corp.
-Original Message
attempts on using enable-debug.
Jaime Bozza
-Original Message-
From: Yasuo Ohgaki [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 12, 2001 9:04 PM
To: [EMAIL PROTECTED]; Jaime Bozza
Subject: [PHP] Re: PHP 4.1.0 and User-defined Sessions
Search bug database to see if the same problem
certainly write a bug report up for
that, but I don't know if you'd classify that as a bug.
Jaime Bozza
-Original Message-
From: Yasuo Ohgaki [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 13, 2001 1:01 PM
To: Jaime Bozza
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: PHP 4.1.0
-defined handlers for
sessions started causing me lots of problems. (As near as I can tell,
you need to have some sort of a decent load on your servers - Single
client access didn't ever seem to allow me to force the crashes)
HELP!
Jaime Bozza
--
PHP General Mailing List (http://www.php.net
been
involved in. :)
I read the list all the time, so I don't think I need two copies sent to
me. G
Jaime Bozza
GeoComm International Corp.
-Original Message-
From: Kevin Williams [mailto:[EMAIL PROTECTED]]
Sent: Sunday, May 13, 2001 1:46 PM
To: [EMAIL PROTECTED]
Cc: PHP User Group
just ereg, or lowercase the email address
before you check it.
We also go a step further and use checkdnsrr to see if there are any (type
ANY that is) records available for the hostname part. Not great, but it at
least tries to see if the hostname exists.
Let me know if it works out for you.
Jaime Boz
I'm not sure if this will fix anybody else's problems, but if you change
your read handler to return a blank string instead of a FALSE condition, it
may start working for you as well! (If it DOES help you out, please let me
know.)
Jaime Bozza
--
PHP General Mailing List (http://www.
39 matches
Mail list logo