Re: [PHP] the Y2K38 BUG

2008-05-07 Thread Paul Scott

On Wed, 2008-05-07 at 00:54 -0600, Nathan Nobbe wrote:

> looks like mine only goes to dec. 31,  =/
> 

*Gasp!* best you get cracking on finding an alternative solution!

--Paul

All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm 

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

RE: [PHP] the Y2K38 BUG

2008-05-07 Thread Chris Haensel
-Original Message-
From: Paul Scott [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 07, 2008 9:12 AM
To: Nathan Nobbe
Cc: Kalle Sommer Nielsen; Jon L.; Chetan Rane; php-general@lists.php.net
Subject: Re: [PHP] the Y2K38 BUG


On Wed, 2008-05-07 at 00:54 -0600, Nathan Nobbe wrote:

> looks like mine only goes to dec. 31,  =/
> 

*Gasp!* best you get cracking on finding an alternative solution!

--Paul

I'm building my apps for my
grand-grand-grand-grand-grand-grand-grand-grand-grand-grand-grand-grand-gran
d-grand-grand-grand-grand-grand-grand-grand-grand-grand-grand-grand-grand-gr
and-grand-grand- children, so I better get on this :op

-- Chris


http://www.burning-turf.com http://www.phpstop.com

There is much pleasure to be gained from useless knowledge.
Bertrand Rusell


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



[PHP] Re: PHP Web Apps & OpenID

2008-05-07 Thread Colin Guthrie

Joe Harman wrote:

I am curious here if any of you are considering or already using
OpenID or Windows CardSpace? Does anyone see this being a big deal???
from a users stand point it seems like a big hassle to get started
with it and I'm not sure if it would scare people away or not? any
thoughts

I've been looking at some PHP scripts out there for OpenID... does
anyone have one to recommend???


With a bit of an upcoming rewrite of some of our user handling code, I 
fully intend to support OpenID. I really like the idea and want to 
promote it as much as possible.


Col


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



[PHP] AI file and mapping with PHP

2008-05-07 Thread Angelo Zanetti
Hi Guys, 

We have a project where by we have a map in ai format (vector format). What
we want to do is to programmatically come up with a solution that say on the
map there is a restaurant at a certain location, that we can zoom into the
map on that specific area.

I really am not sure where to start. I guess image maps arent going to work
are they?

Should I be using the GD library for manipulating the images and doing
zooming? Also will the ai format be supported?

Please guys, any tips, links or help is appreciated.

TIA

Angelo


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



Re: [PHP] AI file and mapping with PHP

2008-05-07 Thread Aschwin Wesselius

Angelo Zanetti wrote:
Hi Guys, 


We have a project where by we have a map in ai format (vector format). What
we want to do is to programmatically come up with a solution that say on the
map there is a restaurant at a certain location, that we can zoom into the
map on that specific area.

I really am not sure where to start. I guess image maps arent going to work
are they?

Should I be using the GD library for manipulating the images and doing
zooming? Also will the ai format be supported?
  


Hi Angelo,

I can't find anywhere what this is about? Is it a web based solution? Is 
it an desktop application? Is it console based?

--

Aschwin Wesselius

/'What you would like to be done to you, do that to the other'/


RE: [PHP] AI file and mapping with PHP

2008-05-07 Thread Angelo Zanetti
 

 

  _  

From: Aschwin Wesselius [mailto:[EMAIL PROTECTED] 
Sent: 07 May 2008 12:21
To: Angelo Zanetti
Cc: php-general@lists.php.net
Subject: Re: [PHP] AI file and mapping with PHP

 

Angelo Zanetti wrote: 

Hi Guys, 
 
We have a project where by we have a map in ai format (vector format). What
we want to do is to programmatically come up with a solution that say on the
map there is a restaurant at a certain location, that we can zoom into the
map on that specific area.
 
I really am not sure where to start. I guess image maps arent going to work
are they?
 
Should I be using the GD library for manipulating the images and doing
zooming? Also will the ai format be supported?
  


Hi Angelo,

I can't find anywhere what this is about? Is it a web based solution? Is it
an desktop application? Is it console based?

Hi Aschwin, 

 

Yes it will be a web based solution. 

 

Thanks

Angelo

 



Re: [PHP] AI file and mapping with PHP

2008-05-07 Thread Paul Scott

On Wed, 2008-05-07 at 12:17 +0200, Angelo Zanetti wrote:
> We have a project where by we have a map in ai format (vector format). What
> we want to do is to programmatically come up with a solution that say on the
> map there is a restaurant at a certain location, that we can zoom into the
> map on that specific area.
> 

Angelo,

You will need a specialised solution for this, like UMN Mapserver with
PHP/Mapscript. If you need some real, local, help, mail me off list, and
I will see about you guys paying me to do this for you (at SA prices) ;)

Seriously though, you won't get what you want with GD...

--Paul

All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm 

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

[PHP] Problems with mod_vhost_alias and PHP require

2008-05-07 Thread Mário Gamito
Hi,

I have this Apache server with mod_vhost_alias and set /home/pages/%0
as the VirtualDocumentRoot

In /home/pages/gamito.foo.com I have a index.php file. This generates
the http://gamito.foo.com URL.
Also, I have a /home/pages/fckeditor with FCKeditor. *This is not
defined as a subdomain in the DNS*

I need to include in my index.php the file /home/pages/fckeditor/fckeditor.php

I have:

@define('FCKEDITOR_BASE', dirname(__FILE__));
require FCKEDITOR_BASE . '/../fckeditor/fckeditor.php';

But no good, Apache says it can't find the file:

/home/pages/gamito.foo/fckeditor/fckeditor.php

So, there's a "gamito" hanging wrongly in the request.

How can I solve this ?

Any help woud be appreciated.

Warm Regards,
Mário Gamito

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



Re: [PHP] Problems with mod_vhost_alias and PHP require

2008-05-07 Thread Aschwin Wesselius

Mário Gamito wrote:

Hi,

I have this Apache server with mod_vhost_alias and set /home/pages/%0
as the VirtualDocumentRoot

In /home/pages/gamito.foo.com I have a index.php file. This generates
the http://gamito.foo.com URL.
Also, I have a /home/pages/fckeditor with FCKeditor. *This is not
defined as a subdomain in the DNS*

I need to include in my index.php the file /home/pages/fckeditor/fckeditor.php

I have:

@define('FCKEDITOR_BASE', dirname(__FILE__));
require FCKEDITOR_BASE . '/../fckeditor/fckeditor.php';
  

Hi,

Try this '../fckeditor/fckeditor.php'
--

Aschwin Wesselius

/'What you would like to be done to you, do that to the other'/


Re: [PHP] GD - JPEG to PNG with transparency and color

2008-05-07 Thread tedd

At 12:16 PM -0400 5/6/08, Travis L. Font wrote:

Following files:
bg.png - Clear Transparent Image
14416fed5d4f78.jpg - Normal Jpeg Image


The Code:

header('content-type: image/png');

$watermark = imagecreatefromjpeg('14416fed5d4f78.jpg');

$watermark_width = imagesx($watermark);
$watermark_height = imagesy($watermark);

$image = imagecreatetruecolor($watermark_width, $watermark_height);
$image = imagecreatefrompng('bg.png');

$size = getimagesize('bg.png');

$dest_x = $size[0] - $watermark_width - 5;
$dest_y = $size[1] - $watermark_height - 5;

imagecopymerge($image, $watermark, $dest_x, 
$dest_y, 0, 0, $watermark_width, 
$watermark_height, 100);


imagepng($image);

imagedestroy($image);
imagedestroy($watermark);


The Problem:

The code above works fine in sense of syntax! 
bg.png acts as a transparent border for 
14416fed5d4f78.jpg to keep the size of bg.png 
and not the size of 14416fed5d4f78.jpg so it 
doesn't blow up 14416fed5d4f78.jpg. However, the 
image comes out black/white and has lost its 
color!
I looked all over Google and I've found nothing 
so far that's functional to give the new created 
png file the correct colors as the original 
14416fed5d4f78.jpg. I figure that I'm missing 
some small elements to the process of creating 
the pngŠ
Anyone have any ideas, pointers, advice, or 
correct solution to make this possible?


Travis:

Try this:

$original=imagecreatefromjpeg("mydog.jpg");
$watermark=imagecreatefrompng("copyright.png");

$osx=imagesx($original);
$osy=imagesy($original);
$wsx=imagesx($watermark);
$wsy=imagesy($watermark);

imagecopy($original, $watermark, ($osx-$wsx)/2, 
($osy-$wsy)/2, 0, 0, $wsx, $wsy); //center


imagepng($original, "trans.png");

The code works here:

http://webbytedd.com/b/watermark/

Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

Re: [PHP] Where to start!

2008-05-07 Thread tedd

At 1:49 PM -0400 5/6/08, Robert Cummings wrote:

On Tue, 2008-05-06 at 13:42 -0400, tedd wrote:
 > Rob, who I respect greatly, said that 90 percent of what you are

 doing should be decided before you start programming. But, I never
 work that way either.

 I always jump right in and use the computer to design stuff. I never
 resort to making a story-book layout or poster board work-up or
 anything like that. I just don't work that way.


I don't do much of that either unless I want to sort some complex things
out that aren't easy to visualize in my head. When I say 90% of your DB
should be designed before you start writing code... well, I usually
thinking about the create statements (I guess some people might call
those code), not drawing charts :)


