php-general Digest 21 Nov 2005 16:00:12 -0000 Issue 3807

Topics (messages 226171 through 226204):

Some good framework for new website
        226171 by: ÕÔ¹â
        226176 by: Roman Ivanov

new to sessions, but learning
        226172 by: matt VanDeWalle
        226173 by: Roman Ivanov
        226174 by: Roman Ivanov

Can't execute external program
        226175 by: Voip tech

Deployment and maintenance of php software
        226177 by: Andy Pieters
        226192 by: Oliver Grätz

Re: php related segmentation fault with Apache 2.0.55
        226178 by: Marco Kaiser

php5 call by refference
        226179 by: Georgi Ivanov
        226181 by: David Grant
        226183 by: Jochem Maas
        226185 by: Marcus Bointon
        226191 by: Oliver Grätz
        226194 by: Georgi Ivanov

Re: mod_rewrite and include paths
        226180 by: Marcus Bointon

Re: APC caching keys.
        226182 by: Marcus Bointon
        226186 by: Jochem Maas
        226188 by: Marcus Bointon

Re: using ($test)?$true:$false in a string
        226184 by: Jochem Maas
        226187 by: Marcus Bointon
        226198 by: Chris Boget
        226199 by: Robert Cummings
        226200 by: Richard Heyes
        226201 by: Robert Cummings
        226202 by: Richard Heyes
        226203 by: Jochem Maas

Re: showing in pages selecting result?
        226189 by: Jochem Maas
        226193 by: xkorakidis

Re: PHP 4.4.1 on Apache 2.0.x issue
        226190 by: Marcus Bointon

Sorting users geographically...
        226195 by: Tony Di Croce
        226196 by: David Grant
        226197 by: Jim Moseby

Cookie problem with IE
        226204 by: Kristen G. Thorson

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        php-general@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
i am new to php,i want to write a website contain
blog(mutil-user),forum and album.
who can tell me some good framework can accelerate developing.and any
exist web site implement the fuction i wanted,please tell me some for
reference.
thanks for all.
--
/**********************************************************
* Love in Gentoo-Linux  C and Python
* Look at my blog
* http://poorc.wordpress.com
**********************************************************/

--- End Message ---
--- Begin Message ---
赵光 wrote:
i am new to php,i want to write a website contain
blog(mutil-user),forum and album.

This is pretty basic stuff. Why don't you try some CMS first?

http://www.xaraya.com/
http://www.joomla.org/
http://www.drupal.org/

--- End Message ---
--- Begin Message ---
hello,
I am writing basically what is hopefully going to turn out eventually to be a penpal website. There are millions out there i know but some are tooooooooo slow and only load half the page whenever it feels like it + has a bazillion ads and well, other things..so I decided to write my own. What I am wanting to know, is it possible to do the signup thing in two parts using sessions. I basically have the signup info first, then so the user doesn't have to come back later, they can fill out their profile right then and there, on the next page. I'm thinking about saving the signup info and then when the user clicks continue, it would have their info. I know session vars work between two pages but will sessions work across 3 and 4 pages or not?
thanks
matt

--- End Message ---
--- Begin Message ---
matt VanDeWalle wrote:
hello,
I know session vars work between two pages but will sessions work across 3 and 4 pages or not?

Yes.

--- End Message ---
--- Begin Message --- I mean, yes they will work across multiple pages. Thy store data locally and re-load it, identifying necessary information by session ID which is stored in cookie on the client side.
--- End Message ---
--- Begin Message ---
Hello,
I cannot get exec(), system() or passthru() to run an extenal program.
>From the command line it runs perfectly:
[EMAIL PROTECTED] html]# /var/www/html/myprog -E 123456789098.dat sample1.txt
sample1.new
(no output, it just creates the file .new)

