Re: [PHP] Howto detect the hostname of the server?

2011-11-25 Thread Mark Kelly
Hi. On Saturday 26 Nov 2011 at 00:14 Andreas wrote: > how could I identify the server the script runs on? [snip] > I looked into phpinfo() but haven't found anything helpful, yet. > Have I overlooked something or is there another way to identify the server? Wouldn't the server IP address in $

Re: [PHP] Re: Secure data management

2011-10-05 Thread Mark Kelly
Hi. On Wednesday 05 Oct 2011 at 00:04 Mark Kelly wrote: > I'd be interested in any ideas folk have about these issues, or any others > they can envisage with this proposal. Thank you all for joining in here - it's been a fascinating read so far. Mark -- PHP General Ma

Re: [PHP] Re: Secure data management

2011-10-04 Thread Mark Kelly
Hi. On Tuesday 04 Oct 2011 at 21:39 Stuart Dallas wrote: > http://stut.net/2011/09/15/mysql-real-escape-string-is-not-enough/ Thanks. I followed this link through and read the full message (having missed it the first time round), and while I find the idea of using base64 to sanitise text inter

Re: [PHP] Object Query Language optimization

2011-05-21 Thread Mark Kelly
Hi. On Saturday 21 May 2011 at 15:56 jean-baptiste verrey wrote: > I'm writing an Object Query Language [snip] > (queries don't get much more complicated than that, you have multiple > alias.fieldName in the select, then multiple joins) I often use SQL that is far, far more complex than this.

Re: [PHP] Re: dynamic copyright in page footer?

2011-04-30 Thread Mark Kelly
On Saturday 30 Apr 2011 at 14:28 Nathan Rixham wrote: > echo implode(",", range(2011,date("Y"))); What an elegant solution! Thank you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Regex for extracting quoted strings

2011-03-05 Thread Mark Kelly
Hi. Thanks for all the replies. On Saturday 05 Mar 2011 at 22:11 Simon J Welsh wrote: > On 6/03/2011, at 11:08 AM, Shawn McKenzie wrote: > > $regex = '/"([^"]+)"/'; Shawn, this regex gets me two copies of each string - one with and one without the double quotes - as did the one Nathan posted e

[PHP] Regex for extracting quoted strings

2011-03-05 Thread Mark Kelly
Hi. I'm hoping someone can help me extract text between double quotes from a string. $regex = 'some magic'; $r = preg_match($regex, $sentence, $phrases); So, if $sentence = 'Dave said "This is it". "Nope, that is the wrong colour" she replied.'; I want $phrases to contain 'This is it' and '

Re: [PHP] Custom function

2011-02-16 Thread Mark Kelly
Hi. On Wednesday 16 Feb 2011 at 00:49 Simon J Welsh wrote: > As $z is converted to a boolean and exists, that works just the same way as > !empty(). --- First I'd like to apologise for handing out bad advice, and second, to thank Simon and Andre for pointing out my mistake. I'll go back to kee

Re: [PHP] Custom function