Occasionally I scribble down ideas I want to include, but normally I 
just go right to the keyboard and outline what I want to do in the 
comments of the code. I fill in the code later.


In school, my teachers wanted flow-charts with symbols on them -- but 
considering we only had rocks to program with (i.e., one symbol), 
there was not much difference between the flow-chart and the program. 
So, I bypassed the design and went straight to programming. Old 
habits die hard.


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



[PHP] php make fails with Sybase15

2008-05-07 Thread Lorena
Hi,

I am having issues compiling php5.2.3 with Sybase 15. After much
troubleshooting,  I was able to compile it with sybase12.5. But since we are
upgrading our system to Sybase 15. I need php5.2.3 to run with this version
of sybase. During my web search I found out that the library files php
uses/calls are different to the ones in Sybase15.

The article is from the bugs.php.net site:
http://bugs.php.net/bug.php?id=36516

I also followed a few suggestions regarding sybase directly from the php
site i.e.:

http://us.php.net/manual/en/ref.sybase.php

But none of the suggestions in the page above got me any results. If any one
else has any ideas/suggestions as to how to get php working with the new
Sybase/OCS-15_0 library files, it will greatly appreciated.

Thanks.

Lorena.




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



Re: [PHP] AI file and mapping with PHP

2008-05-07 Thread Thijs Lensselink

Quoting Angelo Zanetti <[EMAIL PROTECTED]>:


Hi Guys,

We have a project where by we have a map in ai format (vector format). What
we want to do is to programmatically come up with a solution that say on the
map there is a restaurant at a certain location, that we can zoom into the
map on that specific area.

I really am not sure where to start. I guess image maps arent going to work
are they?

Should I be using the GD library for manipulating the images and doing
zooming? Also will the ai format be supported?

Please guys, any tips, links or help is appreciated.

TIA

Angelo



I think doing something like this with GD is nearly impossible.

But you could import the vector image in flash/flex. Draw an invisible
grid over it to create some sort of long / lat coordinats.

Or maybe just move to the google / yahoo map API's.




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



[PHP] How to determine if file is writable and deletable

2008-05-07 Thread Al
I need to determine if a file is truly deletable by a php script, Deleting permissions seem to be 
the same as writing, they probably have the same criteria.


is_writable() seems to virtually useless in most cases. It doesn't take into account the directory 
ownership/permissions; which, best I can tell, is the real determining factor.


I've resorted to having to determine the directory's ownership and then compare the directory's 
rights with the owner's and then the other ['world'].


E.g., Assume my script was loaded with ftp, so it's ownership is the site-name, and I want the scrip 
to be able to determine if it can delete a file. Thus, the file in question must have its "other" 
permissions include write.


Surely, there must be an easier way.

Thanks, Al

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



Re: [PHP] How to determine if file is writable and deletable

2008-05-07 Thread Aschwin Wesselius

Al wrote:
I need to determine if a file is truly deletable by a php script, 
Deleting permissions seem to be the same as writing, they probably 
have the same criteria.


