[PHP] Question: Validation on select boxes and lists.

2004-10-21 Thread Stuart Felenstein
Hope this is not off topic, and it might be a dumb question, but I'm new. For drop down menus, list boxes, selects etc, would validation be needed to check the string , say for special characters ? (as a security precaution) Thank Stuart -- PHP General Mailing List (http://www.php.net

RE: [PHP] Question: Validation on select boxes and lists.

2004-10-21 Thread Stuart Felenstein
Graham, Thank you. Actually , you suggested this site to me the other day and it's great! I have read through a number of documents and have a few more to get through. How would a hacker pass an HTTP message ? That is interesting. Stuart --- Graham Cossey <[EMAIL PROTECTED]> wrot

RE: [PHP] Question: Validation on select boxes and lists.

2004-10-22 Thread Stuart Felenstein
This make sense ? And I'm not trying to be lazy here , only practical. Of course, should I still be polite to hackers by still testing for invalid characters :) Stuart --- Graham Cossey <[EMAIL PROTECTED]> wrote: > [snip] > > > > How would a hacker pass an HT

[PHP] Question: Simpler loop

2004-10-22 Thread Stuart Felenstein
&& $skys[$key] = '' && $slus[$key] != '') . above only takes into account that 1 of that 3 has been filled in. I would need another set to take into account if 2 of the 3 have been filled in. Is there a simpler way / shorter way to check conditions to do this ? Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Question: Simpler loop

2004-10-22 Thread Stuart Felenstein
Yes, I think that will work, as soon as I can figure out where on the page it should go. On error should post to itself, on success it moves to next page. I put the loop on top and am getting an invalid argument for the foreach. Stuart --- "Ford, Mike" <[EMAIL PROTECTED]> wr

[PHP] RE: Redirect - was Question: Simpler loop

2004-10-22 Thread Stuart Felenstein
direct is working , but the print isn't. Do I do an exit first, then the redirect and print ? Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Redirect then error message to user

2004-10-22 Thread Stuart Felenstein
I'm not quite sure how to get an error message to print out after a redirect. I know it's possible. Now page1 moves to page2, check below is on page2 If I leave it on page2 (without redirect), it prints error to user fine. Once it redirects no print. I also tried leaving it on form1, at the top

RE: [PHP] Redirect then error message to user

2004-10-22 Thread Stuart Felenstein
Now why didn't I think of that ! Thank you Jay! Stuart --- Jay Blanchard <[EMAIL PROTECTED]> wrote: > [snip] >{ > header("Location: > http://www.xx.com/page1.php"; > ); > print "You have errors"; > exit; >} > &g

RE: [PHP] Redirect then error message to user