2011-02-15 Thread Mark Kelly
Hi. On Tuesday 15 Feb 2011 at 23:41 Andre Polykanine wrote: > Give it a default (possible empty) value: > > function MyFunction($x, $y, $z="") { > // function goes here > if (!empty($z)) { > // The optional parameter is given > } > } Using an empty string and the empty() function in this way can

Re: [PHP] NetBeans Question

2010-05-30 Thread Mark Kelly
Hi. On Monday 31 May 2010 at 02:50 Ashley Sheridan wrote: > Yeah, like I mentioned earlier, Dreamweaver is known for having issues > with include files, can be slow when working on large projects with lots > of files, and is only available for Mac and Windows, which limits it > somewhat. Indeed.

Re: [PHP] NetBeans Question

2010-05-30 Thread Mark Kelly
t a real IDE. If you want a regular text > editor netbeans is the way to go. > > On Sun, May 30, 2010 at 8:15 PM, Mark Kelly wrote: > > Hi Tedd. > > > > On Sunday 30 May 2010 at 19:01 tedd wrote: > > > I wanted to ask my questions on the NetBeans forums, but I a

Re: [PHP] NetBeans Question

2010-05-30 Thread Mark Kelly
Hi Tedd. On Sunday 30 May 2010 at 19:01 tedd wrote: > I wanted to ask my questions on the NetBeans forums, but I am having > trouble logging in. They seem to have a problem with my given ID, > password, and email address and I haven't the time to straighten it > all out -- I just want answers -- s

Re: [PHP] Need login suggestions

2010-05-02 Thread Mark Kelly
Hi. On Monday 03 May 2010 at 03:49 Ashley M. Kirchner wrote: [snip] >So what if a student registers on the wrong side of the wall? Nothing > happens [snip] > Kids would be registering for a > photo contest, parents will be registering for something completely > different. You might try ch

[PHP] Server-side encryption to prevent form hacking: new idea?

2009-12-11 Thread Kelly Jones
If you have an HTML form select field xyz with possible values "apple", "banana", and "cucumber", anyone can easily set xyz to an arbitrary value. To prevent this, I create a hidden field code[xyz] with value: base64_encode(mcrypt_ecb( MCRYPT_RIJNDAEL_256,$salt,"apple,banana,cucumber",MCRYPT_ENCR

Re: [PHP] Recognizing double clicks

2009-11-22 Thread Mark Kelly
Hi. On Sunday 22 Nov 2009 at 05:34 Skip Evans wrote: > It just dawned on me the button may be disabled right when > it's clicked to prevent a double submit? > > Is that doable? To mark a button as disabled after it has been clicked to prevent it being clicked twice just add some simple code in

[PHP] Encrypt then decrypt yields extra dots at end

2009-09-07 Thread Kelly Jones
I thought this code: $enc=mcrypt_ecb(MCRYPT_RIJNDAEL_256,"salt123","encrypt_me",MCRYPT_ENCRYPT); $dec=mcrypt_ecb(MCRYPT_RIJNDAEL_256,"salt123",$enc,MCRYPT_DECRYPT); echo $dec; would yield "encrypt_me". The actual result is "encrypt_me.." (bunch of extra dots). Why, and how do

Re: [PHP] putting variables in a variable

2009-07-21 Thread Mark Kelly
Ross, If I understand correctly what you want to do, you're almost there... You need: $myimage1 = "image1.jpg"; $myimage2 = "image2.jpg"; $myimage3 = "image3.jpg"; $body .=" "; Cheers, Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Re: preg_replace problem

2009-06-14 Thread Mark Kelly
Hi. On Saturday 13 June 2009, Al wrote: > I may not have been very clear. Feed it just "test" with the > quotes. You should get back, "test" the same as you gave it. Instead, > I get back "e;test"e; Like Shawn, I have tried your code in isolation and only get the expected results. I loo

Re: [PHP] Fractions

2009-05-24 Thread Mark Kelly
Hi. On Sunday 24 May 2009, Ron Piggott wrote: > Is there a way to remove the trailing '0'? $width = number_format($width,2); > Also is there a way to have the original fraction display (1/4), as well > as have provision for 1/8 and 3/8 and 1/2, etc. display? On this one I suspect you'd have to

Re: [PHP] what to use instead of foreach

2009-04-14 Thread Mark Kelly
Hi Phil. On Monday 13 April 2009, PJ wrote: > Thanks for the suggestion, Mark. I've already experimented with count; > you're close, but there is still a small glitch and that's in count(); > foreach doesn't give a damn about count so you can't use that - it is > reset once inside the foreach loop

Re: [PHP] what to use instead of foreach

2009-04-13 Thread Mark Kelly
Hi. On Sunday 12 April 2009, PJ wrote: > foreach does not allow for different formatting for output... [snip] > But how do you get result1, result2 & result3 // with at end ? $lastIndex = count($a) - 1; // Adjust for zero-indexing. $outputString = ''; foreach ($a as $index => $value) { if

Re: [PHP] $_GET

2009-04-11 Thread Mark Kelly
Hi. On Sunday 12 April 2009, Ron Piggott wrote: > At the very start of my index.php I have the following lines of code: > > foreach($_GET as $key => $val) { > $$key = $_GET[$val]; > echo $_GET[$val] . ""; > } Try: echo $_GET[$key] . ""; HTH Mark -- PHP General Mailing List (http://www.php.ne

Re: [PHP] Search thoughts

2008-07-19 Thread Mark Kelly
Hi. Just noticed I replied direct rather than to the list last time, sorry about that. On Saturday 19 July 2008, Richard Heyes wrote: > How much traffic do you have and what's your hardware? Are your queries > cached and subsequently repeated? Do you pre cache common queries? I've done this kin

[PHP] Re: problem with "include" directive under XHTML

2008-06-03 Thread Michael Kelly
Robert Huff wrote: I'm working on a project that involves converting HTML to XHTML. Not strictly sure this is a PHP issue, but testing (so far) has eliminated other possibilities. Can someone offer suggestions why, on the same server (Apache 2.2.8), this works: Te

[PHP] Arbitrary mathematical relations, not just hashes

2008-04-06 Thread Kelly Jones
Many programming languages (including Perl, Ruby, and PHP) support hashes: $color['apple'] = 'red'; $color['ruby'] = 'red'; $type['apple'] = 'fruit'; $type['ruby'] = 'gem'; This quickly lets me find the color or type of a given item. In this sense, color() and type() are like mathematical funct

Re: [PHP] looping through a $_POST variable

2007-12-30 Thread Mark Kelly
Hi. On Monday 31 December 2007 00:34, Richard Kurth wrote: > When I do a var_dump($_POST['emails']); it has all the emails in it > string(65) "[EMAIL PROTECTED] [EMAIL PROTECTED] > [EMAIL PROTECTED]" Then this simple regex should do you; just use it instead of explode: $AddressList = preg_split(

Re: [PHP] From TXT to a mySQL db

2007-10-18 Thread Mark Kelly
Hi. On Thursday 18 October 2007 19:29, Marcelo Wolfgang wrote: > Hi all, > > I need some helps/tips to know if a transition from a txt file to a sql > database is viable to do. [snipped data and table descriptions] > Is there a quick and simple way to convert the row string into a INSERT > query

RE: [PHP] Problems with file_get_contents() and local PHP file

2007-08-08 Thread Michael Kelly
I'm too busy with other matters to try this out right now, but I'll make sure to try it later when I can. Thanks! -Mike - Original Message - From: ""Jan Reiter"" <[EMAIL PROTECTED]> Newsgroups: php.general To: <[EMAIL PROTECTED]>; "'Mike'" <[EMAIL PROTECTED]> Cc: Sent: Tuesd

Re: [PHP] Thoughts about music library

2007-08-06 Thread Mark Kelly
Hi. On Monday 06 August 2007 23:13, Børge Holen wrote: > As mentioned earlier, I want to make stuff myself When I did this I used Music Player Daemon (MPD - http://musicpd.org/) and wrote my own web interface in php. It offers a nice simple but powerful API, and is *very* low on resource usage

Re: [PHP] Pirate PHP books online?

2007-07-16 Thread Mark Kelly
Hi. On Monday 16 July 2007 12:42, Dotan Cohen wrote: > So, suckers, I'm with you now, and I'll start pirating again. This is a real shame (not to mention a foolish thing to post to a publicly archived mailing list). As a user of open source technology you are benefiting directly from the PHP

Re: [PHP] Re: php security books

2007-07-04 Thread Mark Kelly
Hi. On Wednesday 04 July 2007 13:01, Andrew Hutchings wrote: > Avoid the O'Reilly one as it is flawed. In what way? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP not posting

2007-06-24 Thread Mark Kelly
On Sunday 24 June 2007 13:54, Pieter du Toit wrote: > Hi > > I installed PHP5 on iis and i can see "hello world" and phpinfo. > > When i right click the webpage and view source, i can see the php code, > and the form does not want to post the form details. > > Will appreciate any help. I'm not rea

[PHP] Intercepting fopen, mysql_connect, and similar functions for migration

2007-06-08 Thread Kelly Jones
I'm migrating a website from one server to another, and my file paths and dbs have changed. For example /a/b/c/foo.txt on the old machine is at /x/y/z/foo.txt on the new machine. The MySQL db "foo" on the old machine is "bar" on the new machine. Can I intercept fopen() and mysql_connect() so tha

[PHP] Calling static child method from inherited static parent method

2007-01-03 Thread Kelly Jones
I'm trying to implement what I think is called a "virtual method": my abstract parent class ParentClass defines a method xxx that calls method yyy, but yyy is defined only in ParentClass's children. I can't get this to work (PHP5.0.4). Sample code: === start sample code === abstract class Paren

Re: [PHP] php/ajax question

2006-12-30 Thread Mark Kelly
On Saturday 30 December 2006 18:56, tedd wrote: > Why can't the php script redirect the browser when called via ajax ? The browser will not be expecting a page back, and will ignore headers. The response must be handled by a function you define. For the sake of a quick demo, if your php accepts

Re: [PHP] php/ajax question

2006-12-30 Thread Mark Kelly
On Saturday 30 December 2006 18:56, tedd wrote: > Why can't the php script redirect the browser when called via ajax ? The browser will not be expecting a page back, and will ignore headers. Just some quick suggestion code, this isn't tested (except createRequest - I use that all the time)... f

Re: [PHP] Tidy HTML source?

2006-11-27 Thread Mark Kelly
On Monday 27 November 2006 17:10, Mark Kelly wrote: > Am I crazy to make an extra effort in my code to make the generated HTML > pretty? Thanks everyone for your thoughts on this - I'm quite relieved that I'm not the only one who sits and tweaks so that the HTML is nice and re

[PHP] func_get_args as a hash? (faster constructors)

2006-11-27 Thread Kelly Jones
If I define a function like this: function foo ($x, $y, $z) {} and then call: foo(1,2,"bar"); is there a function I can call inside foo() that yields this hash: {"x" => 1, "y" => 2, "z" => "bar"} In other words, gives me the values *and names* of the arguments to foo? func_get_args just yiel

[PHP] Tidy HTML source?

2006-11-27 Thread Mark Kelly
Hi. In the stuff I do almost all the HTML is generated with PHP as basically none of it is static (lots of tabular data, state-sensitive links, stuff like that). Am I crazy to make an extra effort in my code to make the generated HTML pretty? By this I mean linebreaks, indentation etc. - stuff

[PHP] PHP sendmail proxy (using xinetd)

2006-11-26 Thread Kelly Jones
I'm trying to write a sendmail proxy in PHP: people would connect to my proxy running on port 25 (via xinetd), and the proxy would connect to sendmail (tweaked to run on port 26). Currently, the proxy is 100% transparent, but I plan to tweak it to intercept sendmail's replies and substitute its o

[PHP] Error: Cannot load /usr/local/apache2/modules/libphp4.so into server: /usr/local/apache2/modules/libphp4.so: cannot restore segment prot after reloc: Permission denied

2006-09-20 Thread Kelly McCoy
installations have gone smoothly; I just have not been able to start apache because of the error. Thanks for any help. Kelly

Re: [PHP] Including Functions; one file or many?

2006-05-26 Thread Mark Kelly
On Friday 26 May 2006 16:41, Jochem Maas wrote: > besides .inc.php seems to be/becoming a sort of defacto std (no need for > filenaming jihad people ;-) That's certainly worth considering (particularly as the project is still at the very early stages), thank you both for mentioning it. My experi

Re: [PHP] Including Functions; one file or many?

2006-05-26 Thread Mark Kelly
On Friday 26 May 2006 14:56, Matt Carlson wrote: > One note on include files. Usually it's "best practice" to not name them > .inc > > Name them .inc.php so that they cannot be opened by a webbrowser, thus > giving more information to a potential attacker. Is this still a concern when all include

Re: [PHP] Including Functions; one file or many?

2006-05-26 Thread Mark Kelly
> At 9:02 AM +0100 5/26/06, Mark Kelly wrote: > >TIA in advance for any advice, And thanks in arrears to all who responded. Since there appears to be no compelling reason to go either way, and we already have subdivided include files for functions (to a limited extent) I've deci

[PHP] Including Functions; one file or many?

2006-05-26 Thread Mark Kelly
Hi I'm writing a set of db abstraction functions for an internal app which will give us a set of simple function calls for dealing with the db, like $result = db_AddEmployee($EmployeeData); $EmployeeData = db_GetEmployee($EmployeeID); etc. There will be quite a few functions needed to deal wi

Re: [PHP] redirect using php

2006-04-05 Thread Mark Kelly
On Wednesday 05 April 2006 14:33, Chris Shiflett wrote: > Mark Kelly wrote: > > > > You can also use something like: > > > > > > > > echo ""; > > > > > > There's no need to use a meta tag to mimic HTTP headers. PHP > >

Re: [PHP] redirect using php

2006-04-05 Thread Mark Kelly
On Wednesday 05 April 2006 13:55, Chris Shiflett wrote: > Mark Kelly wrote: > > You can also use something like: > > > > echo ""; > > There's no need to use a meta tag to mimic HTTP headers. PHP provides > the header() function. I have been using

Re: [PHP] redirect using php

2006-04-05 Thread Mark Kelly
On Tuesday 04 April 2006 22:27, Brady Mitchell wrote: > > -Original Message- > > In JSP I have access to a function called sendRedirect() to > > send a user > > from one page to another, usually after some processing completed. Is > > there a similar function in PHP? > > Take a look at the

Re: [PHP] Creating forms dynamically

2006-03-15 Thread Mark Kelly
On Tuesday 14 March 2006 20:21, Paul Goepfert wrote: > If anyone has any ideas on how to create the form when the error messages > are displayed without having to code it a second time please let me > know. I use an assoc. array that matches the form inputs, for example: $FormDisplayData = array

[PHP] javascript, forms and php

2005-12-01 Thread Kelly Meeks
it still doesn't seem to check things properly. Is there any way around this, or what am I missing? TIA, Kelly -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.

[PHP] php/pear question

2005-04-28 Thread Kelly Meeks
s or was plans to merge phplib into pear. Thanks in advance, Kelly -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] POST multipart/form-data temp files not being created. File_upload directive is resetting to "No."

2005-03-11 Thread Shawn Kelly
Richard Lynch you are my new best friend! grep -n uploads /etc/httpd/conf/httpd.conf tells me "279:php_admin_value file_uploads off". I don't know how I could have missed it! I changed httpd.conf to have php_admin_value file_uploads On and everything worked like it was supposed to this morning be

[PHP] Re: Sending data via POST

2005-03-11 Thread Shawn Kelly
This is from php.net: Just change the $out to fill with your POST request (instead of the GET).  Works good, you can change ports. :)   $fp = fsockopen("www.example.com", 80, $errno, $errstr, 30);if (!$fp) {   echo "$errstr ($errno)\n";} else {   $out = "GET / HTTP/1.1\r\n";   $out .= "Host:

[PHP] POST multipart/form-data temp files not being created. File_upload directive is resetting to "No."

2005-03-11 Thread Shawn Kelly
so causing my $_FILES variable to be empty and my actual file data to be thrown into the trash. If you read all the way to the bottom, I must thank you for your time! My respect and admiration to the PHP community! cudos, Shawn Kelly. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP - mail problems - HELP!!! PLEASE

2005-01-15 Thread Kelly
;, [EMAIL PROTECTED] Can someone please help me figure this out? I am desperate!! I am also at my wits end. I have been fighting with this for a week. Kelly -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] [Fwd: [PHP-INSTALL] Install of PHP 5.0.3 Error]

2005-01-12 Thread Kelly
Well I think you have the variable problem fixed. Worked like a charm. But I think I spoke to soon about the mail feature. I cannot get it to mail a form. Could I have not turned something else on? Kelly > Kelly wrote: > > I found other things about this online doing google. I

Re: [PHP] [Fwd: [PHP-INSTALL] Install of PHP 5.0.3 Error]

2005-01-12 Thread Kelly
(/usr/apache/libexec/libphp5.so) libthread.so.1 => /usr/lib/libthread.so.1 Kelly > Kelly wrote: > > I have installed PHP 5.0.3 on an Intel box running Apache 1.3 with a > > Solaris 9 x86 OS. When I try to restart the Apache server I get this > > error: &g

[PHP] [Fwd: [PHP-INSTALL] Install of PHP 5.0.3 Error]

2005-01-12 Thread Kelly
ven re-compile. What am I doing wrong. Is there a registry like componant to Solaris I need to change to show the old version is gone? Any help out there for me? Kelly -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] splitting string

2004-11-16 Thread Kelly Hallman
this should only be used for data that is NEVER intended to be queried, but may be usefully extracted on SELECTed records. And we know the wisdom of assuming something will NEVER be necessary! :) -- Kelly Hallman // Ultrafancy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] authentication question

2004-11-02 Thread Kelly Meeks
e htaccess file so if the user has already logged in via the session system, they don't have to then enter the same data again via http authentication? ____ Kelly Meeks Right Angle, Inc. PO Box 356 Northampton, MA 01060 413-586-4694 ext. 11

[PHP] Adding a realtime monitoring console

2004-09-01 Thread Kelly Hallman
/or any other ideas I've not considered (syslog? others?)... Has anyone done this before? Is there anything already available? If anyone else is interested, I would be willing to share the eventual technique and code with interested parties. TIA! --Kelly -- PHP General Mailing List (ht

RE: [PHP] " in data

2004-06-18 Thread Kelly Hallman
ddslashes() is good for database insertions, but for HTML probably are looking for something like http://www.php.net/htmlentities -- Kelly Hallman // Ultrafancy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] SCP a file from my server to another using PHP

2004-05-04 Thread Kelly Hallman
could be a security issue, if you are on a shared server, as it might allow other users to use that same key to access the remote server as well. Proceed with caution! > TIA for anyone who has done this and knows the answer!!! Haven't done this, but I think it should work. Hope it helps at least. -- Kelly Hallman // Ultrafancy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Logic problem

2004-04-20 Thread Kelly Hallman
', ',$array1), implode(', ',$array2)); The more complex the query gets, the easier it is to read using this approach. I'm sure some find that debatable. After all, I'm crazy ;) -- Kelly Hallman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] oo question

