[PHP] session variables and SVG documents

2010-02-01 Thread Aurelie REYMUND
Hello,

I have the following problem with the Adobe SVG viewer:
I try to generate a SVG document using PHP. the following code is working
well under Firefox, as well as IE with ASV:

?php

header(Content-type: image/svg+xml);

$graph_title = 'title';


print('?xml version=1.0 encoding=iso-8859-1 standalone=no?');
$svgwidth=500;
$svgheight=400;
?

!DOCTYPE svg PUBLIC -//W3C//DTD SVG 1.0//EN 
http://www.w3.org/TR/SVG/DTD/svg10.dtd;
svg width=?php echo $svgwidth; ?px height=?php echo $svgheight; ?px
xmlns=http://www.w3.org/2000/svg;
descThis is a php-random rectangle test/desc
?php
srand((double) microtime() * 100); //initalizing random generator
for ($i = 0; $i  20; $i+=1) {
$x = floor(rand(0,$svgwidth-1)); //avoid getting a range 0..0 for rand
function
$y = floor(rand(0,$svgheight-1));
$width = floor(rand(0,$svgwidth-$x)); //avoid getting rect outside of
viewbox
$height = floor(rand(0,$svgheight-$y));
$red = floor(rand(0,255));
$blue = floor(rand(0,255));
$green = floor(rand(0,255));
$color = rgb(.$red.,.$green.,.$
blue.);
print \trect x=\$x\ y=\$y\ width=\$width\ height=\$height\
style=\fill:$color;\/\n;
}
?
text x=?php echo $svgwidth/2;?px y=300 style=font-size:15;
text-anchor=middleThe servers Date and Time is: ?php print
(strftime(%Y-%m-%d, %H:%M:%S)); ?/text
text x=?php echo $svgwidth/2;?px y=340 style=font-size:15;
text-anchor=middleYou are running:/text
text x=?php echo $svgwidth/2;?px y=360 style=font-size:15;
text-anchor=middle?php print $HTTP_USER_AGENT; ?/text
/svg

If now I want to include the session_start() at the beginning of the code,
in IE I got a pop-up dialog called download file

What am I doing wrong ?

Regards,
Aurelie


Re: [PHP] session variables and SVG documents

2010-02-01 Thread Ashley Sheridan
On Mon, 2010-02-01 at 11:37 +0100, Aurelie REYMUND wrote:

 Hello,
 
 I have the following problem with the Adobe SVG viewer:
 I try to generate a SVG document using PHP. the following code is working
 well under Firefox, as well as IE with ASV:
 
 ?php
 
 header(Content-type: image/svg+xml);
 
 $graph_title = 'title';
 
 
 print('?xml version=1.0 encoding=iso-8859-1 standalone=no?');
 $svgwidth=500;
 $svgheight=400;
 ?
 
 !DOCTYPE svg PUBLIC -//W3C//DTD SVG 1.0//EN 
 http://www.w3.org/TR/SVG/DTD/svg10.dtd;
 svg width=?php echo $svgwidth; ?px height=?php echo $svgheight; ?px
 xmlns=http://www.w3.org/2000/svg;
 descThis is a php-random rectangle test/desc
 ?php
 srand((double) microtime() * 100); //initalizing random generator
 for ($i = 0; $i  20; $i+=1) {
 $x = floor(rand(0,$svgwidth-1)); //avoid getting a range 0..0 for rand
 function
 $y = floor(rand(0,$svgheight-1));
 $width = floor(rand(0,$svgwidth-$x)); //avoid getting rect outside of
 viewbox
 $height = floor(rand(0,$svgheight-$y));
 $red = floor(rand(0,255));
 $blue = floor(rand(0,255));
 $green = floor(rand(0,255));
 $color = rgb(.$red.,.$green.,.$
 blue.);
 print \trect x=\$x\ y=\$y\ width=\$width\ height=\$height\
 style=\fill:$color;\/\n;
 }
 ?
 text x=?php echo $svgwidth/2;?px y=300 style=font-size:15;
 text-anchor=middleThe servers Date and Time is: ?php print
 (strftime(%Y-%m-%d, %H:%M:%S)); ?/text
 text x=?php echo $svgwidth/2;?px y=340 style=font-size:15;
 text-anchor=middleYou are running:/text
 text x=?php echo $svgwidth/2;?px y=360 style=font-size:15;
 text-anchor=middle?php print $HTTP_USER_AGENT; ?/text
 /svg
 
 If now I want to include the session_start() at the beginning of the code,
 in IE I got a pop-up dialog called download file
 
 What am I doing wrong ?
 
 Regards,
 Aurelie


