Re: [nyphp-talk] somewhat OT Re: validating proper name capitalization

2011-10-04 Thread John Campbell
> I understand that, but I'm asking something like: if you type in •.com into > your browser, what's getting passed to the server behind the scenes? The non encoded string (xn--...). It must be this way because the HTTP protocol requires the header to be completely US-ASCII. It is best to think

Re: [nyphp-talk] somewhat OT Re: validating proper name capitalization

2011-09-29 Thread John Campbell
> This is a problem, but not an unsolvable one. Browsers will support PUNYCODE > AND be safe eventually. You are right, that it is more complicated than I initially mentioned, however, chromium has pretty much decided already which way they are going to go. Don't hold your breath waiting for √.c

Re: [nyphp-talk] somewhat OT Re: validating proper name capitalization

2011-09-29 Thread John Campbell
On Thu, Sep 29, 2011 at 3:24 PM, Chris Snyder wrote: > On Thu, Sep 29, 2011 at 2:06 PM, John Campbell wrote: > >> The problem with puny code is that it is a security nightmare, and no >> safe browsers are ever going to support it. >> >> Can you find the difference

Re: [nyphp-talk] somewhat OT Re: validating proper name capitalization

2011-09-29 Thread John Campbell
Can you find the difference between http://paypal.com/ and http://paypaḷ.com/ ? Regards, John Campbell ___ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation

Re: [nyphp-talk] PHP html DOM manipulation