Here is the php I've created, fairly simple:
<?php
exec("/var/www/html/myprog -E 123456789098.dat sample1.txt
sample1.new");
?>
I've tried using full paths as well
>From other threats I've double-checked this:
 - safe mode is disabled
 - the values for max_execution_time and memory_limit are large enough
for this simple program.
 - permissions are correct for all files involved:
any user can run the program ( rwxr-xr-x )
any user can read input files
apache is the owner of all files involved

I'm getting frustrated, Any  help will be deeply appreciated
Henry

--- End Message ---
--- Begin Message ---
 Hi all

I am a php developer and develop huge packages.  Those packages are then 
installed by my clients or clients of my resellers on a score of webservers.  
As with all applications, bugfixes, and updates are issued on an almost 
weekly bases.

I developed an application that runs on the php cli and connects to a list of 
ftp sites and is capable of performing *some* updates but all of this is 
shady at most.

What I really would like is to have an rpm style system.

So that I can have for instance

package dbfunctions-1.0-1-noarch.rpm (provides dbfunctions)
package dbadmin-1.0-1-noarch (provides dbadmin, requires dbfunctions)

I read up on the rpm command and find that it is very suitable for this kind 
of functionality.  It support scripts that are run when a package is 
installed or removed, as well as triggers that can execute scripts.  For 
instance if package dbadmin is updated, it can trigger a script in package 
dbfunctions to for example, update a configuration script.

The downside of it all is that it requires shell access which most clients do 
not have.  Furthermore, not all clients are running linux, some are running 
Mac (Unix based, but...?), or windows.  Even though rpm exists for virtually 
all platforms.

Three more requirements are not met:

1. The location of where the files in the package are installed is fixed in 
the rpm
2. Many packages require updates to the database, which means that a php cli 
with mysql support must be available on the system.
3. In case of a first install, information needs to be collected about the 
environment and user/password stuff.

Is there anyone that can provide a solution to this or suggest another 
approach to the problem?

With kind regards


x_terminat_or_3

-- 
Now listening to Top! Radio Live www.topradio.be/stream on amaroK
Geek code: www.vlaamse-kern.com/geek
Registered Linux User No 379093
If life was for sale, what would be its price?
www.vlaamse-kern.com/sas/ for free php utilities
--

Attachment: pgpfa5KGjTvxv.pgp
Description: PGP signature


--- End Message ---
--- Begin Message ---
Andy Pieters schrieb:

> Is there anyone that can provide a solution to this or suggest another 
> approach to the problem?

First of all something about packages: PEAR is coming up with their own
format ".phar" for this. These are tar archives that may contain an
additional PHP script that is executed when unpacking the archive. This
gives you all the possibilities of other package management systems.

If you decide to go for standard package formats: I can't tell you
anything about .rpm but I know that it isn't too difficult to build .deb
packages. There are good howtos for the debian format.

As another approach: How about using Subversion? PHP developers have one
advantage: They don't have to compile their code before deployment. So
in other words: Deployment is somehow very similar to just getting the
source code. Subversion on Apache allows for easy access control. You
cann create a deployment branch or even different branches for each of
your customers. After you have created some new features in your project
you can simply merge the changes to your braches. All the client has to
do to fetch this update is one single "svn up"!

OLLi

--- End Message ---
--- Begin Message ---
Hi Kristina,

have you tried the lates cvs snap? I know there was some problems with
apache2 and mod_rewrite maybe it is solve in CVS.

--
Marco Kaiser

--- End Message ---
--- Begin Message ---
Hi,
AFAIK, in PHP5 one can't call function with function parameters .
The error is that you only can pass variables by reference.
foo(strlen('aaa'),strlen('bbbb'));

Is there some sort of workaround ?

--- End Message ---
--- Begin Message ---
Georgi,

You should assign the output of the functions to variables before the
call and use those variables as the parameters.

Cheers,

David Grant

Georgi Ivanov wrote:
> Hi,
> AFAIK, in PHP5 one can't call function with function parameters .
> The error is that you only can pass variables by reference.
> foo(strlen('aaa'),strlen('bbbb'));
> 
> Is there some sort of workaround ?
> 

--- End Message ---
--- Begin Message ---
Georgi Ivanov wrote:
Hi,
AFAIK, in PHP5 one can't call function with function parameters .
The error is that you only can pass variables by reference.

which means that you can't use a function call as the argument to a
function that required the argument to be passed by reference, if the
argument is not passed by reference then you can use a function call as
the argument directly.

apart from, atleast,  func_get_args() which cannot be used directly as a
function argument for some reason I don't fully understand (has to do
with engine internals I believe)

foo(strlen('aaa'),strlen('bbbb'));

Is there some sort of workaround ?


--- End Message ---
--- Begin Message ---
On 21 Nov 2005, at 09:26, Georgi Ivanov wrote:

AFAIK, in PHP5 one can't call function with function parameters .
The error is that you only can pass variables by reference.
foo(strlen('aaa'),strlen('bbbb'));