It sounds like it's the SVG plugin you're using on IE that's badly
misbehaving. That said, I've not seen any plugins that correctly pass
across the full headers that the browser would. I tried using sessions
once to secure media files by checking for a valid login against the
session id, but the plugins requesting the video clips didn't send any
cookie data in the header request. As such, it might be better to not
rely on it in this case.

Thanks,
Ash
http://www.ashleysheridan.co.uk




[PHP] magic_quotes_gpc on by default??

2010-02-01 Thread Rene Veerman
I've just wasted a few hours by trying to find a bug in my code that
messed up my JSON-passed-on-$_GET.
I'm using fopen() so please no nagging about putting JSON in $_POST..

I finally found the answer; in my distro's /etc/php5/apache2/php.ini,
magic_quotes_gpc is ON.
I'd like to know why, since it's being depracted anyway:

http://nl.php.net/manual/en/info.configuration.php#ini.magic-quotes-gpc

I'm on
PHP 5.2.10-2ubuntu6.4 with Suhosin-Patch 0.9.7 (cli) (built: Jan  6
2010 22:41:56)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

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



Re: [PHP] magic_quotes_gpc on by default??

2010-02-01 Thread Ashley Sheridan
On Mon, 2010-02-01 at 19:44 +0100, Rene Veerman wrote:

 I've just wasted a few hours by trying to find a bug in my code that
 messed up my JSON-passed-on-$_GET.
 I'm using fopen() so please no nagging about putting JSON in $_POST..
 
 I finally found the answer; in my distro's /etc/php5/apache2/php.ini,
 magic_quotes_gpc is ON.
 I'd like to know why, since it's being depracted anyway:
 
 http://nl.php.net/manual/en/info.configuration.php#ini.magic-quotes-gpc
 
 I'm on
 PHP 5.2.10-2ubuntu6.4 with Suhosin-Patch 0.9.7 (cli) (built: Jan  6
 2010 22:41:56)
 Copyright (c) 1997-2009 The PHP Group
 Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
 


Either Ubuntu is turning it on by default, your ISP has turned it on
(assuming it's not your own server), or someone else has turned it on at
some point.

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] magic_quotes_gpc on by default??

2010-02-01 Thread Rene Veerman
itsa homeserver, so i recon it was ubuntu.. buncha lamers :)