2004-10-22 Thread Stuart Felenstein
after session_start $_SESSION['er'] = $_POST['er']; Then below in form area: print $er; (tried also echo) Am I do something wrong ? Stuart --- Jay Blanchard <[EMAIL PROTECTED]> wrote: > [snip] >{ > header("Location: > ht

RE: [PHP] Redirect then error message to user

2004-10-22 Thread Stuart Felenstein
Sorry, all fixed now! Thank you for the help! Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Redirect then error message to user

2004-10-22 Thread Stuart Felenstein
ESSION['oops'] = "Use all 3 fields to set a skill"; header("Location: http://www.lurkingforwork.com/TestMulti4a.php"; ); exit; } Page1: I even logged out of the session, thinking I was now carrying it through the session. Stuart > Jason Wong -> Gremlins Associ

Re: [PHP] Redirect then error message to user

2004-10-22 Thread Stuart Felenstein
The only problem I'm having here is that if a user goes backwards, the error from the session variable will show up. I put an unset $.. underneath the echo but that seems to have no effect. Stuart --- Stuart Felenstein <[EMAIL PROTECTED]> wrote: > See below: > --- J

Re: [PHP] Redirect then error message to user

2004-10-22 Thread Stuart Felenstein
Brent - Thank you I will try that method. Can you elaborate more on below. I take it to mean you have one page/script that your pages are going to do all the checks. This form is 5 pages long. So I chose session variables just to keep it neat and "maybe", more secure. Stuart

[PHP] Form madness maybe OT

2004-10-23 Thread Stuart Felenstein
ssible issues. Thank you. Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Form madness maybe OT

2004-10-23 Thread Stuart Felenstein
--- Andre Dubuc <[EMAIL PROTECTED]> wrote: > Stuart, > > I'm no expert, but did you flush your browser? > > Hth, > Andre > Andre, thank you for the response. I'm not sure what you mean by flush the browser ? Here is what I've been doing.

Re: [PHP] Form madness maybe OT

2004-10-23 Thread Stuart Felenstein
--- Andre Dubuc <[EMAIL PROTECTED]> wrote: > Stuart, > > Go to your browser settings, under 'Cache' (or > something similar) then clear > the cache. I struggled with a similar problem for > days . . . > > Andre > I did that, and didn't change

Re: [PHP] Form madness maybe OT

2004-10-23 Thread Stuart Felenstein
Call off the troops. I reconstructed the form, step by step checking each step. All seems to be working. Stuart --- Stuart Felenstein <[EMAIL PROTECTED]> wrote: > > --- Andre Dubuc <[EMAIL PROTECTED]> wrote: > > Stuart, > > > > Go to your browser setti

[PHP] Help: Database search and results

2004-10-24 Thread Stuart Felenstein
y all i get regardless of my search criteria is a complete dump of every listing. NOW - I don't expect any suggestions based on my above question, but was not sure if it was okay to post the code. Both pages total about 325 lines. If it's okay to post it I will. Thank you , Stuart

[PHP] SOLVED Re: [PHP] Help: Database search and results

2004-10-24 Thread Stuart Felenstein
Wow~! I'm getting good. --- Stuart Felenstein <[EMAIL PROTECTED]> wrote: > I have created a database search and results set. > Things seem to work fine until I add the join > statements into the results page query string. > If I don't use the joins , the search work

Re: [PHP] regex - filtering out chinese utf8 characters

2009-07-30 Thread Stuart Connolly
Hi Merlin, I think the pattern you're looking for is '/[a-zA-Z0-9]/' which will match all alphanumeric characters. Cheers Stuart On 30 Jul 2009, at 19:13, Merlin Morgenstern wrote: Hi there, I am trying to filter out content that is not ascii. Can I do this with reg

Re: [PHP] String to Date Conversion Problem

2009-07-31 Thread Stuart Connolly
Hi Alice, Based on the string format that you mentioned (DD MMM YY - DAY) you should be able to transform to any other date using the following: $parts = explode(' ', '23 JUL 09 - THURSDAY'); echo date('m/d/Y', strtotime("{$parts[1]} {$parts[0]} {$parts

Re: [PHP] Extracting a time zone from a latitude longitude

2009-11-21 Thread Stuart Dallas
traight lines from pole to pole. I Googled and got this among several others... http://stackoverflow.com/questions/41504/timezone-lookup-from-latitude-longitude -Stuart -- http://3ft9.com/ > On Nov 21, 2009, at 12:25 PM, Haig Davis wrote: > >> Good Morning all, >> >&g

Re: [PHP] Checking for internet connection.

2009-12-22 Thread Stuart Dallas
trying to hit the update server? If you can then you check for updates, if not then you, erm, don't. Simples, no? -Stuart -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] trying to launch kate from the browser....

2010-01-08 Thread Stuart Dallas
/filename). That app can then do whatever you need it to with the URL which it will get passed as an argument. -Stuart -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] POLL: To add the final ?> or not...

2010-01-08 Thread Stuart Dallas
othing but rub against some people's sense of neatness and order. Given the choice I'll always vote for the one that doesn't cause issues - I'd rather have people a tiny bit uncomfortable with not having it there than finding out there's a bit of whitespace at the end of

Re: [PHP] POLL: To add the final ?> or not...

2010-01-08 Thread Stuart Dallas
On 8 Jan 2010, at 21:38, Ashley Sheridan wrote: > On Fri, 2010-01-08 at 21:30 +0000, Stuart Dallas wrote: >> On 8 Jan 2010, at 20:49, LinuxManMikeC wrote: >> >> > >> http://framework.zend.com/manual/en/coding-standard.html#coding-standard.overview.scope &g

Re: [PHP] POLL: To add the final ?> or not...

2010-01-10 Thread Stuart Dallas
On 10 Jan 2010, at 14:44, Michael A. Peters wrote: > Stuart Dallas wrote: > >> That's a massive assumption. There are a number of editors that >> automatically add a blank line to the end of source files. I stand by >> taking the option that requires the leas

Re: [PHP] Do you use a public framework or roll your own?

2010-01-27 Thread Stuart Dallas
almost 2:1) who close their > opening PHP tags. :) 1) When you suggest that one of the answers is "proper" and the other is "stupid" then you're heavily influencing the results. 2) Just because everybody does it doesn't mean it's the right thing to do. In fac

