[PHP] Re: Shared memory, mutex functionality and spawning threads. Is it possible using PHP?

2008-09-02 Thread Colin Guthrie

Kent Larsson wrote:

Thank you for your answer. I was hoping there were a solution. :-/ It would
have been nice as PHP has a large install base and is a quite common element
in cheap web hosting solutions. Has anyone else got any more comments or
suggestions?

In absence of shared memory and threads. What I really must have is some
kind of mutex functionality. I will be manipulating files on disk and I
don't want two instances to be able to touch the disk at the same time. Is
there something I could use for mutual exclusion? If there aren't any
dedicated methods, are there 100% reliable workarounds?


If you are looking for shared memory such that one request can then 
access an object created once (e.g. "primed") and stored for subsequent 
reuse, then this is totally possible.


Using something like memcached or APC you can access such shared memory 
etc. Access to APC shared memory is protected using various locking 
methods, including File Locks (mmap), IPC Semaphores, Spinlocks and 
PThread Mutexs.


While you cannot run threads in a Web based environment very easily, you 
can fork child processes: http://uk.php.net/pcntl_fork. I'm not sure I'd 
recommend this for a web environment tho! Depending what you are doing 
tho' you may want to run a small "daemon" that listens for connections 
and spawns off a new process to deal with it via this method. It really 
depends what you are trying to achieve as all of the timing/locking 
problems of asynchronous programming are typically something I would try 
and avoid in a web/scripting environment.


HTHs

Col



--

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Mozilla user agent escapes detection

2008-09-02 Thread Diogo Neves
On Tue, Sep 2, 2008 at 4:39 AM, Dave M G <[EMAIL PROTECTED]> wrote:

> PHP List,
>
> I have a script, part of which is taken from a script I found on the 'net,
> which tries to detect the user agent of the browser accessing the site. One
> of the reasons I'm doing this is to find out if the browser is a desktop or
> mobile.
>
> Part of the code looks like this:
>
> $ua = strtolower($_SERVER['HTTP_USER_AGENT']);
> $isDesktop = (strpos($ua, 'firefox') !== false)
> || (strpos($ua,'mosaic') !== false)
> || (strpos($ua,'msie') !== false)
> || (strpos($ua,'opera') !== false)
> || (strpos($ua,'mozilla') !== false)
> || (strpos($ua,'w3c_css_validator') !== false)
> || (strpos($ua,'w3c_validator') !== false);
>
> What's driving me crazy is that it successfully determines all the browsers
> listed there, *except* mozilla.
>
> I have a log file which alerts me when an unknown browser comes through my
> site, and it's chock full of messages telling me that a Mozilla based
> browser has come by. There are a *lot* of Mozilla based browsers.
>
> Some examples from my logs of the browsers slipping by my test:
>
> HTTP_USER_AGENT: Mozilla/5.0 compatible; Yahoo! Slurp
> HTTP_USER_AGENT: Mozilla/5.0 compatible; Googlebot/2.1
> HTTP_USER_AGENT: Mozilla/5.0 X11; U; Linux i686
>
> In each case, the strpos() should have seen the mozilla agent and not
> bothered logging it.
>
> It's not complicated code, especially considering it's successfully finding
> msie and firefox.
>
> I can't imagine why Mozilla would be different.
>
> Any suggestions? Is there something about my code right in front of my face
> that I'm not seeing?
>
> Any suggestions would be greatly appreciated.
>
> Thanks.
>
> --
> Dave M G
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Unless you are not getting that useragents on your php, it as to work...
At least my test worked perfectly




-- 
Thanks for your attention,

Diogo Neves
Web Developer @ SAPO.pt by PrimeIT.pt


Re: [PHP] Mozilla user agent escapes detection

2008-09-02 Thread Jochem Maas

Dave M G schreef:

PHP List,

I have a script, part of which is taken from a script I found on the 
'net, which tries to detect the user agent of the browser accessing the 
site. One of the reasons I'm doing this is to find out if the browser is 
a desktop or mobile.


Part of the code looks like this:

$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
$isDesktop = (strpos($ua, 'firefox') !== false)
|| (strpos($ua,'mosaic') !== false)
|| (strpos($ua,'msie') !== false)
|| (strpos($ua,'opera') !== false)
|| (strpos($ua,'mozilla') !== false)
|| (strpos($ua,'w3c_css_validator') !== false)
|| (strpos($ua,'w3c_validator') !== false);

What's driving me crazy is that it successfully determines all the 
browsers listed there, *except* mozilla.


Mozilla !== mozilla

stripos is the case-insenstive version of strpos



I have a log file which alerts me when an unknown browser comes through 
my site, and it's chock full of messages telling me that a Mozilla based 
browser has come by. There are a *lot* of Mozilla based browsers.


Some examples from my logs of the browsers slipping by my test:

HTTP_USER_AGENT: Mozilla/5.0 compatible; Yahoo! Slurp
HTTP_USER_AGENT: Mozilla/5.0 compatible; Googlebot/2.1


these 2 are bots btw.


HTTP_USER_AGENT: Mozilla/5.0 X11; U; Linux i686

In each case, the strpos() should have seen the mozilla agent and not 
bothered logging it.


It's not complicated code, especially considering it's successfully 
finding msie and firefox.


I can't imagine why Mozilla would be different.

Any suggestions? Is there something about my code right in front of my 
face that I'm not seeing?


Any suggestions would be greatly appreciated.


STW? plenty of people offering code that attempts to detect mobile devices, 
e.g.:

http://www.andymoore.info/php-to-detect-mobile-phones/

also I'd offer a link in the top of your site pointing to the mobile site
(and vice-versa) in order to:

1. allow bots to visit both.
2. in case your code guessed incorrectly for some user(s)

I'd also check the UA string specifically for bots first and just let them
through ... they are neither desktop nor mobile browsers.

additionally you might consider how you want to accomodate text browsers
(which is kind of what a bot is)



Thanks.




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Individual bulk e-mails - performance question (was "skinning a cat") :-)

2008-09-02 Thread Jochem Maas

Robert Cummings schreef:

On Mon, 2008-09-01 at 14:34 +0200, Merlin Morgenstern wrote:

Per Jessen schrieb:

Jochem Maas wrote:


lockfile=/var/lock//file
# clear out a lock older than 60mins
find $lockfile -cmin +60 | xargs rm
test ! -f $lockfile && (
touch $lockfile

rm -f $lockfile
)

wouldn't creating a dir be better here? (with regard to atomicity)


I haven't thought it through, but I don't think it would change
anything. 



/Per Jessen, Zürich


Hello everybody,

thank you for the huge amount of replies on my question. I believe I 
quite lost a bit track on how to solve the problem hands on. To 
summerize, there are aparently two ways of skinning the cat :-)


1. Run a deamon
I admit I have never wrote one, and that seems therefore to be the 
harder option for me. Well... perhaps not.
I assume it is simply creating a shell script like Jochem wrote, however 
I guess it would just take longer for me to get it running as I have 
never done that before.


It was Per who posted that script, I merely asked him for clarification ...
it's actually an easy script to implement ... you just about only have
to change one line (the line that runs your cron script) ... and then have
crom run the shell script as opposed to your script directly.



2. Create a PHP file that holds some lock code which is triggered by 
CRON every 5 minutes. Taking the example from Robert.


3. Following idea which I am now actually implementing :-)

  - Add all emails into a mysql db with one insert command.
  - Run a php script by cron every 5 min that does the following:
- update table, set session_id = x on all entries without session id
- get all entries with that session ID
- send email to those with that session ID
- remove all entries with that session ID

Looks like easies sollution on how to skimm the cat. DB might not be the 
most performing sollution, but sufficient considering the hard ware power.


Actually 3 was what I suggested with a lock mechanism to ensure that if
your script run by cron takes longer than 5 minutes that you don't have
two scritps stepping on each others' toes.

Cheers,
Rob.



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Mozilla user agent escapes detection

2008-09-02 Thread Richard Heyes
> I have a script, part of which is taken from a script I found on the 'net,
> which tries to detect the user agent of the browser accessing the site. One
> of the reasons I'm doing this is to find out if the browser is a desktop or
> mobile.

Try another detection script. Eg my own:

http://www.phpguru.org/static/browser.html

Or the Javascript version it stems from. Or...

-- 
Richard Heyes

HTML5 Graphing for IE7, FF, Opera and Safari:
http://www.phpguru.org/RGraph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Google Chrome

2008-09-02 Thread Richard Heyes
Hi,

Looks like Google chrome is being released today (or soon). IE,
Firefox, Opera, Safari and now Chrome, hmmm, can anyone say "browser
war"?

http://www.google.com/googlebooks/chrome/

-- 
Richard Heyes

HTML5 Graphing for IE7, FF, Opera and Safari:
http://www.phpguru.org/RGraph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Google Chrome

2008-09-02 Thread Diogo Neves
On Tue, Sep 2, 2008 at 12:21 PM, Richard Heyes <[EMAIL PROTECTED]> wrote:

> Hi,
>
> Looks like Google chrome is being released today (or soon). IE,
> Firefox, Opera, Safari and now Chrome, hmmm, can anyone say "browser
> war"?
>
> http://www.google.com/googlebooks/chrome/
>
> --
> Richard Heyes
>
> HTML5 Graphing for IE7, FF, Opera and Safari:
> http://www.phpguru.org/RGraph
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Hi,
I have nothing against browsers, but that discussion is (maybe) better on a
javascript/designer/whatever mailling...
And it's only rumors... why not wait by the real thing is out?

-- 
Thanks for your attention,

Diogo Neves
Web Developer @ SAPO.pt by PrimeIT.pt


Re: [PHP] Google Chrome

2008-09-02 Thread Per Jessen
Richard Heyes wrote:

> Hi,
> 
> Looks like Google chrome is being released today (or soon). IE,
> Firefox, Opera, Safari and now Chrome, hmmm, can anyone say "browser
> war"?
> 

Can anyone say "even more money & effort wasted on testing
webpages"  :-(


/Per Jessen, Zürich


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Google Chrome

2008-09-02 Thread Richard Heyes
> why not wait by the real thing is out?

By the looks of it, the release is imminent.

-- 
Richard Heyes

HTML5 Graphing for IE7, FF, Opera and Safari:
http://www.phpguru.org/RGraph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Google Chrome

2008-09-02 Thread Stut

On 2 Sep 2008, at 12:34, Per Jessen wrote:

Richard Heyes wrote:

Hi,

Looks like Google chrome is being released today (or soon). IE,
Firefox, Opera, Safari and now Chrome, hmmm, can anyone say "browser
war"?



Can anyone say "even more money & effort wasted on testing
webpages"  :-(


Webkit-based, so no need to add any more testing than you do now.

-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Google Chrome

2008-09-02 Thread Per Jessen
Stut wrote:

> On 2 Sep 2008, at 12:34, Per Jessen wrote:
>> Richard Heyes wrote:
>>> Hi,
>>>
>>> Looks like Google chrome is being released today (or soon). IE,
>>> Firefox, Opera, Safari and now Chrome, hmmm, can anyone say "browser
>>> war"?
>>>
>>
>> Can anyone say "even more money & effort wasted on testing
>> webpages"  :-(
> 
> Webkit-based, so no need to add any more testing than you do now.
> 