On Mon, Feb 1, 2010 at 7:51 PM, Ashley Sheridan 
a...@ashleysheridan.co.ukwrote:

  On Mon, 2010-02-01 at 19:44 +0100, Rene Veerman wrote:

 I've just wasted a few hours by trying to find a bug in my code that
 messed up my JSON-passed-on-$_GET.
 I'm using fopen() so please no nagging about putting JSON in $_POST..

 I finally found the answer; in my distro's /etc/php5/apache2/php.ini,
 magic_quotes_gpc is ON.
 I'd like to know why, since it's being depracted anyway:
 http://nl.php.net/manual/en/info.configuration.php#ini.magic-quotes-gpc

 I'm on
 PHP 5.2.10-2ubuntu6.4 with Suhosin-Patch 0.9.7 (cli) (built: Jan  6
 2010 22:41:56)
 Copyright (c) 1997-2009 The PHP Group
 Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies



 Either Ubuntu is turning it on by default, your ISP has turned it on
 (assuming it's not your own server), or someone else has turned it on at
 some point.

   Thanks,
 Ash
 http://www.ashleysheridan.co.uk





[PHP] OpenID

2010-02-01 Thread Al

This is a bit off subject, but

What is your opinion on OpenID?

Are you using it?

Is it worth the trouble?

What php code applic, or did you code your own?

Pear has an alpha release OpenID, anyone try or using it?

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



[PHP] Got a packet bigger than 'max_allowed_packet' bytes

2010-02-01 Thread saeed ahmed
i have write a script which search few element from a database. I use a text
file as input.

input file contains these kind of data

clubhouseforkids.com
cairouniversity.com
501c3nonprofit.com
mrbling.com
cellsocket.com

this is the scripts for read the file data

/**/
$file = fopen(files.txt, r) or exit(Unable to open file!);

 while(!feof($file))
 {
 $data[] = stream_get_line($file, 100, \n);
 }
 fclose($file);
//

this script worked fine for small size of file. but if i use a large size
like 900KB then its show Got a packet bigger than 'max_allowed_packet'
bytes .

where I'm doing wrong? please help me out there...


-
Regards
Saeed Ahmed
http://saeed05.wordpress.com
-


[PHP] Magento shopping cart

2010-02-01 Thread Skip Evans

Hey all,

Anyone ever use the Magento shopping cart? Pluses, minuses, 
opinions? I have a client that is pretty adamant about using 
it, but I've found over just about any I've used I can do a 
better service to the client by writing them from scratch. 
It's easy and they always get exactly what they want.


I see they seem to have a lot of plug ins, but I think someone 
just told him it is the best cart to use so he's sort of 
fixated on it.


Like I said, I typically find I can custom write one with 
better results. I found xCart, for example, to contain some of 
the worst code I had ever seen and it turned me off to third 
party carts.


Skip

--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Magento shopping cart

2010-02-01 Thread Ashley Sheridan
On Mon, 2010-02-01 at 15:02 -0600, Skip Evans wrote:

 Hey all,
 
 Anyone ever use the Magento shopping cart? Pluses, minuses, 
 opinions? I have a client that is pretty adamant about using 
 it, but I've found over just about any I've used I can do a 
 better service to the client by writing them from scratch. 
 It's easy and they always get exactly what they want.
 
 I see they seem to have a lot of plug ins, but I think someone 
 just told him it is the best cart to use so he's sort of 
 fixated on it.
 
 Like I said, I typically find I can custom write one with 
 better results. I found xCart, for example, to contain some of 
 the worst code I had ever seen and it turned me off to third 
 party carts.
 
 Skip
 
 -- 
 
 Skip Evans
 PenguinSites.com, LLC
 503 S Baldwin St, #1
 Madison WI 53703
 608.250.2720
 http://penguinsites.com
 
 Those of you who believe in
 telekinesis, raise my hand.
   -- Kurt Vonnegut
 


I've not used it myself, but I know people who have. The main problems
you'll face if you write it from scratch is that of going up against
tried and tested code. Magento has a large user base behind it, with
feedback that improves it's feature list and security features. Why
spend ages reinventing the wheel?

As far as I'm aware as well, Magento is still in active development, so
you know you will be safe using it for quite a while.

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] Magento shopping cart

2010-02-01 Thread Skip Evans

Ashley Sheridan wrote:

Why spend ages reinventing the wheel?



I've come across so many clients using third party carts who 
have been unhappy with the final results. I hear so often It 
does eighty percent of what we need, but we do things like 
this [insert idiosyncratic business practice here].


And then getting a third party cart to do what they wanted was 
often either incredibly frustrating/time consuming, or often 
just not doable.


Yes, writing a cart takes time, but I've found I can whip them 
out pretty easily, and I have a lot of code I reuse all the 
time. I pretty much have a complete basic cart stored away, 
but I intentionally keep its functionality to a minimum so 
that I can expand on it to their specifications.


To date the results have been pretty good.

Skip
--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Magento shopping cart

2010-02-01 Thread Rene Veerman
Is the client not receptive to that explanation?

On Mon, Feb 1, 2010 at 10:25 PM, Skip Evans s...@bigskypenguin.com wrote:
 Ashley Sheridan wrote:

 Why spend ages reinventing the wheel?


 I've come across so many clients using third party carts who have been
 unhappy with the final results. I hear so often It does eighty percent of
 what we need, but we do things like this [insert idiosyncratic business
 practice here].

 And then getting a third party cart to do what they wanted was often either
 incredibly frustrating/time consuming, or often just not doable.

 Yes, writing a cart takes time, but I've found I can whip them out pretty
 easily, and I have a lot of code I reuse all the time. I pretty much have a
 complete basic cart stored away, but I intentionally keep its functionality
 to a minimum so that I can expand on it to their specifications.

 To date the results have been pretty good.


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



Re: [PHP] Got a packet bigger than 'max_allowed_packet' bytes

2010-02-01 Thread Rene Veerman
yea, try executing the sql statement

set global max_allowed_packet = 500 * 1024 * 1024;

from php?? (note; it sets it to 500mb)

not sure if your mysql server will allow this.

on shared hosting, you can expect they disabled the ability to change
it from php..


On Mon, Feb 1, 2010 at 10:27 PM, saeed ahmed saeed@gmail.com wrote:
 Thank you, I also think so its a mysql problem.

 anyway do you have any method for increase the max_allowed_packet from a php
 script?



 -
 Regards
 Saeed Ahmed
 http://saeed05.wordpress.com
 -

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