2004-04-19 Thread Kelly Hallman
Apr 19 at 3:46pm, Chris W. Parker wrote: > Kelly Hallman <mailto:[EMAIL PROTECTED]> > > I think what you're talking about here is encapsulation. > > in that case what is abstraction? I suppose it's pretty similar, but I believe that encapsulation is the pe

Re: [PHP] Pear Layout question

2004-04-19 Thread Kelly Hallman
> ... As long as the directory containing the PEAR files is in your include path, and it mimics the same structure as the PEAR directory you have on the server (where PEAR is installed) you should be good to go. -- Kelly Hallman -- PHP General Mailing List (http://www.php.net/) To uns

RE: [PHP] Re: oo question

2004-04-19 Thread Kelly Hallman
ting too much into the constructor can add overhead if you want to create lightweight instances of the object for another purpose that you're not envisioning at the moment. -- Kelly Hallman // Ultrafancy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] oo question

2004-04-19 Thread Kelly Hallman
t;firstName(), and may encourage mixing the way you access the object data from your code, which could potentially defeat the purpose of the get/set method. On that note, you may be interested in the __call(), __get() and __set() magic methods in PHP5, as they will give you the best of both worlds. ...Among many other nice OO feature improvements in PHP5... -- Kelly Hallman // Ultrafancy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Help with shorting this please

2004-04-19 Thread Kelly Hallman
he regex here; however, I didn't test this code either. Hopefully this type of optimization is what you were looking for. - Kelly // constant; preferred date format define('DATE_FMT','F j, Y'); // set file prefix and suffix $deleteprefix = ""; $delet

Re: [PHP] Re: smarty

2004-04-14 Thread Kelly Hallman
here with a sharp rock saying, "but this works too!" Then the guy with the knife started using it to cut everything, while the rock required constant honing to remain sharp enough to do half the work. But the guy with the rock thought it was all he needed! I use a knife. -- Kelly Hallman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP Web-Chat Software

2004-04-13 Thread Kelly Hallman
his is an infinite loop (until script times out) but why not just while(true) { } or, more commonly, while(1) { } ...? That's a rhetorical question, by the way :) --Kelly -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] class design

2004-04-13 Thread Kelly Hallman
u may need to address without OO. Try it out, think conceptually. Get crazy: the more creative you get with these ideas, the more neat things you'll find to do with OO. Often this design process may require multiple revisions until you hit the right balance. Like any design effort, it's worth the time--and gets easier. --Kelly -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] Serializing objects and storing them is sessions [fixed]