I can't help thinking that sounds just like when MS is telling us they
are compatible.  But it _is_ good that they're using Webkit, I'm just
not sure if it really means no extra testing effort.  FF3 wasn't and
isn't compatible with FF2. 


/Per Jessen, Zürich


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Google Chrome

2008-09-02 Thread Luke
isn't the webkit based on KHTML?

2008/9/2 Stut <[EMAIL PROTECTED]>

> On 2 Sep 2008, at 12:34, Per Jessen wrote:
>
>> Richard Heyes wrote:
>>
>>> Hi,
>>>
>>> Looks like Google chrome is being released today (or soon). IE,
>>> Firefox, Opera, Safari and now Chrome, hmmm, can anyone say "browser
>>> war"?
>>>
>>>
>> Can anyone say "even more money & effort wasted on testing
>> webpages"  :-(
>>
>
> Webkit-based, so no need to add any more testing than you do now.
>
> -Stut
>
> --
> http://stut.net/
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Luke Slater


Re: [PHP] Google Chrome

2008-09-02 Thread shiplu
Google Chrome is not released yet, is it?
Didn't get any download link. :-S

-- 
A K M Mokaddim
http://talk.cmyweb.net
http://twitter.com/shiplu
Stop Top Posting !!


Re: [PHP] Google Chrome

2008-09-02 Thread Per Jessen
Luke wrote:

> isn't the webkit based on KHTML?
> 

It's a fork of KHTML, yes.  


/Per Jessen, Zürich


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Google Chrome

2008-09-02 Thread Diogo Neves
On Tue, Sep 2, 2008 at 12:44 PM, shiplu <[EMAIL PROTECTED]> wrote:

> Google Chrome is not released yet, is it?
> Didn't get any download link. :-S
>

Was what i said... it's a rumor... let da thing came out and u'll see your
websites after...

>
> --
> A K M Mokaddim
> http://talk.cmyweb.net
> http://twitter.com/shiplu
> Stop Top Posting !!
>



-- 
Thanks for your attention,

Diogo Neves
Web Developer @ SAPO.pt by PrimeIT.pt


Re: [PHP] Google Chrome

2008-09-02 Thread Jochem Maas

Richard Heyes schreef:

Hi,

Looks like Google chrome is being released today (or soon). IE,
Firefox, Opera, Safari and now Chrome, hmmm, can anyone say "browser
war"?

http://www.google.com/googlebooks/chrome/


to quote Han Solo :  "I have a bad feeling about this"






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Google Chrome

2008-09-02 Thread Richard Heyes
>> Can anyone say "even more money & effort wasted on testing
>> webpages"  :-(
>
> Webkit-based, so no need to add any more testing than you do now.

Are you going to take the gamble? :-)

-- 
Richard Heyes

HTML5 Graphing for IE7, FF, Opera and Safari:
http://www.phpguru.org/RGraph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Google Chrome

2008-09-02 Thread Richard Heyes
> Google Chrome is not released yet, is it?
> Didn't get any download link. :-S

Can't find any download link. It maybe a few hours away.

http://news.cnet.com/8301-17939_109-10030025-2.html

-- 
Richard Heyes

HTML5 Graphing for IE7, FF, Opera and Safari:
http://www.phpguru.org/RGraph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Google Chrome

2008-09-02 Thread Jochem Maas

Richard Heyes schreef:

Hi,

Looks like Google chrome is being released today (or soon). IE,
Firefox, Opera, Safari and now Chrome, hmmm, can anyone say "browser
war"?

http://www.google.com/googlebooks/chrome/


I've been reading this ... very well done all in all, on page 37 they
say "But Google lives on the internet. It's in our interest to make the
internet better and without competition we have stagnation"

... funny that, make me think of the online ad market ;-)






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Google Chrome

2008-09-02 Thread Stut

On 2 Sep 2008, at 12:59, Richard Heyes wrote:

Can anyone say "even more money & effort wasted on testing
webpages"  :-(


Webkit-based, so no need to add any more testing than you do now.


Are you going to take the gamble? :-)


I'll decide when I can play with it and the official announcement  
spells out what they've modified.


-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] geolocation

2008-09-02 Thread clive

Hi,

Have any developed a site that determines a users location based on IP  
address, Im not looking for accurate locations, just what country they 
are coming from.


I know I could possible get a list of IP blocks allocated to countries 
or make use of some web server to get the information, I just want to 
know how others are doing this?


If are using a specific method and know it to be robust and up to date 
please let me know.


Thanks

clive


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] geolocation

2008-09-02 Thread Schiz0
On Tue, Sep 2, 2008 at 9:05 AM, clive <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Have any developed a site that determines a users location based on IP
>  address, Im not looking for accurate locations, just what country they are
> coming from.
>
> I know I could possible get a list of IP blocks allocated to countries or
> make use of some web server to get the information, I just want to know how
> others are doing this?
>
> If are using a specific method and know it to be robust and up to date
> please let me know.
>
> Thanks
>
> clive
>
>

I use the GeoIP libraries. They work perfectly. YOu just need to
install the pecl-GeoIP package, then make sure you keep the binary
database up-to-date (from www.maxmind.com).

http://php.net/geoip

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] geolocation

2008-09-02 Thread Per Jessen
clive wrote:

> Hi,
> 
> Have any developed a site that determines a users location based on IP
> address, Im not looking for accurate locations, just what country they
> are coming from.
> 

We use the information from  http://countries.nerd.dk/ - it's a simple
DNS lookup.


/Per Jessen, Zürich


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Recommendation

2008-09-02 Thread Dan Joseph
On Sat, Aug 30, 2008 at 8:38 AM, tedd <[EMAIL PROTECTED]> wrote:

> Hi gang:
>
> At 1:16 PM +0100 8/30/08, Stut wrote:
>
>> Now, about that recommendation for my linked in profile... ;)
>>
>
> That's not a bad idea. Daniel and I did an exchange a while back. I think
> it might help to land clients if we can use our linked-in status in some
> way. I haven't done that yet, but there should be a way.
>
> As such, if any of the regulars to this list are in need of a
> recommendation, please contact me off-list.
>
> Cheers,
>
> tedd
>
> --
> ---
> http://sperling.com  http://ancientstones.com  http://earthstones.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
We have threads that go 100+, and this one dies at 3...

You can view mine at http://www.linkedin.com/in/danjoseph

Anyone can feel free to connect to me as well, and I'd be happy to give
recommendations.

-- 
-Dan Joseph

www.canishosting.com - Plans start @ $1.99/month.

"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."


Re: [PHP] Re: skinning a cat

2008-09-02 Thread Robert Cummings
On Tue, 2008-09-02 at 07:52 +0200, Per Jessen wrote:
> Lupus Michaelis wrote:
> 
> > Robert Cummings a écrit :
> > 
> >> Try running that on windows.
> > 
> >No problem
> > 
> > 
> 
> And of course, there's also Cygwin.

*lol* And I quote:

Per Jessen said:
"I'm probably old fashioned, but to me all that stuff is way
 overkill."

And now your suggesting installing cygwin to accomplish something so
easily accomplished in PHP.

Yeesh.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Google Chrome

2008-09-02 Thread Robert Cummings
On Tue, 2008-09-02 at 12:36 +0100, Stut wrote:
> On 2 Sep 2008, at 12:34, Per Jessen wrote:
> > Richard Heyes wrote:
> >> Hi,
> >>
> >> Looks like Google chrome is being released today (or soon). IE,
> >> Firefox, Opera, Safari and now Chrome, hmmm, can anyone say "browser
> >> war"?
> >>
> >
> > Can anyone say "even more money & effort wasted on testing
> > webpages"  :-(
> 
> Webkit-based, so no need to add any more testing than you do now.

You must not remember IE 5.5 on IE and IE 5.5 on Mac. They were quite
different in annoying little places.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] geolocation

2008-09-02 Thread Jignesh Thummar
You can use this one also http://ip-to-country.webhosting.info/
This is being used by php.net site - to find country specific mirror.

You can get sample code here :
http://www.ruturaj.net/tutorials/php/ip-to-country

Regards,
Jignesh


On Tue, Sep 2, 2008 at 2:18 PM, Per Jessen <[EMAIL PROTECTED]> wrote:

> clive wrote:
>
> > Hi,
> >
> > Have any developed a site that determines a users location based on IP
> > address, Im not looking for accurate locations, just what country they
> > are coming from.
> >
>
> We use the information from  http://countries.nerd.dk/ - it's a simple
> DNS lookup.
>
>
> /Per Jessen, Zürich
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] Re: skinning a cat

2008-09-02 Thread Per Jessen
Robert Cummings wrote:

> On Tue, 2008-09-02 at 07:52 +0200, Per Jessen wrote:
>> Lupus Michaelis wrote:
>> 
>> > Robert Cummings a écrit :
>> > 
>> >> Try running that on windows.
>> > 
>> >No problem
>> > 
>> > 
>> 
>> And of course, there's also Cygwin.
> 
> *lol* And I quote:
> 
> Per Jessen said:
> "I'm probably old fashioned, but to me all that stuff is way
>  overkill."
> 
> And now your suggesting installing cygwin to accomplish something so
> easily accomplished in PHP.
> 
> Yeesh.

Rob, I've never suggested anything like that.  But if you were to ask me
how to get a fairly decent Unix-like environment on a Windows platform,
yes, I would suggest using Cygwin.


/Per Jessen, Zürich


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Google Chrome

2008-09-02 Thread Eric Butera
On Tue, Sep 2, 2008 at 10:12 AM, Robert Cummings <[EMAIL PROTECTED]> wrote:
> You must not remember IE 5.5 on IE and IE 5.5 on Mac. They were quite
> different in annoying little places.
>
> Cheers,
> Rob.
> --
> http://www.interjinn.com
> Application and Templating Framework for PHP

It is pretty sweet trying to inform clients that Microsoft has stopped
supporting IE on Mac.  If MS doesn't, then why on Earth should we? ;)
And yes, this still happens as of 2008.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: skinning a cat

2008-09-02 Thread Robert Cummings
On Tue, 2008-09-02 at 16:23 +0200, Per Jessen wrote:
> Robert Cummings wrote:
> 
> > On Tue, 2008-09-02 at 07:52 +0200, Per Jessen wrote:
> >> Lupus Michaelis wrote:
> >> 
> >> > Robert Cummings a écrit :
> >> > 
> >> >> Try running that on windows.
> >> > 
> >> >No problem
> >> > 
> >> > 
> >> 
> >> And of course, there's also Cygwin.
> > 
> > *lol* And I quote:
> > 
> > Per Jessen said:
> > "I'm probably old fashioned, but to me all that stuff is way
> >  overkill."
> > 
> > And now your suggesting installing cygwin to accomplish something so
> > easily accomplished in PHP.
> > 
> > Yeesh.
> 
> Rob, I've never suggested anything like that.  But if you were to ask me
> how to get a fairly decent Unix-like environment on a Windows platform,
> yes, I would suggest using Cygwin.

