php-general Digest 14 Mar 2010 11:14:37 -0000 Issue 6638

2010-03-14 Thread php-general-digest-help
php-general Digest 14 Mar 2010 11:14:37 - Issue 6638 Topics (messages 302788 through 302795): Re: Migration Scheme - from one mysql DB to another mysql DB 302788 by: MEM Re: I need a fresh look at storing variables in MySQL 302789 by: Paul M Foster 302790 by: Paul M

php-general Digest 14 Mar 2010 23:56:56 -0000 Issue 6639

2010-03-14 Thread php-general-digest-help
php-general Digest 14 Mar 2010 23:56:56 - Issue 6639 Topics (messages 302796 through 302816): Re: I need a fresh look at storing variables in MySQL 302796 by: Ashley Sheridan 302797 by: Rene Veerman 302798 by: Rene Veerman 302799 by: Ashley Sheridan

Re: [PHP] I need a fresh look at storing variables in MySQL

2010-03-14 Thread Rene Veerman
On Sun, Mar 14, 2010 at 7:18 AM, Paul M Foster pa...@quillandmouse.com wrote: Tedd's perfectly capable of speaking for himself, but I can tell you he's been on this list for a long time, and his skills are plenty adequate for this task. He's just asking for second opinions. Wouldn't someone

Re: [PHP] I need a fresh look at storing variables in MySQL

2010-03-14 Thread Rene Veerman
On Sun, Mar 14, 2010 at 8:22 AM, Jochem Maas joc...@iamjochem.com wrote: first off - wasn't there a cut'n'dried piece of survey software out there that did the job? don't know off hand what the 'market' currently offers but I'm pretty sure there are a number of candidate php-based wotsits.

Re: [PHP] I need a fresh look at storing variables in MySQL

2010-03-14 Thread Ashley Sheridan
On Sun, 2010-03-14 at 11:15 +0100, Rene Veerman wrote: On Sun, Mar 14, 2010 at 7:18 AM, Paul M Foster pa...@quillandmouse.com wrote: Tedd's perfectly capable of speaking for himself, but I can tell you he's been on this list for a long time, and his skills are plenty adequate for this

Re: [PHP] I need a fresh look at storing variables in MySQL

2010-03-14 Thread Rene Veerman
On Sun, Mar 14, 2010 at 11:16 AM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: That function won't always work. You're using a PHP version check for mysql_real_escape_string() when the most likely failure point for it is if no database connection has been opened. I never call it without

Re: [PHP] I need a fresh look at storing variables in MySQL

2010-03-14 Thread Ashley Sheridan
On Sun, 2010-03-14 at 12:14 +0100, Rene Veerman wrote: On Sun, Mar 14, 2010 at 11:16 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: That function won't always work. You're using a PHP version check for mysql_real_escape_string() when

Re: [PHP] I need a fresh look at storing variables in MySQL

2010-03-14 Thread Rene Veerman
On Sun, Mar 14, 2010 at 12:13 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: I have to deal with a lot of CMS's, so I expect the users to enter some HTML code through a rich-text editor, and they expect to be able to. I'd love to have a copy of whatever function you use to filter out

Re: [PHP] I need a fresh look at storing variables in MySQL

2010-03-14 Thread Rene Veerman
On Sun, Mar 14, 2010 at 12:24 PM, Rene Veerman rene7...@gmail.com wrote: I'd love to have a copy of whatever function you use to filter out bad HTML/js/flash for use cases where users are allowed to enter html. I'm aware of strip_tags() allowed tags param, but haven't got a good list for it.

Re: [PHP] I need a fresh look at storing variables in MySQL

2010-03-14 Thread Ashley Sheridan
On Sun, 2010-03-14 at 12:25 +0100, Rene Veerman wrote: On Sun, Mar 14, 2010 at 12:24 PM, Rene Veerman rene7...@gmail.com wrote: I'd love to have a copy of whatever function you use to filter out bad HTML/js/flash for use cases where users are allowed to enter html. I'm aware of

[PHP] SimpleXML: convert xml to text

2010-03-14 Thread Dasn
Hello, I want to convert some xml stuff to simple string using php, say: ?php $string = XML a left foocenter1okok/okcenter2/fooright /a XML; $xml = simplexml_load_string($string); echo $xml; ? The code will output left right while all the central stuff was lost. How should I print it as left

Re: [PHP] SimpleXML: convert xml to text

2010-03-14 Thread Ashley Sheridan
On Sun, 2010-03-14 at 21:58 +0800, Dasn wrote: Hello, I want to convert some xml stuff to simple string using php, say: ?php $string = XML a left foocenter1okok/okcenter2/fooright /a XML; $xml = simplexml_load_string($string); echo $xml; ? The code will output left right while all