2004-04-09 Thread Kelly Hallman
; considering the result/consequence... It's probably just my older version of PHP, but a segfault seems like a pretty extreme error message :) Thanks for pointing me in the right direction! It's so much easier to find the explanation when you already have the answer --Kelly --

Re: [PHP] Serializing objects and storing them is sessions [fixed]

2004-04-09 Thread Kelly Hallman
Apr 9 at 2:49pm, Jason Giangrande wrote: > Kelly Hallman wrote: > > Try it without serializing, it works. > > After retesting, it seems you are correct. I guess the same bad > __sleep() code that was causing the object not to unserialize at all was > also preventing au

Re: [PHP] Serializing objects and storing them is sessions [fixed]

2004-04-09 Thread Kelly Hallman
ariable, without needing to convert it in and out every time. -- Kelly Hallman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Serializing objects and storing them is sessions [fixed]

2004-04-09 Thread Kelly Hallman
defined prior to session_start(), for the same reason a class needs to be defined prior to unserializing. http://www.php.net/manual/en/language.oop.serialization.php --Kelly -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] smarty

2004-04-08 Thread Kelly Hallman
g are never tired! > I'll be frank with this next comment and say to you, Kelly, that it was > fine and dandy for you to be antagonistic and demeaning with your tone > towards Justin French when he commented that PHP, itself, IS a > templating engine, but when John turned th