You originally said it was overkill to use my lock class and then went
on to show your shell script doing similar. To which I then responded
try running the shell script in windows. To which you've now suggested
installing cygwin. Thus you have suggested a shell script and cygwin to
accomplish what a simple lock class easily achieves in both linux and
windows. It all goes back to that original argument you brought up where
you said the lock class was overkill. I haven't even commented on the
complexity added by introducing a second technology (And third now that
cygwin is on the table). I'm sure this is a prime example for the
application of Occam's Razor.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Recommendation

2008-09-02 Thread Eric Butera
I'm on there too.

http://www.linkedin.com/in/ericbutera

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Google Chrome

2008-09-02 Thread Richard Heyes
> If MS doesn't, then why on Earth should we? ;)

Because there aren't enough high horses to go around... :-)

-- 
Richard Heyes

HTML5 Graphing for IE7, FF, Opera and Safari:
http://www.phpguru.org/RGraph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Google Chrome

2008-09-02 Thread Bastien Koert
On Tue, Sep 2, 2008 at 10:52 AM, Richard Heyes <[EMAIL PROTECTED]> wrote:

> > If MS doesn't, then why on Earth should we? ;)
>
> Because there aren't enough high horses to go around... :-)
>
> --
> Richard Heyes
>
> HTML5 Graphing for IE7, FF, Opera and Safari:
> http://www.phpguru.org/RGraph
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Just when things were getting dull with IE8 claiming better standards
support

-- 

Bastien

Cat, the other other white meat


Re: [PHP] Google Chrome

2008-09-02 Thread Robert Cummings
On Tue, 2008-09-02 at 11:03 -0400, Bastien Koert wrote:
> On Tue, Sep 2, 2008 at 10:52 AM, Richard Heyes <[EMAIL PROTECTED]> wrote:
> 
> > > If MS doesn't, then why on Earth should we? ;)
> >
> > Because there aren't enough high horses to go around... :-)
> >
> >
> Just when things were getting dull with IE8 claiming better standards
> support

Call me a Doubting Thomas, but I wanna stick my fingers into IE8 before
I believe any of their claims.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Google Chrome

2008-09-02 Thread David Giragosian
On 9/2/08, Bastien Koert <[EMAIL PROTECTED]> wrote:
>
> On Tue, Sep 2, 2008 at 10:52 AM, Richard Heyes <[EMAIL PROTECTED]> wrote:
>
> > > If MS doesn't, then why on Earth should we? ;)
> >
> > Because there aren't enough high horses to go around... :-)
> >
> > --
> > Richard Heyes
> >
> > HTML5 Graphing for IE7, FF, Opera and Safari:
> > http://www.phpguru.org/RGraph
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> Just when things were getting dull with IE8 claiming better standards
> support


The tech writer in our local newspaper reviewed IE8 this morning.

http://www.chron.com/disp/story.mpl/business/silverman/5978053.html

Interesting read.

David


Re: [PHP] Recommendation

2008-09-02 Thread Shawn McKenzie

Eric Butera wrote:

I'm on there too.

http://www.linkedin.com/in/ericbutera


Me too...

http://www.linkedin.com/in/rsmckenzie

-Shawn

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Mozilla user agent escapes detection

2008-09-02 Thread Dave M G

Richard,

Thanks for responding.


http://www.phpguru.org/static/browser.html


I may just do that. If it works out for my needs, I'll let you know.

Really, right now I'm doing browser detection to simply sort incoming 
browsers into desktops, bots, and mobile. If I can get your script to do 
that, then sweet.


By the way, another thing I'm trying to do is reliably test to see if a 
browser accepts cookies. I just looked through your PHP blog, and didn't 
see that specifically listed, but since I'm emailing you already, may I 
ask if you have a script that does that? Or a good recommendation?


--
Dave M G

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Mozilla user agent escapes detection

2008-09-02 Thread Shawn McKenzie

Jochem Maas wrote:

Dave M G schreef:

PHP List,

I have a script, part of which is taken from a script I found on the 
'net, which tries to detect the user agent of the browser accessing 
the site. One of the reasons I'm doing this is to find out if the 
browser is a desktop or mobile.


Part of the code looks like this:

$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
$isDesktop = (strpos($ua, 'firefox') !== false)
|| (strpos($ua,'mosaic') !== false)
|| (strpos($ua,'msie') !== false)
|| (strpos($ua,'opera') !== false)
|| (strpos($ua,'mozilla') !== false)
|| (strpos($ua,'w3c_css_validator') !== false)
|| (strpos($ua,'w3c_validator') !== false);

What's driving me crazy is that it successfully determines all the 
browsers listed there, *except* mozilla.


Mozilla !== mozilla


Look at the code: strtolower('Mozilla') === 'mozilla'

-Shawn


stripos is the case-insenstive version of strpos



I have a log file which alerts me when an unknown browser comes 
through my site, and it's chock full of messages telling me that a 
Mozilla based browser has come by. There are a *lot* of Mozilla based 
browsers.


Some examples from my logs of the browsers slipping by my test:

HTTP_USER_AGENT: Mozilla/5.0 compatible; Yahoo! Slurp
HTTP_USER_AGENT: Mozilla/5.0 compatible; Googlebot/2.1


these 2 are bots btw.


HTTP_USER_AGENT: Mozilla/5.0 X11; U; Linux i686

In each case, the strpos() should have seen the mozilla agent and not 
bothered logging it.


It's not complicated code, especially considering it's successfully 
finding msie and firefox.


I can't imagine why Mozilla would be different.

Any suggestions? Is there something about my code right in front of my 
face that I'm not seeing?


Any suggestions would be greatly appreciated.


STW? plenty of people offering code that attempts to detect mobile 
devices, e.g.:


http://www.andymoore.info/php-to-detect-mobile-phones/

also I'd offer a link in the top of your site pointing to the mobile site
(and vice-versa) in order to:

1. allow bots to visit both.
2. in case your code guessed incorrectly for some user(s)

I'd also check the UA string specifically for bots first and just let them
through ... they are neither desktop nor mobile browsers.

additionally you might consider how you want to accomodate text browsers
(which is kind of what a bot is)



Thanks.





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Google Chrome

2008-09-02 Thread Richard Heyes
Hi,

And more about it:

http://news.bbc.co.uk/1/hi/technology/7593106.stm

-- 
Richard Heyes

HTML5 Graphing for IE7, FF, Opera and Safari:
http://www.phpguru.org/RGraph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: What's with the Rx symbol?

2008-09-02 Thread Andrew Ballard
On Sun, Aug 31, 2008 at 9:53 AM, tedd <[EMAIL PROTECTED]> wrote:
> At 2:21 PM -0400 8/30/08, Andrew Ballard wrote:
>>
>> On Sat, Aug 30, 2008 at 11:38 AM, tedd <[EMAIL PROTECTED]> wrote:
>>  > I think making the URL RED would be a better warning than showing
>> PUNYCODE
>>>
>>>  -- but that's my opinion.
>>>
>>>  Cheers,
>>>
>>>  tedd
>>
>> Wait a minute - you're going to rail on for ever on another thread
>> about web in-accessibility with CAPTCHA and then you're going to
>> propose something that relies on color coding for something that
>> important? What about all those with red/green color blindness?
>>
>> Andrew
>
> Andrew:
>
> First, I don't think I "rail on forever about web accessibility" -- instead
> I simply address the concerns/questions/comments as they are presented.

Agreed, and my apologies. It definitely comes across much more harshly
in print than I intended. I was mostly just amused at the irony of you
throwing out a possible solution to one problem that flies directly in
the face of another thread that you have been discussing at the same
time.

> Second, I said highlighting mixed charset URL's in the color RED was an
> example to illustrate that solutions can be found that are different than
> showing PUNYCODE. It was not a solution I would endorse for red/green color
> blindness or for blindness. There are other ways to handle that.

There are indeed many ways to pare a feline. I was just pointing out
that ONE of those ways is reduce the size of the available symbol set
to eliminate similar or possibly misunderstood glyphs, and that seems
to be what some browsers are doing. Obviously, it's not a method that
you prefer given that it obscures the entire domain names you have,
but it is still a valid option.

Accessibility aside, it's already getting somewhat confusing to sort
out the icons and colors used in address bars as it is. (In different
versions and vendors I've seen backgrounds that include white and
light yellow, green, and red; text that is bold and not bold, black,
green, and red...) At least the lock icons are consistent, but now I
am getting familiar with the different variations of the passport
inspector in FF.

> So, please cut me some slack.
>
>
> Cheers,
>
> tedd

Slack cut, take all you need.

Andrew

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Mozilla user agent escapes detection

2008-09-02 Thread Richard Heyes
> By the way, another thing I'm trying to do is reliably test to see if a
> browser accepts cookies. I just looked through your PHP blog, and didn't see
> that specifically listed, but since I'm emailing you already, may I ask if
> you have a script that does that? Or a good recommendation?

Just send a cookie to the browser, rfresh the page (or redirect to
another page) and then test for its existence (in $_COOKIE).

-- 
Richard Heyes

HTML5 Graphing for IE7, FF, Opera and Safari:
http://www.phpguru.org/RGraph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: skinning a cat

2008-09-02 Thread Per Jessen
Robert Cummings wrote:

> You originally said it was overkill to use my lock class and then went
> on to show your shell script doing similar. To which I then responded
> try running the shell script in windows. To which you've now suggested
> installing cygwin. 

Well, no I haven't, but feel free to think so.  

> Thus you have suggested a shell script and cygwin to accomplish what a
> simple lock class easily achieves in both linux and windows.  

OK, if you want to debate this - you take a relatively complex solution
which is intended for 1% of your customers, and apply it to the other
99% which could have done with a much simpler solution. That's more
overkill, IMHO. 


/Per Jessen, Zürich


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: skinning a cat

2008-09-02 Thread Robert Cummings
On Tue, 2008-09-02 at 18:02 +0200, Per Jessen wrote:
> Robert Cummings wrote:
> 
> > You originally said it was overkill to use my lock class and then went
> > on to show your shell script doing similar. To which I then responded
> > try running the shell script in windows. To which you've now suggested
> > installing cygwin. 
> 
> Well, no I haven't, but feel free to think so.  

Ok, maybe you didn't explicitly suggest installing cygwin but you did
write:

"And of course, there's also Cygwin."

As a method of running the shell script you provided. That struck me as
a suggestion... but I won't quibble. Obviously you meant someone could
use cygwin without installing it.

> > Thus you have suggested a shell script and cygwin to accomplish what a
> > simple lock class easily achieves in both linux and windows.  
> 
> OK, if you want to debate this - you take a relatively complex solution
> which is intended for 1% of your customers, and apply it to the other
> 99% which could have done with a much simpler solution. That's more
> overkill, IMHO.

No, I take a single solution that works for 99% of my clients and just
so happens to work for the other 1% because the solution is homogenous.
Additionally the solution is re-usable and can be applied at ANY point
within the PHP code. Your solution is required to wrap the PHP script
invocation and thus is not as versatile. Additionally my solution is
hardly complex. Ooooh... a class wrapper around mkdir() that's tuff to
grok. Similarly adding features to the class is simplistic and instantly
available to all applications that want to use locks and not just
applications wanting to be launched from a shell script that manages the
locks. I guess you also have problems with using PHP classes that pull
in directory listings, perform file uploads/downloads, image
manipulations, etc. All these can be done with the shell, by extension
of your argument they appear to have no place in PHP code.