is_writable() seems to virtually useless in most cases. It doesn't 
take into account the directory ownership/permissions; which, best I 
can tell, is the real determining factor.


I've resorted to having to determine the directory's ownership and 
then compare the directory's rights with the owner's and then the 
other ['world'].


E.g., Assume my script was loaded with ftp, so it's ownership is the 
site-name, and I want the scrip to be able to determine if it can 
delete a file. Thus, the file in question must have its "other" 
permissions include write.


Surely, there must be an easier way.

Thanks, Al


Hi,

Maybe this is what you need:

http://nl.php.net/manual/en/function.fileperms.php
--

Aschwin Wesselius

/'What you would like to be done to you, do that to the other'/


Re: [PHP] the Y2K38 BUG

2008-05-07 Thread Nathan Nobbe
On Wed, May 7, 2008 at 1:11 AM, Paul Scott <[EMAIL PROTECTED]> wrote:

>
> On Wed, 2008-05-07 at 00:54 -0600, Nathan Nobbe wrote:
>
> > looks like mine only goes to dec. 31,  =/
> >
>
> *Gasp!* best you get cracking on finding an alternative solution!


yes, me and the rest of the immortal gang are all quite worried :O

-nathan


Re: [PHP] How to determine if file is writable and deletable

2008-05-07 Thread Al
You are missing the point of my question. I don't have a problem reading the permissions. They do 
not solely determine whether a file can be deleted.


Aschwin Wesselius wrote:

Al wrote:
I need to determine if a file is truly deletable by a php script, 
Deleting permissions seem to be the same as writing, they probably 
have the same criteria.


is_writable() seems to virtually useless in most cases. It doesn't 
take into account the directory ownership/permissions; which, best I 
can tell, is the real determining factor.


I've resorted to having to determine the directory's ownership and 
then compare the directory's rights with the owner's and then the 
other ['world'].


E.g., Assume my script was loaded with ftp, so it's ownership is the 
site-name, and I want the scrip to be able to determine if it can 
delete a file. Thus, the file in question must have its "other" 
permissions include write.


Surely, there must be an easier way.

Thanks, Al


Hi,

Maybe this is what you need:

http://nl.php.net/manual/en/function.fileperms.php


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



[PHP] $_SESSION v. Cookies

2008-05-07 Thread Scott Campbell
Dear PHP List,

PHP 5, Apache2, MySQL 5, running on Ubuntu, viewing & deving with
FireFox and Konqueror (Linux).

I am building a site with multiple tools and want to pass variables
throughout them all.  Before, I was passing variables using  HTML
Form tags, but the site has grown too large for this tactic, so I went to
using $_SESSION.  However, when I started using $_SESSION, my site loads 3-5
times slower then before.  A page that queried MySQL and built itself in 3-5
seconds was now taking 15-20.  While more has changed then just $_SESSION,
it is really the only significant difference.

Is $_SESSION slowing down my site?  Is there a faster alternative to
global variables then using $_SESSION?  Are using regular cookies faster?

Any help is appreciated.

Thanks,
  Scott

-- 
Scott Campbell
"If you do what you've always done, you'll get what you've always gotten."

"Courage is resistance to fear .. not absence of fear."


Re: [PHP] $_SESSION v. Cookies

2008-05-07 Thread Robert Cummings

On Wed, 2008-05-07 at 12:27 -0400, Scott Campbell wrote:
> Dear PHP List,
> 
> PHP 5, Apache2, MySQL 5, running on Ubuntu, viewing & deving with
> FireFox and Konqueror (Linux).
> 
> I am building a site with multiple tools and want to pass variables
> throughout them all.  Before, I was passing variables using  HTML
> Form tags, but the site has grown too large for this tactic, so I went to
> using $_SESSION.  However, when I started using $_SESSION, my site loads 3-5
> times slower then before.  A page that queried MySQL and built itself in 3-5
> seconds was now taking 15-20.  While more has changed then just $_SESSION,
> it is really the only significant difference.
> 
> Is $_SESSION slowing down my site?  Is there a faster alternative to
> global variables then using $_SESSION?  Are using regular cookies faster?
> 
> Any help is appreciated.

How are your sessions implemented? Are you using the stock PHP session
functionality or did you cook your own solution? I can't see the stock
PHP solution adding anything more than a split second to your page time.
The exception being when it performs cleanup. Cleanup should be
relegated to a cron job. Have you added anything new to the database?
new query perhaps on a large table that doesn't make use of indexes?
Small changes can have a bigger impact than large changes depending on
what exactly changed.

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] How to determine if file is writable and deletable

2008-05-07 Thread robinv
On 07/05/2008, Al <[EMAIL PROTECTED]> wrote:
> I need to determine if a file is truly deletable by a php script, Deleting
> permissions seem to be
> the same as writing, they probably have the same criteria.

You're not writing to the file, you're unlinking it from the
containing directory, so it's the directory's permissions that matter,
not the file's.

All you really need to do is check that the directory is_writable()

is_writable(dirname($filename));

-robin

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



RES: [PHP] How to determine if file is writable and deletable

2008-05-07 Thread Thiago Pojda
If it's not, what else can? I got curious.


Regards,
Thiago Henrique Pojda