Re: [PHP] Will PHP ever "grow up" and have threading?

2010-03-24 Thread Stuart Dallas
s to enable use-as-a-cloud. PHP is a hammer, and a bloody good one at that, but you seem to want it to be a tool shed. Accept that it's a hammer, go visit a DIY store, find the right tool for the job and get on with your life! The fact is that even if we all agree that PHP needs threading,

Re: [PHP] Will PHP ever "grow up" and have threading?

2010-03-24 Thread Stuart Dallas
cussed before, both on this list and on internals (Google can tell you all about it), and every time it's been dismissed because the cost-benefit calculations just don't add up. > On Wed, Mar 24, 2010 at 11:31 AM, Rene Veerman wrote: >> php is not a hammer, its a programming langua

Re: [PHP] Will PHP ever "grow up" and have threading?

2010-03-24 Thread Stuart Dallas
On 24 Mar 2010, at 10:24, Tommy Pham wrote: > On Wed, Mar 24, 2010 at 2:58 AM, Stuart Dallas wrote: >> On 24 Mar 2010, at 09:36, Rene Veerman wrote: >> >>> unless the actual php development team would like to weigh in on this >>> matter of course. >>>

Re: [PHP] Will PHP ever "grow up" and have threading?

2010-03-24 Thread Stuart Dallas
this before i had to. > > +1, +1, +1... You realise, of course, that the same argument applies to using advanced features of PHP, such as threading should it ever be supported. -Stuart -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Will PHP ever "grow up" and have threading?

2010-03-24 Thread Stuart Dallas
On 24 Mar 2010, at 10:38, Tommy Pham wrote: > On Wed, Mar 24, 2010 at 3:31 AM, Stuart Dallas wrote: >> On 24 Mar 2010, at 10:24, Tommy Pham wrote: >>> I did give a real life example, ie e-commerce site mentioned earlier. >>> Amazon has the similar features of my exa

Re: [PHP] Will PHP ever "grow up" and have threading?

2010-03-24 Thread Stuart Dallas
On 24 Mar 2010, at 10:46, Rene Veerman wrote: > On Wed, Mar 24, 2010 at 11:58 AM, Stuart Dallas wrote: >> On 24 Mar 2010, at 09:36, Rene Veerman wrote: >> >>> unless the actual php development team would like to weigh in on this >>> matter of course. >>>

Re: [PHP] Will PHP ever "grow up" and have threading?

2010-03-24 Thread Stuart Dallas
On 24 Mar 2010, at 10:48, Tommy Pham wrote: > On Wed, Mar 24, 2010 at 3:39 AM, Stuart Dallas wrote: >> >> On 24 Mar 2010, at 10:34, Rene Veerman wrote: >> >>> On Wed, Mar 24, 2010 at 12:28 PM, Tommy Pham wrote: >>>> >>>> Funny you shoul

Re: [PHP] how to do cloud computing with php

2010-03-24 Thread Stuart Dallas
n I don't see any reason why I can't handle any scalability issue that's likely to come along with a minimum of fuss and cost. The key think to remember is that scalability is not the same as performance. They're barely even related. What, specifically, makes you doubt PHP

