Re: [nyphp-talk] Can I set the response code if a PHP Fatal error occurs?

2009-02-17 Thread Michael Sims
not right. There's no other way to do it. You can't have nothing be a valid response because as you've seen, it's possible to get nothing as an error response too. Michael Sims ___ New York PHP User Group Community Talk M

Re: [nyphp-talk] Can I set the response code if a PHP Fatal error occurs?

2009-02-17 Thread Michael Sims
es. Certainly the PHP script which blew a gasket ought to log something to the system log files, trying its best to tell the maintainers what went wrong and how. But exposing those messages to the users is terrible practice. Nor is it even possible, since the Javascript call *by defini

Re: [nyphp-talk] Can I set the response code if a PHP Fatal error occurs?

2009-02-17 Thread Michael Sims
a way to figure out if things were successful - test some data output by the PHP script, where that data is only sent if everything went correctly. Michael Sims ___ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php

Re: [nyphp-talk] Session timing out too soon

2008-12-04 Thread Michael Sims
x27;s an explanation with some sample code: http://www.captain.at/howto-php-sessions.php Michael Sims ___ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php

Re: Re[2]: [nyphp-talk] Bypassing Registration forms on vBulletin forums ... I guess other forums are having similar problem too?

2008-10-14 Thread Michael Sims
which query is being used to add them. It need not be anywhere on the registration page. Michael Sims ___ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show

Re: [nyphp-talk] comparing arrays to build query?

2008-06-08 Thread Michael Sims
nt of cases the database will happily give you exactly what you need if you just ask it nicely. Michael Sims ___ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http

Re: [nyphp-talk] sun and mysql acquisition for non-enterprise users

2008-03-26 Thread Michael Sims
L, I'd say the answers are clearly yes. So have no fear! MySQL, or some derivative of it, will remain available as long as people care about it. Michael Sims ___ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailm

Re: [nyphp-talk] Urgent: Help in Defending Attack

2008-02-28 Thread Michael Sims
HP level. I don't know how much control you have over the server, but if it's your machine, you can use, e.g., hosts.deny to block IP address ranges that annoy you. Michael Sims ___ New York PHP Community Talk Mailing List h

Re: [nyphp-talk] I think this is an encoding issue?

2007-10-17 Thread Michael Sims
for the double-tick mark, not whatever the curly quote character is, so if you cut-and-paste that into an HTML document, it won't parse. You can turn off the curly quotes in OpenOffice's options, so that it won't auto-convert the double-tick mark for you anymore.

Re: [nyphp-talk] Many pages: one script

2007-08-05 Thread Michael Sims
index.php?var1=$1 Now, any request for foo.com/yourdir/anything/anythingatall will be sent to foo.com/yourdir/index.php, which will see the extra "directories" as URL variables. The user will not know what's happening - the

Re: [nyphp-talk] TRUNCATING MySQL FIELDS

2007-07-28 Thread Michael Sims
hat you were trying to do. Probably you should tell your random number generator to give you a number of exactly eight digits, if that's what you want. Michael Sims ___ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/li

Re: [nyphp-talk] gzip compressed sites

2007-02-02 Thread Michael Sims
18 kb uncompressed) Style Sheets (9 files) 31 kb Total 36 kb (67 kb uncompressed) Pretty handy, yes? Michael Sims ___ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online ht

Re: [nyphp-talk] Zip Code Stuff

2007-01-22 Thread Michael Sims
lose to zip 05701, and its arccos is getting rounded to zero, which makes the distance calculated be zero, which is untrue. Use one of the other formulas on that Wikipedia page. Michael Sims ___ New York PHP Community Talk Mailing List http://lists.n

Re: [nyphp-talk] Ownership of Code

2007-01-11 Thread Michael Sims
pay them to produce... would not be hired by me. Nor would I hire a wedding photographer who insisted that they owned the negatives to the pictures that they took on my dime. Both situations suggest the contractor is planning to extort money from me at a later date, to make me pay twice for the

Re: [nyphp-talk] Re: PHP_SELF problems

2006-12-29 Thread Michael Sims
the canonical solution would be something like: $thispage = (isset($_SERVER['ORIG_SCRIPT_NAME'])) ? $_SERVER['ORIG_SCRIPT_NAME'] : $_SERVER['SCRIPT_NAME']; How's that? That should work anywhere, right? (Disclaimer: I never use PHP as a cgi script and can't

PHP_SELF problems (was Re: [nyphp-talk] Holiday Greetings to Everyone...)

2006-12-26 Thread Michael Sims
On Tuesday 26 December 2006 5:11 pm, Joseph Crawford wrote: > Chris, > > do you suggest hardcoding the filenames even when referencing the same > file that is executing? There was a long thread about this in July 2005. Executive summary: PHP_SELF intentionally includes extra URL garbage (or valu

Re: [nyphp-talk] Zip Code field in Excel

2006-11-15 Thread Michael Sims
'01234 will be seen by Excel as the text string "01234" rather than the numeric value 1234. (Another solution: the user can also, when importing into Excel, set that field as "Text" rather than "General".) Michael Sims

Re: [nyphp-talk] MySQL GPL License

2006-11-10 Thread Michael Sims
license allows one to modify MySQL and distribute applications that are intricately bound together with it, and not distribute the altered source code. Lamp2lapo.com is lying (and I do say lying, rather than mistaken, because anyone speaking "authoritatively" about GPL licensing certainly kn