Re: [PHP] session variables and SVG documents

2010-02-01 Thread Ray Solomon

From: Aurelie REYMUND aurely...@gmail.com
Sent: Monday, February 01, 2010 3:37 AM
To: php-general@lists.php.net
Subject: [PHP] session variables and SVG documents


Hello,

I have the following problem with the Adobe SVG viewer:
I try to generate a SVG document using PHP. the following code is working
well under Firefox, as well as IE with ASV:

?php

header(Content-type: image/svg+xml);

$graph_title = 'title';


print('?xml version=1.0 encoding=iso-8859-1 standalone=no?');
$svgwidth=500;
$svgheight=400;
?

!DOCTYPE svg PUBLIC -//W3C//DTD SVG 1.0//EN 
http://www.w3.org/TR/SVG/DTD/svg10.dtd;
svg width=?php echo $svgwidth; ?px height=?php echo $svgheight; 
?px

xmlns=http://www.w3.org/2000/svg;
   descThis is a php-random rectangle test/desc
?php
srand((double) microtime() * 100); //initalizing random generator
for ($i = 0; $i  20; $i+=1) {
   $x = floor(rand(0,$svgwidth-1)); //avoid getting a range 0..0 for rand
function
   $y = floor(rand(0,$svgheight-1));
   $width = floor(rand(0,$svgwidth-$x)); //avoid getting rect outside of
viewbox
   $height = floor(rand(0,$svgheight-$y));
   $red = floor(rand(0,255));
   $blue = floor(rand(0,255));
   $green = floor(rand(0,255));
   $color = rgb(.$red.,.$green.,.$
blue.);
   print \trect x=\$x\ y=\$y\ width=\$width\ height=\$height\
style=\fill:$color;\/\n;
}
?
   text x=?php echo $svgwidth/2;?px y=300 style=font-size:15;
text-anchor=middleThe servers Date and Time is: ?php print
(strftime(%Y-%m-%d, %H:%M:%S)); ?/text
   text x=?php echo $svgwidth/2;?px y=340 style=font-size:15;
text-anchor=middleYou are running:/text
   text x=?php echo $svgwidth/2;?px y=360 style=font-size:15;
text-anchor=middle?php print $HTTP_USER_AGENT; ?/text
/svg

If now I want to include the session_start() at the beginning of the code,
in IE I got a pop-up dialog called download file

What am I doing wrong ?

Regards,
Aurelie




It appears IE does not support svg yet and you need a plugin for it.

However, you could also design your code differently by using Imagemagick to 
convert the svg to png.

If that suits your needs, then use the modified code below:


?php

header(Content-type: image/png);

$graph_title = 'title';

$svgwidth=500;
$svgheight=400;

$svg = '?xml version=1.0 encoding=iso-8859-1 standalone=no?
svg width='.$svgwidth.'px height='.$svgheight.'px 
xmlns=http://www.w3.org/2000/svg;

   descThis is a php-random rectangle test/desc';


for ($i = 0; $i  20; $i++) {
$x = floor(rand(0,$svgwidth-1));
$y = floor(rand(0,$svgheight-1));
$width = floor(rand(0,$svgwidth-$x));
$height = floor(rand(0,$svgheight-$y));
$red = floor(rand(0,255));
$blue = floor(rand(0,255));
$green = floor(rand(0,255));
$color = rgb(.$red.,.$green.,.$blue.);
	$svg .= \trect x=\$x\ y=\$y\ width=\$width\ height=\$height\ 
style=\fill:$color;\/\n;

}

   $svg .= 'text x='.($svgwidth/2).'px y=300 style=font-size:15; 
text-anchor=middleThe servers Date and Time is: '.date(Y-m-d, 
H:m:s).'/text
   text x='.($svgwidth/2).'px y=340 style=font-size:15; 
text-anchor=middleYou are running:/text
   text x='.($svgwidth/2).'px y=360 style=font-size:15; 
text-anchor=middle'.$HTTP_USER_AGENT.'/text

/svg';


file_put_contents('/tmp/image.svg', $svg);

exec(/usr/bin/rsvg /tmp/image.svg /tmp/image.png);

echo file_get_contents('/tmp/image.png');
?

-Ray Solomon



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



Re: [PHP] Magento shopping cart