Re: [PHP] smarty

2004-04-07 Thread Kelly Hallman
Apr 7 at 10:22pm, John W. Holmes wrote: > > Uhhh, yeah--that's not templating, that's called spaghetti code :) > > +1 - Use of buzzword Right about here I could sense where this was going I don't know, what would you call it? Is there a non-buzzword term you'd be happier with? That term pre

Re: [PHP] smarty

2004-04-07 Thread Kelly Hallman
s necessary. I think we're on the same side. Perhaps I just haven't yet seen the light. I'll give InterJinn a go. I hope it's all you say it is. One thing we can both agree on is that templating is not inherently redundant with PHP. --Kelly -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] smarty

2004-04-07 Thread Kelly Hallman
just poking in variables and PHP into inline'd HTML. It works, but you're missing some of the power of Smarty if you think that's all it's good for. > The question is, do you want to give your templater designers full > access to the power of PHP, or not. In other word

Re: [PHP] smarty

2004-04-06 Thread Kelly Hallman
ader... {include file=$content} ...footer... // mypage.php -- extended Smarty object class MyPage extends Smarty { var $tmpl = 'MyPage.tpl'; function render($x) { $this->assign('content',$x); $this->display($this->tmpl); } } // actualphpcode.php --

Re: [PHP] smarty