-Mensagem original-
De: Al [mailto:[EMAIL PROTECTED] 
Enviada em: quarta-feira, 7 de maio de 2008 12:25
Para: php-general@lists.php.net
Assunto: Re: [PHP] How to determine if file is writable and deletable

You are missing the point of my question. I don't have a problem reading the
permissions. They do 
not solely determine whether a file can be deleted.

Aschwin Wesselius wrote:
> Al wrote:
>> I need to determine if a file is truly deletable by a php script, 
>> Deleting permissions seem to be the same as writing, they probably 
>> have the same criteria.
>>
>> is_writable() seems to virtually useless in most cases. It doesn't 
>> take into account the directory ownership/permissions; which, best I 
>> can tell, is the real determining factor.
>>
>> I've resorted to having to determine the directory's ownership and 
>> then compare the directory's rights with the owner's and then the 
>> other ['world'].
>>
>> E.g., Assume my script was loaded with ftp, so it's ownership is the 
>> site-name, and I want the scrip to be able to determine if it can 
>> delete a file. Thus, the file in question must have its "other" 
>> permissions include write.
>>
>> Surely, there must be an easier way.
>>
>> Thanks, Al
>>
> Hi,
> 
> Maybe this is what you need:
> 
> http://nl.php.net/manual/en/function.fileperms.php

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





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



Re: [PHP] the Y2K38 BUG

2008-05-07 Thread Daniel Brown
On Wed, May 7, 2008 at 11:34 AM, Nathan Nobbe <[EMAIL PROTECTED]> wrote:
>
> On Wed, May 7, 2008 at 1:11 AM, Paul Scott <[EMAIL PROTECTED]> wrote:
>
>  >
>  > On Wed, 2008-05-07 at 00:54 -0600, Nathan Nobbe wrote:
>  >
>  > > looks like mine only goes to dec. 31,  =/
>  > >
>  >
>  > *Gasp!* best you get cracking on finding an alternative solution!
>
>
>  yes, me and the rest of the immortal gang are all quite worried :O

It matters nil.  We're all dead anyway.  There's indisputable
evidence that "Crisis 38", as I've dubbed it, will be man's doom.

http://isawit.com/y2k38.php

-- 

Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just
$59.99/mo. with no contract!
Dedicated servers, VPS, and hosting from $2.50/mo.

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



Re: [PHP] $_SESSION v. Cookies

2008-05-07 Thread Wolf

 Scott Campbell <[EMAIL PROTECTED]> wrote: 
> Dear PHP List,
> 
> PHP 5, Apache2, MySQL 5, running on Ubuntu, viewing & deving with
> FireFox and Konqueror (Linux).
> 
> I am building a site with multiple tools and want to pass variables
> throughout them all.  Before, I was passing variables using  HTML
> Form tags, but the site has grown too large for this tactic, so I went to
> using $_SESSION.  However, when I started using $_SESSION, my site loads 3-5
> times slower then before.  A page that queried MySQL and built itself in 3-5
> seconds was now taking 15-20.  While more has changed then just $_SESSION,
> it is really the only significant difference.
> 
> Is $_SESSION slowing down my site?  Is there a faster alternative to
> global variables then using $_SESSION?  Are using regular cookies faster?
> 
> Any help is appreciated.
> 
> Thanks,
>   Scott

Did you add any includes and are they include or include_once or require VS. 
require_once?

I found stress tests that show that an include is faster then an include_once 
and so removing the _once from includes and requires will speed up your site.

HTH,
Wolf

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



Re: [PHP] Re: Re[PHP] gex to catch s

2008-05-07 Thread Ryan S


 
Hey,


$tag_regex=array(
  '/\(.*?)\<\/p\> /si' => "$1",
  '/\<(\s*)(*.?)class\=(*.?)\>(.*?)\<\/(*.?)\>/si' => "$3"
);

$paragraphs=preg_replace(array_keys($tag_regex),array_values($tag_regex),$page);

I am not sure what tag is that you mean on , but in this
RE .. it should capture any  tags (the first element of the array) and
any tags (the second element of the array) that has attribute class on it. 
 

Thanks for replying!
Sorry, a bit of a typo there, i meant 

I ran your regex but got this warning:
Warning:  preg_replace() [function.preg-replace]: Compilation failed: nothing 
to repeat at offset 8 in C:\xampp2\htdocs\ezee\tests\para_regex.php on line 25


I think I ran it wrong, because although i have passed $page i dont know where 
to pass the replacement texts...

Can you give me an example on how to run this or an explanation?

Thanks!
R



  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

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



Re: [PHP] Re: PHP Web Apps & OpenID

2008-05-07 Thread Joe Harman
Yeah, after reading some about it yesterday and using it on some
sites, I like that it sort of simplifies some things for the end
user... it really fits sites like social networking stuff well.. I am
considering using this for our ecommerce site, it only becomes useful
though for repeat visitors though... which is what I want to make it
easy& convienent for those repeat customers

thanks for your input guys
Joe

On Wed, May 7, 2008 at 4:04 AM, Colin Guthrie <[EMAIL PROTECTED]> wrote:
>
> Joe Harman wrote:
>
> > I am curious here if any of you are considering or already using
> > OpenID or Windows CardSpace? Does anyone see this being a big deal???
> > from a users stand point it seems like a big hassle to get started
> > with it and I'm not sure if it would scare people away or not? any
> > thoughts
> >
> > I've been looking at some PHP scripts out there for OpenID... does
> > anyone have one to recommend???
> >
>
>  With a bit of an upcoming rewrite of some of our user handling code, I
> fully intend to support OpenID. I really like the idea and want to promote
> it as much as possible.
>
>  Col
>
>
>  --
>  PHP General Mailing List (http://www.php.net/)
>  To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
Joe Harman

SCP Performance Parts Warehouse
3475 High Ridge Blvd
High Ridge, MO 63049
Office : (636) 677-1320
Cell : (269) 277-0717

http://www.scpracingparts.com

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



Re: [PHP] Regex to catch s (weird result)

2008-05-07 Thread Ryan S



preg_match_all('|]*>(.*)|Ui', $myText, $myArray);


Hey!

Thanks for replying.

Your preg_match_all works like a charm, but for some reason catches only 8 out 
of 9 paragraphs... its really weird. I have upped the test page to 
http://www.ezee.se/tests/para_regex2.php.txt  so you can have a look at it... 
didnt want to post such a lot of text to the list.

Thanks again,
R


  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

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



Re: [PHP] Regex to catch s (weird result)

2008-05-07 Thread Shawn McKenzie

Ryan S wrote:




preg_match_all('|]*>(.*)|Ui', $myText, $myArray);


Hey!

Thanks for replying.

Your preg_match_all works like a charm, but for some reason catches only 8 out 
of 9 paragraphs... its really weird. I have upped the test page to 
http://www.ezee.se/tests/para_regex2.php.txt  so you can have a look at it... 
didnt want to post such a lot of text to the list.

Thanks again,
R


  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


Yep, sorry...  Just add the s

preg_match_all('|]*>(.*)|Uis', $myText, $myArray);

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



[PHP] ldap_search results limited

2008-05-07 Thread mburtch

I am running into a problem with my queries returning a limited number of
result entries. The LDAP server is Kerio Mail Server, and I am verified that
the SIZELIMIT in the server's configuration is 0 (no limit). For some
reason, my server seems to be limited to 200 results if no limit is
specified in ldap_search(), or 201 (?!) if I specify a limit larger than
200.

// setting the protocol version
ldap_set_option($conn, LDAP_OPT_PROTOCOL_VERSION, 3); // returns TRUE

// getting & settings SIZELIMIT options
ldap_get_option($conn, LDAP_OPT_SIZELIMIT, $optVal); // returns 0
ldap_set_option($conn, LDAP_OPT_SIZELIMIT, 1000); // returns TRUE

// some example queries
$res = ldap_search($conn, "", "cn=*", $attrs, false, 0); // 200 results
$res = ldap_search($conn, "", "cn=*", $attrs, false, 1000); // 201 results
$res = ldap_search($conn, "", "cn=*", $attrs, false, 199); // 199 results

I am using MAMP with PHP 5.2.5. Any ideas?

- MB
-- 
View this message in context: 
http://www.nabble.com/ldap_search-results-limited-tp17112001p17112001.html
Sent from the PHP - General mailing list archive at Nabble.com.


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



Re: [PHP] Regex to catch s (weird result)

2008-05-07 Thread Ryan S

> http://www.ezee.se/tests/para_regex2.php.txt  

Yep, sorry...  Just add the s

preg_match_all('|]*>(.*)|Uis', $myText, $myArray);



Swett! It works!
If you _do get time_, would love to know the actual meaning of 
|]*>(.*)|Uis
because although I do appreciate the help and the code, am learning to work a 
bit with regex
and this is still quite advanced for me.
So far I have gotten (correct me if I am wrong)
|]*> = 1) Starts with " 
3) end with ">"
(.*)| = 1) can have whatever inbetween till the end which is ""