Moving along... why the heck would anyone want to punt logic to the
shell that could easily be incorporated into the application. You almost
certainly give up control and flexibility in such cases.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Mozilla user agent escapes detection

2008-09-02 Thread Jochem Maas

Shawn McKenzie schreef:

Jochem Maas wrote:

Dave M G schreef:

PHP List,

I have a script, part of which is taken from a script I found on the 
'net, which tries to detect the user agent of the browser accessing 
the site. One of the reasons I'm doing this is to find out if the 
browser is a desktop or mobile.


Part of the code looks like this:

$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
$isDesktop = (strpos($ua, 'firefox') !== false)
|| (strpos($ua,'mosaic') !== false)
|| (strpos($ua,'msie') !== false)
|| (strpos($ua,'opera') !== false)
|| (strpos($ua,'mozilla') !== false)
|| (strpos($ua,'w3c_css_validator') !== false)
|| (strpos($ua,'w3c_validator') !== false);

What's driving me crazy is that it successfully determines all the 
browsers listed there, *except* mozilla.


Mozilla !== mozilla


Look at the code: strtolower('Mozilla') === 'mozilla'


oh crap :-)



-Shawn


stripos is the case-insenstive version of strpos



I have a log file which alerts me when an unknown browser comes 
through my site, and it's chock full of messages telling me that a 
Mozilla based browser has come by. There are a *lot* of Mozilla based 
browsers.


Some examples from my logs of the browsers slipping by my test:

HTTP_USER_AGENT: Mozilla/5.0 compatible; Yahoo! Slurp
HTTP_USER_AGENT: Mozilla/5.0 compatible; Googlebot/2.1


these 2 are bots btw.


HTTP_USER_AGENT: Mozilla/5.0 X11; U; Linux i686

In each case, the strpos() should have seen the mozilla agent and not 
bothered logging it.


It's not complicated code, especially considering it's successfully 
finding msie and firefox.


I can't imagine why Mozilla would be different.

Any suggestions? Is there something about my code right in front of 
my face that I'm not seeing?


Any suggestions would be greatly appreciated.


STW? plenty of people offering code that attempts to detect mobile 
devices, e.g.:


http://www.andymoore.info/php-to-detect-mobile-phones/

also I'd offer a link in the top of your site pointing to the mobile site
(and vice-versa) in order to:

1. allow bots to visit both.
2. in case your code guessed incorrectly for some user(s)

I'd also check the UA string specifically for bots first and just let 
them

through ... they are neither desktop nor mobile browsers.

additionally you might consider how you want to accomodate text browsers
(which is kind of what a bot is)



Thanks.








--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] newbie - PHP escaping trigger happy

2008-09-02 Thread seungp
IIRC. That's covered under magic quotes . You should be able to turn that off 
via a config switch in php.ini or .htaccess.

  
-Original Message-
From: Govinda <[EMAIL PROTECTED]>

Date: Mon, 1 Sep 2008 20:21:10 
To: PHP-General List
Subject: [PHP] newbie - PHP escaping trigger happy

Just a quick Q, which I know has to be in the docs somewhere, but I  
haven't come across it yet-

PHP automatically escaping single and double quotes...  how to turn it  
off?

I.e.-
in a form text input, someone inputs
love's "influence" 

and on the posted page I get:
love\'s \"influence\"

WHen I wrap that with  htmlspecialchars , then I get:
love\'s \"influence\" 

What I want is:
love's "influence"  

in this case anyway.  Probably if I understood why PHP was escaping  
the quotes, then I likely would want that behavior in those  
circumstances it was designed for...  but not now, and I don't know  
how to turn it off.

Thanks,
-Govinda

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Confused

2008-09-02 Thread Dan Shirah
All,

Okay, I am a bit confused.   I'm setting up another server to host PHP
pages.  I followed everything in the Manual for installing PHP.  I'm running
Windows Server 2003, IIS6.0 and PHP 5.2.6.

And...it kind of works...

If I do:  it prints fine.
If I do: Today is:  it prints fine.

If I do: You are recognized as:  I get no output.
If I do:
 if (!$connect_id = ifx_connect("[EMAIL PROTECTED]", $user, $pass)) { //
THE ACTUAL CONNECTION
 echo "Unable to connect to Informix Database\n"; // DISPLAY IF
CONNECTION FAILS
 exit();
  }

I don't get a connection to the database and the "Unable to connect to
Informix Database\n"; does not even display.

I get no errors output to the screen and I have display_errors = On
And I have error_reporting = E_ALL & ~E_NOTICE

Any ideas?


RE: [PHP] Confused

2008-09-02 Thread Simcha
This does not seem to be an installation problem -