2004-04-06 Thread Kelly Hallman
bloated for basic work, but I think the powerful benefits far outweigh any performance issues. I've never felt like it was slow or too much for a given task. Get yo' template on! --Kelly (another Smarty fan) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Tricky array question

2004-04-01 Thread Kelly Hallman
t loop over it as you like, to do your output. If you're reading an XML file, you might look into PEAR, which has packages for parsing and building data structures of XML data. -- Kelly Hallman // Ultrafancy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] What's the use in OOP?

2004-03-29 Thread Kelly Hallman
it's a myth to think simply avoiding (delving into) OOP because "I've heard that it's slow in PHP" automatically means you're being more efficient. It's not the prime language for OOP but I find that when it all balances out, for web apps in PHP, OO offers an attractive

RE: [PHP] What's the use in OOP?

2004-03-29 Thread Kelly Hallman
ost would suggest against in PHP, anyway). There IS something to OOP! Unfortunately, it's difficult to learn through examples of car stereo panels or different types of fruit or trees (though they do make perfect sense in hindsight). -- Kelly Hallman // Ultrafancy -- PHP General Maili

Re: [PHP] array $_POST problem

2004-03-17 Thread Joey Kelly
On Tuesday 16 March 2004 12:16, thou spake: > You're the Joey Kelly who runs the LUG in NoLA, yes? Yes, that's me. Have you been to one of our meetings lately? We redid our website recently: http://www.nolug.org Thanks for saying "hi" :-) > > Upon post, you