2010-02-01 Thread Nathan Nobbe
On Mon, Feb 1, 2010 at 2:25 PM, Skip Evans s...@bigskypenguin.com wrote:

 Ashley Sheridan wrote:

 Why spend ages reinventing the wheel?


i whole heartedly agree.


 I've come across so many clients using third party carts who have been
 unhappy with the final results. I hear so often It does eighty percent of
 what we need, but we do things like this [insert idiosyncratic business
 practice here].


thats why a lot of the modern incarnations have embraced the concept of
modularization, eg. plugins / skins etc. etc.

just look back a os-commerce / zen-cart; the notion of skins they had was
horrific, basically since the ui was intertwined w/ logic, skins were tied
to revs of the application - ouch!  the community has matured a lot since
then from what i gather.


 And then getting a third party cart to do what they wanted was often either
 incredibly frustrating/time consuming, or often just not doable.


i think in most cases, anymore, youre mainly looking at ramp-up time on how
to use / customize / extend an existing third party system.  while that can
be sucky, you should really weigh the trade-off between that and getting
beaten over the head w/ requests to develop the most common place
look-and-feel customization crap / features.  ive started to lean towards
the former in my personal career, having come from zealous devotion to the
later in my initial years in the industry.


 Yes, writing a cart takes time, but I've found I can whip them out pretty
 easily, and I have a lot of code I reuse all the time. I pretty much have a
 complete basic cart stored away, but I intentionally keep its functionality
 to a minimum so that I can expand on it to their specifications.


ok, well, when your custom cart has all the features of magento / [your fav
e-commerce platform here] let me know.  ill have finished up the proprietary
plugins that make my site unique and have forgotten pretty much everything
about silly crap id never want to write - like custom look at feel, crm,
reports etc etc.

o and also, when you have as many users / devs hitting your codebase as some
of the popular platforms, im interested in hearing about that as well, lol.

-nathan


Re: [PHP] Magento shopping cart

2010-02-01 Thread Skip Evans
I'm not totally opposed to using Magento, though I can see my 
comments, especially if it's what the client wants.


I have been looking over the site and it does have a lot of 
features so I can see it saving some serious time, especially 
given the extras he wants.


So Nathan, having used it, do you have any tips for a Magento 
newbie when it comes to integrating it with a custom site?


I haven't found any integration documentation for programmers yet.

Skip

Nathan Nobbe wrote:
On Mon, Feb 1, 2010 at 2:25 PM, Skip Evans s...@bigskypenguin.com 
mailto:s...@bigskypenguin.com wrote:


Ashley Sheridan wrote:

Why spend ages reinventing the wheel?


i whole heartedly agree.
 


I've come across so many clients using third party carts who have
been unhappy with the final results. I hear so often It does eighty
percent of what we need, but we do things like this [insert
idiosyncratic business practice here].


thats why a lot of the modern incarnations have embraced the concept of 
modularization, eg. plugins / skins etc. etc.


just look back a os-commerce / zen-cart; the notion of skins they had 
was horrific, basically since the ui was intertwined w/ logic, skins 
were tied to revs of the application - ouch!  the community has matured 
a lot since then from what i gather.
 


And then getting a third party cart to do what they wanted was often
either incredibly frustrating/time consuming, or often just not doable.


i think in most cases, anymore, youre mainly looking at ramp-up time on 
how to use / customize / extend an existing third party system.  while 
that can be sucky, you should really weigh the trade-off between that 
and getting beaten over the head w/ requests to develop the most common 
place look-and-feel customization crap / features.  ive started to lean 
towards the former in my personal career, having come from zealous 
devotion to the later in my initial years in the industry.
 


Yes, writing a cart takes time, but I've found I can whip them out
pretty easily, and I have a lot of code I reuse all the time. I
pretty much have a complete basic cart stored away, but I
intentionally keep its functionality to a minimum so that I can
expand on it to their specifications.


ok, well, when your custom cart has all the features of magento / [your 
fav e-commerce platform here] let me know.  ill have finished up the 
proprietary plugins that make my site unique and have forgotten pretty 
much everything about silly crap id never want to write - like custom 
look at feel, crm, reports etc etc.


o and also, when you have as many users / devs hitting your codebase as 
some of the popular platforms, im interested in hearing about that as 
well, lol.


-nathan


--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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



Re: [PHP] Appalling Dreamweaver performance