Re: [PHP] Will PHP ever "grow up" and have threading?

2010-03-24 Thread Stuart Dallas
#x27;t mind me asking, when you say graphics-heavy do you mean it uses a lot of images? And if so, how the hell does that affect the scalability of PHP? -Stuart -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Will PHP ever "grow up" and have threading?

2010-03-24 Thread Stuart Dallas
need to add that functionality into the code. >>> Now show me a website that meets those requirements and uses PHP, I'll >>> be glad to support your argument about PHP w/o threads :) BTW, this >>> is not even enterprise requirement. I may have another possible >

Re: [PHP] Will PHP ever "grow up" and have threading?

2010-03-24 Thread Stuart Dallas
single box. The cost in development time alone to implement effective threading strategies would far outstrip the cost of adding a couple of servers and ensuring that your app is scalable. What you seem to be ignoring is the fact that these issues have been solved already, and the techniques

Re: [PHP] Will PHP ever "grow up" and have threading?

2010-03-24 Thread Stuart Dallas
t you think it's we who are barricading. Love it! -Stuart -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Login using just cookies, bad idea?

2010-07-12 Thread Stuart Dallas
rd in there, make sure it's salted, and validate the contents before using them. http://stut.net/2008/07/26/sessionless-sessions-2/ -Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sorting Help

2012-04-11 Thread Stuart Dallas
second in descending order. I looked at array_multisort but couldn't figure > out how to make work for my needs. Use a custom sorting function, then you can sort any way you want: http://php.net/usort -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www

Re: [PHP] strict nannying ...

2012-04-15 Thread Stuart Dallas
On 15 Apr 2012, at 11:44, Lester Caine wrote: > I've got a machine set up with PHP5.4 and left the strict errors showing, and > I'm falling at the first hurdle :) > > The functions for generating URL's are used both statically and as part of > the class. STRICT complains because they are not ma

Re: [PHP] strict nannying ...

2012-04-15 Thread Stuart Dallas
On 15 Apr 2012, at 13:30, Lester Caine wrote: > Stuart Dallas wrote: >> On 15 Apr 2012, at 11:44, Lester Caine wrote: >> >>> I've got a machine set up with PHP5.4 and left the strict errors showing, >>> and I'm falling at the first hurdle :) >>&

Re: [PHP] strict nannying ...

2012-04-15 Thread Stuart Dallas
On 15 Apr 2012, at 15:02, Lester Caine wrote: > Stuart Dallas wrote: >> No code duplication but clear separation between static and instantiated >> usage. However, this is not the best way to structure this code IMO. The >> better option would be to extract the static

Re: [PHP] strict nannying ...

2012-04-15 Thread Stuart Dallas
On 15 Apr 2012, at 19:41, Lester Caine wrote: > Stuart Dallas wrote: >>> Stuart Dallas wrote: >>>> >> No code duplication but clear separation between static and >>>> >> instantiated usage. However, this is not the best way to structure this

Re: [PHP] sms class

2012-04-17 Thread Stuart Dallas
On 17 Apr 2012, at 20:17, Marc Guay wrote: > Woah. Is that good luck or bad luck? Inherently? Neither. To you? Whatever. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] sms class

2012-04-17 Thread Stuart Dallas
On 17 Apr 2012, at 20:50, Lester Caine wrote: > Ignoring the wallies I'd rather be a wally surrounded by fishmongers than a fishmonger surrounded by wallies. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vis

Re: [PHP] Variable Question

2012-04-19 Thread Stuart Dallas
27;word_'.$i} = stripslashes( eval ("echo $row['word_$i']") ); Eww, nasty. Why the eval? Why not just stripslashes($row['word_'.$i])? Variable variables have their uses, but this seems to be one of those cases where you're trying to get the square peg thr

Re: [PHP] SqLite INSERT want not write

2012-04-19 Thread Stuart Dallas
can run php -l script.php to see those errors, but it would be better to set the error_reporting and display_errors values in php.ini on your development system/server. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] SqLite INSERT want not write