You can call functions like that without problems UNLESS the function is expecting values by reference, i.e. results are passed back through the parameters. If you supply a function result, then you may as well not be calling the function as you'll never be able to get a result back from it, hence the error message. e.g.

function foo(&$a, $b) {
        $a = $a.$b;
}

If you call this as you asked, where would the result go?

Is there some sort of workaround ?

As was suggested, put your values in variables before calling the function, though the code example you posted suggests you're trying to do something odd.

Marcus
--
Marcus Bointon
Synchromedia Limited: Putting you in the picture
[EMAIL PROTECTED] | http://www.synchromedia.co.uk

--- End Message ---
--- Begin Message ---
Georgi Ivanov schrieb:
> Hi,
> AFAIK, in PHP5 one can't call function with function parameters .
> The error is that you only can pass variables by reference.
> foo(strlen('aaa'),strlen('bbbb'));
> 
> Is there some sort of workaround ?

First of all, the problem with this arises if your function foo is
defined as

  function foo(&$a,&$b) { ... }

There is no problem if a and b are not reference parameters.
So think a second about this: You tell in the definition of foo that you
want to write to the position where a and b are stored. But by calling
the funtion with strlen() you don't have a position in user space
because the results of strlen() are just values which haven't been
explicitly stored.

Now you can decide if you don't write to your parameters a and b. Then
there is no need for call by reference! It is not true that PHP copies
the value and that you save memory by using references! The values of
call-by-value parameters are copied if and only if you WRITE to them!
The Zend Engine 2 is highly optimized for this.

If you want to write to a and/or b then you must supply a storage
container (also called variable *g*). Simplest way of supplying a
temporary container:

  foo($t1=strlen('aaa'),$t2=strlen('bbbb'));

Have Fun!
OLLi

--- End Message ---
--- Begin Message ---
Thanks !
It's all clear now .
:)


On Monday 21 November 2005 14:45, Oliver Grätz wrote:
> Georgi Ivanov schrieb:
> > Hi,
> > AFAIK, in PHP5 one can't call function with function parameters .
> > The error is that you only can pass variables by reference.
> > foo(strlen('aaa'),strlen('bbbb'));
> >
> > Is there some sort of workaround ?
>
> First of all, the problem with this arises if your function foo is
> defined as
>
>   function foo(&$a,&$b) { ... }
>
> There is no problem if a and b are not reference parameters.
> So think a second about this: You tell in the definition of foo that you
> want to write to the position where a and b are stored. But by calling
> the funtion with strlen() you don't have a position in user space
> because the results of strlen() are just values which haven't been
> explicitly stored.
>
> Now you can decide if you don't write to your parameters a and b. Then
> there is no need for call by reference! It is not true that PHP copies
> the value and that you save memory by using references! The values of
> call-by-value parameters are copied if and only if you WRITE to them!
> The Zend Engine 2 is highly optimized for this.
>
> If you want to write to a and/or b then you must supply a storage
> container (also called variable *g*). Simplest way of supplying a
> temporary container:
>
>   foo($t1=strlen('aaa'),$t2=strlen('bbbb'));
>
> Have Fun!
> OLLi