2011-08-10 Thread John Campbell
> 2) After the entire page is loaded, an onDomReady event is fired which find > all href links with a rel attribute of lightbox[x] where x is some text. >  The javascript code will then check to see if there is a thumbnail for the > image[by checking for the same image name in a subdirectory called

Re: [nyphp-talk] PHP html DOM manipulation

2011-08-07 Thread John Campbell
t even make sense. Sure PHP can run selectors and maybe change attributes, but it can't bind an event to the DOM. If you want better performance, maybe event delegation in javascript is a better solution. See the jQuery docs for "live" -John Campbell _

Re: [nyphp-talk] Shopping Cart Solutions

2011-08-07 Thread John Campbell
On Sun, Aug 7, 2011 at 10:50 PM, Tim Lieberman wrote: > Depending on her needs, she might be better off using a hosted service like > Shopify. It is going to be really hard to beat Shopify. You can get a store up and running in no time, and it is very cheap. If you have less than 100 SKUs it i

Re: [nyphp-talk] Google Rank Amateur

2011-07-10 Thread John Campbell
Your "solution" will make things worse with google. There is no "duplicate" content pentalty, but there is a "scraper" penalty, and I doubt that is being applied in your case. "noindex" tells google that you have a page that customers can and should see, but the googlebot specifically doesn't hav

Re: [nyphp-talk] cookies and experiation

2011-07-10 Thread John Campbell
The reason you cannot add 125 years is the 2038 problem. A simple solution is to set the expiration date to Jan 1, 2038. http://en.wikipedia.org/wiki/Year_2038_problem -jc On Sun, Jul 10, 2011 at 12:13 PM, Margaret Waldman wrote: > Jim, I used the at 386 from ‘90-‘04. I even put Windows ‘9

Re: [nyphp-talk] Can Javascript call a PHP program and read the results?

2011-05-31 Thread John Campbell
I really doubt google's ip-> location database is broken that badly, but if you do want to do this, I recommend something like the following: javascript: $.getJSON('http://myserver.com/getlocation.php?callback=foobar

Re: [nyphp-talk] Does PHP have file size download limits? Best practice?

2011-05-16 Thread John Campbell
There are no filesize limits, but you can run in to memory limits if you load the file into memory. To avoid this, use `fpassthru`. In terms of best practices, don't pass a user generated filename into fopen. It is a security mess. If you really need to allow arbitrary filenames, you should scr

Re: [nyphp-talk] Regex for P Elements

2011-01-12 Thread John Campbell
if the content is not encoded in utf8, you might need to run > utf8_decode on the strings to get the right data because I believe libxml > uses utf8 internally. If you are using DomDocument, passing everything though Tidy first is a good idea. http://

Re: [nyphp-talk] Doctrine and auto_increment not being a primary key

2010-12-11 Thread John Campbell
name`) ) ; This says: "Assign each user an id, and use that to reference each user. Make lookups on last name, email, and username, very fast. Don't allow duplicate usernames or emails." Regards, John Campbell ___ New York PH

Re: [nyphp-talk] Doctrine and auto_increment not being a primary key

2010-12-11 Thread John Campbell
e two different people with the same name. There is no chance someone might change their name. Oh, but we will assign everyone a unique number and keep it sorted in an index, but that is just for fun... we aren't going to use that number to identify people."

Re: [nyphp-talk] Squashing accented characters

2010-10-24 Thread John Campbell
I use a regex, and apply it to the source and the indexed text. it is pretty simple like: preg_replace('/[àâäåãá]/iu','a',$x); preg_replace('/[éèêë]/iu','e',$x) It is a bit of a hack, but works quite well in practice. If you do some googling, you can find many regex variations that will do what

Re: [nyphp-talk] OT: Javascript - Opening a new window, but the window name is getting lost with Facebook.com

2010-09-29 Thread John Campbell
avascript is: if(top != self) { ... } Facebook does not want their site embedded as an iframe or as a child window to your site. Letting other sites control the window is a security issue for facebook, and they want to control the experience on their own site. Sorry, there is nothing you can d

Re: [nyphp-talk] OT: Javascript - Opening a new window, but the window name is getting lost with Facebook.com

2010-09-29 Thread John Campbell
sn't irritate the user. Why would you want to create a window that is not resizable and without a location bar? That is just plain rude. Thank god all decent browsers ignore it. -John Campbell On Wed, Sep 29, 2010 at 1:56 PM, David Roth wrote: > I was successfully using Javascript

Re: [nyphp-talk] REGEXP Solution Needed

2010-09-08 Thread John Campbell
size=(?!10) but that isn't quite right, because it will negate with size=100. so I think you need: (size=(?!10))|(size=\d{3,})) Regards, John Campbell > If anyone can polish this more or if I am wrong, pls give a note. Thanks. > > Original Message > Subject: Re:

Re: [nyphp-talk] design question: user self-registration

2010-08-31 Thread John Campbell
pattern. You can just save the checksum in the table, and avoid the email altogether if you want a shorter url. Regards, John Campbell ___ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation

Re: [nyphp-talk] Getting Closure - on PHP Closures and 5.3

2010-07-16 Thread John Campbell
On Fri, Jul 16, 2010 at 10:21 PM, David Krings wrote: > Uhm, for the ones like me who have no clue what this means, any pointers > available that explain closures? You can read about closures until you are blue in the face. The first thing you have to grock is first-class functions. Which basic

Re: [nyphp-talk] Getting Closure - on PHP Closures and 5.3

2010-07-16 Thread John Campbell
On Fri, Jul 16, 2010 at 2:48 PM, Hans Zaunere wrote: > Closures - great for Javascript, but for PHP?  In a non-callback-centric > synchronous language such as PHP, what else can we use this "syntactic > sugar" for?  How are people using them and what can we gain from them?  And, > the hell with co

Re: [nyphp-talk] Minor rant, pass by reference during method invocation depreciated

2010-07-02 Thread John Campbell
nt? Passing strings / ints by reference is a pointless feature of php. -John Campbell ___ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation

Re: [nyphp-talk] Thoughts on encryption

2010-05-06 Thread John Campbell
On Thu, May 6, 2010 at 1:15 PM, Anthony Papillion wrote: > An attacker could determine an MD5 or SHA1 password through a simple > dictionary attack. So, in essence, the encryption is useless. Yes, current CUDA setups can calculate a billion SHA1's per second. Dictionary attacks against salted has

Re: [nyphp-talk] MAMP or XAMPP ?

2010-04-26 Thread John Campbell
On Tue, Apr 27, 2010 at 12:20 AM, Justin Hileman wrote: > Ugh. MacPorts used to be cool, before I started using Homebrew :) How is Homebrew better than MacPorts? I am seriously curious. -jc ___ New York PHP Users Group Community Talk Mailing List http

Re: [nyphp-talk] MAMP or XAMPP ?

2010-04-25 Thread John Campbell
I think MAMP is a pain in the ass, and prefer to get the stack from MacPorts. The default MAMP install leaves you with stuff like a different version of PHP for cli vs Apache, and it is a pain to install additional modules. On Sat, Apr 24, 2010 at 11:58 PM, Ajai Khattri wrote: > > Which is be

Re: [nyphp-talk] Adding indexes

2010-03-22 Thread John Campbell
cuting it that way. If you have 3 years of data, and you should see a 1000x speedup by doing it my way. There is no "formula" to follow, but you need to intuitively understand how relational databases work to write fast queries. As a starting point, 1. index foreign keys 2. no formulas

Re: [nyphp-talk] good language for small GUI app?

2010-03-09 Thread John Campbell
On Tue, Mar 9, 2010 at 9:42 AM, David Mintz wrote: > I'm considering writing a small desktop GUI app for my psychotherapist wife > to manage her patient records. It will run on Linux but I guess it would be > good if it's cross-platform. Have you considered Adobe AIR + HTML + Javascript?

Re: [nyphp-talk] html to PDF conversion?

2010-03-05 Thread John Campbell
The best solution I have seen uses webkit create the PDFs. You get pretty much the same results as using the print feature in Safari/Chrome. I don't know if it will run on your system, but it is worth a look: http://code.google.com/p/wkhtmltopdf/ On Fri, Mar 5, 2010 at 3:07 AM, David Roth wrot

Re: [nyphp-talk] Google Grants

2010-02-17 Thread John Campbell
>> Maybe private schools fall under the "membership or providing benefits >> solely to memebers" exclusion. > Could be, but then that applies to every non profit in the "education" > sphere.  O Only the non-profits that charge tuition or a membership fee would be excluded. I know of a google gran

Re: [nyphp-talk] Google Grants

2010-02-16 Thread John Campbell
for causes to support rather than giving free adwords to help a private school juice its enrollment numbers. Regards, -John Campbell ___ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation

Re: [nyphp-talk] iterating through a multibyte string

2010-01-13 Thread John Campbell
7277803421 Dan is the winner. preg_split always runs in linear time. Both of the mb_substr are O(N^2), because the first step in mb_substr is splitting the string into array. It is not as intelligent as I initially assumed. Regards, John Campbell On Wed, Jan 13, 2010 at 11:37 AM, Rob Marsc

Re: [nyphp-talk] iterating through a multibyte string

2010-01-13 Thread John Campbell
); This will at least be O(N) on the length of the string. I also like Dan's idea of using preg_split. Regards, John Campbell On Wed, Jan 13, 2010 at 10:02 AM, Rob Marscher wrote: > Hi all, > > I have a need to iterate through a multibyte string to process the string > chara

Re: [nyphp-talk] email system for website

2010-01-04 Thread John Campbell
x27;order_confirmation.tpl'); For my application, it is easier to generate the contents of the email in the front end. The email messages can get really complicated and change based on 10 parameters. It could get really messy if you have to save all

Re: [nyphp-talk] email system for website

2010-01-04 Thread John Campbell
sending mechanism. The delivery implementation should be easy to change later. Regards, John Campbell ___ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation

Re: [nyphp-talk] PHP error handling with simplexml_load_file questions.

2009-12-29 Thread John Campbell
e http errors, may or may not follow redirects, etc. simple_xml_load_file() on a remote resource is great for article writers because they don't have to have a bunch of boilerplate curl code in the article, but it is a mistake for a real application. Regards, John Campbell On Tue, Dec 2

Re: [nyphp-talk] How common is bcmath?

2009-12-27 Thread John Campbell
I think you should compare google results vs something that every install has: phpinfo +pcre - 357k phpinfo +bcmath - 207k It looks like more that 50% of installs have it. Not great, but it isn't that rare either. -John Campbell On Sat, Dec 26, 2009 at 8:27 PM, Daniel Convissor wrote:

Re: [nyphp-talk] Google Wave API

2009-12-17 Thread John Campbell
Google never releases php anything. They are a C++/Java/Python shop. They have occasionally written some sample php code for tutorial purposes, but they will not write a php library. On Wed, Dec 16, 2009 at 5:44 PM, Gary Mort wrote: > Just wondering if anyone here knows if/when Google will be

Re: [nyphp-talk] Returning DB results as XML or JSON?

2009-12-03 Thread John Campbell
that is responsible for everything, and counting products by category would require a heroic effort. Keeping non-relational databases consistent requires writing tons of cron jobs to constantly fix the data. Sure, NoSQL may be better than sharding, but it isn't exactly fun. Regards,

Re: [nyphp-talk] joomla configuration

2009-11-05 Thread John Campbell
I think there is a file called database.mysql.php, but I bet you could grep for 'localhost', and I am sure you will find the file quickly (assuming it is set to connect to localhost). try: grep -R -C 4 localhost * To recover the admin password, see: http://www.google.com/search?q=joomla+recover+a

Re: [nyphp-talk] Valudating common field types

2009-10-26 Thread John Campbell
and I have 2 icelandic customers that don't even have last names on their credit cards. I am glad I don't do validation, because if I did, I probably would have lost those customers. Regards, -John Campbell ___ New York PHP Users Group Community

Re: [nyphp-talk] developer's machine specs -- recomendations?

2009-10-19 Thread John Campbell
make sure you get a computer with a matte display. Regards, John Campbell ___ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation

Re: [nyphp-talk] SimpleXML - UTF8

2009-10-19 Thread John Campbell
On Mon, Oct 19, 2009 at 7:32 AM, Dan Cech wrote: > Try: > > $text = @iconv('UTF-8','UTF-8//TRANSLIT',$text); Thanks Dan, I knew there had to be something simple. It looks like mb_convert_encoding($txt,'UTF-8','UTF-8') will work similarly, but

[nyphp-talk] SimpleXML - UTF8

2009-10-17 Thread John Campbell
UTF-8 bytes, e.g. replace the invalid bytes with a '?'. Rgds, John Campbell ___ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation

Re: [nyphp-talk] Database, table, and column naming schemes

2009-10-07 Thread John Campbell
of no good reason to add the extraneous information to the table. -John Campbell ___ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation

Re: [nyphp-talk] manipulating an IMAP account

2009-10-02 Thread John Campbell
h is not quite right (but, makes imap behave more like pop). It is unlikely the class maintainers are going to change that. How is the ArrayAccess broken? The key=>message mapping should change every time you call delete. Regards, John Campbell ___

Re: [nyphp-talk] naming identifiers

2009-09-01 Thread John Campbell
up writing stuff like: SELECT user.name, (SELECT COUNT(*) from post WHERE post.user_id=user.user_id) as post_count FROM user -john campbell ___ 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] Need help understanding NULL

2009-08-29 Thread John Campbell
You should be aware that PHP and SQL have completely different concepts of null. In php, null is a unique magic value that means "undefined", and if two things are null, then they are equal. http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php

Re: [nyphp-talk] Short Tags deprecated?

2009-08-29 Thread John Campbell
) ); It is handy to make your shortcut behave like printf when there is more than 1 argument. -John Campbell ___ 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] Dynamically Add Links to Text

2009-08-27 Thread John Campbell
On Thu, Aug 27, 2009 at 2:46 PM, Randal Rust wrote: > On Thu, Aug 27, 2009 at 2:42 PM, Hall, Leam wrote: > >> Maybe a nightly or weekly rebuild? Depends on frequency of updates. > > Conceptually, that makes sense. It is certainly something to consider. > However, these clients are typically librari

Re: [nyphp-talk] Migrate to Cloud

2009-08-12 Thread John Campbell
2009/8/12 Peter Sawczynec : > Any other suggestions on a cloud storage resource? Strategy? I'd use something based on S3. It is cheap, reliable, proven, and going to be around forever. -John C. ___ New York PHP User Group Community Talk Mailing List h

Re: [nyphp-talk] Barcodes

2009-08-06 Thread John Campbell
Zebra Crossing is a java based project that probably does what you want. Haven't used it personally, but I know it is behind the Shop Savvy andriod application. I am quite sure you wont find anything with php bindings. On Thu, Aug 6, 2009 at 6:00 PM, Ajai Khattri wrote: > > Im looking for an alg

Re: [nyphp-talk] session validation between http requests

2009-08-01 Thread John Campbell
h. I think 'httponly' cookies is probably a better XSS attack mitigation strategy in the long run (though there is no reason you can't do both). In php 5.2+ the option is: ini_set("session.cookie_httponly", 1); It is supported by FF 3

Re: [nyphp-talk] SSH2_CONNECT

2009-07-30 Thread John Campbell
missions. Regards, John Campbell ___ 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] Best Cell Phone for a PHP Programmer

2009-07-28 Thread John Campbell
On Tue, Jul 28, 2009 at 12:04 PM, Anthony Wlodarski wrote: > Yes but your chances of getting an app published are slim to none with an > iPhone. The review period can last a few months, but there is nothing stopping people from getting apps in the store. Google was rejected because they created a

Re: [nyphp-talk] So what do people use to parse RSS these days?

2009-07-21 Thread John Campbell
http://lmsotfy.com/index.php?q=Best+way+to+parse+RSS+feeds+with+PHP Sorry... couldn't help myself. -John Campbell ___ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyph

Re: [nyphp-talk] Help Finding an HTML Email View in CakePHP Application

2009-07-01 Thread John Campbell
It looks like the html is in the database. The message is generated from $result['Invoice']['invoice']. My guess is the invoice is generated somewhere else and stored in database, as a permanent record. This email code is just retrieving the html from the database and sending it. On Wed, Jul 1,

Re: [nyphp-talk] where in filesystem to install php application

2009-07-01 Thread John Campbell
On Wed, Jul 1, 2009 at 10:48 AM, David Mintz wrote: > Perhaps this is one of those things that doesn't matter a helluva lot, but: > when you have a freshly installed Debian-style LAMP (actually Ubuntu server > 9.04) and you are looking for a place in the filesystem to install your PHP > application

Re: [nyphp-talk] Trying to decide between MDB2 and PHP PDO

2009-06-26 Thread John Campbell
On Fri, Jun 26, 2009 at 1:33 AM, Konstantin Rozinov wrote: > On Thu, Jun 25, 2009 at 6:04 PM, John Campbell wrote: >> On Thu, Jun 25, 2009 at 5:44 PM, Eddie Drapkin wrote: >>> Wait, are you advocating //against// prepared statements? >> >> Not at all, but when using

Re: [nyphp-talk] Trying to decide between MDB2 and PHP PDO

2009-06-25 Thread John Campbell
this, I have to wrap whatever I am using, and I have found PDO to be slower and more buggy than mysqli. Regards, John Campbell ___ 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] Trying to decide between MDB2 and PHP PDO

2009-06-25 Thread John Campbell
reason you are ruling out mysqli? Regards, John Campbell >         } > >         echo "Array of Field Names From Header Record in Input data is \n"; >         print_r($arrFields); >         $seqno++; >         continue;    } > > >         $key = 0+$inrec[$arrFields[&

Re: [nyphp-talk] memory problems

2009-06-04 Thread John Campbell
mage handle. You have to manually free the memory with GD. This generally isn't a problem with web processes, because everything is cleaned up at the end of the request. Regards, John Campbell ___ New York PHP User Group Community Talk Mailing Li

Re: [nyphp-talk] delete one element from array

2009-06-03 Thread John Campbell
I think you want array_splice, rather than array_slice array_splice($arr,6,1); Regards, -John Campbell ___ 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] stopping comment spam with PHP

2009-06-02 Thread John Campbell
On Tue, Jun 2, 2009 at 4:53 PM, Chris Snyder wrote: > I've had rel="nofollow" in my comments froms since 2003 and I still > get dumb spammers who either don't know or don't care. Wow, I am impressed. Google announced nofollow in 2005, and you already had it implemented for two years. :) -jc ___

Re: [nyphp-talk] stopping comment spam with PHP

2009-06-02 Thread John Campbell
You should also make sure your comment system is using rel="nofollow", and doesn't have any XSS issues. If you aren't using rel="nofollow", and the site has page rank, then it will be worth the spammer's time to manually defeat your form. ___ New York PH

Re: [nyphp-talk] [0T] Verizon FIOS -- comments?

2009-05-27 Thread John Campbell
On Wed, May 27, 2009 at 5:09 PM, David Mintz wrote: > I tried, but could not for the life of me locate the IR sensor on the > Verizon box. Wait... you say IR emitters attached to the front of the > *cable* box?  I thought it was the other way around, i.e., that the Tivo box > had to send commands

Re: [nyphp-talk] Zip code radius

2009-05-22 Thread John Campbell
l 3) Read up on the Haversine formula. http://en.wikipedia.org/wiki/Haversine_formula Once you have these three pieces, you will be able to calculate the distance between contacts and any zip code. Regards, John Campbell On Fri, May 22, 2009 at 2:09 PM, Aaron Fischer wrote: > I'd lik

Re: [nyphp-talk] Switch-Case v. if/else

2009-05-14 Thread John Campbell
PHP should run ~1M switch tests per second on decent hardware. Either you are misinterpreting you profiling data, or running a switch statement a hell of a lot of time. I can't imagine any sort of if/else vs switch vs. jump table is going to make much of a difference. At best you will see a spee

Re: [nyphp-talk] Mobile Phone Detection

2009-05-01 Thread John Campbell
CSS @media or even a PHP > route. Javascript won't work because so many mobile browsers don't turn js on by default. CSS - '@media handheld' doesn't work very well either. Regex'ing the useragent string from php is the only

Re: [nyphp-talk] anyone have idea about the following warning message?

2009-04-30 Thread John Campbell
7;,'exp_date','card_code'); foreach($cart_keys as $key) { if($_POST[$key]) $_SESSION[$key] = $_POST[$key]; } // load the keys as variables, not really needed because the values already exist in _SESSION. extract(array_intersect_key($_SESSION,array_flip($cart_keys))); Regards

Re: [nyphp-talk] Remote addess

2009-04-29 Thread John Campbell
On Wed, Apr 29, 2009 at 8:21 PM, Michele Waldman wrote: > Does anyone know how to configure the server to allow remote access? There is never a valid reason to include remote files, but if you really want to do it, just enable allow_url_fopen and allow_url_include

Re: [nyphp-talk] WAMP (minus the M) forking question - also open to other ideas

2009-04-27 Thread John Campbell
art the command without the extra command window, so you get similar behavior to Unix's background processes. Look it up for more details." I don't use windows, but I trigger background processes with and "&" in *nix, and it looks like windows offers the same functiona

Re: [nyphp-talk] PHP hosting and standard tool-chain for newbie?

2009-04-23 Thread John Campbell
ly just use the command line, but does anyone know of a good free tool to mount remote file systems? I did a quick search and found MacFuse, but that looks like overkill. Standalone FTP programs seem ridiculous these days. Regards, John Campbell ___ New Y

Re: [nyphp-talk] APC for a custom PHP session handler

2009-03-24 Thread John Campbell
On Wed, Mar 25, 2009 at 12:03 AM, Steve Manes wrote: > John Campbell wrote: >> >> Don't do it.  It is either a solution to a problem you don't have, or >> the wrong solution.  APC has one datastore per server, which will be a >> disaster once you have more tha

Re: [nyphp-talk] APC for a custom PHP session handler

2009-03-24 Thread John Campbell
Don't do it. It is either a solution to a problem you don't have, or the wrong solution. APC has one datastore per server, which will be a disaster once you have more than 1 front end machine, or if you have to restart the webserver then all your users will get logged out. What do you store in s

Re: [nyphp-talk] Apache is killing me.

2009-03-16 Thread John Campbell
2ctl fullstatus` to a log in the event the apache craps out again, and I'll be sure to get a gdb dump if it happens again. 5) For other reasons, I reduced the Keep-Alive time and moved most of the static content to Amazon's CDN. Thanks for the help

Re: [nyphp-talk] generate random unique 8-digit number

2009-03-11 Thread John Campbell
01% That is a risk I am willing to take. Regards, John Campbell ___ 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] Apache is killing me.