[PHP] array $_POST problem

2004-03-16 Thread Joey Kelly
antity1, $quantity2, etc.), which to me is an awful kludge that I'd rather not sign my name to. Thanks for any help. -- Joey Kelly < Minister of the Gospel | Linux Consultant > http://joeykelly.net "I may have invented it, but Bill made it famous." --- David Bradley, th

Re: [PHP] Re: Are $_POST and $_GET interchangable?

2004-03-10 Thread Kelly Hallman
are really no specific rules. On that note, something to keep in mind is that GET variables (being part of the URL) are written to server logs. Depending on the data being passed, this could be a security issue (especially in a shared hosting environment where untrusted users may have access to the lo

[PHP] Return value efficiency question

2004-03-09 Thread Kelly Hallman
d? Appreciate any expert responses. I don't know enough about the internals of PHP to know the implications of this... thank you! --Kelly -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] need form array help

2004-03-01 Thread Kelly Hallman
quot;); > print(" $result["image"] . '" size="10" />' . "\n"); > print("Edit: value=\"edit\" /> Delete: name=\"edit_rider_action[]\" value=\"delete\" />" . "\n"); > print('' .

Re: [PHP] Using a perl regex

2004-02-11 Thread Kelly Hallman
to escape something in the pattern, > but will look further. I think it means you need to put a delimiter around your regex... Typically you would use slashes (preg_match("/regex/")) but the character can be other than slash.. i.e. "not alphanumeric or backslash" :) --