2010-02-01 Thread clancy_1
On Mon, 01 Feb 2010 00:51:39 +, a...@ashleysheridan.co.uk (Ashley Sheridan) 
wrote:

On Mon, 2010-02-01 at 11:28 +1100, clanc...@cybec.com.au wrote:
.

Don't use Dreamweaver then :p

Joking aside (Dreamweaver is a very capable editor, although it is quite
large for simple find and replace tasks) how were you performing the
find and replace? Regular expression replacements will be much slower,
although it shouldn't account for quite the speed hit you saw. For
simple tasks like that, I'd recommend Notepad++. It has code
highlighting and folding, regex find/replace features, and a slew of
other bits that make it a very good editor, and it's very speedy to
boot.

I was doing a simple replace: ,  with  ;   As I mentioned, I use Dreamweaver 
both its
editing and its file managing capabilities, and as I spend a lot of time 
programming it is
nearly always open, so it gets used for odd jobs like this (which it usually 
does very
well).

However there is definitely something seriously wrong with its implementation 
of this
feature. After reading some of the other comments I thought I should try the 
same thing
again this morning, while the computer was fresh. I did the same job on the 
same file. The
screen was refreshed after each line was completely processed, and for the 
first few lines
the cursor ran quite quickly down the screen. But by line 130 it had slowed to 
about 1line
per second, and last time by the end it was taking more than five seconds to do 
each line.

I didn't bother to let it run to completion, but I did look at the results log. 
This had a
new line for every replacement-- 10 lines of log for each line of the original 
file.  I
expect this is the explanation for the initial slow performance but I can't 
understand
what they have done to make it slow down as it progresses -- unless they start 
searching
again at the beginning of the file after each replacement? Given the cumbersome 
error
logging this is just conceivable.

I have had it crash once or twice after I have opened a lot of files (usually 
after I have
searched the whole folder for every reference to a variable a number of times), 
but
generally I have found quite reliable.

One feature which I find really annoying is that if you tell it to search a 
folder for a
particular variable name, it doesn't seem to be possible to tell it to only 
search certain
directories, and certain file extensions. If Notepad++ offered this feature I 
would
certainly be tempted to try it.


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



[PHP] Re: OpenID

2010-02-01 Thread Nathan Rixham
Al wrote:
 This is a bit off subject, but
 
 What is your opinion on OpenID?

openID  foaf+ssl are the future without a doubt, openid is a step in
the right direction; most important factor is giving every person a http
identifier (URI); because then you can start linking data together.

article - dc:creator - al; -- means nothing

so we give you a unique identifier which can be looked up to
authenticate you, get more info about you etc.

article - dc:creator - http://ridersite.org/al; -- means everything

 Are you using it?

yes

 Is it worth the trouble?

the trouble is not using it; so yes more than worth it

 What php code applic, or did you code your own?

various, rolled my own + recently used zend_openid which is v good;
here's a list:
http://openid.net/developers/libraries/#php

 Pear has an alpha release OpenID, anyone try or using it?

would stick to the ones on the page above ^^ also many plugins for
drupal, wordpress, various cms's etc which work out of the box.

would completely reverse this back to you; can you think of one good
reason *not* to use openid?

regards!

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



Re: [PHP] Good source for sample data?

2010-02-01 Thread clancy_1
On Fri, 29 Jan 2010 15:08:49 -0800, br...@briandunning.com (Brian Dunning) 
wrote:

Thanks for the suggestions but I couldn't find any that suited my needs, so I 
made my own. Feel free to download if you can use them, I made files with up 
to a million unique records.

Name, Company, Address, Phone, Email, etc., all are fake but are real 
addresses with correct area codes, zips, exchange, so will work for mapping, 
phone or address validation, whatever your needs are. Hope someone find it 
useful.

http://www.briandunning.com/sample-data/

Thank you for this. I was just wondering where I could get a reasonably large 
set of
sample data to demonstrate my mailmerge type program, and this will serve the 
purpose
nicely. It will also enable me to test it on a much larger set of data than my 
laboriously
assembled private address book (which has 666 entries).

(My program worked well with the 500 entry file, but had serious problems with 
the 5000
entry file. However when I cut this back to 1700 entries it again worked 
correctly, though
it was a bit slow.)

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



Re: [PHP] Magento shopping cart

2010-02-01 Thread Kim Madsen

Skip Evans wrote on 01/02/2010 22:02:

Hey all,