Your test [(!$connect_id = ] fails, since the connect returns false, so it
does not run the condition.

Compare:




-Original Message-
From: Dan Shirah [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 02, 2008 7:31 PM
To: PHP List
Subject: [PHP] Confused

All,

Okay, I am a bit confused.   I'm setting up another server to host PHP
pages.  I followed everything in the Manual for installing PHP.  I'm running
Windows Server 2003, IIS6.0 and PHP 5.2.6.

And...it kind of works...

If I do:  it prints fine.
If I do: Today is:  it prints fine.

If I do: You are recognized as:  I get no output.
If I do:
 if (!$connect_id = ifx_connect("[EMAIL PROTECTED]", $user, $pass)) { //
THE ACTUAL CONNECTION
 echo "Unable to connect to Informix Database\n"; // DISPLAY IF
CONNECTION FAILS
 exit();
  }

I don't get a connection to the database and the "Unable to connect to
Informix Database\n"; does not even display.

I get no errors output to the screen and I have display_errors = On
And I have error_reporting = E_ALL & ~E_NOTICE

Any ideas?

No virus found in this incoming message.
Checked by AVG - http://www.avg.com 
Version: 8.0.169 / Virus Database: 270.6.14/1646 - Release Date: 02/09/2008
06:02


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Confused

2008-09-02 Thread Robert Cummings
On Tue, 2008-09-02 at 13:31 -0400, Dan Shirah wrote:
> All,
> 
> Okay, I am a bit confused.   I'm setting up another server to host PHP
> pages.  I followed everything in the Manual for installing PHP.  I'm running
> Windows Server 2003, IIS6.0 and PHP 5.2.6.
> 
> And...it kind of works...
> 
> If I do:  it prints fine.
> If I do: Today is:  it prints fine.
> 
> If I do: You are recognized as:  13); ?> I get no output.

Add the following:

'."\n"
print_r( $_SERVER );
echo ''."\n";

?>

See if the AUTH_USER entry is in there.

> If I do:
>  if (!$connect_id = ifx_connect("[EMAIL PROTECTED]", $user, $pass)) { //
> THE ACTUAL CONNECTION
>  echo "Unable to connect to Informix Database\n"; // DISPLAY IF
> CONNECTION FAILS
>  exit();
>   }
> 
> I don't get a connection to the database and the "Unable to connect to
> Informix Database\n"; does not even display.

Shouldn't that be:

if( !($connect_id = ifx_connect("[EMAIL PROTECTED]", $user, $pass)) )

I think PHP may support the style you've used, but I sure as heck
wouldn't use it.

How do you know you don't get a connection to the database? What is the
value of $connect_id? Use var_dump( $connect_id ) to find out.

> I get no errors output to the screen and I have display_errors = On
> And I have error_reporting = E_ALL & ~E_NOTICE

Maybe turn on notices as well. That will probably generate a notice for
the missing AUTH_USER index.

> 
> Any ideas?
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Confused

2008-09-02 Thread Dan Shirah
If it was that simple then the second line: echo "Unable to connect to
Informix Database\n";  would execute upon the connection failing and that
message would be output to my screen.  I get Nothing.

Just as a simple call to 
returns nothing as well.


On 9/2/08, Simcha <[EMAIL PROTECTED]> wrote:
>
> This does not seem to be an installation problem -
>
> Your test [(!$connect_id = ] fails, since the connect returns false, so it
> does not run the condition.
>
> Compare:
> 
> if($a = false){echo "no good";}else{echo "condition true";}
>
> ?>
>
>
>
> -Original Message-
> From: Dan Shirah [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 02, 2008 7:31 PM
> To: PHP List
> Subject: [PHP] Confused
>
> All,
>
> Okay, I am a bit confused.   I'm setting up another server to host PHP
> pages.  I followed everything in the Manual for installing PHP.  I'm
> running
> Windows Server 2003, IIS6.0 and PHP 5.2.6.
>
> And...it kind of works...
>
> If I do:  it prints fine.
> If I do: Today is:  it prints fine.
>
> If I do: You are recognized as:  13); ?> I get no output.
> If I do:
> if (!$connect_id = ifx_connect("[EMAIL PROTECTED]", $user, $pass)) { //
> THE ACTUAL CONNECTION
> echo "Unable to connect to Informix Database\n"; // DISPLAY IF
> CONNECTION FAILS
> exit();
> }
>
> I don't get a connection to the database and the "Unable to connect to
> Informix Database\n"; does not even display.
>
> I get no errors output to the screen and I have display_errors = On
> And I have error_reporting = E_ALL & ~E_NOTICE
>
> Any ideas?
>
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com
> Version: 8.0.169 / Virus Database: 270.6.14/1646 - Release Date: 02/09/2008
> 06:02
>
>


RE: [PHP] Confused

2008-09-02 Thread Simcha

Ignore my previous email - 
It was sloppy. I was not focusing on the email.

SY
-Original Message-
From: Simcha [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 02, 2008 8:41 PM
To: 'Dan Shirah'; 'PHP List'
Subject: RE: [PHP] Confused

This does not seem to be an installation problem -

Your test [(!$connect_id = ] fails, since the connect returns false, so it
does not run the condition.

Compare:




-Original Message-
From: Dan Shirah [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 02, 2008 7:31 PM
To: PHP List
Subject: [PHP] Confused

All,

Okay, I am a bit confused.   I'm setting up another server to host PHP
pages.  I followed everything in the Manual for installing PHP.  I'm running
Windows Server 2003, IIS6.0 and PHP 5.2.6.

And...it kind of works...

If I do:  it prints fine.
If I do: Today is:  it prints fine.

If I do: You are recognized as:  I get no output.
If I do:
 if (!$connect_id = ifx_connect("[EMAIL PROTECTED]", $user, $pass)) { //
THE ACTUAL CONNECTION
 echo "Unable to connect to Informix Database\n"; // DISPLAY IF
CONNECTION FAILS
 exit();
  }

I don't get a connection to the database and the "Unable to connect to
Informix Database\n"; does not even display.

I get no errors output to the screen and I have display_errors = On
And I have error_reporting = E_ALL & ~E_NOTICE

Any ideas?

No virus found in this incoming message.
Checked by AVG - http://www.avg.com 
Version: 8.0.169 / Virus Database: 270.6.14/1646 - Release Date: 02/09/2008
06:02


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

No virus found in this incoming message.
Checked by AVG - http://www.avg.com 
Version: 8.0.169 / Virus Database: 270.6.14/1646 - Release Date: 02/09/2008
06:02


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: concatenating with "." or ","

2008-09-02 Thread Robert Cummings
On Tue, 2008-09-02 at 20:58 +0300, Thodoris wrote:
> 1982
> 
> Thank you guys it is a late reply but you really make me feel so young 
> and cunning.

This begs the question... are you also a linguist?

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Confused

2008-09-02 Thread brian

Dan Shirah wrote:

All,

Okay, I am a bit confused.   I'm setting up another server to host PHP
pages.  I followed everything in the Manual for installing PHP.  I'm running
Windows Server 2003, IIS6.0 and PHP 5.2.6.

And...it kind of works...

If I do:  it prints fine.
If I do: Today is:  it prints fine.

If I do: You are recognized as:  I get no output.


AUTH_USER will be empty unless the user has logged in (using whatever 
Microsoft's equivalent of htpasswd/htdigest is). As suggested 
previously, print $_SERVER to ensure it's set.



If I do:
 if (!$connect_id = ifx_connect("[EMAIL PROTECTED]", $user, $pass)) { //
THE ACTUAL CONNECTION
 echo "Unable to connect to Informix Database\n"; // DISPLAY IF
CONNECTION FAILS
 exit();
  }

I don't get a connection to the database and the "Unable to connect to
Informix Database\n"; does not even display.

I get no errors output to the screen and I have display_errors = On
And I have error_reporting = E_ALL & ~E_NOTICE

Any ideas?




$connect_id = ifx_connect("[EMAIL PROTECTED]", $user, $pass);

var_dump($connect_id);

And, to be sure, maybe echo $database, $host, $user, and $pass.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Creating single row for multiple items.

2008-09-02 Thread brian

Tom Shaw wrote:

My array looks very similar to this. I need to create a single row for the
items that have the same order number for CSV export.  I'd prefer to do this
PHP wise instead of SQL. But would appreciate any help I can get.


$ar = array(

   array(

 "order_id" => "34",

 "order_number" => "35Y345Y356YU3",

 "order_name" => "Steinway Grand Piano #11",

 "order_ordered_size" => "Grand",

 "order_sales_price" => "78671.90",

 "order_shipping_price" => "7.85",

 "order_shipping_extra" => "0.06",

   ),

   array(
...


A single row of *what*? The order_ids? The order_names? Perhaps you 
should post an example of the outcome you're looking for.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Confused

2008-09-02 Thread Dan Shirah
>
> Add the following:
>
> 
> echo ''."\n"
> print_r( $_SERVER );
> echo ''."\n";
>
> ?>
>
> See if the AUTH_USER entry is in there.


AUTH_USER shows up, but does not have a value. From the output of phpinfo()
it says, "No value"

How do you know you don't get a connection to the database? What is the
> value of $connect_id? Use var_dump( $connect_id ) to find out.


I know it isn't connecting because I can go to the database and see that
there is no active connections to it.


Re: [PHP] Mozilla user agent escapes detection

2008-09-02 Thread Diogo Neves
On Tue, Sep 2, 2008 at 5:49 PM, Jochem Maas <[EMAIL PROTECTED]> wrote:

> Shawn McKenzie schreef:
>
>> Jochem Maas wrote:
>>
>>> Dave M G schreef:
>>>
 PHP List,

 I have a script, part of which is taken from a script I found on the
 'net, which tries to detect the user agent of the browser accessing the
 site. One of the reasons I'm doing this is to find out if the browser is a
 desktop or mobile.

 Part of the code looks like this:

 $ua = strtolower($_SERVER['HTTP_USER_AGENT']);
 $isDesktop = (strpos($ua, 'firefox') !== false)
 || (strpos($ua,'mosaic') !== false)
 || (strpos($ua,'msie') !== false)
 || (strpos($ua,'opera') !== false)
 || (strpos($ua,'mozilla') !== false)
 || (strpos($ua,'w3c_css_validator') !== false)
 || (strpos($ua,'w3c_validator') !== false);

 What's driving me crazy is that it successfully determines all the
 browsers listed there, *except* mozilla.

>>>
>>> Mozilla !== mozilla
>>>
>>
>> Look at the code: strtolower('Mozilla') === 'mozilla'
>>
>
> oh crap :-)
>
>
>
>> -Shawn
>>
>>>
>>> stripos is the case-insenstive version of strpos
>>>
>>>
 I have a log file which alerts me when an unknown browser comes through
 my site, and it's chock full of messages telling me that a Mozilla based
 browser has come by. There are a *lot* of Mozilla based browsers.

 Some examples from my logs of the browsers slipping by my test:

 HTTP_USER_AGENT: Mozilla/5.0 compatible; Yahoo! Slurp
 HTTP_USER_AGENT: Mozilla/5.0 compatible; Googlebot/2.1

>>>
>>> these 2 are bots btw.
>>>
>>>  HTTP_USER_AGENT: Mozilla/5.0 X11; U; Linux i686

 In each case, the strpos() should have seen the mozilla agent and not
 bothered logging it.

 It's not complicated code, especially considering it's successfully
 finding msie and firefox.

 I can't imagine why Mozilla would be different.

 Any suggestions? Is there something about my code right in front of my
 face that I'm not seeing?

 Any suggestions would be greatly appreciated.

>>>
>>> STW? plenty of people offering code that attempts to detect mobile
>>> devices, e.g.:
>>>
>>> http://www.andymoore.info/php-to-detect-mobile-phones/
>>>
>>> also I'd offer a link in the top of your site pointing to the mobile site
>>> (and vice-versa) in order to:
>>>
>>> 1. allow bots to visit both.
>>> 2. in case your code guessed incorrectly for some user(s)
>>>
>>> I'd also check the UA string specifically for bots first and just let
>>> them
>>> through ... they are neither desktop nor mobile browsers.
>>>
>>> additionally you might consider how you want to accomodate text browsers
>>> (which is kind of what a bot is)
>>>
>>>
 Thanks.


>>>
>>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> Anyway, this code is working...
I changed my useragent in Firefox and it worked pretty well to me...


-- 
Thanks for your attention,

Diogo Neves
Web Developer @ SAPO.pt by PrimeIT.pt


Re: [PHP] Creating single row for multiple items.

2008-09-02 Thread Diogo Neves
On Tue, Sep 2, 2008 at 7:17 PM, brian <[EMAIL PROTECTED]> wrote:

> Tom Shaw wrote:
>
>> My array looks very similar to this. I need to create a single row for the
>> items that have the same order number for CSV export.  I'd prefer to do
>> this
>> PHP wise instead of SQL. But would appreciate any help I can get.
>>
>>
>> $ar = array(
>>
>>   array(
>>
>> "order_id" => "34",
>>
>> "order_number" => "35Y345Y356YU3",
>>
>> "order_name" => "Steinway Grand Piano #11",
>>
>> "order_ordered_size" => "Grand",
>>
>> "order_sales_price" => "78671.90",
>>
>> "order_shipping_price" => "7.85",
>>
>> "order_shipping_extra" => "0.06",
>>
>>   ),
>>
>>   array(
>> ...
>>
>
> A single row of *what*? The order_ids? The order_names? Perhaps you should
> post an example of the outcome you're looking for.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> Yep, i got lost too ;)

-- 
Thanks for your attention,

Diogo Neves
Web Developer @ SAPO.pt by PrimeIT.pt


Re: [PHP] Confused

2008-09-02 Thread Robert Cummings
On Tue, 2008-09-02 at 14:27 -0400, Dan Shirah wrote:
> >
> > Add the following:
> >
> >  >
> > echo ''."\n"
> > print_r( $_SERVER );
> > echo ''."\n";
> >
> > ?>
> >
> > See if the AUTH_USER entry is in there.
> 
> 
> AUTH_USER shows up, but does not have a value. From the output of phpinfo()
> it says, "No value"
> 
> How do you know you don't get a connection to the database? What is the
> > value of $connect_id? Use var_dump( $connect_id ) to find out.
> 
> 
> I know it isn't connecting because I can go to the database and see that
> there is no active connections to it.

So you're script runs long enough for you to check?

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Recommendation

2008-09-02 Thread Robert Cummings
On Tue, 2008-09-02 at 14:07 -0400, Bastien Koert wrote:
> On Tue, Sep 2, 2008 at 11:15 AM, Shawn McKenzie <[EMAIL PROTECTED]>wrote:
> 
> > Eric Butera wrote:
> >
> >> I'm on there too.
> >>
> >> http://www.linkedin.com/in/ericbutera
> >>
> >
> > Me too...
> >
> > http://www.linkedin.com/in/rsmckenzie
> >
> > -Shawn
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> toss in mine as well
> 
>  http://www.linkedin.com/in/bastienkoert

I may as well be another me too :)

http://www.linkedin.com/in/robertcummings123

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Confused

2008-09-02 Thread Eric Butera
On Tue, Sep 2, 2008 at 1:46 PM, Dan Shirah <[EMAIL PROTECTED]> wrote:
> If it was that simple then the second line: echo "Unable to connect to
> Informix Database\n";  would execute upon the connection failing and that
> message would be output to my screen.  I get Nothing.
>
> Just as a simple call to 
> returns nothing as well.
>
>
> On 9/2/08, Simcha <[EMAIL PROTECTED]> wrote:
>>
>> This does not seem to be an installation problem -
>>
>> Your test [(!$connect_id = ] fails, since the connect returns false, so it
>> does not run the condition.
>>
>> Compare:
>> >
>> if($a = false){echo "no good";}else{echo "condition true";}
>>
>> ?>
>>
>>
>>
>> -Original Message-
>> From: Dan Shirah [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, September 02, 2008 7:31 PM
>> To: PHP List
>> Subject: [PHP] Confused
>>
>> All,
>>
>> Okay, I am a bit confused.   I'm setting up another server to host PHP
>> pages.  I followed everything in the Manual for installing PHP.  I'm
>> running
>> Windows Server 2003, IIS6.0 and PHP 5.2.6.
>>
>> And...it kind of works...
>>
>> If I do:  it prints fine.
>> If I do: Today is:  it prints fine.
>>
>> If I do: You are recognized as: > 13); ?> I get no output.
>> If I do:
>> if (!$connect_id = ifx_connect("[EMAIL PROTECTED]", $user, $pass)) { //
>> THE ACTUAL CONNECTION
>> echo "Unable to connect to Informix Database\n"; // DISPLAY IF
>> CONNECTION FAILS
>> exit();
>> }
>>
>> I don't get a connection to the database and the "Unable to connect to
>> Informix Database\n"; does not even display.
>>
>> I get no errors output to the screen and I have display_errors = On
>> And I have error_reporting = E_ALL & ~E_NOTICE
>>
>> Any ideas?
>>
>> No virus found in this incoming message.
>> Checked by AVG - http://www.avg.com
>> Version: 8.0.169 / Virus Database: 270.6.14/1646 - Release Date: 02/09/2008
>> 06:02
>>
>>
>

Look at your server error log.  Maybe you have a parse error or
something that prevents it from getting to the screen.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: concatenating with "." or ","

2008-09-02 Thread Thodoris

1982

Thank you guys it is a late reply but you really make me feel so young 
and cunning.


--
Thodoris




O/H Robert Cummings ??:

On Wed, 2008-08-27 at 14:44 -0400, tedd wrote:
  

At 1:24 PM -0400 8/27/08, Robert Cummings wrote:


On Wed, 2008-08-27 at 13:17 -0400, tedd wrote:
 > As it is, you Stut, Rob, and Daniel are going to be the ones who
  

 fight out who's the sharpest crayon in this box. I'm glad I no longer
 have to defend that title (as if I ever did).


Bah, who put me in a box with crayons. I'm a scalpel for crying out
loud. Anyways, I could wax on forever, but cutting to the point... I
think I'm hanging with the wrong bunch of tools.

(multiple puns intended ;)
  

:-)

Don't give up your day job for stand-up.



 But, I would rather get the good looking girl anyway (as I have
 already done). :-)


Isn't it amazing the amount of choice in blow up dolls these days?

(ducks and runs)

Cheers,
Rob.
  

LOL! Good one!

My wife just got her gun and is asking "Who is the Rob character anyway?"



So you could say she's blowing up at me? That's awesome!!
Self-inflating! ;)

Cheers,
Rob.
  




Re: [PHP] Confused

2008-09-02 Thread Dan Shirah
>
> So you're script runs long enough for you to check?
>
> Cheers,
> Rob.


if (!$connect_id = ifx_connect("[EMAIL PROTECTED]", $user, $pass)) {

Checks to see if it doesn't connect.  If it does connect the page continues
to process.  If it doesn't connect the error is displayed.
echo "Unable to connect to Informix Database\n";

If I put in the following:

echo "Point 1";
if (!$connect_id = ifx_connect("[EMAIL PROTECTED]", $user, $pass)) { // THE
ACTUAL CONNECTION
echo "Point 2";
 echo "Unable to connect to Informix Database\n"; // DISPLAY IF
CONNECTION FAILS
echo "Point 3";
 exit();
  }
echo "Point 4";

The only thing that is output to my screen is "Point 1"


Re: [PHP] Confused

2008-09-02 Thread Robert Cummings
On Tue, 2008-09-02 at 14:43 -0400, Dan Shirah wrote:
> So you're script runs long enough for you to check?
> 
> Cheers,
> Rob.
>  
> if (!$connect_id = ifx_connect("[EMAIL PROTECTED]", $user, $pass)) {
>  
> Checks to see if it doesn't connect.  If it does connect the page
> continues to process.  If it doesn't connect the error is displayed.
> echo "Unable to connect to Informix Database\n"; 
>  
> If I put in the following:
>  
> echo "Point 1";
> if (!$connect_id = ifx_connect("[EMAIL PROTECTED]", $user, $pass)) { //
> THE ACTUAL CONNECTION
> echo "Point 2";
>  echo "Unable to connect to Informix Database\n"; // DISPLAY IF
> CONNECTION FAILS
> echo "Point 3";
>  exit();
>   }
> echo "Point 4";
>  
> The only thing that is output to my screen is "Point 1"

Your script is dying then. What does the error log say? Are you sure PHP
is using the php.ini you think it's using? Double check by using
phpinfo().

Cheers,
Rob.

-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Recommendation

2008-09-02 Thread Bastien Koert
On Tue, Sep 2, 2008 at 11:15 AM, Shawn McKenzie <[EMAIL PROTECTED]>wrote:

> Eric Butera wrote:
>
>> I'm on there too.
>>
>> http://www.linkedin.com/in/ericbutera
>>
>
> Me too...
>
> http://www.linkedin.com/in/rsmckenzie
>
> -Shawn
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
toss in mine as well

 http://www.linkedin.com/in/bastienkoert


-- 

Bastien

Cat, the other other white meat


Re: [PHP] Confused

2008-09-02 Thread Robert Cummings
On Tue, 2008-09-02 at 14:46 -0400, Robert Cummings wrote:
> On Tue, 2008-09-02 at 14:43 -0400, Dan Shirah wrote:
> > So you're script runs long enough for you to check?
> > 
> > Cheers,
> > Rob.
> >  
> > if (!$connect_id = ifx_connect("[EMAIL PROTECTED]", $user, $pass)) {
> >  
> > Checks to see if it doesn't connect.  If it does connect the page
> > continues to process.  If it doesn't connect the error is displayed.
> > echo "Unable to connect to Informix Database\n"; 
> >  
> > If I put in the following:
> >  
> > echo "Point 1";
> > if (!$connect_id = ifx_connect("[EMAIL PROTECTED]", $user, $pass)) { //
> > THE ACTUAL CONNECTION
> > echo "Point 2";
> >  echo "Unable to connect to Informix Database\n"; // DISPLAY IF
> > CONNECTION FAILS
> > echo "Point 3";
> >  exit();
> >   }
> > echo "Point 4";
> >  
> > The only thing that is output to my screen is "Point 1"
> 
> Your script is dying then. What does the error log say? Are you sure PHP
> is using the php.ini you think it's using? Double check by using
> phpinfo().

BTW, my guess is that ifx_connect() doesn't exist. Possibly you don't
have ifx support.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Recommendation

2008-09-02 Thread Dan Joseph
What about also creating a PHP General List group?  Has anyone created
Groups on linkedin before?  Maybe we could get quite a few people "linked"
thru one?

-- 
-Dan Joseph

www.canishosting.com - Plans start @ $1.99/month.

"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."


Re: [PHP] Recommendation

2008-09-02 Thread Eric Butera
On Tue, Sep 2, 2008 at 2:35 PM, Robert Cummings <[EMAIL PROTECTED]> wrote:
> On Tue, 2008-09-02 at 14:07 -0400, Bastien Koert wrote:
>> On Tue, Sep 2, 2008 at 11:15 AM, Shawn McKenzie <[EMAIL PROTECTED]>wrote:
>>
>> > Eric Butera wrote:
>> >
>> >> I'm on there too.
>> >>
>> >> http://www.linkedin.com/in/ericbutera
>> >>
>> >
>> > Me too...
>> >
>> > http://www.linkedin.com/in/rsmckenzie
>> >
>> > -Shawn
>> >
>> >
>> > --
>> > PHP General Mailing List (http://www.php.net/)
>> > To unsubscribe, visit: http://www.php.net/unsub.php
>> >
>> >
>> toss in mine as well
>>
>>  http://www.linkedin.com/in/bastienkoert
>
> I may as well be another me too :)
>
> http://www.linkedin.com/in/robertcummings123
>
> Cheers,
> Rob.
> --
> http://www.interjinn.com
> Application and Templating Framework for PHP
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

123?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Recommendation

2008-09-02 Thread Jay Blanchard
[snip]
What about also creating a PHP General List group?  Has anyone created
Groups on linkedin before?  Maybe we could get quite a few people
"linked"
thru one?
[/snip]

I am on LinkedIn and having a group would be very cool.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Recommendation

2008-09-02 Thread Robert Cummings
On Tue, 2008-09-02 at 14:42 -0400, Eric Butera wrote:
> On Tue, Sep 2, 2008 at 2:35 PM, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > On Tue, 2008-09-02 at 14:07 -0400, Bastien Koert wrote:
> >> On Tue, Sep 2, 2008 at 11:15 AM, Shawn McKenzie <[EMAIL PROTECTED]>wrote:
> >>
> >> > Eric Butera wrote:
> >> >
> >> >> I'm on there too.
> >> >>
> >> >> http://www.linkedin.com/in/ericbutera
> >> >>
> >> >
> >> > Me too...
> >> >
> >> > http://www.linkedin.com/in/rsmckenzie
> >> >
> >> > -Shawn
> >> >
> >> >
> >> > --
> >> > PHP General Mailing List (http://www.php.net/)
> >> > To unsubscribe, visit: http://www.php.net/unsub.php
> >> >
> >> >
> >> toss in mine as well
> >>
> >>  http://www.linkedin.com/in/bastienkoert
> >
> > I may as well be another me too :)
> >
> > http://www.linkedin.com/in/robertcummings123
> >
> > 
> 
> 123?

There's more than one robertcummings and I wasn't first :(

*hehe*

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Confused

2008-09-02 Thread Dan Shirah
>
> Your script is dying then. What does the error log say? Are you sure PHP
> is using the php.ini you think it's using? Double check by using
> phpinfo().
>
> Cheers,
> Rob.


It is VERY strange!  phpinfo() shows that it is using C:\Windows\php.ini

phpinfo() also shows display_errors = Off but when I go to the
C:\Windows\php.ini file it says display_errors = On...


Re: [PHP] Confused

2008-09-02 Thread Robert Cummings
On Tue, 2008-09-02 at 14:58 -0400, Dan Shirah wrote:
> Your script is dying then. What does the error log say? Are
> you sure PHP
> is using the php.ini you think it's using? Double check by
> using
> phpinfo().
> 
> Cheers,
> Rob.
>  
> It is VERY strange!  phpinfo() shows that it is using C:\Windows
> \php.ini
>  
> phpinfo() also shows display_errors = Off but when I go to the C:
> \Windows\php.ini file it says display_errors = On...

Does your script, the apache conf, virtual host conf, or a .htaccess
conf modify this setting? perhaps php.ini has more than one
display_errors entries?

Cheers,
Rob.

-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Confused

2008-09-02 Thread Diogo Neves
On Tue, Sep 2, 2008 at 7:58 PM, Dan Shirah <[EMAIL PROTECTED]> wrote:

> >
> > Your script is dying then. What does the error log say? Are you sure PHP
> > is using the php.ini you think it's using? Double check by using
> > phpinfo().
> >
> > Cheers,
> > Rob.
>
>
> It is VERY strange!  phpinfo() shows that it is using C:\Windows\php.ini
>
> phpinfo() also shows display_errors = Off but when I go to the
> C:\Windows\php.ini file it says display_errors = On...
>

You can be rewriting it on your vistualhost or in a script somewhere...

-- 
Thanks for your attention,

Diogo Neves
Web Developer @ SAPO.pt by PrimeIT.pt


Re: [PHP] Confused

2008-09-02 Thread Diogo Neves
On Tue, Sep 2, 2008 at 8:04 PM, Robert Cummings <[EMAIL PROTECTED]>wrote:

> On Tue, 2008-09-02 at 14:58 -0400, Dan Shirah wrote:
> > Your script is dying then. What does the error log say? Are
> > you sure PHP
> > is using the php.ini you think it's using? Double check by
> > using
> > phpinfo().
> >
> > Cheers,
> > Rob.
> >
> > It is VERY strange!  phpinfo() shows that it is using C:\Windows
> > \php.ini
> >
> > phpinfo() also shows display_errors = Off but when I go to the C:
> > \Windows\php.ini file it says display_errors = On...
>
> Does your script, the apache conf, virtual host conf, or a .htaccess
> conf modify this setting? perhaps php.ini has more than one
> display_errors entries?
>
> Cheers,
> Rob.
>
> --
> http://www.interjinn.com
> Application and Templating Framework for PHP
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> And all other possible places :)


-- 
Thanks for your attention,

Diogo Neves
Web Developer @ SAPO.pt by PrimeIT.pt


Re: [PHP] Confused

2008-09-02 Thread David Giragosian
On 9/2/08, Dan Shirah <[EMAIL PROTECTED]> wrote:
>
> >
> > Your script is dying then. What does the error log say? Are you sure PHP
> > is using the php.ini you think it's using? Double check by using
> > phpinfo().
> >
> > Cheers,
> > Rob.
>
>
> It is VERY strange!  phpinfo() shows that it is using C:\Windows\php.ini
>
> phpinfo() also shows display_errors = Off but when I go to the
> C:\Windows\php.ini file it says display_errors = On...
>

Have you restarted the server since changes were made?

David


RE: [PHP] Recommendation

2008-09-02 Thread Jay Blanchard
[snip]
...
[/snip]

Who is going to create the group?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Confused

2008-09-02 Thread Dan Shirah
> Does your script, the apache conf, virtual host conf, or a .htaccess
> conf modify this setting? perhaps php.ini has more than one
> display_errors entries?
>
> Cheers,
> Rob.


PROGRESS!  It just clicked!

About 3 years ago when I setup my first PHP server on Windows I saw someone
mention that certain versions of ntwdblib.dll were causing all kinds of
problems.

I copied the ntwdblib.dll from one of my current servers and now I am at
least getting the connection errors!  YAY!

So now my connection error is probably in my ODBC mapping.

But I still need to figure out why AUTH_USER is still "No Value"


Re: [PHP] Confused

2008-09-02 Thread Eric Butera
On Tue, Sep 2, 2008 at 2:49 PM, Robert Cummings <[EMAIL PROTECTED]> wrote:
> On Tue, 2008-09-02 at 14:46 -0400, Robert Cummings wrote:
>> On Tue, 2008-09-02 at 14:43 -0400, Dan Shirah wrote:
>> > So you're script runs long enough for you to check?
>> >
>> > Cheers,
>> > Rob.
>> >
>> > if (!$connect_id = ifx_connect("[EMAIL PROTECTED]", $user, $pass)) {
>> >
>> > Checks to see if it doesn't connect.  If it does connect the page
>> > continues to process.  If it doesn't connect the error is displayed.
>> > echo "Unable to connect to Informix Database\n";
>> >
>> > If I put in the following:
>> >
>> > echo "Point 1";
>> > if (!$connect_id = ifx_connect("[EMAIL PROTECTED]", $user, $pass)) { //
>> > THE ACTUAL CONNECTION
>> > echo "Point 2";
>> >  echo "Unable to connect to Informix Database\n"; // DISPLAY IF
>> > CONNECTION FAILS
>> > echo "Point 3";
>> >  exit();
>> >   }
>> > echo "Point 4";
>> >
>> > The only thing that is output to my screen is "Point 1"
>>
>> Your script is dying then. What does the error log say? Are you sure PHP
>> is using the php.ini you think it's using? Double check by using
>> phpinfo().
>
> BTW, my guess is that ifx_connect() doesn't exist. Possibly you don't
> have ifx support.
>
> Cheers,
> Rob.
> --
> http://www.interjinn.com
> Application and Templating Framework for PHP
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Yea I thought the same that is why I recommended the looking at logs idea.

Perhaps maybe just running form cli will do it:

[EMAIL PROTECTED]:~/Sites$ php5 blah.php
Point 1
Fatal error: Call to undefined function ifx_connect() in
/home/eric/Sites/blah.php on line 3

Call Stack:
0.0002  60252   1. {main}() /home/eric/Sites/blah.php:0

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Confused

2008-09-02 Thread Dan Shirah
>
> Yea I thought the same that is why I recommended the looking at logs idea.
>
> Perhaps maybe just running form cli will do it:
>
> [EMAIL PROTECTED]:~/Sites$ php5 blah.php
> Point 1
> Fatal error: Call to undefined function ifx_connect() in
> /home/eric/Sites/blah.php on line 3



You probably don't have extension=php_ifx.dll uncommented? Or you don't have
php_ifx.dll in your ext folder?


Re: [PHP] Confused

2008-09-02 Thread Eric Butera
On Tue, Sep 2, 2008 at 3:15 PM, Dan Shirah <[EMAIL PROTECTED]> wrote:
>> Yea I thought the same that is why I recommended the looking at logs idea.
>>
>> Perhaps maybe just running form cli will do it:
>>
>> [EMAIL PROTECTED]:~/Sites$ php5 blah.php
>> Point 1
>> Fatal error: Call to undefined function ifx_connect() in
>> /home/eric/Sites/blah.php on line 3
>
>
>
> You probably don't have extension=php_ifx.dll uncommented? Or you don't have
> php_ifx.dll in your ext folder?
>
>

I don't use windows.  I knew I didn't have it enabled. :)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Google Chrome

2008-09-02 Thread Diogo Neves
On Tue, Sep 2, 2008 at 4:33 PM, Richard Heyes <[EMAIL PROTECTED]> wrote:

> Hi,
>
> And more about it:
>
> http://news.bbc.co.uk/1/hi/technology/7593106.stm
>
> --
> Richard Heyes
>
> HTML5 Graphing for IE7, FF, Opera and Safari:
> http://www.phpguru.org/RGraph
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> www.google.com/chrome

Now is the time ;)


-- 
Thanks for your attention,

Diogo Neves
Web Developer @ SAPO.pt by PrimeIT.pt


[PHP] Re: geolocation

2008-09-02 Thread zerof

clive escreveu:

Hi,

Have any developed a site that determines a users location based on IP  
address, Im not looking for accurate locations, just what country they 
are coming from.


I know I could possible get a list of IP blocks allocated to countries 
or make use of some web server to get the information, I just want to 
know how others are doing this?


If are using a specific method and know it to be robust and up to date 
please let me know.


Thanks

clive

I use GeoIP from Maxmind, too, and I wrote a brief tutorial on how to 
use it.


http://www.educar.pro.br/i_en/GeoIP/
--
zerof
http://www.educar.pro.br/
Apache - PHP - MySQL - Boolean Logics - Project Management
--
You must hear, always, one second opinion! In all cases.
--
Let the people know if this info was useful for you!
--

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Secure way to handle pw on session.

2008-09-02 Thread k bah

 Hi,

 I noticed session files are kept on /tmp for a while, and even if they were 
immediately deleted, well, someone could use one of my php scripts to inject 
code and read them, since they belong to the httpd user.
 What's the best way to receive passwords thru a form and store them in the 
$_SESSION while I process other information to decide whether or not that user 
is able to proceed and login (check to see if user is also allowed to use that 
service, not just validate user/pw)? I use https, always, no plain http is used.

 Thanks

=


-- 
Powered by Outblaze

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Secure way to handle pw on session.

2008-09-02 Thread Dan Joseph
On Tue, Sep 2, 2008 at 3:27 PM, k bah <[EMAIL PROTECTED]> wrote:

>
>  Hi,
>
>  I noticed session files are kept on /tmp for a while, and even if they
> were immediately deleted, well, someone could use one of my php scripts to
> inject code and read them, since they belong to the httpd user.
>  What's the best way to receive passwords thru a form and store them in the
> $_SESSION while I process other information to decide whether or not that
> user is able to proceed and login (check to see if user is also allowed to
> use that service, not just validate user/pw)? I use https, always, no plain
> http is used.
>
>  Thanks
>
> =
>
>
> --
> Powered by Outblaze
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
I personally would recommend you never store passwords in $_SESSION.

I don't know how your auth code works, but the way I've always done it would
be to process everything when you his submit, with the password being in
$_POST or $_GET, then after you authenticate the user, drop it and don't
store it with sessions.  If you find you need it to be stored for other
things, I'd suggest rethinking the design/checking you're doing.

-- 
-Dan Joseph

www.canishosting.com - Plans start @ $1.99/month.

"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."


Re: [PHP] Google Chrome

2008-09-02 Thread Stut

On 2 Sep 2008, at 20:23, Diogo Neves wrote:

Now is the time ;)


Indeed: http://www.google.com/chrome

But only for Windows for now :(

-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Google Chrome

2008-09-02 Thread Thiago Melo de Paula
Yes, and the proxy configuration lauches the IE configuration window!


On Tue, Sep 2, 2008 at 4:38 PM, Stut <[EMAIL PROTECTED]> wrote:

> On 2 Sep 2008, at 20:23, Diogo Neves wrote:
>
>> Now is the time ;)
>>
>
> Indeed: http://www.google.com/chrome
>
> But only for Windows for now :(
>
> -Stut
>
> --
> http://stut.net/
>
>


Re: [PHP] Google Chrome

2008-09-02 Thread Eric Butera
On Tue, Sep 2, 2008 at 3:38 PM, Stut <[EMAIL PROTECTED]> wrote:
> On 2 Sep 2008, at 20:23, Diogo Neves wrote:
>>
>> Now is the time ;)
>
> Indeed: http://www.google.com/chrome
>
> But only for Windows for now :(
>
> -Stut
>
> --
> http://stut.net/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

I got the linux version coming soon message myself.  It will probably
be instructions on how to install wine, right? ;)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Google Chrome

2008-09-02 Thread Dan Joseph
On Tue, Sep 2, 2008 at 3:38 PM, Stut <[EMAIL PROTECTED]> wrote:

> On 2 Sep 2008, at 20:23, Diogo Neves wrote:
>
>> Now is the time ;)
>>
>
> Indeed: http://www.google.com/chrome
>
> But only for Windows for now :(
>
> -Stut
>
> --
> http://stut.net/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Well its not that exciting I guess.  All the hype, and its a browser. :)  It
is fast though, I'll give it that.

-- 
-Dan Joseph

www.canishosting.com - Plans start @ $1.99/month.

"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."


Re: [PHP] Secure way to handle pw on session.

2008-09-02 Thread Micah Gersten
Take a look at this:
http://us2.php.net/manual/en/function.session-save-path.php

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



k bah wrote:
>  Hi,
>
>  I noticed session files are kept on /tmp for a while, and even if they were 
> immediately deleted, well, someone could use one of my php scripts to inject 
> code and read them, since they belong to the httpd user.
>  What's the best way to receive passwords thru a form and store them in the 
> $_SESSION while I process other information to decide whether or not that 
> user is able to proceed and login (check to see if user is also allowed to 
> use that service, not just validate user/pw)? I use https, always, no plain 
> http is used.
>
>  Thanks
>
> =
>
>
>   

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Google Chrome

2008-09-02 Thread Richard Heyes
> www.google.com/chrome
>
> Now is the time ;)

Sadly, my bedtime looms. Tomorrow I think...

-- 
Richard Heyes

HTML5 Graphing for IE7, FF, Opera and Safari:
http://www.phpguru.org/RGraph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Google Chrome

2008-09-02 Thread Richard Heyes
> I got the linux version coming soon message myself.  It will probably
> be instructions on how to install wine, right? ;)

Or Windows... :-)

-- 
Richard Heyes

HTML5 Graphing for IE7, FF, Opera and Safari:
http://www.phpguru.org/RGraph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Secure way to handle pw on session.

2008-09-02 Thread mike
As an additional note suhosin can transparently encrypt and decrypt  
your session data for reasons just like the /tmp issue. It happens  
without you needing to configure anything (except to enable or disable  
it) I think it is enabled by default.


On Sep 2, 2008, at 12:35 PM, "Dan Joseph" <[EMAIL PROTECTED]> wrote:


On Tue, Sep 2, 2008 at 3:27 PM, k bah <[EMAIL PROTECTED]> wrote:



Hi,

I noticed session files are kept on /tmp for a while, and even if  
they
were immediately deleted, well, someone could use one of my php  
scripts to

inject code and read them, since they belong to the httpd user.
What's the best way to receive passwords thru a form and store them  
in the
$_SESSION while I process other information to decide whether or  
not that
user is able to proceed and login (check to see if user is also  
allowed to
use that service, not just validate user/pw)? I use https, always,  
no plain

http is used.

Thanks

=


--
Powered by Outblaze

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



I personally would recommend you never store passwords in $_SESSION.

I don't know how your auth code works, but the way I've always done  
it would
be to process everything when you his submit, with the password  
being in
$_POST or $_GET, then after you authenticate the user, drop it and  
don't
store it with sessions.  If you find you need it to be stored for  
other

things, I'd suggest rethinking the design/checking you're doing.

--
-Dan Joseph

www.canishosting.com - Plans start @ $1.99/month.

"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Google Chrome

2008-09-02 Thread Robert Cummings
On Tue, 2008-09-02 at 20:38 +0100, Stut wrote:
> On 2 Sep 2008, at 20:23, Diogo Neves wrote:
> > Now is the time ;)
> 
> Indeed: http://www.google.com/chrome
> 
> But only for Windows for now :(

Oh well, guess I'll have to run it in vmware. Fortunately I have a
dedicate 1TB drive for vmware appliances :)

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Google Chrome

2008-09-02 Thread Douglas Temple
Beta or not, it's still amazingly fast.
Despite the fact you can't scroll up with the mouse wheel...


Re: [PHP] Secure way to handle pw on session.

2008-09-02 Thread Robert Cummings
On Tue, 2008-09-02 at 14:45 -0500, Micah Gersten wrote:
> Take a look at this:
> http://us2.php.net/manual/en/function.session-save-path.php

This won't help since the OP mentioned he was worried about code
injection exposing the contents of $_SESSION.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Secure way to handle pw on session.

2008-09-02 Thread Robert Cummings
On Tue, 2008-09-02 at 12:58 -0700, mike wrote:
> As an additional note suhosin can transparently encrypt and decrypt  
> your session data for reasons just like the /tmp issue. It happens  
> without you needing to configure anything (except to enable or disable  
> it) I think it is enabled by default.

This won't help since the OP mentioned he was worried about code
injection exposing the contents of $_SESSION and presumably suhosin
doesn't prevent restoration of the session on page load.

Cheers,
Rob.



> On Sep 2, 2008, at 12:35 PM, "Dan Joseph" <[EMAIL PROTECTED]> wrote:
> 
> > On Tue, Sep 2, 2008 at 3:27 PM, k bah <[EMAIL PROTECTED]> wrote:
> >
> >>
> >> Hi,
> >>
> >> I noticed session files are kept on /tmp for a while, and even if  
> >> they
> >> were immediately deleted, well, someone could use one of my php  
> >> scripts to
> >> inject code and read them, since they belong to the httpd user.
> >> What's the best way to receive passwords thru a form and store them  
> >> in the
> >> $_SESSION while I process other information to decide whether or  
> >> not that
> >> user is able to proceed and login (check to see if user is also  
> >> allowed to
> >> use that service, not just validate user/pw)? I use https, always,  
> >> no plain
> >> http is used.
> >>
> >> Thanks
> >>
> >> =
> >>
> >>
> >> --
> >> Powered by Outblaze
> >>
> >> --
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >>
> > I personally would recommend you never store passwords in $_SESSION.
> >
> > I don't know how your auth code works, but the way I've always done  
> > it would
> > be to process everything when you his submit, with the password  
> > being in
> > $_POST or $_GET, then after you authenticate the user, drop it and  
> > don't
> > store it with sessions.  If you find you need it to be stored for  
> > other
> > things, I'd suggest rethinking the design/checking you're doing.
> >
> > -- 
> > -Dan Joseph
> >
> > www.canishosting.com - Plans start @ $1.99/month.
> >
> > "Build a man a fire, and he will be warm for the rest of the day.
> > Light a man on fire, and will be warm for the rest of his life."
> 
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Google Chrome

2008-09-02 Thread Eric Butera
On Tue, Sep 2, 2008 at 4:04 PM, Douglas Temple <[EMAIL PROTECTED]> wrote:
> Beta or not, it's still amazingly fast.
> Despite the fact you can't scroll up with the mouse wheel...
>

Ever use Safari?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Secure way to handle pw on session.

2008-09-02 Thread Eric Butera
On Tue, Sep 2, 2008 at 4:06 PM, Robert Cummings <[EMAIL PROTECTED]> wrote:
> On Tue, 2008-09-02 at 12:58 -0700, mike wrote:
>> As an additional note suhosin can transparently encrypt and decrypt
>> your session data for reasons just like the /tmp issue. It happens
>> without you needing to configure anything (except to enable or disable
>> it) I think it is enabled by default.
>
> This won't help since the OP mentioned he was worried about code
> injection exposing the contents of $_SESSION and presumably suhosin
> doesn't prevent restoration of the session on page load.
>
> Cheers,
> Rob.
>
>
>
>> On Sep 2, 2008, at 12:35 PM, "Dan Joseph" <[EMAIL PROTECTED]> wrote:
>>
>> > On Tue, Sep 2, 2008 at 3:27 PM, k bah <[EMAIL PROTECTED]> wrote:
>> >
>> >>
>> >> Hi,
>> >>
>> >> I noticed session files are kept on /tmp for a while, and even if
>> >> they
>> >> were immediately deleted, well, someone could use one of my php
>> >> scripts to
>> >> inject code and read them, since they belong to the httpd user.
>> >> What's the best way to receive passwords thru a form and store them
>> >> in the
>> >> $_SESSION while I process other information to decide whether or
>> >> not that
>> >> user is able to proceed and login (check to see if user is also
>> >> allowed to
>> >> use that service, not just validate user/pw)? I use https, always,
>> >> no plain
>> >> http is used.
>> >>
>> >> Thanks
>> >>
>> >> =
>> >>
>> >>
>> >> --
>> >> Powered by Outblaze
>> >>
>> >> --
>> >> PHP General Mailing List (http://www.php.net/)
>> >> To unsubscribe, visit: http://www.php.net/unsub.php
>> >>
>> >>
>> > I personally would recommend you never store passwords in $_SESSION.
>> >
>> > I don't know how your auth code works, but the way I've always done
>> > it would
>> > be to process everything when you his submit, with the password
>> > being in
>> > $_POST or $_GET, then after you authenticate the user, drop it and
>> > don't
>> > store it with sessions.  If you find you need it to be stored for
>> > other
>> > things, I'd suggest rethinking the design/checking you're doing.
>> >
>> > --
>> > -Dan Joseph
>> >
>> > www.canishosting.com - Plans start @ $1.99/month.
>> >
>> > "Build a man a fire, and he will be warm for the rest of the day.
>> > Light a man on fire, and will be warm for the rest of his life."
>>
> --
> http://www.interjinn.com
> Application and Templating Framework for PHP
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

If code is getting injected into our apps we're screwed.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Google Chrome

2008-09-02 Thread Douglas Temple
Once.

'Nuff said.


Re: [PHP] Secure way to handle pw on session.

2008-09-02 Thread Robert Cummings
On Tue, 2008-09-02 at 16:10 -0400, Eric Butera wrote:
> On Tue, Sep 2, 2008 at 4:06 PM, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > On Tue, 2008-09-02 at 12:58 -0700, mike wrote:
> >> As an additional note suhosin can transparently encrypt and decrypt
> >> your session data for reasons just like the /tmp issue. It happens
> >> without you needing to configure anything (except to enable or disable
> >> it) I think it is enabled by default.
> >
> > This won't help since the OP mentioned he was worried about code
> > injection exposing the contents of $_SESSION and presumably suhosin
> > doesn't prevent restoration of the session on page load.
> >
> > Cheers,
> > Rob.
> >
> >
> >
> >> On Sep 2, 2008, at 12:35 PM, "Dan Joseph" <[EMAIL PROTECTED]> wrote:
> >>
> >> > On Tue, Sep 2, 2008 at 3:27 PM, k bah <[EMAIL PROTECTED]> wrote:
> >> >
> >> >>
> >> >> Hi,
> >> >>
> >> >> I noticed session files are kept on /tmp for a while, and even if
> >> >> they
> >> >> were immediately deleted, well, someone could use one of my php
> >> >> scripts to
> >> >> inject code and read them, since they belong to the httpd user.
> >> >> What's the best way to receive passwords thru a form and store them
> >> >> in the
> >> >> $_SESSION while I process other information to decide whether or
> >> >> not that
> >> >> user is able to proceed and login (check to see if user is also
> >> >> allowed to
> >> >> use that service, not just validate user/pw)? I use https, always,
> >> >> no plain
> >> >> http is used.
> >> >>
> >> >> Thanks
> >> >>
> >> >> =
> >> >>
> >> >>
> >> >> --
> >> >> Powered by Outblaze
> >> >>
> >> >> --
> >> >> PHP General Mailing List (http://www.php.net/)
> >> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >> >>
> >> >>
> >> > I personally would recommend you never store passwords in $_SESSION.
> >> >
> >> > I don't know how your auth code works, but the way I've always done
> >> > it would
> >> > be to process everything when you his submit, with the password
> >> > being in
> >> > $_POST or $_GET, then after you authenticate the user, drop it and
> >> > don't
> >> > store it with sessions.  If you find you need it to be stored for
> >> > other
> >> > things, I'd suggest rethinking the design/checking you're doing.
> >> >
> >> > --
> >> > -Dan Joseph
> >> >
> >> > www.canishosting.com - Plans start @ $1.99/month.
> >> >
> >> > "Build a man a fire, and he will be warm for the rest of the day.
> >> > Light a man on fire, and will be warm for the rest of his life."
> >>
> > --
> > http://www.interjinn.com
> > Application and Templating Framework for PHP
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> 
> If code is getting injected into our apps we're screwed.

Too true *lol*. The database is probably exposed at that point.
Although, if you can see passwords in plaintext, your system is
compromised beyond any fixes you may introduce.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Google Chrome

2008-09-02 Thread Robert Cummings
On Tue, 2008-09-02 at 21:10 +0100, Douglas Temple wrote:
> Once.

.. twice, three times a lady??

> 'Nuff said.

Sorry, not enuff for me... not sure how it applies to the thread.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Google Chrome

2008-09-02 Thread Eric Butera
On Tue, Sep 2, 2008 at 4:10 PM, Douglas Temple <[EMAIL PROTECTED]> wrote:
> Once.
>
> 'Nuff said.
>

I used to hate it.  After using it for a while though I noticed that
it rendered pages faster than all the other browsers I use.  Too bad
the developer console isn't as nice as firebug though. :)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



  1   2   >