Re: [PHP] auto forms from mysql database

2004-02-02 Thread Kelly Hallman
haunt you down the road.. Design the object well and it could validate the data automatically or contain other non-database data such as form headings, help text, etc. Also hooking this into some kind of form class (I like PEAR's HTML_QuickForm) may help speed things along... -- Kelly Hallman //

RE: [PHP] OOP methodology{O|T} kinda'

2004-01-30 Thread Kelly Hallman
ng OO with PHP simplified a lot of problems I'd had trying to do more complex tasks with a procedural/functional approach. I still use perl to whip up a sysadmin script here and there, but after using Python I began to regard perl as a syntactic mess. -- Kelly Hallman // Ultrafancy -- PHP G

RE: [PHP] OOP methodology{O|T} kinda'

2004-01-30 Thread Kelly Hallman
learn C++ before you're going to do much successful OOP with it. Not exactly a small learning curve. Other languages dispense with a lot of the formalities found in C++ (a good or bad thing, depending on your perspective). I found Python to be a great language to learn OOP, since it f

Re: [PHP] class design question

2004-01-12 Thread Kelly Hallman
it (it's the SQL queries themselves that are not always portable, so you have to solve that). If you've never looked at PEAR, the DB class is a good start. Also, despite all it's features, it's quite fast! -- Kelly Hallman // Ultrafancy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] _("What does this do?")

2004-01-12 Thread Kelly Hallman
code (SquirrelMail) uses it in one place, but not another. What say you, PHP gurus? Gotta love the syntactic sugar! -- Kelly Hallman // Ultrafancy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Re: jpeg Uploader issue

2004-01-12 Thread Kelly Hallman
ould set the Content-type header like so: header("Content-type: image/jpeg"); -- Kelly Hallman // Ultrafancy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php doesn't work in html files

2004-01-11 Thread Kelly Hallman
don't mostly all contain PHP code. Same performance hit if you were naming plain HTML files as .php... -- Kelly Hallman // Ultrafancy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] not sure why regex is doing this

2004-01-09 Thread Kelly Hallman
ave input like (), but it would work as expected. Many tricky regex problems can be solved by lookaheads. There is also a negative lookahead (?!pattern) ... also note that this is an advanced regex feature and won't it work on many regex engines not based on PCRE. -- Kelly Hallman // Ultrafancy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Problem with Picture Name

2004-01-06 Thread Kelly Hallman
single place. Also, it includes defaults that don't need to be specified with each call, as you'd need to do with preg_replace() alone. -- Kelly Hallman // Ultrafancy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

  1   2   3   >