2012-04-19 Thread Stuart Dallas
On 19 Apr 2012, at 18:54, Silvio Siefke wrote: > On Thu, 19 Apr 2012 18:39:00 +0100 > Stuart Dallas wrote: > >> The script has syntax errors in it. You won't see those errors because PHP >> won't run a script with syntax errors, so it won't modify the &

Re: [PHP] SqLite INSERT want not write

2012-04-19 Thread Stuart Dallas
opaste.info/63fe0a9148.html Using date() is not valid there. It's possible now() might work (don't use PDO so I dunno for sure), otherwise you'll need to bind that parameter in the same way you're binding the others. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PH

Re: [PHP] SqLite INSERT want not write

2012-04-19 Thread Stuart Dallas
> The issue was (without looking any deeper) the quotes... > > Try that, and let us know. Still wrong. It should be as follows. $sql = "INSERT INTO bloggen (date, autor, title, teaser, content) VALUES ('" . date( 'Y-m-s H:i:s', time() ) . "

Re: [PHP] SqLite INSERT want not write

2012-04-19 Thread Stuart Dallas
$ ls -l > insgesamt 4 > -rw-rw-rw- 1 siefke siefke 4096 19. Apr 21:25 silviosiefke.db What does the script output? The only path through your script that doesn't display something is if there are missing $_POST elements, and the PDO errors you've shown previously suggest that they&#x

Re: [PHP] preg_replace_callback

2012-04-20 Thread Stuart Dallas
On 20 Apr 2012, at 21:00, TR Shaw wrote: > It appears that preg_replace_callback has a memory leak at least in version > 5.3.8. Based on what? If you have a repeatable test that demonstrates this behaviour please create a bug report at https://bugs.php.net/ with all the details. -

Re: [PHP] session lost problem

2012-04-23 Thread Stuart Dallas
you're describing is as designed. When you call session_commit() you are saving and closing the session, so nothing done to $_SESSION after that point will be saved, even if you call session_commit() again. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] session lost problem

2012-04-23 Thread Stuart Dallas
Please don't top-post, and please include the list when replying. On 24 Apr 2012, at 06:35, bug zhu wrote: > 2012/4/24 Stuart Dallas >> On 24 Apr 2012, at 05:58, bug zhu wrote: >> >> > there are tow php files a.php and b.php, >> > >> > cont

Re: [PHP] What is wrong here?

2012-04-25 Thread Stuart Dallas
e developing with notices switched off. This is a very bad idea because it hides simple errors like this. See the manual for details: http://php.net/error_reporting. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Find/count different word in a text

2012-04-25 Thread Stuart Dallas
a go and if you have problems post the code and we can help you some more. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] url string being split

2012-04-26 Thread Stuart Dallas
e > giving someone an open invitation. A "query string" has nothing to do with databases. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] undefined offset

2012-04-26 Thread Stuart Dallas
the same size naturally. So - what is it telling me? For every iteration of the loop or just once? If it's just once then you're not handling the possibility of a blank line. If more than once then the file doesn't contain what you think it contains. -Stuart -- Stuart Dallas

Re: [PHP] code deployment through php

2012-05-01 Thread Stuart Dallas
ol. I know it can look complicated, but it's really not, and it will make it far easier to keep track of what you're doing and what changes are deployed where than the system you described. I strongly recommend you reconsider. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] howto get pgUp, pgDn, delete, home and end keycodes in CLI PHP script

2012-05-04 Thread Stuart Dallas
t; > Anybody here know how to do this? As far as I know you can't do this through any of the built-in functions. However, the ncurses extension may give you what you need: http://php.net/ncurses -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] regexp novice

2012-05-18 Thread Stuart Dallas
t; have a fix for that I'd appreciate it - otherwise I'll have to devote some > book-time to mastering this string and come up with a fix myself. Based on your requirements, 00:40 is completely valid. Why do you think it should be invalid? -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] regexp novice