--- End Message ---
--- Begin Message --- I found the source of my mod_rewrite problems. I was doing everything right to start with - The odd behaviour was due to a PHP bug (http:// bugs.php.net/bug.php?id=35059) that's fixed in 4.4.2-dev and 5.1.0RC7- dev (I'd assume 5.0.x as well). Recompiling with a new checkout works fine.

Marcus
--
Marcus Bointon
Synchromedia Limited: Putting you in the picture
[EMAIL PROTECTED] | http://www.synchromedia.co.uk

--- End Message ---
--- Begin Message ---
On 19 Nov 2005, at 04:07, Curt Zirzow wrote:

If you are using mysql i would use the SQL_CACHE flag, it will
eliminate the need for you to manage the cache.

You don't necessarily need to us the SQL_CACHE flag in queries - you can just turn on the query cache globally using query_cache_type=1 in your my.cnf. Otherwise I quite agree - and MySQL has the huge advantage that it will work very nicely across multi-server deployments:

http://dev.mysql.com/doc/refman/5.0/en/query-cache.html

The last version of php5.1 i have installed APC on is a cvs
snapshot of around Feb 4 2005 11:49:05. Nothing special was needed.

The current 3.0.8 release of APC is broken in PHP 5.1.0-dev if you ever use __autoload. It will be fixed in 3.0.9 (and is fixed in CVS), though Rasmus implied that 3.0.9 is waiting until 5.1 release.

Marcus
--
Marcus Bointon
Synchromedia Limited: Putting you in the picture
[EMAIL PROTECTED] | http://www.synchromedia.co.uk

--- End Message ---
--- Begin Message ---
Marcus Bointon wrote:
On 19 Nov 2005, at 04:07, Curt Zirzow wrote:

If you are using mysql i would use the SQL_CACHE flag, it will
eliminate the need for you to manage the cache.


You don't necessarily need to us the SQL_CACHE flag in queries - you can just turn on the query cache globally using query_cache_type=1 in your my.cnf. Otherwise I quite agree - and MySQL has the huge advantage that it will work very nicely across multi-server deployments:

http://dev.mysql.com/doc/refman/5.0/en/query-cache.html

The last version of php5.1 i have installed APC on is a cvs
snapshot of around Feb 4 2005 11:49:05. Nothing special was needed.


The current 3.0.8 release of APC is broken in PHP 5.1.0-dev if you ever use __autoload. It will be fixed in 3.0.9 (and is fixed in CVS), though Rasmus implied that 3.0.9 is waiting until 5.1 release.

I guess I'll have to try a build myself a copy of APC from cvs - operative
word being try :-/

having said that I don't use __autoload() - I did but it was just a PITA -
but I wonder if the segfault still occurs if there are situations that occur
(missing class[es]) that cause the engine to check-for/try-to-run __autoload()
(even though it doesn't due to the fact that its not defined)??

thanks for the feedback!


Marcus

--- End Message ---
--- Begin Message ---
On 21 Nov 2005, at 10:54, Jochem Maas wrote:

having said that I don't use __autoload() - I did but it was just a PITA -

I thought it was a good idea for a while... One major irritation with it is that with standard error reporting you can't tell where a missing class can't be found from (it is reported as having come from your __autoload function). You need a stack trace to figure out where the original problem occurred - xdebug works a treat (but it won't mix with APC).

Marcus
--
Marcus Bointon
Synchromedia Limited: Putting you in the picture
[EMAIL PROTECTED] | http://www.synchromedia.co.uk

--- End Message ---
--- Begin Message ---
Dylan wrote:
Hi

Is it possible to use the ($test)?$true:$false construction in a (double
quoted) string without dropping out of the string and concatenating? I have
many lines like:

$var = "first part of string ".(($a==$b)?$c:$d)." rest of string";

and I feel it would be more elegant to be able to do something like:

$var ="first part of string {(($a==$b)?$c:$d)} rest of string";

$templateStr = 'first part of string %s rest of string';
$outputStr   = sprintf($templateStr, (($a==$b)?$c:$d));


Cheers
Dylan


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

On 18 Nov 2005, at 20:13, Dylan wrote:

$var = "first part of string ".(($a==$b)?$c:$d)." rest of string";

and I feel it would be more elegant to be able to do something like:

$var ="first part of string {(($a==$b)?$c:$d)} rest of string";

Strange as it may seem, you'll probably find that this is the fastest method:

'first part of string '.(($a==$b)?$c:$d).' rest of string'

I benchmarked this a while ago and was surprised to find that multiple concats with single quotes are significantly faster than interpolation.

Marcus
--
Marcus Bointon
Synchromedia Limited: Putting you in the picture
[EMAIL PROTECTED] | http://www.synchromedia.co.uk

--- End Message ---
--- Begin Message ---
and I feel it would be more elegant to be able to do something like:
$var ="first part of string {(($a==$b)?$c:$d)} rest of string";
$templateStr = 'first part of string %s rest of string';
$outputStr   = sprintf($templateStr, (($a==$b)?$c:$d));

That is so totally slick!  I'm definitely going to have to remember this
neat little trick! :)

thnx,
Chris

--- End Message ---
--- Begin Message ---
On Mon, 2005-11-21 at 09:42, Chris Boget wrote:
> >> and I feel it would be more elegant to be able to do something like:
> >> $var ="first part of string {(($a==$b)?$c:$d)} rest of string";
> > $templateStr = 'first part of string %s rest of string';
> > $outputStr   = sprintf($templateStr, (($a==$b)?$c:$d));
> 
> That is so totally slick!  I'm definitely going to have to remember this
> neat little trick! :)

That's like using a bulldozer to tidy your living room. Why not use the
following even more readable style (and more efficient)?

$outputStr =
    'first part of string  '
   .($a == $b ? $c : $d)
   .' rest of string';

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

--- End Message ---
--- Begin Message ---
Robert Cummings wrote:
On Mon, 2005-11-21 at 09:42, Chris Boget wrote:

and I feel it would be more elegant to be able to do something like:
$var ="first part of string {(($a==$b)?$c:$d)} rest of string";

$templateStr = 'first part of string %s rest of string';
$outputStr   = sprintf($templateStr, (($a==$b)?$c:$d));

That is so totally slick!  I'm definitely going to have to remember this
neat little trick! :)