Anyone ever use the Magento shopping cart? Pluses, minuses, opinions? I 
have a client that is pretty adamant about using it, but I've found over 
just about any I've used I can do a better service to the client by 
writing them from scratch. It's easy and they always get exactly what 
they want.


I just installed it a couple of days ago, took me an hour and 5 minutes 
incl. installing danish and make different kind of troubleshooting 
during the installation. Make sure your database user has at least 
(haven't had the time to investigave yet) ALTER privileges  otherwise 
the install fails and it's rather wierd to continue the installation 
after giving the DB user the righs privileges.


I see they seem to have a lot of plug ins, but I think someone just told 
him it is the best cart to use so he's sort of fixated on it.


It sure looks cool, that I must say.

Like I said, I typically find I can custom write one with better 
results. I found xCart, for example, to contain some of the worst code I 
had ever seen and it turned me off to third party carts.


I sort of have the same opinion, but this was a fast install and there's 
lots of admin features.


However as you write elsewhere in this thread, knowing your own code 
makes it easy to make changes. This is definetly going to take longer 
with Magento since you don't know the code. Make sure you customer 
understands this.


A good example: the search button is an image, so this is not 
translated into danish, that could be a potential design problem, if in 
thai search it translated to rapapupapikiwikital :-)


--
Kind regards
Kim Emax - masterminds.dk

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



Re: [PHP] Magento shopping cart

2010-02-01 Thread Phpster
I hear good things about magento, neve used it though. Xcart stinks.  
I've had to hack that before. It was painful.


Bastien

Sent from my iPod

On Feb 1, 2010, at 4:02 PM, Skip Evans s...@bigskypenguin.com wrote:


Hey all,

Anyone ever use the Magento shopping cart? Pluses, minuses,  
opinions? I have a client that is pretty adamant about using it, but  
I've found over just about any I've used I can do a better service  
to the client by writing them from scratch. It's easy and they  
always get exactly what they want.


I see they seem to have a lot of plug ins, but I think someone just  
told him it is the best cart to use so he's sort of fixated on it.


Like I said, I typically find I can custom write one with better  
results. I found xCart, for example, to contain some of the worst  
code I had ever seen and it turned me off to third party carts.


Skip

--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
-- Kurt Vonnegut

--
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] Magento shopping cart

2010-02-01 Thread Jochem Maas
Op 2/1/10 10:02 PM, Skip Evans schreef:
 Hey all,
 
 Anyone ever use the Magento shopping cart? Pluses, minuses, opinions? I
 have a client that is pretty adamant about using it, but I've found over
 just about any I've used I can do a better service to the client by
 writing them from scratch. It's easy and they always get exactly what
 they want.
 
 I see they seem to have a lot of plug ins, but I think someone just told
 him it is the best cart to use so he's sort of fixated on it.
 
 Like I said, I typically find I can custom write one with better
 results. I found xCart, for example, to contain some of the worst code I
 had ever seen and it turned me off to third party carts.

I find the only time a custom solution is suitable is when there is a large
budget and very specific requirements, which usually translates into atleast:

1. specialized discounting mechanisms
2. tight integration with a 'big' backend system (e.g. SAP, Siebel, etc)
3. custom data-related workflows

I just spent some time looking at XCart for someone - seeing the frontend I 
figured
the requested changes would be a piece fo cake, the reality is that making those
changes was practically impossible and definitely not ecomonically viable. the 
XCart
code is complete pants.

I also took a dive into the Magento codebase, a quick perusal shows a well 
defined
structure, tidy code, well commented, modular. looks very good really - learning
curve is a bit steep but that's down to the fact that it's a very complete and
sophicated package ... additionally there is a big, well organized community 
behind
it ... I would hazard a guess and say that it's a very good bet.

 Skip
 


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



Re: [PHP] Magento shopping cart

2010-02-01 Thread Nathan Nobbe
On Mon, Feb 1, 2010 at 3:22 PM, Skip Evans s...@bigskypenguin.com wrote:

 I'm not totally opposed to using Magento, though I can see my comments,
 especially if it's what the client wants.

 I have been looking over the site and it does have a lot of features so I
 can see it saving some serious time, especially given the extras he wants.

 So Nathan, having used it, do you have any tips for a Magento newbie when
 it comes to integrating it with a custom site?


I havent used it yet, but we are considering using it as a second-gen
platform at my new place of biz.  initial glimpses are promising, but it
appears to be a somewhat complex offering compared to say wordpress w/ an
e-commerce plugin.

