[PHP] Multibyte strings as array keys

2008-01-16 Thread Naz Gassiep
Does this work? Something is breaking when I try to do this, and all I can think of is that PHP does not allow multibyte array keys. - Naz. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] re[PHP] gister_globals

2008-01-16 Thread Richard Heyes
I'm a newbie to php and i would like to set register_globals to 'on' from my php script itself(eg:- index.php). Is there any way of doing this. You can't do this from inside the script with ini_set() as register_globals has already had it's affect at that point, so you can put this in a

[PHP] Word Wrap on highlight_file

2008-01-16 Thread Tom Chubb
Can anyone tell me how to wrap the results of highlight_file so it doesn't mess up the size of my table div? I tried the following and doesn't work! if ($ext == phps) { $showcode = highlight_file($pathtoscripts . $_GET['file']); echo wordwrap($showcode, 70); } else { echo Nice try, but

Re: [PHP] Word Wrap on highlight_file

2008-01-16 Thread Jochem Maas
Tom Chubb schreef: Can anyone tell me how to wrap the results of highlight_file so it doesn't mess up the size of my table div? use CSS to control the visual display in the browser. not to mention that 'table div' doesn't make much sense as a concept. probably you'll want to do something with

Re: [PHP] re[PHP] gister_globals

2008-01-16 Thread Jochem Maas
tbt schreef: Hi, I'm a newbie to php and i would like to set register_globals to 'on' from my php script itself(eg:- index.php). Is there any way of doing this. you think you would like that. but you are wrong. register_globals is a security risk in the hands of someone who doesn't know

[PHP] snmp_set_valueretrieval depends on what?

2008-01-16 Thread Dotan Cohen
I am experimenting with the snmp_set_valueretrieval function, which does not appear to be documented: http://il.php.net/snmp_set_valueretrieval What does this function depend upon? Simply using it throws this: Fatal error: Call to undefined function snmp_set_valueretrieval() in I'm on a

Re: [PHP] snmp_set_valueretrieval depends on what?

2008-01-16 Thread Per Jessen
Dotan Cohen wrote: I am experimenting with the snmp_set_valueretrieval function, which does not appear to be documented: http://il.php.net/snmp_set_valueretrieval What does this function depend upon? Simply using it throws this: Fatal error: Call to undefined function

Re: [PHP] Encryption failing

2008-01-16 Thread Ken Kixmoeller -- reply to [EMAIL PROTECTED]
On Jan 15, 2008, at 10:48 PM, Casey wrote: It returns the correct value. If you look at the last example, and run base64_decode on MDAwMzEwMDI0NDA0MTMyOQ==, you will get 0003100244041329. Oops. Haste makes crappy programming. Ken -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Closures in PHP

2008-01-16 Thread Nathan Nobbe
On Jan 16, 2008 1:58 AM, Larry Garfield [EMAIL PROTECTED] wrote: On Tuesday 15 January 2008, Nathan Nobbe wrote: when i said a function would have to be loaded into the interpreter to avoid a runtime error upon invocation, i didnt mention that its best to programatically verify it can

Re: [PHP] utf-8 in $_POST

2008-01-16 Thread Olav Mørkrid
the user agents in question are various mobile phones, which as you might guess are premature technology and have their own ways with things. here is an example posting from a Samsung D600 which insists on posting form data in UTF-8 even though i serve it ISO-8859-1 and it claims to support all

Re: [PHP] Encryption failing

2008-01-16 Thread Ken Kixmoeller -- reply to [EMAIL PROTECTED]
On Jan 16, 2008, at 1:28 AM, Andrés Robinet wrote: 1 - Mike is right about first encrypting and then doing a base64_encode (then saving results to DB, cookies, etc). I don't know why replacing to + for decrypting, though. His other post explains that php didn't seem to like spaces.

Re: [PHP] snmp_set_valueretrieval depends on what?

2008-01-16 Thread Dotan Cohen
On 16/01/2008, Per Jessen [EMAIL PROTECTED] wrote: Dotan Cohen wrote: I am experimenting with the snmp_set_valueretrieval function, which does not appear to be documented: http://il.php.net/snmp_set_valueretrieval What does this function depend upon? Simply using it throws this:

Re: [PHP] re[PHP] gister_globals

2008-01-16 Thread Sancar Saran
On Wednesday 16 January 2008 15:33:04 Jochem Maas wrote: tbt schreef: Hi, I'm a newbie to php and i would like to set register_globals to 'on' from my php script itself(eg:- index.php). Is there any way of doing this. you think you would like that. but you are wrong. register_globals is

Re: [PHP] utf-8 in $_POST

2008-01-16 Thread mike
you don't have to have your files in utf-8 for it to work, just the browser header. although any utf-8 characters in your files will look funky. it just depends where the content comes from... you could always use #174; for the (r) registered symbol for example. i'd be more apt to figuring out

Re: [PHP] Encryption failing

2008-01-16 Thread mike
On 1/16/08, Ken Kixmoeller -- reply to [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Jan 16, 2008, at 1:28 AM, Andrés Robinet wrote: His other post explains that php didn't seem to like spaces. No spaces in the test strings -- I'll check for those when/if I can get the core en/decryption

Re: [PHP] New years resolution: To get serious with my programming! Anyone wanna help? :)

2008-01-16 Thread Daniel Brown
On Jan 15, 2008 6:42 PM, Jochem Maas [EMAIL PROTECTED] wrote: funny that, I usually use 'exit;' for a clean exit and 'die();' to signify a shitty exit ... although they are actually indentical functionally - just my idiosyncrasity ... that said I also so stuff like 'exit(1);' when I really

Re: [PHP] How to take video embed codes and change all their widths/heights?

2008-01-16 Thread Daniel Brown
On Jan 15, 2008 6:37 PM, Jochem Maas [EMAIL PROTECTED] wrote: Daniel Brown schreef: .. $embed_code = preg_replace('/height=([0-9]*)/U','height='.$height.'',preg_replace('/width=([0-9]*)/U','width='.$width.'',$embed_code)); I wouldn't have given him the complete regexp - how will they

[PHP] changing the ini from a file

2008-01-16 Thread Wolf
I'm using .htaccess to do php_value auto_prepend_file auth.php The problem is that there are very specific files that I want to be able to NOT run that in. I guess I could just move them to a directory and use .htaccess to perform a php_value auto_prepend_file But I was hoping to not have

Re: [PHP] changing the ini from a file

2008-01-16 Thread Daniel Brown
On Jan 16, 2008 11:10 AM, Wolf [EMAIL PROTECTED] wrote: I'm using .htaccess to do php_value auto_prepend_file auth.php The problem is that there are very specific files that I want to be able to NOT run that in. I guess I could just move them to a directory and use .htaccess to perform a

Re: [PHP] changing the ini from a file

2008-01-16 Thread Wolf
Daniel Brown [EMAIL PROTECTED] wrote: On Jan 16, 2008 11:10 AM, Wolf [EMAIL PROTECTED] wrote: I'm using .htaccess to do php_value auto_prepend_file auth.php The problem is that there are very specific files that I want to be able to NOT run that in. I guess I could just move

Re: [PHP] changing the ini from a file

2008-01-16 Thread Daniel Brown
On Jan 16, 2008 11:33 AM, Wolf [EMAIL PROTECTED] wrote: Daniel Brown [EMAIL PROTECTED] wrote: [snip] At that point, wouldn't it be just as easy to ? require('auth.php'); ? as the first line of each file you want it in, and omit the line in those you don't? Or are there a lot of

Re: [PHP] New years resolution: To get serious with my programming! Anyone wanna help? :)