2009-03-11 Thread John Campbell
On Wed, Mar 11, 2009 at 11:13 AM, Rob Marscher wrote: > Is it running but not processing requests?  Or is it no longer running? >  Maybe it's rotating log files but doesn't start back up properly? >  Otherwise, maybe some type of odd segmentation fault? I am pretty sure it is running, but as soo

[nyphp-talk] Apache is killing me.

2009-03-11 Thread John Campbell
anyone have any ideas or suggestions? Regards, John Campbell ___ 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] the stale V in MVC web apps

2009-03-04 Thread John Campbell
On Wed, Mar 4, 2009 at 12:48 PM, David Mintz wrote: > // on load > > window.updater = window.setInterval(submitForm,updateInterval); > > // and... > > submitForm = function(){ > > $('searchForm').request({ > > onCreate:function(response){$('formSubmit').value="Processin

Re: [nyphp-talk] the stale V in MVC web apps

2009-03-04 Thread John Campbell
On Wed, Mar 4, 2009 at 12:10 PM, David Mintz wrote: > > On Wed, Mar 4, 2009 at 12:01 PM, David Mintz wrote: >>> >> Thanks for the tip, but... why is this so? >> > > Cancel that, I think > http://blog.paulbonser.com/2007/11/18/extending-javascript-tail-recursion/ > is trying to help me out on this