i imagine there may be other tradeoffs as well, like a number of general
purpose plugins and probly more look  feel options in wordpress than
magento.


 I haven't found any integration documentation for programmers yet.


google for magento extension and it looks like you may have to hit the
appropriate mailing list for more details.

fwiw, afaik, x-cart is one of those older e-commerce platforms circa
os-commerce / zencart days.  the code is ass, but frankly that damn thing
has installations up all over the net (or did once upon a time, lol).

-nathan


RE: [PHP] OpenID

2010-02-01 Thread Daevid Vincent
 

 -Original Message-
 From: Al [mailto:n...@ridersite.org] 
 Sent: Monday, February 01, 2010 12:09 PM
 To: php-general@lists.php.net
 Subject: [PHP] OpenID
 
 This is a bit off subject, but
 
 What is your opinion on OpenID?

Failed gimick. 
Tried to resurface again about a year ago. 
Still seems like failure.

http://electronicmuseum.org.uk/2008/07/16/openid-fail/
http://thenextweb.com/2008/10/30/google-openid-fail/
http://en.wikipedia.org/wiki/OpenID#Adoption

 Are you using it?

Uhm, no. 
I've got more important things to worry about and implement.

 Is it worth the trouble?

I hear it's relatively simple to implement, but even then it's just another
hassle you have to test and work with forever (or eventually drop it as
some sites have).

 What php code applic, or did you code your own?
 Pear has an alpha release OpenID, anyone try or using it?

N/A

It sounds great in theory, but I see it as a solution in search of a
problem. Sure everyone has a bajillion logins, but you know what, the
browser has solved that long ago by remembering my user/pass for each and
every site. Most sites also conveniently store a cookie hash so you don't
even have to login -- it just knows you if you use the same computer to
connect.

There is an inherent distrust when you are re-directed somewhere -- I don't
even like to get redirected to PayPal from eBay, and they're the same
company! :)

It's too techy for Jane Average and too cumbersome for Joe Savvy. 

YMMV.


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



RE: [PHP] OpenID

2010-02-01 Thread Ashley Sheridan
On Mon, 2010-02-01 at 18:38 -0800, Daevid Vincent wrote:

 
  -Original Message-
  From: Al [mailto:n...@ridersite.org] 
  Sent: Monday, February 01, 2010 12:09 PM
  To: php-general@lists.php.net
  Subject: [PHP] OpenID
  
  This is a bit off subject, but
  
  What is your opinion on OpenID?
 
 Failed gimick. 
 Tried to resurface again about a year ago. 
 Still seems like failure.
 
 http://electronicmuseum.org.uk/2008/07/16/openid-fail/
 http://thenextweb.com/2008/10/30/google-openid-fail/
 http://en.wikipedia.org/wiki/OpenID#Adoption
 
  Are you using it?
 
 Uhm, no. 
 I've got more important things to worry about and implement.
 
  Is it worth the trouble?
 
 I hear it's relatively simple to implement, but even then it's just another
 hassle you have to test and work with forever (or eventually drop it as
 some sites have).
 
  What php code applic, or did you code your own?
  Pear has an alpha release OpenID, anyone try or using it?
 
 N/A
 
 It sounds great in theory, but I see it as a solution in search of a
 problem. Sure everyone has a bajillion logins, but you know what, the
 browser has solved that long ago by remembering my user/pass for each and
 every site. Most sites also conveniently store a cookie hash so you don't
 even have to login -- it just knows you if you use the same computer to
 connect.
 
 There is an inherent distrust when you are re-directed somewhere -- I don't
 even like to get redirected to PayPal from eBay, and they're the same
 company! :)
 
 It's too techy for Jane Average and too cumbersome for Joe Savvy. 
 
 YMMV.
 
 


I see some popular sites are starting to use it as a login method.
Sourceforge for example allows OpenID logins.

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] OpenID

2010-02-01 Thread Michael A. Peters

Daevid Vincent wrote:
 


-Original Message-
From: Al [mailto:n...@ridersite.org] 
Sent: Monday, February 01, 2010 12:09 PM

To: php-general@lists.php.net
Subject: [PHP] OpenID

This is a bit off subject, but

What is your opinion on OpenID?


Failed gimick. 
Tried to resurface again about a year ago. 
Still seems like failure.


++

Session ID hijacking is bad enough, it gives the malicious user access 
to one resource.


OpenID hijacking gives the malicious user access to a ton of resources.
And what does a user do when their OpenID provider disappears?

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