Have no idea of the Uis switches...

Thanks again,
R



  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

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



Re: [PHP] ldap_search results limited

2008-05-07 Thread Nathan Nobbe
On Wed, May 7, 2008 at 12:50 PM, mburtch <[EMAIL PROTECTED]> wrote:

>
> I am running into a problem with my queries returning a limited number of
> result entries. The LDAP server is Kerio Mail Server, and I am verified
> that
> the SIZELIMIT in the server's configuration is 0 (no limit). For some
> reason, my server seems to be limited to 200 results if no limit is
> specified in ldap_search(), or 201 (?!) if I specify a limit larger than
> 200.
>
> // setting the protocol version
> ldap_set_option($conn, LDAP_OPT_PROTOCOL_VERSION, 3); // returns TRUE
>
> // getting & settings SIZELIMIT options
> ldap_get_option($conn, LDAP_OPT_SIZELIMIT, $optVal); // returns 0
> ldap_set_option($conn, LDAP_OPT_SIZELIMIT, 1000); // returns TRUE
>
> // some example queries
> $res = ldap_search($conn, "", "cn=*", $attrs, false, 0); // 200 results
> $res = ldap_search($conn, "", "cn=*", $attrs, false, 1000); // 201 results
> $res = ldap_search($conn, "", "cn=*", $attrs, false, 199); // 199 results
>
> I am using MAMP with PHP 5.2.5. Any ideas?


hard to say if its a php issue..  have you tried using phpLdapAdmin ?  i
usually set that up on my ldap installs; kindofa nice failsafe.

-nathan


RE: [PHP] ldap_search results limited

2008-05-07 Thread Jay Blanchard
[snip]
> I am running into a problem with my queries returning a limited number
of
> result entries. 
[/snip]

Most LDAP servers set a limit, it is usually not a PHP problem. One way
to solve is to query by first letter of last name and throw into an
array (iterating through the alphabet).

function ldapUserList($username, $password, $ip="127.0.0.1"){

$arrLetters = array("A", "B", "C", "D", "E", "F", "G", "H", "I",
"J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W",
"X", "Y", "Z");

/* connect to AD server */
if(!$ds=ldap_connect($ip)){
echo "did not connect...please contact system
administrator or go back to try again";
}

/* set LDAP option */
$un = "domain\\".$username;
$upw = $password;
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
ldap_set_option($ds, LDAP_OPT_REFERRALS, 0);
ldap_set_option($ds, LDAP_OPT_SIZELIMIT, 0);

/* bind to AD server */
if(!$r=ldap_bind($ds, $un, $upw)){
echo 'You are not authorized and or, your login information
was incorrect';
echo $un.": ".$upw."\n";
} else {
$userArray = array();
foreach($arrLetters as $letter){

/*
 * search AD for users with surnames (sn), valid
e-mail addresses (mail)
 * and make sure that they are valid
(msExchHideFromAddessLists)
 */

$sr= @ldap_search($ds, "dc=domain, dc=local",
"(&(&(sn=".$letter."*)([EMAIL PROTECTED]))(!(msExchHideFromAddressLists=
TRUE)))");
$info = ldap_get_entries($ds, $sr);
if(0 != count($info)){
/* place all valid entries into a usable
array */
for ($i=0; $i$tusername, "fullname"=>$fullname,
"readname"=>$readname);
array_push($userArray,
$tempArray);
}
}
}
}   
}
/* sort the user array alphabetically and re-align numeric key
*/

array_multisort($userArray[1], SORT_ASC, SORT_STRING);
return $userArray;
}



$userArray = ldapUserList($_SESSION['user'], $_SESSION['password'],
"127.0.0.1");

Sorry about the funky line breaks

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



Re: [PHP] Regex to catch s (weird result)

2008-05-07 Thread Jon L.
Pretty close.

The only thing I'd suggest is a different way of wording step 2:
Can contain anything but '>' until step 3.

As for the switches/modifiers (Uis), check out:
http://us.php.net/manual/en/reference.pcre.pattern.modifiers.php

U = ungreedy
i = case-insensitive (|p| matches 'p' and/or 'P')
s = treat as single line

- Jon L.

On Wed, May 7, 2008 at 1:51 PM, Ryan S <[EMAIL PROTECTED]> wrote:

> 
> > http://www.ezee.se/tests/para_regex2.php.txt
>
> Yep, sorry...  Just add the s
>
> preg_match_all('|]*>(.*)|Uis', $myText, $myArray);
>
> 
>
> Swett! It works!
> If you _do get time_, would love to know the actual meaning of
> |]*>(.*)|Uis
> because although I do appreciate the help and the code, am learning to
> work a bit with regex
> and this is still quite advanced for me.
> So far I have gotten (correct me if I am wrong)
> |]*> = 1) Starts with " next > 3) end with ">"
> (.*)| = 1) can have whatever inbetween till the end which is ""
>
> Have no idea of the Uis switches...
>
> Thanks again,
> R
>
>
>
>
>  
> 
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile.  Try it now.
> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


[PHP] php 5.2.6 make failure

2008-05-07 Thread Steven Perez
I am having a problem that I cannot seem to get through.  Unfortunately, 
I was given the task of getting a working php binary for a modified 
redhat 7.2 box (I know I know).  I got through the configure phase but I 
cannot seem to complete the make process.  The following is what I get 
as an error:


ext/openssl/openssl.o: In function `zif_openssl_sign':
/home/sperez/php-5.2.6/ext/openssl/openssl.c:3525: undefined reference 
to `EVP_MD_CTX_cleanup'

ext/openssl/openssl.o: In function `zif_openssl_verify':
/home/sperez/php-5.2.6/ext/openssl/openssl.c:3565: undefined reference 
to `EVP_MD_CTX_cleanup'

collect2: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 1


The version of openssl I am using is the following:

# ./openssl version
OpenSSL 0.9.6l 04 Nov 2003


My config statement is the following:

../configure --with-mysql=/usr/local/mysql --enable-sysvshm=yes 
--enable-sysvsem=yes --enable-debug=no --enable-safe-mode=yes 
--enable-track-vars=yes --enable-force-cgi-redirect=yes 
--enable-url-fopen-wrapper=yes --with-ttf=/usr/local 
--with-png-dir=/usr/local --with-zlib-dir=/usr/local 
--with-jpeg-dir=/usr/local --with-mhash=/usr/local 
--with-mcrypt=/usr/local --with-gdbm=/usr/local --enable-ftp 
--with-tiff-dir=/usr/local --with-curl=/usr/local --enable-memory-limit 
--enable-mbstring --with-expat-dir=/usr/local --enable-sockets 
--enable-wddx --with-mcal=/usr/local/mcal --with-freetype-dir=/usr/local 
--enable-bcmath --with-xsl=/usr/local --enable-mbstr-enc-trans 
--enable-mbregex --with-xsl=/usr/local --enable-exif --with-gd2 
--enable-gd-native-ttf --enable-gd-imgstrttf --prefix=/usr/local/php5 
--with-pear=/usr/local/php5/share/pear --enable-calendar 
--with-dom=/usr/local --with-openssl=/usr/local/ssl 
--with-zip=/usr/local --with-pdflib=/usr/local --with-iconv=/usr/local 
--with-imap=/usr/local/imap-2007a --with-pspell=/usr/local --enable-soap 
--with-gettext=/usr/local --with-mssql=/usr/local 
--with-imap-ssl=/usr/local/imap-2007a 2>&1 | tee configure.out



I updated to the latest imap, curl,  etc. based on what I have been 
reading online.  I have no idea what to do at this time. 

I do recall someone mentioning about php not working correctly with a 
specific openssl version.   Can someone point me to the right direction 
as I am out of ideas.





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



Re: [PHP] $_SESSION v. Cookies

2008-05-07 Thread tedd

At 12:34 PM -0400 5/7/08, Robert Cummings wrote:


The exception being when it performs cleanup. Cleanup should be
relegated to a cron job.


Rob:

What clean-up?

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



Re: [PHP] How to determine if file is writable and deletable

2008-05-07 Thread tedd

At 11:16 AM -0400 5/7/08, Al wrote:
I need to determine if a file is truly deletable by a php script, 
Deleting permissions seem to be the same as writing, they probably 
have the same criteria.


is_writable() seems to virtually useless in most cases. It doesn't 
take into account the directory ownership/permissions; which, best I 
can tell, is the real determining factor.


I've resorted to having to determine the directory's ownership and 
then compare the directory's rights with the owner's and then the 
other ['world'].


E.g., Assume my script was loaded with ftp, so it's ownership is the 
site-name, and I want the scrip to be able to determine if it can 
delete a file. Thus, the file in question must have its "other" 
permissions include write.


Surely, there must be an easier way.

Thanks, Al



Perhaps touch might help.

http://nl.php.net/manual/en/function.touch.php

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



Re: [PHP] How to determine if file is writable and deletable

2008-05-07 Thread Richard Heyes

Perhaps touch might help.


Touch my ass.

ROFLMAO

(I've been waiting for years to use that one)

--
Richard Heyes

++
| Access SSH with a Windows mapped drive |
|http://www.phpguru.org/sftpdrive|
++

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



Re: [PHP] $_SESSION v. Cookies

2008-05-07 Thread Robert Cummings

On Wed, 2008-05-07 at 16:03 -0400, tedd wrote:
> At 12:34 PM -0400 5/7/08, Robert Cummings wrote:
> >
> >The exception being when it performs cleanup. Cleanup should be
> >relegated to a cron job.
> 
> Rob:
> 
> What clean-up?

All the inactive session files... inactive and garbage collection time
is denoted by the following php.ini settings:

session.gc_probability= 1 ; percentual probability that the 
  ; 'garbage collection' process is
  ; started
  ; on every session initialization
session.gc_maxlifetime= 1440  ; after this number of seconds,
  ; stored data will be seen as
  ; 'garbage' and cleaned up by the
  ; gc process

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] $_SESSION v. Cookies

2008-05-07 Thread Nathan Nobbe
On Wed, May 7, 2008 at 2:22 PM, Robert Cummings <[EMAIL PROTECTED]>
wrote:

>
> On Wed, 2008-05-07 at 16:03 -0400, tedd wrote:
> > At 12:34 PM -0400 5/7/08, Robert Cummings wrote:
> > >
> > >The exception being when it performs cleanup. Cleanup should be
> > >relegated to a cron job.
> >
> > Rob:
> >
> > What clean-up?
>
> All the inactive session files... inactive and garbage collection time
> is denoted by the following php.ini settings:
>
> session.gc_probability= 1 ; percentual probability that the
>  ; 'garbage collection' process is
>  ; started
>  ; on every session initialization
> session.gc_maxlifetime= 1440  ; after this number of seconds,
>  ; stored data will be seen as
>  ; 'garbage' and cleaned up by the
>  ; gc process