[PHP] gmail filter test

2010-03-14 Thread bruce
test -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] gmail filter test

2010-03-14 Thread Ashley Sheridan
On Sun, 2010-03-14 at 08:37 -0700, bruce wrote: test test received! what were we test bunnies for again? :p Thanks, Ash http://www.ashleysheridan.co.uk

[PHP] php - page flow issue...

2010-03-14 Thread bruce
hi. got a situation for a potential page that i'm playing with. i'm trying to figure out how to implement it, and the best/good approach to this. i'm actually considering integrating this kind of process within a cms (joomla/mambo/cmsms/etc..) but right now, this is in the initia thought stage...

[PHP] php-cli

2010-03-14 Thread Rick Pasotto
Has cli php changed recently? I've got a php script (script1) that creates a php script (script2) by opening a file and then writing to it. When I try to run it from the command line script1 is simply copied to stdout. When I run it from the browser it works as expected. The directory has 777

Re: [PHP] php-cli

2010-03-14 Thread Ashley Sheridan
On Sun, 2010-03-14 at 14:15 -0400, Rick Pasotto wrote: Has cli php changed recently? I've got a php script (script1) that creates a php script (script2) by opening a file and then writing to it. When I try to run it from the command line script1 is simply copied to stdout. When I run it

[PHP] Re: CodeBubbles -- the coolest IDE innovation since since syntax highlighting and intellisense

2010-03-14 Thread Nathan Rixham
Daevid Vincent wrote: Wow. Maybe the coolest IDE innovation I've seen since syntax highlighting and intellisense. http://www.cs.brown.edu/people/acb/codebubbles_site.htm http://www.cs.brown.edu/people/acb/codebubbles_site.htm

[PHP] Using FreeType2 without having to suffer GD

2010-03-14 Thread PmI
Hi, is there a FreeType extension that doesn't rely on not-calling-freetype-in-the-slightest through GD? GD is lacking lots of function wrappers for things that are part of the standard FreeType2 API, like the super basic get char index function, which are essential for any kind of intelligent

Re: [PHP] php - page flow issue...

2010-03-14 Thread Rene Veerman
sounds like you want to build an ajax site with global config settings per subpart(=functionality) for each browser-client. if it got it right your other requirements are; - you have run-time config/state settings per subpart instance that other subparts' instances need to access. - you want to

[PHP] Change displayed file name to download

2010-03-14 Thread Php Developer
Hi, I'm using the following code: $fp = fopen($filename, 'r+'); $content = fread($fp, filesize($filename)); fclose($fp); header(Content-type: application/msword); header(Content-Disposition: attachment; filename=$filename); echo $content; exit; ___

Re: [PHP] php-cli

2010-03-14 Thread Rick Pasotto
On Sun, Mar 14, 2010 at 06:13:24PM +, Ashley Sheridan wrote: On Sun, 2010-03-14 at 14:15 -0400, Rick Pasotto wrote: Has cli php changed recently? I've got a php script (script1) that creates a php script (script2) by opening a file and then writing to it. When I try to run it from

Re: [PHP] Change displayed file name to download

2010-03-14 Thread Kim Madsen
Hi Make a $new_filename and put that in the header: $neW_filename = downloadfile. . $filetype; header(Content-Disposition: attachment; filename=$new_filename); (the content of the file is now in $content, so if you like you could also change the value of $filename if you preferrer that)

Re: [PHP] Change displayed file name to download

2010-03-14 Thread Peter Lind
You can set the name to display as you see fit, just change $filename to your liking right before the header() call. If you just want to cut the path, use basename($filename) Regards Peter On 14 March 2010 21:29, Php Developer pdevelo...@rocketmail.com wrote: Hi, I'm using the following code:

Re: [PHP] php-cli

2010-03-14 Thread Ashley Sheridan
On Sun, 2010-03-14 at 16:41 -0400, Rick Pasotto wrote: On Sun, Mar 14, 2010 at 06:13:24PM +, Ashley Sheridan wrote: On Sun, 2010-03-14 at 14:15 -0400, Rick Pasotto wrote: Has cli php changed recently? I've got a php script (script1) that creates a php script (script2) by

Re: [PHP] SimpleXML: convert xml to text

2010-03-14 Thread Dasn
On Sun, 14 Mar 2010 22:02:22 +0800, Ashley Sheridan wrote: On Sun, 2010-03-14 at 21:58 +0800, Dasn wrote: Hello, I want to convert some xml stuff to simple string using php, say: ?php $string = XML a left foocenter1okok/okcenter2/fooright /a XML; $xml = simplexml_load_string($string); echo

Re: [PHP] I need a fresh look at storing variables in MySQL