Re: [nyphp-talk] the stale V in MVC web apps

2009-03-04 Thread John Campbell
On Wed, Mar 4, 2009 at 11:53 AM, David Mintz wrote: > > > On Wed, Mar 4, 2009 at 11:34 AM, Brent Baisley wrote: >> >> Use AJAX instead to refresh just the part of the page that needs >> refreshing. If it's a fair chunk of information, you set a "version" >> on the server so the AJAX call just che

Re: [nyphp-talk] the stale V in MVC web apps

2009-03-04 Thread John Campbell
I use AJAX polling loops to check if the data is actually stale, and then do something about it. It can be complicated as auto updating the sections of the page that have changed, and then doing the "yellow-fade". If you don't want to get fancy, you could just show a dialogue that let's the user

Re: [nyphp-talk] Flattening a Tree

2009-02-24 Thread John Campbell
ten($arr) { $result = array_values($arr); $i = 0; while($i < count($result) ) is_array($result[$i]) ? array_splice($result,$i,1,array_values($result[$i])) : $i++; return $result; } -John Campbell ___ New York PHP User Group Community T

Re: [nyphp-talk] Parse HTML Files as PHP

2009-02-22 Thread John Campbell
2009/2/22 Peter Sawczynec : > So now if anyone with some SEO/search background can weigh in on the > page name change issue > that would be great. You are on the right track. You could do a bazillion 301 redirects from .html to .php , but that is a waste of your time, will slow down page loads,