so where is the setting, using the stock session handler, to relegate the gc
process to a cron job ?

-nathan


Re: [PHP] ldap_search results limited

2008-05-07 Thread Matt Burtch
Thanks for the tips. phpLDAPAdmin was hanging while trying to authenticate,
but I'll give it a try again later.

Nathan: splitting up the search; I hadn't considered this! It is working
nicely for the time being, thanks.

- MB

On Wed, May 7, 2008 at 3:23 PM, Jay Blanchard <[EMAIL PROTECTED]> wrote:

> [snip]
> > I am running into a problem with my queries returning a limited number
> of
> > result entries.
> [/snip]
>
> Most LDAP servers set a limit, it is usually not a PHP problem. One way
> to solve is to query by first letter of last name and throw into an
> array (iterating through the alphabet).
>
> function ldapUserList($username, $password, $ip="127.0.0.1"){
>
>$arrLetters = array("A", "B", "C", "D", "E", "F", "G", "H", "I",
> "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W",
> "X", "Y", "Z");
>
>/* connect to AD server */
>if(!$ds=ldap_connect($ip)){
>echo "did not connect...please contact system
> administrator or go back to try again";
>}
>
>/* set LDAP option */
>$un = "domain\\".$username;
>$upw = $password;
>ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
>ldap_set_option($ds, LDAP_OPT_REFERRALS, 0);
>ldap_set_option($ds, LDAP_OPT_SIZELIMIT, 0);
>
>/* bind to AD server */
>if(!$r=ldap_bind($ds, $un, $upw)){
>echo 'You are not authorized and or, your login information
> was incorrect';
>echo $un.": ".$upw."\n";
>} else {
>$userArray = array();
>foreach($arrLetters as $letter){
>
>/*
> * search AD for users with surnames (sn), valid
> e-mail addresses (mail)
> * and make sure that they are valid
> (msExchHideFromAddessLists)
> */
>
>$sr= @ldap_search($ds, "dc=domain, dc=local",
> "(&(&(sn=".$letter."*)([EMAIL PROTECTED]))(!(msExchHideFromAddressLists=
> TRUE)))");
>$info = ldap_get_entries($ds, $sr);
>if(0 != count($info)){
>/* place all valid entries into a usable
> array */
>for ($i=0; $i/* make sure the item being
> pushed into the array is not empty */
>if('' !=
> $info[$i]["mailnickname"][0]){
>//array_push($userArray,
> $info[$i]["mailnickname"][0] . "+".$info[$i]["cn"][0] .
> "+".$info[$i]["mail"][0]);
>$fullname =
> $info[$i]["cn"][0];
>$arrFN = explode("
> ",$fullname);
>$fullname = $arrFN[1].",
> ".$arrFN[0];
>$readname = $arrFN[0]."
> ".$arrFN[1];
>$tusername =
> strtolower($info[$i]["samaccountname"][0]);
>$tempArray =
> array("username"=>$tusername, "fullname"=>$fullname,
> "readname"=>$readname);
>array_push($userArray,
> $tempArray);
>}
>}
>}
>}
>}
>/* sort the user array alphabetically and re-align numeric key
> */
>
>array_multisort($userArray[1], SORT_ASC, SORT_STRING);
>return $userArray;
> }
>
>
>
> $userArray = ldapUserList($_SESSION['user'], $_SESSION['password'],
> "127.0.0.1");
>
> Sorry about the funky line breaks
>


Re: [PHP] ldap_search results limited

2008-05-07 Thread Nathan Nobbe
On Wed, May 7, 2008 at 2:26 PM, Matt Burtch <[EMAIL PROTECTED]> wrote:

> Thanks for the tips. phpLDAPAdmin was hanging while trying to
> authenticate, but I'll give it a try again later.
>
> Nathan: splitting up the search; I hadn't considered this! It is working
> nicely for the time being, thanks.


umm, that was jay who gave the tip, but ... youre welcome! :)

-nathan


Re: [PHP] $_SESSION v. Cookies

2008-05-07 Thread tedd

At 4:22 PM -0400 5/7/08, Robert Cummings wrote:

On Wed, 2008-05-07 at 16:03 -0400, tedd wrote:

 At 12:34 PM -0400 5/7/08, Robert Cummings wrote:
 >
 >The exception being when it performs cleanup. Cleanup should be
 >relegated to a cron job.

 Rob:

 What clean-up?


All the inactive session files... inactive and garbage collection time
is denoted by the following php.ini settings:

session.gc_probability= 1 ; percentual probability that the
  ; 'garbage collection' process is
  ; started
  ; on every session initialization
session.gc_maxlifetime= 1440  ; after this number of seconds,
  ; stored data will be seen as
  ; 'garbage' and cleaned up by the
  ; gc process

Cheers,
Rob.


Oh, Okay. That's an automatic practice taken from the php.ini 
settings. I was thinking that maybe one was supposed to do something 
after using sessions.


Thanks,

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



Re: [PHP] $_SESSION v. Cookies

2008-05-07 Thread Robert Cummings

On Wed, 2008-05-07 at 14:29 -0600, Nathan Nobbe wrote:
> On Wed, May 7, 2008 at 2:22 PM, Robert Cummings <[EMAIL PROTECTED]>
> wrote:
> 
> On Wed, 2008-05-07 at 16:03 -0400, tedd wrote:
> > At 12:34 PM -0400 5/7/08, Robert Cummings wrote:
> > >
> > >The exception being when it performs cleanup. Cleanup
> should be
> > >relegated to a cron job.
> >
> > Rob:
> >
> > What clean-up?
> 
> 
> All the inactive session files... inactive and garbage
> collection time
> is denoted by the following php.ini settings:
> 
> session.gc_probability= 1 ; percentual probability
> that the
>  ; 'garbage collection'
> process is
>  ; started
>  ; on every session
> initialization
> session.gc_maxlifetime= 1440  ; after this number of
> seconds,
>  ; stored data will be seen as
>  ; 'garbage' and cleaned up by
> the
>  ; gc process
> 
> so where is the setting, using the stock session handler, to relegate
> the gc process to a cron job ?