That's like using a bulldozer to tidy your living room. Why not use the
following even more readable style (and more efficient)?

$outputStr =
    'first part of string  '
   .($a == $b ? $c : $d)
   .' rest of string';

Readability is in the eye of the beholder.

--
Richard Heyes
http://www.phpguru.org

--- End Message ---
--- Begin Message ---
On Mon, 2005-11-21 at 10:02, Richard Heyes wrote:
>
> Readability is in the eye of the beholder.

But efficiency isn't ;)

Cheers,
Rob
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

--- End Message ---
--- Begin Message ---
Robert Cummings wrote:
On Mon, 2005-11-21 at 10:02, Richard Heyes wrote:

Readability is in the eye of the beholder.


But efficiency isn't ;)

Try measuring the difference between the various methods over a realistic number of iterations, eg. 100. There's little point in going through ones code trying to "optimise" these things. Sure you might gain a millisecond here or there, but so what? You'd have to have a *seriously* busy site for that to make a difference.

--
Richard Heyes

--- End Message ---
--- Begin Message ---
Richard Heyes wrote:
Robert Cummings wrote:

On Mon, 2005-11-21 at 10:02, Richard Heyes wrote:

Readability is in the eye of the beholder.



But efficiency isn't ;)

yes it is actually - everything is in the eye of the beholder.
it just so happens that we often have consensus ;-)

with regard to the bulldozer metaphor - true that using sprintf() is
such a simple case may be excessive BUT I was merely introducing the OP to
something new (possibly) - anyone asking such 'simple' questions is
not at a stage that this kind of efficiency is an issue (i.e. give
them 'whats possible' before telling them 'whats best')

the sprintf() example leaves lots of room for creativity and
code reuse (even by relative newcomers) or aleast the possiblity of
writing more managable code.... Chris Boget liked it anyway :-)


PS - Robert Cummings, I totally agree with your general comments on
internals@ regarding migration/irritation/etc btw. and if I didn't
spend so much time on 'fixing' my working code I might have had time
to take a proper look at your InterJinn project - more's the pity
that I haven't been able to so far :-/



Try measuring the difference between the various methods over a realistic number of iterations, eg. 100. There's little point in going through ones code trying to "optimise" these things. Sure you might gain a millisecond here or there, but so what? You'd have to have a *seriously* busy site for that to make a difference.


--- End Message ---
--- Begin Message ---
xkorakidis wrote:
Hi,
How can I present into pages the result of sql select? (e.g. pages of 10
records)

by performing queries that only grab part of the data and passing along a
variable in the relevant urls that allow you to see how far along
in the list you are (i.e. what page).

the term you want is 'pagination' and if you search the web for that and 'php'
you will find enough examples to get confused by. ;-)




--- End Message ---
--- Begin Message ---
Thanks so much Jochem,
I found some things in phpclasses (good material, bad design) and I'll
try that.
Thanks!

Jochem Maas wrote:
> xkorakidis wrote:
>> Hi,
>> How can I present into pages the result of sql select? (e.g. pages of 10
>> records)
> 
> by performing queries that only grab part of the data and passing along a
> variable in the relevant urls that allow you to see how far along
> in the list you are (i.e. what page).
> 
> the term you want is 'pagination' and if you search the web for that and
> 'php'
> you will find enough examples to get confused by. ;-)
> 
> 
>>

--- End Message ---
--- Begin Message ---
On 20 Nov 2005, at 15:14, Geert Booster wrote:

  PHP 4.4.0, since PHP developers seem not interested in
  fixing the bug with apache2 and mod_rewrite

I think you might find this bug report of interest, especially since it's been fixed: http://bugs.php.net/bug.php?id=35059 It's certainly fixed things for me.