2008-01-16 Thread Reese
Daniel Brown wrote: On Jan 15, 2008 6:42 PM, Jochem Maas [EMAIL PROTECTED] wrote: funny that, I usually use 'exit;' for a clean exit and 'die();' to signify a shitty exit ... although they are actually indentical functionally - just my idiosyncrasity ... that said I also so stuff like

Re: [PHP] changing the ini from a file

2008-01-16 Thread Jim Lucas
Wolf wrote: I'm using .htaccess to do php_value auto_prepend_file auth.php The problem is that there are very specific files that I want to be able to NOT run that in. I guess I could just move them to a directory and use .htaccess to perform a php_value auto_prepend_file But I was hoping

Re: [PHP] changing the ini from a file

2008-01-16 Thread Jim Lucas
Jim Lucas wrote: Wolf wrote: I'm using .htaccess to do php_value auto_prepend_file auth.php The problem is that there are very specific files that I want to be able to NOT run that in. I guess I could just move them to a directory and use .htaccess to perform a php_value auto_prepend_file

Re: [PHP] changing the ini from a file

2008-01-16 Thread Wolf
Daniel Brown [EMAIL PROTECTED] wrote: On Jan 16, 2008 11:33 AM, Wolf [EMAIL PROTECTED] wrote: Daniel Brown [EMAIL PROTECTED] wrote: [snip] At that point, wouldn't it be just as easy to ? require('auth.php'); ? as the first line of each file you want it in, and omit the

Re: [PHP] Encryption failing