session.gc_probability = 0

Then do it yourself in a script called by cron.

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] How to determine if file is writable and deletable

2008-05-07 Thread tedd

At 9:18 PM +0100 5/7/08, Richard Heyes wrote:

Perhaps touch might help.


Touch my ass.

ROFLMAO

(I've been waiting for years to use that one)



It won't work?

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



Re: [PHP] How to determine if file is writable and deletable

2008-05-07 Thread Richard Heyes

It won't work?


No idea, it was just a rather poor play on words.

--
Richard Heyes

++
| Access SSH with a Windows mapped drive |
|http://www.phpguru.org/sftpdrive|
++

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



Re: [PHP] $_SESSION v. Cookies

2008-05-07 Thread Nathan Nobbe
On Wed, May 7, 2008 at 2:35 PM, Robert Cummings <[EMAIL PROTECTED]>
wrote:

>
> On Wed, 2008-05-07 at 14:29 -0600, Nathan Nobbe wrote:
> > On Wed, May 7, 2008 at 2:22 PM, Robert Cummings <[EMAIL PROTECTED]>
> > wrote:
> >
> > On Wed, 2008-05-07 at 16:03 -0400, tedd wrote:
> > > At 12:34 PM -0400 5/7/08, Robert Cummings wrote:
> > > >
> > > >The exception being when it performs cleanup. Cleanup
> > should be
> > > >relegated to a cron job.
> > >
> > > Rob:
> > >
> > > What clean-up?
> >
> >
> > All the inactive session files... inactive and garbage
> > collection time
> > is denoted by the following php.ini settings:
> >
> > session.gc_probability= 1 ; percentual probability
> > that the
> >  ; 'garbage collection'
> > process is
> >  ; started
> >  ; on every session
> > initialization
> > session.gc_maxlifetime= 1440  ; after this number of
> > seconds,
> >  ; stored data will be seen as
> >  ; 'garbage' and cleaned up by
> > the
> >  ; gc process
> >
> > so where is the setting, using the stock session handler, to relegate
> > the gc process to a cron job ?
>
> session.gc_probability = 0
>

but wont it still try to run sometimes since that setting determines whether
or not the gc will run *every* time ?  i would imagine if it was for *any*
time, setting session.gc_probability = 0 would effectively disable the stock
gc.

Then do it yourself in a script called by cron.


it would be nice if you could latch into the one they provide out of the box
and just invoke it via cron..

-nathan


Re: [PHP] Regex to catch s

2008-05-07 Thread Aschwin Wesselius

Ryan S wrote:

Hey!

Thansk for replying!


It is obvious I haven't had my caffeine yet. This is my last try to 
get the pattern straight:


hello
hello
those
hello
hello
this
rose
hello
nose
hello
that
hello
END_OF_HTML;

$tags = array();
$tags[] = 'p';
$tags[] = 'a';

$attr = array();
$attr[] = 'class';
$attr[] = 'href';

$vals = array();
$vals[] = 'blah';
$vals[] = 'url';
$vals[] = 'yo';

$text = array();
$text[] = 'hello';
$text[] = 'this';
$text[] = 'that';

$tags = implode('|', $tags);
$attr = implode('|', $attr);
$vals = implode('|', $vals);
$text = implode('|', $text);

$pattern = 
'/<('.$tags.')[^>]*('.$attr.')?[^>]*('.$vals.')?[^>]*>('.$text.')[^<\/]*<\/\1>/i';


echo $pattern."\n";
echo "\n";

preg_match_all($pattern, $html, $matches);

var_dump($matches);

?>


I dont get why you added this
$tags[] = 'a';

Does that mean I will have to make tags like that for all the html 
tags that i think will be on the page?


Hi,

I said before that the example could be a little bit overkill, but it 
gives a quick example how to find any tag(s) given, with any 
attribute(s) given and with any text given in between the opening and 
closing tag.


And yes, it might be incomplete or maybe not even accurate, but it does 
give you a headstart on your solution. There always will be people who 
will give you a shorter, cleaner, more beautiful example, but I hope 
that it was helpful for you or will be helpful for someone else.


Cheers,

Aschwin Wesselius



[PHP] Redirection

2008-05-07 Thread Ben
Is there a way to take all the variables, no matter what their names and 
values are, from the parameters in a url and POST them to another URL so 
that they don't show up in the address bar?  I've noticed a huge increase in 
my bounce rate since I added some tracking parameters to my urls, but I need 
the tracking parameters so I don't trust a client-side redirect.  Thanks. 



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



Re: [PHP] Redirection

2008-05-07 Thread Kyle Browning

Javascript can help you there.


On May 7, 2008, at 4:55 PM, Ben wrote:

Is there a way to take all the variables, no matter what their names  
and
values are, from the parameters in a url and POST them to another  
URL so
that they don't show up in the address bar?  I've noticed a huge  
increase in
my bounce rate since I added some tracking parameters to my urls,  
but I need
the tracking parameters so I don't trust a client-side redirect.   
Thanks.




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




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



Re: [PHP] Redirection

2008-05-07 Thread TG

I believe you can use cURL to create POST requests.

-TG

- Original Message -
From: "Ben" <[EMAIL PROTECTED]>
To: php-general@lists.php.net
Date: Wed, 7 May 2008 17:55:34 -0600
Subject: [PHP] Redirection

> Is there a way to take all the variables, no matter what their names and 
> values are, from the parameters in a url and POST them to another URL so 
> that they don't show up in the address bar?  I've noticed a huge increase 
in 
> my bounce rate since I added some tracking parameters to my urls, but I 
need 
> the tracking parameters so I don't trust a client-side redirect.  Thanks. 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

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



Re: [PHP] Redirection

2008-05-07 Thread Nathan Nobbe
On Wed, May 7, 2008 at 5:55 PM, Ben <[EMAIL PROTECTED]> wrote:

> Is there a way to take all the variables, no matter what their names and
> values are, from the parameters in a url and POST them to another URL so
> that they don't show up in the address bar?  I've noticed a huge increase
> in
> my bounce rate since I added some tracking parameters to my urls, but I
> need
> the tracking parameters so I don't trust a client-side redirect.  Thanks.


maybe you could use mod_rewrite and remove the tracking vars from the urls ?

-nathan