2010-03-14 Thread Jochem Maas
Op 3/14/10 11:45 AM, Ashley Sheridan schreef: On Sun, 2010-03-14 at 12:25 +0100, Rene Veerman wrote: On Sun, Mar 14, 2010 at 12:24 PM, Rene Veerman rene7...@gmail.com wrote: I'd love to have a copy of whatever function you use to filter out bad HTML/js/flash for use cases where users are

Re: [PHP] php-cli

2010-03-14 Thread Rick Pasotto
On Sun, Mar 14, 2010 at 08:40:51PM +, Ashley Sheridan wrote: On Sun, 2010-03-14 at 16:41 -0400, Rick Pasotto wrote: On Sun, Mar 14, 2010 at 06:13:24PM +, Ashley Sheridan wrote: On Sun, 2010-03-14 at 14:15 -0400, Rick Pasotto wrote: Has cli php changed recently?

Re: [PHP] php-cli

2010-03-14 Thread Dmitry Ruban
Rick Pasotto wrote: On Sun, Mar 14, 2010 at 08:40:51PM +, Ashley Sheridan wrote: On Sun, 2010-03-14 at 16:41 -0400, Rick Pasotto wrote: On Sun, Mar 14, 2010 at 06:13:24PM +, Ashley Sheridan wrote: On Sun, 2010-03-14 at 14:15 -0400, Rick Pasotto wrote: Has cli php changed recently?

Re: [PHP] php-cli

2010-03-14 Thread Ashley Sheridan
On Sun, 2010-03-14 at 20:27 -0400, Rick Pasotto wrote: On Sun, Mar 14, 2010 at 08:40:51PM +, Ashley Sheridan wrote: On Sun, 2010-03-14 at 16:41 -0400, Rick Pasotto wrote: On Sun, Mar 14, 2010 at 06:13:24PM +, Ashley Sheridan wrote: On Sun, 2010-03-14 at 14:15 -0400, Rick

Re: [PHP] SimpleXML: convert xml to text

2010-03-14 Thread Dasn
On Sun, 14 Mar 2010 22:02:22 +0800, Ashley Sheridan wrote: On Sun, 2010-03-14 at 21:58 +0800, Dasn wrote: Hello, I want to convert some xml stuff to simple string using php, say: ?php $string = XML a left foocenter1okok/okcenter2/fooright /a XML; $xml = simplexml_load_string($string); echo

Re: [PHP] php-cli

2010-03-14 Thread Rick Pasotto
On Mon, Mar 15, 2010 at 01:32:24PM +1300, Dmitry Ruban wrote: Rick Pasotto wrote: I repeat: is there more than one way to run a php script from the cli? On *nix, you can add #!/usr/bin/php as first line and make file executable (chmod +x). Functionally the same. php is still

Re: [PHP] php-cli

2010-03-14 Thread Ashley Sheridan
On Sun, 2010-03-14 at 21:24 -0400, Rick Pasotto wrote: On Mon, Mar 15, 2010 at 01:32:24PM +1300, Dmitry Ruban wrote: Rick Pasotto wrote: I repeat: is there more than one way to run a php script from the cli? On *nix, you can add #!/usr/bin/php as first line and make file

Re: [PHP] php-cli

2010-03-14 Thread Dmitry Ruban
Rick Pasotto wrote: On Mon, Mar 15, 2010 at 01:32:24PM +1300, Dmitry Ruban wrote: Rick Pasotto wrote: I repeat: is there more than one way to run a php script from the cli? On *nix, you can add #!/usr/bin/php as first line and make file executable (chmod +x). Functionally the same. php is

[PHP] Splitting a string ...

2010-03-14 Thread Ashley M. Kirchner
I'm not a regexp person (wish I was though), and I'm hoping someone can give me a hand here. Consider the following strings: - domain\usern...@example.org - domain\username - the same as above but with / instead of \ (hey, it happens) -

Re: [PHP] Splitting a string ...

2010-03-14 Thread Jochem Maas
Op 3/15/10 1:54 AM, Ashley M. Kirchner schreef: I'm not a regexp person (wish I was though), and I'm hoping someone can give me a hand here. Consider the following strings: - domain\usern...@example.org - domain\username - the same as above but with /

Re: [PHP] php-cli

2010-03-14 Thread Rick Pasotto
On Mon, Mar 15, 2010 at 02:35:54PM +1300, Dmitry Ruban wrote: Rick Pasotto wrote: On Mon, Mar 15, 2010 at 01:32:24PM +1300, Dmitry Ruban wrote: Rick Pasotto wrote: I repeat: is there more than one way to run a php script from the cli? On *nix, you can add #!/usr/bin/php as first line and