2008-01-16 Thread Ken Kixmoeller -- reply to [EMAIL PROTECTED]
Many thanks, Mike --- yours works great... 0 errors. On Jan 16, 2008, at 9:24 AM, mike wrote: function data_encrypt($data) { if(!$data) { return false; } return base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $GLOBALS['config']['salt'], $data, 'cbc', md5($GLOBALS['config']['

Re: [PHP] changing the ini from a file

2008-01-16 Thread Daniel Brown
On Jan 16, 2008 12:02 PM, Jim Lucas [EMAIL PROTECTED] wrote: Jim Lucas wrote: Wolf wrote: I'm using .htaccess to do php_value auto_prepend_file auth.php The problem is that there are very specific files that I want to be able to NOT run that in. I guess I could just move them to a

Re: [PHP] changing the ini from a file

2008-01-16 Thread Wolf
Jim Lucas [EMAIL PROTECTED] wrote: Jim Lucas wrote: Wolf wrote: I'm using .htaccess to do php_value auto_prepend_file auth.php The problem is that there are very specific files that I want to be able to NOT run that in. I guess I could just move them to a directory and use

Re: [PHP] XAdES in PHP

2008-01-16 Thread Pierre Pintaric
Thanks for your responses I think I will start a project for PHP with the implementation of a library for signatures Of course, with XAdES, XMLDSig will be covered... Now I have to learn XAdES specifications, a splendid activity ;-) stay tuned... ;-) -- Pierre PINTARIC SICTIAM Porte 15

Re: [PHP] changing the ini from a file

2008-01-16 Thread Richard Lynch
Personally, I would find it confusing to have settings in httpd.conf with different file suffixes controlling whether or not any given application file included the auth.inc file... Even doing it in .htaccess with Files seems a bit hackish. Turning auto_prepend on/off seems reasonable. But I'd

Re: [PHP] snmp_set_valueretrieval depends on what?

2008-01-16 Thread Richard Lynch
On Wed, January 16, 2008 7:34 am, Dotan Cohen wrote: I am experimenting with the snmp_set_valueretrieval function, which does not appear to be documented: http://il.php.net/snmp_set_valueretrieval What does this function depend upon? Simply using it throws this: Fatal error: Call to

Re: [PHP] Scripts are fast locally, but slow on remote server

2008-01-16 Thread Richard Lynch
Are you relying on autoload or anything of that nature to load in class files, perhaps? On Wed, January 16, 2008 1:02 am, Dave M G wrote: PHP list, I have a set of PHP scripts that seem to be efficient and quick enough both on my home testing environment, and a few different web-hosting

Re: [PHP] Scripts are fast locally, but slow on remote server

2008-01-16 Thread Richard Lynch
On Wed, January 16, 2008 1:29 am, Dave M G wrote: Per Jessen, Thank you for responding. Might this be a name-server issue? Maybe, but I don't think so. The reason I suspect that is not the case is because I can go first to a .html page on the server, and it loads up quickly. Then I go

[PHP] Don't search for domains on Network Solutions...

2008-01-16 Thread Eric Butera
... otherwise this will happen: erics:~/Sites eric$ /opt/php5/bin/php networksolutions.php Starting at 01/16/2008 12:36pm.Result: ...snip... Your Domain Name Search Results Congratulations! The following domains are available eric-butera-for-php-general Then a few minutes later: erics:~ eric$

[PHP] green bean question on singleton php5

2008-01-16 Thread julian
Hi, I am implementing this class dbaccess{ static $db=null; static $othervar=33; private function dbaccess(){ dbaccess::$db= new mysqli(localhost,USER,PASSWD,DB); if(mysqli_connect_errno()){ echo no way; } } public static function GetDb(){

Re: [PHP] Word Wrap on highlight_file

2008-01-16 Thread Tom Chubb
On 16/01/2008, Jochem Maas [EMAIL PROTECTED] wrote: Tom Chubb schreef: Can anyone tell me how to wrap the results of highlight_file so it doesn't mess up the size of my table div? use CSS to control the visual display in the browser. not to mention that 'table div' doesn't make much sense

Re: [PHP] re[PHP] gister_globals

2008-01-16 Thread Richard Lynch
On Wed, January 16, 2008 12:21 am, tbt wrote: I'm a newbie to php and i would like to set register_globals to 'on' from my php script itself(eg:- index.php). Is there any way of doing this. You can't turn it on really, because by the time your PHP script is running and trying to turn it on,

Re: [PHP] Re: re[PHP] gister_globals

2008-01-16 Thread Richard Lynch
Stop using session_register, and start using: $_SESSION['refString'] = $_GET['refNo']; And, actually, you should do something more like this: $refNo = (int) $_GET['refNo']; //sanitize input $_SESSION['refString'] = $refNo; The MORE specific you can be about what is a VALID $refNo, in place of

Re: [PHP] green bean question on singleton php5

2008-01-16 Thread Eric Butera
On Jan 16, 2008 12:57 PM, julian [EMAIL PROTECTED] wrote: Hi, I am implementing this class dbaccess{ static $db=null; static $othervar=33; private function dbaccess(){ dbaccess::$db= new mysqli(localhost,USER,PASSWD,DB); if(mysqli_connect_errno()){ echo no

RE: [PHP] (SOLVED) /etc/php.init changes not honored

2008-01-16 Thread Ryan H. Madison
All, The problem turned out to be selinux. With the newest version of RH, a new security model has been implemented. Instead of doing Discretionary Access Control (DAC, conventional rwx permissions) RH implements selinux which uses Mandatory Access Control (MAC, enhanced permissions

Re: [PHP] Re: [QUESTION] MAIL: Send a NOOP instead of DATA

2008-01-16 Thread Richard Lynch
On Tue, January 15, 2008 11:03 pm, Manuel Lemos wrote: Hello, on 01/16/2008 02:11 AM mike said the following: Why not look at phpmailer? Probably more robust than some random classes. I did not suggest any random classes. I developed those classes since 1999 and I know they work reliably

[PHP] Re: green bean question on singleton php5

2008-01-16 Thread Colin Guthrie
julian wrote: Hi, I am implementing this class dbaccess{ static $db=null; static $othervar=33; private function dbaccess(){ dbaccess::$db= new mysqli(localhost,USER,PASSWD,DB); if(mysqli_connect_errno()){ echo no way; } } public static

Re: [PHP] green bean question on singleton php5

2008-01-16 Thread Daniel Brown
On Jan 16, 2008 12:57 PM, julian [EMAIL PROTECTED] wrote: Hi, I am implementing this [snip!] I'm heading out to lunch, so double-check this for errors, but I rewrote your class. You'll have to add your fetch handlers and such. ? class dbaccess{ static $db = null; static $conn =

RE: [PHP] Don't search for domains on Network Solutions...

2008-01-16 Thread Andrés Robinet
-Original Message- From: Eric Butera [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 16, 2008 2:57 PM To: php php Subject: [PHP] Don't search for domains on Network Solutions... ... otherwise this will happen: erics:~/Sites eric$ /opt/php5/bin/php networksolutions.php

RE: [PHP] QNX build

2008-01-16 Thread Andrés Robinet
-Original Message- From: Richard [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 16, 2008 12:48 PM To: php-general@lists.php.net Subject: [PHP] QNX build Hi, After installing PHP on a Windows machine I see a very small PHP-executable and several extension dll's that can be

Re: [PHP] green bean question on singleton php5

2008-01-16 Thread Julian
but that forces me to implement a large interface of functions that I prefer to avoid... the $dummy thing works... but I guess it is not by the book. I would like to understand what am I missing fom the concept Thanks. JCG Daniel Brown wrote: On Jan 16, 2008 12:57 PM, julian [EMAIL

Re: [PHP] green bean question on singleton php5

2008-01-16 Thread Julian
nope... only works if I change $dummy= new dbaccess(); and keep the rest . Thanks. ... hope it does not repeat... got undelivered... Eric Butera wrote: On Jan 16, 2008 12:57 PM, julian [EMAIL PROTECTED] wrote: Hi, I am implementing this class dbaccess{ static $db=null;

Re: [PHP] green bean question on singleton php5

2008-01-16 Thread Nathan Nobbe
to all who have posted classes w/ the singleton instance as a public static; this is not good. the singleton instance should be stored in a private static variable. why? because, otherwise client code can just access the value directly, and even unset the instance; which sort of defeats the

Re: [PHP] SMTP vs mail()

2008-01-16 Thread Nathan Rixham
You can easily make a mail queue in php yourself with a daemon that checks the queue and sends waiting mail in batches of say 200 per minute. (provided you have access to the cli on the server) Black http://rssphp.net a85020316bb687648d6f73c4eb3bec93 :msg::id Chris wrote: Manuel Lemos wrote:

RE: [PHP] green bean question on singleton php5

2008-01-16 Thread Andrés Robinet
-Original Message- From: Julian [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 16, 2008 3:37 PM To: Daniel Brown Cc: julian; php-general@lists.php.net Subject: Re: [PHP] green bean question on singleton php5 but that forces me to implement a large interface of functions that

[PHP] Re: green bean question on singleton php5

2008-01-16 Thread Colin Guthrie
Julian wrote: but that forces me to implement a large interface of functions that I prefer to avoid... the $dummy thing works... but I guess it is not by the book. I would like to understand what am I missing fom the concept You made a critial error in the original implem. You

Re: [PHP] green bean question on singleton php5

2008-01-16 Thread Jochem Maas
julian schreef: Hi, I am implementing this try comparing this rewrite with your version: abstract class dbaccess { static $db = null; private static function init() { if (dbaccess::$db)) return; dbaccess::$db = new mysqli(localhost,USER,PASSWD,DB);

Re: [PHP] green bean question on singleton php5

2008-01-16 Thread Nathan Nobbe
On Jan 16, 2008 1:36 PM, Julian [EMAIL PROTECTED] wrote: I would like to understand what am I missing fom the concept here are the issues i see; you should have a private static for the instance of dbaccess you should have a private instance variable for the instance of the mysqli class

RE: [PHP] green bean question on singleton php5

2008-01-16 Thread Andrés Robinet
-Original Message- From: Julian [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 16, 2008 3:39 PM Cc: php-general@lists.php.net Subject: Re: [PHP] green bean question on singleton php5 nope... only works if I change $dummy= new dbaccess(); and keep the rest .

Re: [PHP] Word Wrap on highlight_file

2008-01-16 Thread Jochem Maas
Tom Chubb schreef: On 16/01/2008, Jochem Maas [EMAIL PROTECTED] wrote: Tom Chubb schreef: ... Jochem, Thanks for that. So presumably it's not possible to do it in PHP? there probably is but I can't tell what the problem is exactly without seeing the output source and rendering, that

Re: [PHP] Don't search for domains on Network Solutions...

2008-01-16 Thread Eric Butera
On Jan 16, 2008 2:32 PM, Andrés Robinet [EMAIL PROTECTED] wrote: A couple of days ago I've come across this: http://www.seomoz.org/blog/network-solutions-exploits-icanns-fiveday-refund- rule-to-hoard-domains So... I don't even think that network solutions is the only one doing it. I know

Re: [PHP] green bean question on singleton php5

2008-01-16 Thread julian
you are forcing the no instantiation via abstract, instead of hiding via private method constructor. You change the constructor for an init function. still the $dummy = new dbaccess (). looks like a simpler solution Thanks for your comments Jochem Maas wrote: julian schreef:

[PHP] Re: green bean question on singleton php5

2008-01-16 Thread julian
That very much make sense. I am indeed doing two assignments. I was just wondering how to call the constructor. The new statement was the only way I saw and it only worked in an assignment . I could not call dbaccess(); nor dbaccess::dbaccess();... Probably the easiest way is a mix

Re: [PHP] Don't search for domains on Network Solutions...

2008-01-16 Thread Daniel Brown
On Jan 16, 2008 2:29 PM, Eric Butera [EMAIL PROTECTED] wrote: It obviously isn't related to PHP. I figured that most of us are in the business of making web applications for clients that are accessed through a domain at some point, so I sent it as a general warning to people. My company has

RE: [PHP] Don't search for domains on Network Solutions...

2008-01-16 Thread Andrés Robinet
-Original Message- From: Daniel Brown [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 16, 2008 5:06 PM To: Eric Butera Cc: Andrés Robinet; php php Subject: Re: [PHP] Don't search for domains on Network Solutions... On Jan 16, 2008 2:29 PM, Eric Butera [EMAIL PROTECTED] wrote:

Re: [PHP] snmp_set_valueretrieval depends on what?

2008-01-16 Thread Per Jessen
Richard Lynch wrote: On Wed, January 16, 2008 7:34 am, Dotan Cohen wrote: I am experimenting with the snmp_set_valueretrieval function, which does not appear to be documented: http://il.php.net/snmp_set_valueretrieval What does this function depend upon? Simply using it throws this: Fatal

Re: [PHP] green bean question on singleton php5

2008-01-16 Thread Jochem Maas
julian schreef: you are forcing the no instantiation via abstract, instead of hiding via private method constructor. you want to garantee a single instance of the mysqli object - who cares exactly how this is done. besides which the whole exercise is bogus. you want a DB connection

Re: [PHP] green bean question on singleton php5

2008-01-16 Thread Nathan Nobbe
On Jan 16, 2008 3:59 PM, Jochem Maas [EMAIL PROTECTED] wrote: given that dbaccess doesn't extend mysqli instantiation of dbaccess is completely pointless no? i dont know; i think using an instance of dbaccess to control a single instance of the mysqli class is appropriate. personally, i

Re: [PHP] Don't search for domains on Network Solutions...

2008-01-16 Thread Eric Butera
On Jan 16, 2008 4:27 PM, Andrés Robinet [EMAIL PROTECTED] wrote: -Original Message- From: Daniel Brown [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 16, 2008 5:06 PM To: Eric Butera Cc: Andrés Robinet; php php Subject: Re: [PHP] Don't search for domains on Network

Re: [PHP] Don't search for domains on Network Solutions...

2008-01-16 Thread Daniel Brown
On Jan 16, 2008 4:30 PM, Eric Butera [EMAIL PROTECTED] wrote: His program was for CLI. Correct. Sorry, forgot to mention it lunch was calling my name, and I had to answer. -- /Dan Daniel P. Brown Senior Unix Geek and #1 Rated Year's Coolest Guy By Self Since

Re: [PHP] green bean question on singleton php5

2008-01-16 Thread Eric Butera
On Jan 16, 2008 4:13 PM, Nathan Nobbe [EMAIL PROTECTED] wrote: On Jan 16, 2008 3:59 PM, Jochem Maas [EMAIL PROTECTED] wrote: given that dbaccess doesn't extend mysqli instantiation of dbaccess is completely pointless no? i dont know; i think using an instance of dbaccess to control a

Re: [PHP] Don't search for domains on Network Solutions...

2008-01-16 Thread Eric Butera
On Jan 16, 2008 4:35 PM, Daniel Brown [EMAIL PROTECTED] wrote: On Jan 16, 2008 4:30 PM, Eric Butera [EMAIL PROTECTED] wrote: His program was for CLI. Correct. Sorry, forgot to mention it lunch was calling my name, and I had to answer. -- /Dan Daniel P. Brown Senior Unix Geek

Re: [PHP] Don't search for domains on Network Solutions...

2008-01-16 Thread Daniel Brown
On Jan 16, 2008 4:48 PM, Eric Butera [EMAIL PROTECTED] wrote: You did forget to escape the user input value in case I was trying to hacks myself. :) No I didn't. QUOTE: I just whipped it up now, so it's not going to be perfect, but it will give accurate results, without risking any

Re: [PHP] Don't search for domains on Network Solutions...

2008-01-16 Thread Eric Butera
On Jan 16, 2008 4:51 PM, Daniel Brown [EMAIL PROTECTED] wrote: On Jan 16, 2008 4:48 PM, Eric Butera [EMAIL PROTECTED] wrote: You did forget to escape the user input value in case I was trying to hacks myself. :) No I didn't. QUOTE: I just whipped it up now, so it's not going to

Re: [PHP] green bean question on singleton php5

2008-01-16 Thread Jochem Maas
Eric Butera schreef: On Jan 16, 2008 4:13 PM, Nathan Nobbe [EMAIL PROTECTED] wrote: On Jan 16, 2008 3:59 PM, Jochem Maas [EMAIL PROTECTED] wrote: given that dbaccess doesn't extend mysqli instantiation of dbaccess is completely pointless no? i dont know; i think using an instance of

Re: [PHP] Scripts are fast locally, but slow on remote server

2008-01-16 Thread Jochem Maas
Richard Lynch schreef: Are you relying on autoload or anything of that nature to load in class files, perhaps? garanteed that it's not an autoload related problem. and Im willing to bet it's a dns related issue - I remember similar problems reported on the list and it always came down to dns.

Re: [PHP] green bean question on singleton php5

2008-01-16 Thread Eric Butera
On Jan 16, 2008 4:55 PM, Jochem Maas [EMAIL PROTECTED] wrote: Eric Butera schreef: On Jan 16, 2008 4:13 PM, Nathan Nobbe [EMAIL PROTECTED] wrote: On Jan 16, 2008 3:59 PM, Jochem Maas [EMAIL PROTECTED] wrote: given that dbaccess doesn't extend mysqli instantiation of dbaccess is

Re: [PHP] green bean question on singleton php5

2008-01-16 Thread Nathan Nobbe
On Jan 16, 2008 4:55 PM, Jochem Maas [EMAIL PROTECTED] wrote: Eric Butera schreef: I still don't understand the obsession of a singleton in regards to a db connection. Using a registry is a much better practice I think. I think I alluded to the registry pattern in my reply above -

Re: [PHP] QNX build

2008-01-16 Thread Jochem Maas
Richard schreef: Hi, After installing PHP on a Windows machine I see a very small PHP-executable and several extension dll's that can be loaded. When I build PHP on a QNX machine I get one huge executable of 8.6 MB. Is it possible to build something similar to the Windows version? yes, by

Re: [PHP] green bean question on singleton php5

2008-01-16 Thread Nathan Nobbe
On Jan 16, 2008 5:06 PM, Eric Butera [EMAIL PROTECTED] wrote: Also with the registry you can use lazy loading. singleton is typically implemented with a lazy loading approach, and most of the code samples ive seen on this thread today use a lazy loading approach. could you give us a more

Re: [PHP] green bean question on singleton php5

2008-01-16 Thread Eric Butera
On Jan 16, 2008 5:06 PM, Nathan Nobbe [EMAIL PROTECTED] wrote: On Jan 16, 2008 4:55 PM, Jochem Maas [EMAIL PROTECTED] wrote: Eric Butera schreef: I still don't understand the obsession of a singleton in regards to a db connection. Using a registry is a much better practice I

Re: [PHP] green bean question on singleton php5

2008-01-16 Thread Nathan Nobbe
On Jan 16, 2008 5:09 PM, Eric Butera [EMAIL PROTECTED] wrote: Here is an implementation: http://framework.zend.com/manual/en/zend.registry.html Here is another: http://www.stubbles.net/browser/trunk/src/main/php/net/stubbles/util/stubRegistry.php cool; ill have a look when i get home.

Re: [PHP] green bean question on singleton php5

2008-01-16 Thread Jochem Maas
Eric Butera schreef: On Jan 16, 2008 4:55 PM, Jochem Maas [EMAIL PROTECTED] wrote: Eric Butera schreef: On Jan 16, 2008 4:13 PM, Nathan Nobbe [EMAIL PROTECTED] wrote: On Jan 16, 2008 3:59 PM, Jochem Maas [EMAIL PROTECTED] wrote: given that dbaccess doesn't extend mysqli instantiation of

Re: [PHP] green bean question on singleton php5

2008-01-16 Thread Eric Butera
On Jan 16, 2008 5:10 PM, Nathan Nobbe [EMAIL PROTECTED] wrote: On Jan 16, 2008 5:09 PM, Eric Butera [EMAIL PROTECTED] wrote: Here is an implementation: http://framework.zend.com/manual/en/zend.registry.html Here is another:

Re: [PHP] Don't search for domains on Network Solutions...

2008-01-16 Thread Joker7
In news: [EMAIL PROTECTED] - Daniel Brown wrote : On Jan 16, 2008 2:29 PM, Eric Butera [EMAIL PROTECTED] wrote: It obviously isn't related to PHP. I figured that most of us are in the business of making web applications for clients that are accessed through a domain at some point, so I sent

Re: [PHP] Don't search for domains on Network Solutions...

2008-01-16 Thread Daniel Brown
On Jan 16, 2008 4:54 PM, Eric Butera [EMAIL PROTECTED] wrote: On Jan 16, 2008 4:51 PM, Daniel Brown [EMAIL PROTECTED] wrote: On Jan 16, 2008 4:48 PM, Eric Butera [EMAIL PROTECTED] wrote: You did forget to escape the user input value in case I was trying to hacks myself. :) No

Re: [PHP] Don't search for domains on Network Solutions...

2008-01-16 Thread Eric Butera
On Jan 16, 2008 5:21 PM, Daniel Brown [EMAIL PROTECTED] wrote: On Jan 16, 2008 4:54 PM, Eric Butera [EMAIL PROTECTED] wrote: On Jan 16, 2008 4:51 PM, Daniel Brown [EMAIL PROTECTED] wrote: On Jan 16, 2008 4:48 PM, Eric Butera [EMAIL PROTECTED] wrote: You did forget to escape the user

Re: [PHP] Don't search for domains on Network Solutions...

2008-01-16 Thread Daniel Brown
On Jan 16, 2008 5:49 PM, Eric Butera [EMAIL PROTECTED] wrote: [snip!] Okay, Eric, I'm not getting involved in any kind of flame war. I am sorry that I struck a nerve with my response as that wasn't my goal. I just hoped that it would be in the archives in case somebody did stumble upon

Re: [PHP] Encryption failing

2008-01-16 Thread Richard Lynch
On Tue, January 15, 2008 10:48 pm, Casey wrote: On Jan 15, 2008 8:40 PM, Ken Kixmoeller -- reply to [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Jan 15, 2008, at 11:08 PM, Andrés Robinet wrote: I second that, you should base64 encode values before encrypting and base64 decode them

Re: [PHP] Encryption failing

2008-01-16 Thread Richard Lynch
Is it possible that 4% of the time, you have spaces on the start/end of the string, which get trimmed before encryption? And if rijndael is one of the algorithms which requires a fixed-size input, that also would be bad to trim it. If you need multiple of 16 bytes input, leave the input alone.

Re: [PHP] New years resolution: To get serious with my programming! Anyone wanna help? :)

2008-01-16 Thread Richard Lynch
On Wed, January 16, 2008 9:57 am, Daniel Brown wrote: echo($h.\n.$i.\n); // echo is a construct, but as expected, can use parentheses() Just to be picuyane: echo isn't using the parens. The parens are forcing PHP to evaluate the concatenation of the strings FIRST, and then echo them. And

Re: [PHP] How to take video embed codes and change all their widths/heights?

2008-01-16 Thread Richard Lynch
$stringtoedit = preg_replace(/width=(\?[0-9%]\?[^0-9%\])/msi, width=\\\1\, $stringtoedit); $stringtoedit = preg_replace(/height=(\?[0-9%]\?[^0-9%\])/msi, height=\\\1\, $stringtoedit); This adds quotes around quote-less values, which were once acceptable HTML, but aren't really a Good Idea. It

[PHP] Function-return-array idea

2008-01-16 Thread Stijn Leenknegt
Hello I've an idea for PHP6. Let's kickoff with an example. ?php $info = getUserInformation($id); //return an array with all the information of an user. echo $info['naam']; ? This is nice, but when I want one element of the returned array, I have to store the returned array into a variable and

Re: [PHP] re[PHP] gister_globals

2008-01-16 Thread Jochem Maas
Sancar Saran schreef: On Wednesday 16 January 2008 15:33:04 Jochem Maas wrote: tbt schreef: Hi, I'm a newbie to php and i would like to set register_globals to 'on' from my php script itself(eg:- index.php). Is there any way of doing this. you think you would like that. but you are wrong.

Re: [PHP] Function-return-array idea

2008-01-16 Thread Richard Lynch
On Wed, January 16, 2008 5:32 pm, Stijn Leenknegt wrote: I've an idea for PHP6. Let's kickoff with an example. This belongs on php-internals... ?php echo getUserInformation($id)['naam']; ? where it has already been discussed at length, and, as I recall, rejected as too obfuscated for the

Re: [PHP] calling java within php setup?

2008-01-16 Thread Richard Lynch
On Tue, January 15, 2008 5:32 pm, Jochem Maas wrote: Janet N schreef: with a bit of luck you'll then have a .so file that is your new extension, now it a matter moving the .so to a suitable place (if you have root access, you can run 'make install') and of editing php.ini to load the

Re: [PHP] Function-return-array idea

2008-01-16 Thread Jim Lucas
I think this would be an easier/quicker fix for you then requesting that the PHP developers re-write a large portion of the way PHP currently works. ?php function i($arr, $i) { return $arr[$i]; } echo i(getUserInformation($id), 'naam'); #or echo i($object-fetchObjects(), 0)-method();

[PHP] Re: Function-return-array idea

2008-01-16 Thread Shawn McKenzie
I'm sure I'm a pea-brain, but this caught my attention. So you execute the fetchObjects() method which could return a large number of objects, then you reference a method of the 0th one. I didn't test, but why not use: $object-fetchObjects(0)-method(); Where fetchObjects($id) returns the object

[PHP] system command runs application, but application doesn't work correctly

2008-01-16 Thread Apple7777
Hello, I'm trying to run mencoder command line utility to encode videos. When I use these two command in terminal (through SSH), everything works fine. But when I run them from PHP script with system command, it doesn't work. The commands are: First pass:

Re: [PHP] system command runs application, but application doesn't work correctly

2008-01-16 Thread Daniel Brown
On Jan 16, 2008 7:56 PM, Apple [EMAIL PROTECTED] wrote: Hello, I'm trying to run mencoder command line utility to encode videos. When I use these two command in terminal (through SSH), everything works fine. But when I run them from PHP script with system command, it doesn't work. [snip]

Re: [PHP] snmp_set_valueretrieval depends on what?

2008-01-16 Thread Dotan Cohen
On 16/01/2008, Richard Lynch [EMAIL PROTECTED] wrote: You can check at http://xlr.php.net but I suspect that it's too new to be in your version of PHP. You are on 5.2.1 and php.net is offering 5.2.5, so you're just enough behind for this to be very plausible. Maybe get Ubuntu to catch up?

RE: [PHP] Scripts are fast locally, but slow on remote server

2008-01-16 Thread Bastien Koert
memory limitation in the php ini? bastien Date: Wed, 16 Jan 2008 16:29:53 +0900 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: php-general@lists.php.net Subject: Re: [PHP] Scripts are fast locally, but slow on remote server Per Jessen, Thank you for responding. Might this be a

[PHP] PHP array entries max limit

2008-01-16 Thread Prabath Kumarasinghe
Hi All I would like to know how many entries does PHP associative array can handle. Cheers Prabath

[PHP] PHP function to list all mysql tables used in a script

2008-01-16 Thread Javed Khan
Hello All, I have php script which performs various sql operations, like insert row in table A, delete row from Table B and Update rows in table C. Now I would like to display all those tables that are affected by my script. Can anyone send me a function or script if it is already available?

Re: [PHP] PHP function to list all mysql tables used in a script

2008-01-16 Thread Chris
Javed Khan wrote: Hello All, I have php script which performs various sql operations, like insert row in table A, delete row from Table B and Update rows in table C. Now I would like to display all those tables that are affected by my script. Can anyone send me a function or script if it is

  1   2   >