Re: [nyphp-talk] PHP and Flex

2009-02-17 Thread John Campbell
ic record sets. I avoid XML where possible for communicating with the client. With XML you have to write custom code to serialize and deserialize, or bundle a massive soap library on the client side. -John Campbell ___ New York PHP User Group Community

Re: [nyphp-talk] Mod_auth_digest/mysql works!

2009-02-03 Thread John Campbell
on in php. Memory is freed as soon as the reference count goes to zero. Regards, John Campbell ___ 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] Corp. and Non-Profit PHP Users for Web

2009-02-02 Thread John Campbell
Thanks for compiling the list. Thought it was a little silly at first, but now that you have responded with the compiled list, I am glad you asked. Cheers, John Campbell 2009/2/2 Peter Sawczynec : > Well, I added a few more myself... > > Yahoo www.yahoo.com > Facebook www.

Re: [nyphp-talk] Non-Profit and Major Corporate PHP Users List

2009-01-30 Thread John Campbell
gt; If there are any more co. names I would still take more. > > Warmest regards, > > Peter Sawczynec > Technology Dir. > blūstudio > 941.893.0396 > p...@blu-studio.com > www.blu-studio.com > > > > -Original Message- > From: talk-boun...@lists.nyphp.org

Re: [nyphp-talk] Non-Profit and Major Corporate PHP Users List