2012-05-18 Thread Stuart Dallas
On 18 May 2012, at 14:41, Jim Giner wrote: > "Stuart Dallas" wrote in message > news:cc22e241-c1df-48e9-bf06-8a638a356...@3ft9.com... >> On 18 May 2012, at 14:32, Jim Giner wrote: >> >>> OK - I don't yet understand how this works, but it seems to wo

Re: [PHP] regexp novice

2012-05-18 Thread Stuart Dallas
personal, just my opinion, which is all I have to offer. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] Need help on increment date

2012-05-24 Thread Stuart Dallas
"2008-02-28" this code give output 2012-03-01. But it > should be 2008-02-29. Where I am getting wrong. Works fine for me: http://dev.stut.net/php/increment_date.php Have you extracted the above from other code, or are you seeing this behaviour with just those two lines? -Stuart

Re: [PHP] Function size

2012-05-29 Thread Stuart Dallas
g job. If you think being able to deal with a large block of code makes you a better programmer, YOU are in the wrong job. A good programmer, in my opinion, knows that the simpler and more discrete each block of code is the less room there is for errors. An excellent programmer knows that 100-line functions are generally impossible to adequately unit test. The bottom line is to use your common sense rather than sticking to some arbitrarily prescribed, measurable target. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Function size

2012-05-29 Thread Stuart Dallas
On 29 May 2012, at 14:38, Tedd Sperling wrote: > On May 29, 2012, at 7:17 AM, Stuart Dallas wrote: >> >> It's a theory, yes, and for many people it may be valid, but it's not for >> me. The resolution of your screen; the size of your font; the colour scheme &g

Re: [PHP] Simple Email System (SES) Provider

2012-06-02 Thread Stuart Dallas
rks in your universe, but 4 * 150 != 350 in the one in which I live :) Don: Options... * Switch to a dedicated server, or a VPS host that doesn't have that limit. * Use Gmail or another hosted email provider (may have a similar limit but I've never run into it with Gmail). * Use a service like http://sendgrid.com/. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] A problem about sessions

2012-06-07 Thread Stuart Dallas
_SESSION get saved to disk only > at the end of the script, after the "very long code" has been executed. > There is a way to save the session manually just after ob_end_flush()? http://php.net/session_write_close -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] reload page without use header

2012-06-17 Thread Stuart Dallas
a page using a meta tag in your HTTP head block -- http://en.wikipedia.org/wiki/Meta_refresh -- but if you're wanting to redirect the user to another page you really should use an HTTP header. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] database hell

2012-07-12 Thread Stuart Dallas
multiple hosts you will want to add that to every single mysql_* function call that supports it, otherwise you could end up running queries on the wrong database. You may also want to note that using the mysql_* functions is now discouraged in favour of MySQLi or PDO: http://php.net/mysqlinfo.api.choosing -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] Regex

2012-07-27 Thread Stuart Dallas
On 27 Jul 2012, at 18:07, Ethan Rosenberg wrote: > I've tried everything and am still stuck. > > A regex that will accept numbers, letters, comma, period and no other > characters /^[0-9a-zA-Z,\.]+$/ -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General M

Re: [PHP] syntax error breaking in and out of php into html code

2012-08-26 Thread Stuart Dallas
; the content that code was intended to add. Let me guess, line 356 is the last line of the file? That error is only caused by mis-matched braces, so the code you are deleting *must* contain either an errant opening brace or be missing a closing brace. -Stuart -- Stuart Dallas 3ft9 L

Re: [PHP] What's the best way to make a dynamic plugin architecture?

2012-08-27 Thread Stuart Dallas
t to provide several classes then I'd require an init.php in each plugin folder and have that register the class names with the class loader. It could also then pass along some meta information such as a description of what each class does. If this is for use in web requests you might want to stick to what you currently have as there's a lot less overhead. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] What's the best way to make a dynamic plugin architecture?

2012-08-27 Thread Stuart Dallas
On 27 Aug 2012, at 14:29, Mark wrote: > On Mon, Aug 27, 2012 at 12:41 PM, Stuart Dallas wrote: >> On 26 Aug 2012, at 19:42, Mark wrote: >> >>> 2. Let the plugin itself (so in this case PluginOne.php) open itself >>> and register it to the PluginLoader. >>