Derick's 4.4.2RC1 release note a couple of days ago:

On 18 Nov 2005, at 11:58, Derick Rethans wrote:
I packed PHP 4.4.2RC1 today, which you can find here:
http://downloads.php.net/derick/ . Windows binaries will follow shortly.

Please test it carefully, and report any bugs in the bug system, but
only if you have a short reproducable test case.

If everything goes well, we can release it next tuesday. Especially test
issues with mod_rewrite and Apache 2 please!

Marcus
--
Marcus Bointon
Synchromedia Limited: Putting you in the picture
[EMAIL PROTECTED] | http://www.synchromedia.co.uk

--- End Message ---
--- Begin Message ---
I'm helping a friend of mine build a matchmaking website, and we have a
doozy of a problem to solve:

What I need to do is two fold:

#1 Collect whatever geographical information I need from each user to enable
#2
#2 Be able to run query's to find people NEAR (geographically) another
person.

Does anyone know of any commercial or free implementations of this? Is it
primarily a database problem or is their some way (computationally) to
compute the probable proximity of two zip codes?

Hopefully someone responds to this with a Pear package that does exactly
what I need! :) If that can't happen, then I'd appreciate any options you
can think of.

td

--
Free Linux Technical Articles
http://www.linuxtecharticles.com

--- End Message ---
--- Begin Message ---
Hi Tony,

I would think the first step would be to find a web service or dataset
to convert a zip code to longitude/latitude.

The formula for calculating distances from long/lat is available here:

http://www.colorado.edu/geography/gcraft/warmup/aquifer/html/distance.html

Cheers,

David Grant

Tony Di Croce wrote:
> I'm helping a friend of mine build a matchmaking website, and we have a
> doozy of a problem to solve:
> 
> What I need to do is two fold:
> 
> #1 Collect whatever geographical information I need from each user to enable
> #2
> #2 Be able to run query's to find people NEAR (geographically) another
> person.
> 
> Does anyone know of any commercial or free implementations of this? Is it
> primarily a database problem or is their some way (computationally) to
> compute the probable proximity of two zip codes?
> 
> Hopefully someone responds to this with a Pear package that does exactly
> what I need! :) If that can't happen, then I'd appreciate any options you
> can think of.
> 
> td
> 
> --
> Free Linux Technical Articles
> http://www.linuxtecharticles.com
> 

--- End Message ---
--- Begin Message ---
> 
> I'm helping a friend of mine build a matchmaking website, and 
> we have a
> doozy of a problem to solve:
> 
> What I need to do is two fold:
> 
> #1 Collect whatever geographical information I need from each 
> user to enable
> #2
> #2 Be able to run query's to find people NEAR (geographically) another
> person.
> 
> Does anyone know of any commercial or free implementations of 
> this? Is it
> primarily a database problem or is their some way (computationally) to
> compute the probable proximity of two zip codes?
> 
> Hopefully someone responds to this with a Pear package that 
> does exactly
> what I need! :) If that can't happen, then I'd appreciate any 
> options you
> can think of.
> 

http://sniptools.com/latitudeLongitude.php

--- End Message ---
--- Begin Message ---
Anyone have any suggestions?  I'm still stuck.


thanks,
kgt



Kristen G. Thorson wrote:

I'm having problems with a customer who can't login to a wholesaler application. To ensure the problem was that the cookie was not being set, I sent him to this script:

if( !isset( $_REQUEST['page'] ) ) {
 setcookie('VATtest','Cookie has been set.',time()+50000, "/");
 echo '<a href="'.$_SERVER['PHP_SELF'].'?page=1">Test cookie.</a>';
} else if( $_REQUEST['page'] == '1' ) {
 if( isset( $_COOKIE['VATtest'] ) ) {
   echo $_COOKIE['VATtest'];
 } else {
   echo 'Cookie NOT set.';
 }
}
?>


He got "Cookie NOT set." which means exactly what it says. He's using IE 6.0, and swears up and down that he's set it to always allow cookies from this domain. I can't verify that he's set it correctly, but he has been told twice how to do it. I also know his browser must be saving some cookies, as he is able to login to other sites. Has anyone run into other sources of cookie-blockage in the past? I cannot manage to duplicate this when I have IE set to always allow cookies from this domain.

Thanks for any tips,

kgt


--- End Message ---

Reply via email to