2009-01-30 Thread John Campbell
ytimes, Facebook Are you looking for anything in particular? Regards, John Campbell ___ 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] how to open choose file dialbox

2009-01-28 Thread John Campbell
ript to be a security threat, and is not possible on modern browsers. Opening a file dialog must be user initiated. Also, please don't crosspost. Post to one list, and wait awhile before posting your question to another list. Regards, John Campbell ___

Re: [nyphp-talk] Run PHP script as service (every 10 seconds)

2008-12-16 Thread John Campbell
ipt takes more than 10 seconds to run. If you use cron, make sure you have a lock to prevent the script from running simultaneously. -John Campbell ___ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/t

Re: [nyphp-talk] Ajax UI, where to display a detailed view of a record

2008-12-09 Thread John Campbell
I would use a modal dialog or append the content below the record and slide down the new content. -John C. ___ 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] Report with line breaks

2008-12-08 Thread John Campbell
On Mon, Dec 8, 2008 at 8:56 PM, Tom Sartain <[EMAIL PROTECTED]> wrote: > It's surprising how much control you can get over printouts with CSS. In theory... those CSS properties are only supported by Safari, and IE8. Unfortunately I found that out the hard way.

Re: Re[2]: [nyphp-talk] OpenID is what?

2008-10-30 Thread John Campbell
, I can't > say that the site authorization was compromised with any certainty. > How did you figure out that they did it over FTP? FTP is a pointless protocol these days... turn it off. Are you on a shared host? -John Campbell ___ New York