Re: [PHP] What's the best way to make a dynamic plugin architecture?

2012-08-27 Thread Stuart Dallas
On 27 Aug 2012, at 14:52, Mark wrote: > On Mon, Aug 27, 2012 at 3:46 PM, Stuart Dallas wrote: >> On 27 Aug 2012, at 14:29, Mark wrote: >> >>> On Mon, Aug 27, 2012 at 12:41 PM, Stuart Dallas wrote: >>>> On 26 Aug 2012, at 19:42, Mark wrote: >>>

Re: [PHP] ksort by value

2012-09-03 Thread Stuart Dallas
oes, with a column for whether they "maintain key association." In this case you want http://php.net/asort -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] array.sorting.php

2012-09-04 Thread Stuart Dallas
http://php.net/uksort -- Sent from my leaf blower On 4 Sep 2012 18:39, "John Taylor-Johnston" wrote: > > David OBrien wrote: > >> On Tue, Sep 4, 2012 at 1:15 PM, John Taylor-Johnston < >> jt.johns...@usherbrooke.ca >> > >> wrote: >> >> Hi, >> Sortin

Re: [PHP] a little trickery

2012-09-08 Thread Stuart Dallas
23456789_R13_1.jpg > > My goal: get the MSL_No out of the DB and concatenate anything after it so I > would end up with the whole image name.. > > I hope this all made sense. :-/ Is there just one image in the folder that starts with the 9 digit number? In that case it's

Re: [PHP] a little trickery

2012-09-09 Thread Stuart Dallas
t; >> > function completeImageFilename($prefix) >> { >>$matches = glob('images/property_pics/'.$prefix.'*'); >>return $matches[0]; >> } >> >> echo ''; >> ?> >> >> If you need to extract more than one image filename you should be able to >> modify that pretty easily. > > YEOW! LOL I looked at this and I'm very stumped on 1 thing. How in the world > did you get $prefix to contain the image name without first assigning it to > $prefix? I understand the rest, but. Holy smokes, that's blown my mind. > :-/ I really can't tell whether you're being sarcastic, so I'll assume you're not. Read about function arguments: http://php.net/functions.arguments -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to limit source IP in PHP

2012-09-14 Thread Stuart Dallas
nx, whatever the web server is has nothing to do with the question. I hope that helps clear it up for those who are confused. -Stuart -- Sent from my leaf blower On 14 Sep 2012 21:01, "Tonix (Antonio Nati)" wrote: > Il 14/09/2012 21:19, Jim Lucas ha scritto: > >>

Re: [PHP] Static constructor support

2012-09-26 Thread Stuart Dallas
On 26 Sep 2012, at 22:13, Yves Goergen wrote: > I couldn't find out whether PHP supports static constructors, and how > the syntax is. The web and the PHP manual don't mention it. So is it not > supported? If it is, is there a PHP version restriction? If you mean what C# calls a static construct

Re: [PHP] Static constructor support

2012-09-26 Thread Stuart Dallas
On 26 Sep 2012, at 22:29, Yves Goergen wrote: > On 26.09.2012 23:20 CE(S)T, Stuart Dallas wrote: >> If you mean what C# calls a static constructor, no that does not >> exist in PHP, but you can fake it. > > Okay, thank you for the quick info. > > How do other

Re: [PHP] php can't insert data mysql table

2012-10-01 Thread Stuart Dallas
echo 'Please enter all of the information to add > your high score.'; >} > } > ?> > > > > >Name: > >Score: > > >Screenshot: > > > > > > > > Results in this output:

Re: [PHP] select function

2012-10-25 Thread Stuart Dallas
(true) { case $Auth == 0: break; case $A == 1: echo('$Aprint_list'); break; case $B == 1: echo('$Bprint_list'); break; case $A == 2: echo('$Aprint_list'); echo('$Aprint_list'); break; case $B == 2: echo('$Bprint_list'); echo('$Bprint_list'); break; default: break; } -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Differentiate Line breaks and Paragraphs