Re: [nyphp-talk] [OT] - Politics.com

2008-10-22 Thread John Campbell
On Wed, Oct 22, 2008 at 11:49 AM, Joseph Crawford <[EMAIL PROTECTED]> wrote: > http://www.politics.com/ - If you are political please come check out what > has been keeping me busy over the last few months. Damn... nice domain name. My expectations are high. Cheers, J

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

2008-10-14 Thread John Campbell
On Tue, Oct 14, 2008 at 11:48 AM, <[EMAIL PROTECTED]> wrote: > Hello Brian, > > Thanks for the reply... > > I only work on vBulletin and I always make sure I have the latest stuff > installed. Earlier versions didn't have problem but since 3.7 seems like the > badguys have found a way to just bypa

Re: [nyphp-talk] Blog Posts with Embedded Content

2008-10-13 Thread John Campbell
ible because it can change the html in unpredictable ways. Not cutting in the middle of a tag is pretty easy to solve, just iterate and keep track of the open tags on a stack. -John Campbell ___ New York PHP Community Talk Mailing List http://list

Re: [nyphp-talk] Blog Posts with Embedded Content

2008-10-07 Thread John Campbell
trong) before passing it to the function. See the code at: http://php.pastebin.com/f7f5262cb The safest approach is probably to pass the html through tidy, and then into DOM, and traverse and count the length of text nodes, but that would be quite slow if you ran it o

Re: [nyphp-talk] Search function

2008-09-19 Thread John Campbell
On Fri, Sep 19, 2008 at 6:30 PM, (Margaret) Michele Waldman <[EMAIL PROTECTED]> wrote: > Googles annual pricing for using their function is: > > Number of web pages Search Query Limit (annual) Pricing (annual) > Up to 5,000 250,000 $100 > 5,001 - 50,000 250,000 $500 > 50,001 - 100,000 500,000

Re: [nyphp-talk] Search function

2008-09-19 Thread John Campbell
On Fri, Sep 19, 2008 at 6:07 PM, (Margaret) Michele Waldman <[EMAIL PROTECTED]> wrote: > Would instr get_file_contents be too slow? This is a really bad idea in general... Is there a reason Google's site search won't work? If you do something like exec(grep), make sure you know how to escape ever

  1   2   3   >