2012-11-02 Thread Stuart Dallas
e user wrote > only one new line character. Something like this should work… '.str_replace($str, '\r\n\r\n', '').''); ?> Untested but that should do what you're looking for. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] Rest Authentication

2012-11-11 Thread Stuart Dallas
menting http authentication and the hassle of apache > configurations? HTTP auth doesn't need to involve the web server at all: http://stut.net/2012/11/11/snippet-http-authentication/ -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsu

Re: [PHP] Date comparison going wrong, wrong, wrong

2012-11-11 Thread Stuart Dallas
example is at http://www.lakesidesurrey.co.uk/test.php. > > You can also me what I am doing wrong? Compare timestamps instead, i.e. time() for the current time, and what you get back from strtotime for the end date. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] Date comparison going wrong, wrong, wrong

2012-11-11 Thread Stuart Dallas
On 11 Nov 2012, at 19:00, "Terry Ally (Gmail)" wrote: > Hi Shiplu and Stuart, > > Comparing timestamps was my first option. I've reinstated it. Have a look > at http://www.lakesidesurrey.co.uk/test.php (show_source included) and you > will see that PHP is st

Re: [PHP] Date comparison going wrong, wrong, wrong

2012-11-11 Thread Stuart Dallas
rrent time is later than the end date of the show, tell them the date of the show hasn't arrived yet. What you mean is: if the current time is later than the end of the show, tell them the show has ended. if ($todaydate < $showenddate): echo "The date of the show has not yet arr

Re: [PHP] Date comparison going wrong, wrong, wrong

2012-11-11 Thread Stuart Dallas
On 11 Nov 2012, at 19:24, "Terry Ally (Gmail)" wrote: > I reversed it as you suggested and every future show is displaying as having > ended. In that case the code you're showing us is not the code you're running, because that's the obvious error in test.php.

Re: [PHP] Re: Switch - Case Statement Questions

2012-11-17 Thread Stuart Dallas
lance providing a fast, efficient, correct solution and minimising maintenance issues. I see neither side being compromised by using a switch statement in this manner, in fact I see both sides potentially getting a boost. Just because the usage is unfamiliar or even surprising to you doesn't mean it's wrong. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Switch - Case Statement Questions

2012-11-19 Thread Stuart Dallas
a lot of > people did 30 years ago on 280), not 100, and to make judgements accordingly. > Equally, I have certain expectations when I see a switch statement; it trying > hard to look like if-elseif-etc is not one of them. Why is it their fault for doing 100mph and not yours for assuming they're only doing 70mph? I'm not saying they're right to be doing 100mph, but I'm definitely saying you're wrong for assuming they're only doing 70mph. Assumptions are the mother of all f*** ups. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: shared memory on php servers?

2012-12-04 Thread Stuart Dallas
are separate daemons so you can access them from multiple servers. Also, as Sebastian says, a database is another option unless you have a good reason to want the data in shared memory rather than a DB. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Can't use the SNMP class

2012-12-04 Thread Stuart Dallas
The class is only available in PHP 5.4+. http://php.net/snmp.construct -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] variable placeholders in a text file

2012-12-31 Thread Stuart Dallas
Please excuse the top post, but this may be helpful: http://stut.net/2008/10/28/snippet-simple-templates-with-php/ -Stuart -- Sent from my leaf blower On 31 Dec 2012, at 19:59, Ashley Sheridan wrote: > On Mon, 2012-12-31 at 13:39 -0600, Nelson Green wrote: > >> Hello, >>

Re: [PHP] Pear Page2

2013-01-06 Thread Stuart Dallas
lvio said "All websites are created manually. (nano + html/css Tags)" he meant "All of the websites are created manually. (nano + html/css Tags)" meaning the sites he's working on rather than every site in existence. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9

Re: [PHP] Apache to serve RESTful requests using PHP

2013-02-09 Thread Stuart Dallas
e data when it's requested, shifting as much of the work as possible to when it is written (assuming a mostly-read service). -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

<    1   2   3   4   5   6   7   8   9   10   >