Re: [nyphp-talk] [OT] facebook figures out memcache replication

2008-01-22 Thread Jon Baer
Pretty nice, I wonder if it is a fork of Brian Aker's original work ... http://tangent.org/506/memcache_engine.html http://tangent.org/586/Memcached_Functions_for_MySQL.html - Jon On Jan 22, 2008, at 12:26 PM, Rob Marscher wrote: I check out the facebook blog from time to time... this is int

Re: [nyphp-talk] Namespaces

2008-01-10 Thread Jon Baer
Its also good to scan the last php-internals list and grep for Namespaces discussions as things can automagically change on you :-) http://marc.info/?l=php-internals&m=118355320225178&w=2 http://marc.info/?l=php-internals&m=119308858512331&w=2 - Jon On Jan 10, 2008, at 8:07 PM, David Krings w

Re: [nyphp-talk] WYSIWYG editors

2008-01-08 Thread Jon Baer
Yes, FCKEditor does have a bunch of special hooks for dealing w/ copy/ paste from Word. "Paste from Word cleanup with auto detection" http://www.fckeditor.net - Jon On Jan 8, 2008, at 10:27 PM, David Krings wrote: Urb LeJeune wrote: I have been using the TinyMCE WYSIWYG editor. I not happy

Re: [nyphp-talk] version mismatch - MySQL vs. PHP MySQL client

2008-01-06 Thread Jon Baer
Ive had this come up a few times ... for the most part if your SQL is simple joins it will not really cause problems, the real problems are if you are using anything like prepared statements or something meant for mysqli extension. http://us.php.net/mysqli (requires 4.1.3) However since th

Re: [nyphp-talk] XML to JSON?

2008-01-04 Thread Jon Baer
Go straight to binary :-) http://hessianphp.sourceforge.net/quickstart.html All kidding aside, there is a nice client way w/ jQuery to accomplish it (cuz the client could always do *more* work) ... http://plugins.jquery.com/project/xmlObjectifier Examples: http://www.terracoder.com/example

Re: [nyphp-talk] Need Help About creating search

2007-11-22 Thread Jon Baer
Or let our friend Google handle it all ... http://www.google.com/coop/cse/ - Jon On Nov 22, 2007, at 9:49 AM, tedd wrote: At 9:41 PM -0800 11/21/07, birgunj birgunj wrote: Dear All, i did not understand how to use this ? please if anybody has any simple example about search,please give me

Re: [nyphp-talk] Need About creating search

2007-11-21 Thread Jon Baer
Build an index with Zend_Search_Lucene http://framework.zend.com/manual/en/zend.search.lucene.html It would be *really* nice to see Zend build a direct DB full-text relation to index scheme that makes indexing easier so you don't have to add your documents manually. @ MySQL camp the consens

Re: [nyphp-talk] XML Security

2007-11-21 Thread Jon Baer
There was suppose to be a full wrapper for XMLSec (C lib) that was presented 2 years ago @ PHP|works ... http://www.aleksey.com/xmlsec/ http://www.cdatazone.org/files/xmlseclibs.phps This is all explained in Pro PHP XML and Web Services (Apress) - Jon On Nov 21, 2007, at 5:06 PM, Adler Medra

Re: [nyphp-talk] My first symfony site

2007-11-20 Thread Jon Baer
Thanks for sharing your experience. The migrations technique looks extremely promising (and familiar :-) ... http://doctrine.pengus.net/index.php/documentation/manual?chapter=migration - Jon On Nov 20, 2007, at 7:42 AM, Paul Houle wrote: I just finished a small project with symfony at htt

Re: [nyphp-talk] detecting Java Script from within a PHP script.

2007-11-16 Thread Jon Baer
Hmm, was under the impression latest Browscap libraries already did a similar technique but does not look like it is the case @ all. Good call. - Jon On Nov 16, 2007, at 10:46 AM, csnyder wrote: On Nov 16, 2007 9:54 AM, Jon Baer <[EMAIL PROTECTED]> wrote: Browscap ...

Re: [nyphp-talk] detecting Java Script from within a PHP script.

2007-11-16 Thread Jon Baer
Browscap ... http://garetjax.info/projects/browscap/ - Jon On Nov 16, 2007, at 9:00 AM, Urb LeJeune wrote: Sorry about the last message, I accidently hit the send button. It there a way to detect if a user's browser has Java Script enabled from within a PHP script? Urb Dr.

Re: [nyphp-talk] Quercus

2007-11-15 Thread Jon Baer
in PHP files (running inside a Zend Framework, too). It worked very nicely for the use I intended it for. Thanks for posting the link. On Nov 15, 2007 8:25 AM, Hans Zaunere <[EMAIL PROTECTED]> wrote: Rob Marscher wrote on Thursday, November 15, 2007 12:21 AM: On Nov 14, 2007, at 8:32 PM, J

[nyphp-talk] Quercus

2007-11-14 Thread Jon Baer
http://quercus.caucho.com So im testing this out w/ CakePHP w/ JVM 1.5 and Terracotta (vm clustering) and have to say from what Ive seen (locally) it is pretty impressive. I am wondering if anyone is actually using (or testing) this combo in production? Or has any opinions otherwise of th

[nyphp-talk] Phpspec (BDD)

2007-11-05 Thread Jon Baer
BDD is just too cool (and productive) to ignore :-) http://code.google.com/p/phpspec/ No downloads yet except w/ what is in trunk ... svn checkout http://phpspec.googlecode.com/svn/trunk/phpspec Hope it picks up some traction + someone can present sometime ... - Jon __

Re: [nyphp-talk] Zend Neon - (Zend Framework Project)

2007-10-31 Thread Jon Baer
Change: set_include_path('.' . PATH_SEPARATOR . './library' . PATH_SEPARATOR . './application/models/' . PATH_SEPARATOR . get_include_path()); To: set_include_path('..' . PATH_SEPARATOR . '../library' . PATH_SEPARATOR . '../application/models/' . PATH_SEPARATOR . get_include_path()); I

Re: [nyphp-talk] PHP5 hosting?

2007-10-31 Thread Jon Baer
Yeah very good point ... in fact it's probably a good idea to remain a little (or super) skeptical of really *any* shared hosting type of setup. Your paranoia level around your app + business requirements usually dictates (or should) how you are going to initially setup. You do get what y

Re: [nyphp-talk] PHP5 hosting?

2007-10-31 Thread Jon Baer
Ive only used 2 hosting setups so far (personal wise) ... PHPWebhosting (unmetered) http://www.phpwebhosting.com/host_details.html Joyent http://www.joyent.com/connector/pricing/ - Jon On Oct 31, 2007, at 1:53 PM, Rob Marscher wrote: On Oct 31, 2007, at 10:00 AM, Ajai Khattri wrote: So Im lo

Re: [nyphp-talk] automatic redirection of PHP script

2007-10-23 Thread Jon Baer
Another option ... switch(TRUE) { case($cost < 100): include("a.php"); break; case($cost > 1000): include("b.php"); break; default: break; } - Jon On Oct 23, 2007, at 4:13 AM, PaulCheung wrote: Hi I was wondering if anybody knows? I am sure that others must have encountered this in

Re: [nyphp-talk] Compiling PHP

2007-10-22 Thread Jon Baer
First thing Id do is grab php-5.2.4 and mysql 5.0.45 sources and untar to /usr/local/src so you have them in case they are not there or outdated. Run "php -i | grep configure" and copy that to a handy file somewhere, it shows how your current php bin was built. Look for the mysql directi

Re: [nyphp-talk] [OT] Book search: The best DIV/CSS book?

2007-10-22 Thread Jon Baer
I find pretty much all of the Friend of Ed series pretty insightful + extremely helpful on the topic ... http://www.friendsofed.com Particularly the title "CSS Mastery" ... http://cssmastery.com HTH, (I can bring this to tomorrows XML DB meetup if interested). - Jon On Oct 22, 2007, at 12:

[nyphp-talk] Framework SIG lists?

2007-10-19 Thread Jon Baer
Hi, Just curious, is there any interest out there to maybe(?) create local framework-specific lists (SIGs) around CakePHP, Zend, Symfony, etc. Or would it be better to just post to Talk w/ something in the subject [Zend] to signify the topic better or would that annoy everyone? Any thoug

Re: [nyphp-talk] How to submit POST vars via html image tags

2007-10-15 Thread Jon Baer
No post data is being sent, It should be ... curl_setopt($imgurl, CURLOPT_POSTFIELDS, 'datastuff='.$datastuff); - Jon On Oct 15, 2007, at 6:36 PM, ali mohammad wrote: Hello, Hopefully, this is not off-topic. I have a couple of html image tags such as on a single web page, and each such tag

Re: [nyphp-talk] Creating Avatar Images

2007-10-12 Thread Jon Baer
Well I was not suggesting to fully use the gravatar site itself (although you can scale to whatever size you wish for your avatar using &size=n), I think they recognize anything > 80px to not be an "avatar" ... your question dealt w/ the security of such images + the technique w/ the MD5 ha

Re: [nyphp-talk] Creating Avatar Images

2007-10-11 Thread Jon Baer
Have you looked @ the gravatar setup before? http://site.gravatar.com/site/implement - Jon On Oct 11, 2007, at 8:27 PM, Ben Sgro ((ProjectSkyLine)) wrote: Hello All, I'm sure this has been done a bunch of times and answered even more. I looked around google and I just want to the most basic

[nyphp-talk] Zend Neon - (Zend Framework Project)

2007-10-11 Thread Jon Baer
Im taking Zend Neon for a spin + am not sure if all the templates being created for a framework project are actually working correctly. It looks like the index.php file is out of place and creating new Zend controllers + Zend views dont seem to place them properly unless you explicitly spec

Re: [nyphp-talk] SPL - Do you use?

2007-09-29 Thread Jon Baer
Excellent feedback from everyone on SPL, thanks for taking time to post back. - Jon On Sep 29, 2007, at 6:34 PM, Michael B Allen wrote: On 9/27/07, Jon Baer <[EMAIL PROTECTED]> wrote: Do many here use the SPL library? I could never really understand this "library", on on

[nyphp-talk] PHP 5.3 / Namespaces

2007-09-29 Thread Jon Baer
So according to a few (kinda old) blogs, etc, in 5.3 we should be able to accomplish something like this (correct me if Im wrong, Ive only poked through latest php-src): Just curious, does importing again as MCL create a stack or does it throw an exception? If it is stacked this would gi

[nyphp-talk] SPL - Do you use?

2007-09-27 Thread Jon Baer
Do many here use the SPL library? I could never really understand this "library", on one side part of the Java programming that I really felt to be a burden of added / bloated code was the idea of the "Iterator" (you always had to grab one) and that is pretty much what the SPL is (for PHP5)

[nyphp-talk] Re: php|works 07 slides

2007-09-17 Thread Jon Baer
Actually found the one I was looking for ... http://sizzo.org/wp/talks/ * Facebook Performance Caching Anyone know if there will be / was video? - Jon On Sep 17, 2007, at 5:38 PM, Jon Baer wrote: For those interested ... Paul Jones put up his 2 slides - excellent topics - @ his blog here

[nyphp-talk] php|works 07 slides

2007-09-17 Thread Jon Baer
For those interested ... Paul Jones put up his 2 slides - excellent topics - @ his blog here: http://paul-m-jones.com/blog/ * Framework and Application Benchmarking * Organizing Your PHP Project Was trying to locate a few others from the schedule w/o luck, anyone have a repository link? He

Re: [nyphp-talk] php|works 07 slides

2007-09-17 Thread Jon Baer
Nice, thanks Paul! - Jon On Sep 17, 2007, at 5:47 PM, Paul M Jones wrote: On Sep 17, 2007, at 4:38 PM, Jon Baer wrote: For those interested ... Paul Jones put up his 2 slides - excellent topics - @ his blog here: http://paul-m-jones.com/blog/ * Framework and Application Benchmarking

Re: [nyphp-talk] Emailing from a PHP script

2007-09-14 Thread Jon Baer
What does the register_globals and safe_mode settings your .ini file say? - Jon On Sep 14, 2007, at 11:34 AM, PaulCheung wrote: Thanks for the solution. I've tried it and it did not work for me changed php.ini to reflect change rebooted my system. Don't really understand why it is necessar

Re: [nyphp-talk] ORM anyone?

2007-09-12 Thread Jon Baer
(This might have already been mentioned, sorry lost some emails) ... I think no matter what ORM framework you pick you always have to look @ its lazy + eager loading options (this is even before the optimization). You can run into big problems if you don't consider the timing of data in yo

[nyphp-talk] CouchDB (PHP)

2007-09-08 Thread Jon Baer
So has anyone here played around w/ CouchDB @ all? http://blog.labnotes.org/2007/09/02/couchdb-thinking-beyond-the-rdbms/ http://couchdb.org/ PHP5 Client: http://couchprojects.googlecode.com/svn/trunk/libraries/php/CouchDb/ Im getting the vibe that it would be akin to say SQLite BLOBs w/ sli

Re: [nyphp-talk] Books & magazines

2007-09-08 Thread Jon Baer
One of the best books Ive read(ing) in a while: Beautiful Code http://www.amazon.com/Beautiful-Code-Leading-Programmers-Practice/dp/ 0596510047/ref=pd_bbs_sr_1/104-9638236-3966325? ie=UTF8&s=books&qid=1189302826&sr=8-1 There are a few chapters which are gems in general thinking. - Jon On Se

Re: [nyphp-talk] Roll ove image

2007-09-08 Thread Jon Baer
Probably the best way Ive seen it implemented (and easiest) would be to use the Fisheye plugin for jQuery ... http://www.ndesign-studio.com/demo/css-dock-menu/css-dock.html * Download link (jQuery): http://docs.jquery.com/ Downloading_jQuery#Current_Release * Download link (Fisheye): http://

Re: [nyphp-talk] Mouse Over Menu

2007-09-07 Thread Jon Baer
Suckerfish ... http://www.alistapart.com/articles/dropdowns/ http://www.htmldog.com/articles/suckerfish/dropdowns/ - Jon On Sep 7, 2007, at 10:11 PM, Urb LeJeune wrote: I'm looking to do a mouse over menu. You run the mouse over a main item and a submenu appears, if available. I would prefer

Re: [nyphp-talk] Finding event listeners?

2007-09-05 Thread Jon Baer
Yep, it does ... http://developer.yahoo.com/yui/docs/YAHOO.util.Event.html#getListeners - Jon On Sep 5, 2007, at 7:26 AM, Ken Robinson wrote: At 06:38 AM 9/5/2007, Kenneth Downs wrote: John Campbell wrote: I cannot seem to figure out which javascript function I would use to determine the

Re: [nyphp-talk] Finding event listeners?

2007-09-04 Thread Jon Baer
Actually a pretty good question ... I was under assumption that you could call Event.observers in Prototype and get back an array of element and handlers but after glimpsing through the API was not the case. In fact since it's not a DOM-level call it seems that it would be pretty API indep

Re: [nyphp-talk] AJAX and State

2007-09-04 Thread Jon Baer
Personally ... I think even broader ideas like Dojo Offline (http:// dojotoolkit.org/offline) and Google Gears (http://gears.google.com/) takes it to an even further level which has not been tapped (yet). Now if only you can sneak it into a project ;-) - Jon On Sep 4, 2007, at 8:50 AM, Ken

Re: [nyphp-talk] Two part question: Shopping carts & E-commerce

2007-08-28 Thread Jon Baer
Or why even reinvent the wheel altogether ... http://www.shopify.com Worth a look I think ... - Jon On Aug 28, 2007, at 11:11 AM, Gary Mort wrote: Ajai Khattri wrote: Or even Google Checkout. I'm not thrilled with Google checkout since it requires you to have your customer setup a Goo

Re: [nyphp-talk] how did you learn php?

2007-08-27 Thread Jon Baer
Don't forget ... probably the one best thing to take advantage of is the vast enormous amount of video screencasts + other free elearning material. There was literally none of it (or it was ridiculously expensive) when I started and it has helped alot of people I know (and I think Rails be

Re: [nyphp-talk] Accessing First Element of Array

2007-08-26 Thread Jon Baer
nt() to get the last value added or key() to get the key of the most recently added element. - Jon On Aug 26, 2007, at 9:08 PM, Michael B Allen wrote: On 8/26/07, Jon Baer <[EMAIL PROTECTED]> wrote: Is it anything that $array[0] would not be able to get access to? Hi Jon,

Re: [nyphp-talk] Accessing First Element of Array

2007-08-26 Thread Jon Baer
Is it anything that $array[0] would not be able to get access to? - Jon On Aug 26, 2007, at 8:45 PM, Michael B Allen wrote: Hi, How do you access the first element of an array? I'm looking for something like array_shift but without modifying the array. Mike __

Re: [nyphp-talk] Linux editors

2007-08-26 Thread Jon Baer
http://www.php-editors.com/review/ My own personal experience has gone from Modelworks SitePad on Windows -> Bluefish on Linux -> TextMate on OS X. I actually liked Bluefish, but have not kept up on what the latest 1.0 delivered. - Jon On Aug 26, 2007, at 1:34 PM, [EMAIL PROTECTED] wrote

Re: [nyphp-talk] Frameworks - Which best fits my development style?

2007-08-22 Thread Jon Baer
I find the fact that if something does go wrong in a framework(ed) environment you know *exactly* where to look (even if the project is not yours) so its normally the debugging aspect of the project I look @ first. Also I think the IDEs are going to (or should) accommodate more and more f

Re: [nyphp-talk] Tuning MySQL Full Text Search

2007-08-22 Thread Jon Baer
is confidential information intended only for the use of the individual to whom it is addressed. - Original Message - From: Jon Baer To: NYPHP Talk Sent: Wednesday, August 22, 2007 12:18 PM Subject: Re: [nyphp-talk] Tuning MySQL Full Text Search I would say build an index if its items which wil

Re: [nyphp-talk] Tuning MySQL Full Text Search

2007-08-22 Thread Jon Baer
I would say build an index if its items which will rarely change. There is real power in using a Lucene-based index for full text search that a DB does not really focus on and would meet your requirements better. Ive recently put a 200k record set thorough Zend_Search and the clients were

Re: [nyphp-talk] Webserver file access (and version control)

2007-08-21 Thread Jon Baer
The only thing that pertains to that you are developing a Rails application is that you have a "config" folder @ the root level so that a "deply.rb" script can be set there. (old method) In fact the new method is just to have a Capfile in your root + describe tasks. From there you would ru

Re: [nyphp-talk] Webserver file access (and version control)

2007-08-21 Thread Jon Baer
+1 for Capistrano, it saves so much time ... But if you need something else even more lightweight ... Vlad the Deployer (yes, that is the name, no typo) ... http://www.infoq.com/news/2007/08/vlad-the-deployer :-) On Aug 21, 2007, at 12:41 PM, Rob Marscher wrote: On Aug 20, 2007, at 3:59 P

[nyphp-talk] Measuring Test Coverage + BDD for PHP

2007-08-16 Thread Jon Baer
So the two tools I have come to respect in Ruby world are both Rspec and Rcov and am looking for what the equivalents in PHP and notice there is a nice "documentation coverage" page on PEAR now ... http://pear.php.net/package/QA_Peardoc_Coverage So what would be used for BDD in PHP (in terms

Re: [nyphp-talk] Search of directories and files on my web server

2007-08-16 Thread Jon Baer
Don't forget, there are good options in PEAR as well. http://pear.php.net/package/File_Find - Jon On Aug 16, 2007, at 10:42 AM, Dan Cech wrote: Aaron Fischer wrote: Greetings, I am working on a little script that will start at a specified directory on my web server and then proceed to lo

Re: [nyphp-talk] Subversion killed Xampp Apache

2007-08-15 Thread Jon Baer
Your ISP should already be setup to use logrotate (a cron job for the purpose) ... http://www.debian-administration.org/articles/117 BTW, on the topic, Im about to upgrade a box and have been looking if its possible to "merge" those logs across machines so they will show up in stat reports

Re: XML vs. rel DBs [was: Re: [nyphp-talk] Many pages: one script]

2007-08-13 Thread Jon Baer
Immediately following this conversation I stopped by B&N to pick up this book: http://www.amazon.com/o/ASIN/0596006349 XQuery by Priscilla Walmsley It mainly goes over XPath 2.0 vs. 1.0 for most of the book, but overall it is a *great* insight into the topic. Also very good examples on FL

Re: [nyphp-talk] Debugging Zend_Db SQL

2007-08-09 Thread Jon Baer
From what I recall most of the framework objects should already have a __toString() overload on them so you can just echo/dump the select itself. - Jon On Aug 9, 2007, at 11:34 AM, Brian Dailey wrote: I'm just starting to dabble with Zend's framework, and I don't see an easy way to check

Re: [nyphp-talk] Good Font Size Control

2007-08-09 Thread Jon Baer
For reference I think it refers to the "CSS Reset" methodology ... http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ -snip- font-size:62.5%; Why? All popular browsers has default font size equal 16px. If we set font size equal 62.5% then font size is equal 10px at screen (but not

Re: [nyphp-talk] What json library do you use?

2007-08-08 Thread Jon Baer
What even a little more confusing is that a full package is already in the Zend Framework ... http://framework.zend.com/manual/en/zend.json.html $json = Zend_Json::encode($phpNative); $phpNative = Zend_Json::decode($encodedValue, Zend_Json::TYPE_OBJECT); - Jon On Aug 8, 2007, at 11:52 AM, Cl

Re: [nyphp-talk] Xampp Mysql Connection Issues

2007-08-08 Thread Jon Baer
Provided you are running XP SP2 you need to deactivate the firewall (or setup 3306 separately) ... http://www.apachefriends.org/en/faq-xampp-windows.html#xpsp2 - Jon On Aug 8, 2007, at 12:05 PM, anan tette-tawia wrote: Issue I have been trying to learn php development by installing xampp o

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

2007-08-07 Thread Jon Baer
Isn't what you described already in some type of existence with the W3C SPARQL idea ... http://www.w3.org/2001/sw/DataAccess/ Or do you have an opinion on it? - Jon On Aug 7, 2007, at 5:15 PM, Elliotte Rusty Harold wrote: David Krings wrote: Hans Zaunere wrote: Agreed - I'm still waiting

Re: [nyphp-talk] need help regarding download bar

2007-08-07 Thread Jon Baer
upload bar will show in any browser or i have to write script for showing upload bar? humayoo Jon Baer <[EMAIL PROTECTED]> wrote: There is already a download progress bar in every known browser last time I checked ;-) Why replicate? On Aug 6, 2007, at 3:24 PM, csnyder wrote:

Re: [nyphp-talk] preg_match (related to Many pages one script discussion)

2007-08-06 Thread Jon Baer
Ahh ... named patterns, how extremely ugly :-) $date = "/2007/08/06"; preg_match("/(?P[0-9]{4})\/(?P[0-9]{2})\/(?P[0-9] {2})/", $date, $match); print_r($match); - Jon On Aug 6, 2007, at 9:56 PM, csnyder wrote: On 8/6/07, Michael B Allen <[EMAIL PROTECTED]> wrote: Hey, It so happens I'm wo

Re: [nyphp-talk] preg_match (related to Many pages one script discussion)

2007-08-06 Thread Jon Baer
Would be something like: @/news/([0-9]+)?/([0-9]+)?/([0-9]+)?@ But I think it should either be a completely valid date or now by default. Also isn't there a mode to preg_match or a version in which you can get named parameters? - Jon On Aug 6, 2007, at 9:46 PM, Michael B Allen wrote:

Re: [nyphp-talk] need help regarding download bar

2007-08-06 Thread Jon Baer
There is already a download progress bar in every known browser last time I checked ;-) Why replicate? On Aug 6, 2007, at 3:24 PM, csnyder wrote: On 8/6/07, birgunj birgunj <[EMAIL PROTECTED]> wrote: Dear All, i want to write script to download file.how do i display download bar in php

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

2007-08-06 Thread Jon Baer
Bare minimum w/ CakePHP (4 files/scripts: model, controller, view, route) + provided you have a db with a table called "articles": 1) /models/article.php public class Article extends AppModel {} 2) /controllers/news_controller.php public class NewsController extends AppController { function

Re: [nyphp-talk] Repeating events script

2007-08-06 Thread Jon Baer
You would still need an end time of course but this is doable if you adjust the 2nd param to strtotime (ie every Wednesday, etc) http://us3.php.net/manual/en/function.strtotime.php What you really do is iterate over the call w/ your db and of course this is better to do w/ a transaction or s

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

2007-08-05 Thread Jon Baer
I have to say that after spending a long time w/ Dynamo / Tomcat / Struts and mod_rewrite that eventually I got down to learning the routing mechanism of frameworks (MVC) and find it to be extremely flexible and very well thought out + could easily replicate a servlet URI request setup. h

Re: [nyphp-talk] alternate to scandir()

2007-07-29 Thread Jon Baer
http://pear.php.net/manual/en/package.php.php-compat.components.php require_once 'PHP/Compat/Function/scandir.php'; - Jon On Jul 29, 2007, at 2:39 PM, Ben Sgro ((ProjectSkyLine)) wrote: Hello, According to php.net: http://us2.php.net/manual/en/function.scandir.php scandir (PHP 5) Is only ava

Re: [nyphp-talk] Determining if cmd line script is running as root?

2007-07-26 Thread Jon Baer
One possible way ... $php whoami.php jonbaer $sudo php whoami.php root - Jon On Jul 26, 2007, at 8:29 PM, Michael B Allen wrote: Hi, How does one determine if a command line PHP script is being executed as root? If there's no posix extension there's no posix_getuid and if the user did

Re: [nyphp-talk] Finding instances of include file

2007-07-26 Thread Jon Baer
Nice even a MacPort for it ... [MacBookPro:~]$ port search rpl rpltextproc/rpl 1.4.0Rpl is a Unix replacement utility Handy stuff ... thanks. - Jon On Jul 26, 2007, at 2:58 PM, csnyder wrote: On 7/26/07, Jon Baer <[EMAIL PROTECTED]> wrote:

Re: [nyphp-talk] Finding instances of include file

2007-07-26 Thread Jon Baer
Very handy might need to $1 it + save that command. Thanks Mark. Combine that with a little sed and you would be able to do your full find + replace in a single line. - Jon On Jul 26, 2007, at 2:08 PM, Mark Armendariz wrote: Jon Baer wrote: Just fgrep for the filename ... fgrep -Rn

Re: [nyphp-talk] Finding instances of include file

2007-07-26 Thread Jon Baer
Just fgrep for the filename ... fgrep -Rn "file.php" /path/to/docroot - Jon On Jul 26, 2007, at 1:41 PM, Aaron Fischer wrote: I have an include file that I do not want to use anymore. I want to go through all the files on my site and find every instance of the code that calls that include

Re: [nyphp-talk] Rename an array key?

2007-07-24 Thread Jon Baer
All that is really needed is a preserve_key to be added to array_splice function and you pretty much have it ... - Jon On Jul 24, 2007, at 2:01 PM, Rob Marscher wrote: On Jul 24, 2007, at 1:29 PM, csnyder wrote: Oh well. I think I'll have to create a map and use that to keep the array in or

Re: [nyphp-talk] who's calling me?

2007-07-23 Thread Jon Baer
Uggg ... sorry that should have been in file2.php: - Jon On Jul 23, 2007, at 7:09 PM, Jon Baer wrote: I *beleive* you can do something like this: Somewhere in file2.php: - Jon On Jul 23, 2007, at 6:50 PM, Rahmin Pavlovic wrote: Say I'm an include. Say several templates inclu

Re: [nyphp-talk] who's calling me?

2007-07-23 Thread Jon Baer
I *beleive* you can do something like this: Somewhere in file2.php: - Jon On Jul 23, 2007, at 6:50 PM, Rahmin Pavlovic wrote: Say I'm an include. Say several templates include me into what will become a single web page. How can I tell which template is calling me? __

Re: [nyphp-talk] inserting data into MySQL table.

2007-07-23 Thread Jon Baer
Id guess that one of your data types (or more) is still not valid for the type declared but ~not sure if you know this~ but you can add column names before your query ... INSERT INTO my_table (col1_name, col2_name) VALUES (col1_value, col2_value) // Try a few values up until you error out

Re: [nyphp-talk] CakePHP

2007-07-17 Thread Jon Baer
A good interview ... http://devzone.zend.com/article/2349-PHP-Abstract-Podcast-Episode-11- Opinionated-Software -snip- Today’s special guest is Chris Hartjes. Chris has been building PHP applications since 1998. Currently employed as a Senior Developer for the Cake Development Corporation,

Re: [nyphp-talk] Should PHP5 be used for this?

2007-07-17 Thread Jon Baer
I think the announcement of end of life for PHP4 should be enough to move on to PHP5. As per why OO is beneficial I think it would be best to @ least look at one of the major frameworks out there, either CakePHP, Symfony, Joolma, etc and see how they are built since it is a good case of how

Re: [nyphp-talk] Stripping formatting from a word document

2007-07-17 Thread Jon Baer
I think he was asking about a .doc file directly? Im suprised that manipulation of Word docs always comes up on the list + the resources are pretty limited. One project I found a while ago was antiword in which the sources are available: http://www.winfield.demon.nl/ There is one file i

Re: [nyphp-talk] closing a page

2007-07-17 Thread Jon Baer
echo '

Re: [nyphp-talk] how to find the mysql server status

2007-07-15 Thread Jon Baer
Sounds like you might want something like mytop ... http://jeremy.zawodny.com/mysql/mytop/ Or SHOW PROCESSLIST http://dev.mysql.com/doc/refman/5.1/en/show-processlist.html Or mysql_stat() http://us2.php.net/manual/en/function.mysql-stat.php However the fact that you want # of queries made in

Re: [nyphp-talk] CakePHP

2007-07-13 Thread Jon Baer
@ this point it really depends on what you are looking to do, for the most basic stuff you can use either, 1.2 comes w/ more behaviors and helpers and a nice Memcache engine for more advanced usage. Umm ConsoleShell is 1.2 and a few other niceties. Just keep you eyes peeled + im sure using

Re: [nyphp-talk] Creating a MySQL DataBase using/through php script. Can anybody help??

2007-07-11 Thread Jon Baer
You would also need to set special GRANT privileges for user "paul". http://dev.mysql.com/doc/refman/5.1/en/create-database.html http://dev.mysql.com/doc/refman/5.1/en/grant.html Also of note ... -snip- If you manually create a directory under the data directory (for example, with mkdir), the

Re: [nyphp-talk] Removing one element from an array

2007-07-09 Thread Jon Baer
Hmmm (not sure why Im always trying to compact stuff to one line now) ... $array = array(1,2,3,3,3,3,4,5); $remove = 3; while (in_array($remove, $array)) unset($array[array_search($remove, $array)]); print_r(array_values($array)); - Jon On Jul 9, 2007, at 8:16 PM, David Krings wrote: Hi!

Re: [nyphp-talk] Using PHP for a Stand-Alone application

2007-07-04 Thread Jon Baer
Forgot to paste the second link ... good in-depth article for Gears ... http://www.onlamp.com/lpt/a/7055 - Jon On Jul 4, 2007, at 2:03 PM, Jon Baer wrote: I think its fair to say that PHP is definitely not a standalone friendly language, the best effort I have seen is something like Phar

Re: [nyphp-talk] Using PHP for a Stand-Alone application

2007-07-04 Thread Jon Baer
I think its fair to say that PHP is definitely not a standalone friendly language, the best effort I have seen is something like Phar format but even then you need to bring the kitchen sink to each client and its not a format built into PHP itself (shame). It's sad that there is not anythin

Re: [nyphp-talk] Length of variable names

2007-07-03 Thread Jon Baer
Should probably stick w/ Zend coding standards ... http://framework.zend.com/manual/en/coding-standard.naming- conventions.html#coding-standard.naming-conventions.variables But I think all you really need to do is answer the question, "If someone else were to takeover my code would they unde

Re: [nyphp-talk] Zend Framework 1.0 released

2007-07-02 Thread Jon Baer
I have a tiny small gripe about it, look @ all the things which are left in the incubator folder ... Im all for showcasing new stuff but it should be out of the !core! distro to avoid confusion and temptation to use. public function __construct($date, $locale, $parameter) { thr

Re: [nyphp-talk] Preferred emailer?

2007-06-29 Thread Jon Baer
+1 for SwiftMailer ... There is a podcast by the author available on Zend DevZone here: http://devzone.zend.com/article/2213-PHP-Abstract-Podcast-Episode-6- SwiftMailer - Jon On Jun 29, 2007, at 10:37 AM, Brian Dailey wrote: I highly recommend SwiftMailer. I use it in my CakePHP applicati

Re: [nyphp-talk] [OT] XSS, Joomla & Remote Shells

2007-06-28 Thread Jon Baer
all. Its signature based detection, and as far as I know doesn't address polymorphic code. But snort is a key part to an overall strong detection system. Great link BTW, I haven't messed w/snort in years. - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons ---

Re: [nyphp-talk] [OT] XSS, Joomla & Remote Shells

2007-06-28 Thread Jon Baer
I think an even worse attack would be what happened to WordPress not too long ago, the code itself on the distribution servers was tinkered with. It's a little unfair to point out XSS as being only a Joomla issue. It happens to any software that lingers past even a single minor 0.1 upgrad

Re: [nyphp-talk] DB Schema for storing revision history?

2007-06-27 Thread Jon Baer
ocument_id, content and the mod_date and author_id. To get a document just do a join on the most recent version. All the other solutions would require support outside of the application, which could cause scalability problems down the road. On 6/27/07, Jon Baer <[EMAIL PROTECTED]> wrote:

Re: [nyphp-talk] DB Schema for storing revision history?

2007-06-27 Thread Jon Baer
Subversion and WebSVN :-) http://websvn.tigris.org/ On Jun 27, 2007, at 12:43 PM, David Krings wrote: Jake McGraw wrote: Hi All, this is my first post, so if this is in the wrong section please let me know. I'd like to know if anyone has developed a database schema for storing the revision

Re: [nyphp-talk] [OT] migrating old site to cleaner URLs

2007-06-27 Thread Jon Baer
There is a script out there which will run through your 404 apache log + put it into mod_rewrite recipes automatically, if I can dig up will post but Im sure it might also be trivial to write. I used this to clean up a switch over a few years back. - Jon On Jun 27, 2007, at 10:13 AM, Bren

Re: [nyphp-talk] compare two binary files.

2007-06-23 Thread Jon Baer
First question is on what platform, Intel or other + are you asking about processing via PHP or just in general? The premiere tool is BinDiff (http://www.sabre-security.com/products/ screens_bindiff.html) ... A nice toolset (can probably be patched for PHP use): http://radare.nopcode.org/wik

Re: [nyphp-talk] Resize pictures before uploading

2007-06-20 Thread Jon Baer
Depending on what you are trying to do, I think its always best to keep the ~original~ photos intact ... there is a great script available here: http://phpthumb.sourceforge.net/ Don't let the "thumb" fool you, its a pretty handy script that allows you to also resize + add filters (watermar

Re: [nyphp-talk] PHP equivalent of the XMLHTTP Library ?

2007-06-12 Thread Jon Baer
http://www.xajaxproject.org On Jun 12, 2007, at 9:31 AM, Miretsky, Anya wrote: I am trying to retrieve and send data to a remote web server using HTTP, I know that there is a library that can be used in ASP code called XMLHTTP which does exactly what I need to do. Is there something like th

[nyphp-talk] PHP-based Hpricot equivalent?

2007-06-11 Thread Jon Baer
Might anyone know of a package which would be equivalent to Ruby's Hpricot gem? http://code.whytheluckystiff.net/hpricot/ libcurl-based would be ok. So far doing it by hand but thinking maybe something else is available. Thanks in advanced. - Jon _

[nyphp-talk] PHP Abstract Episode 1 - PHP Secuity Tips

2007-06-05 Thread Jon Baer
Just stumbled on this, came out today ... pretty good looking podcast so far ... http://devzone.zend.com/article/2092-PHP-Abstract-Episode-1---PHP- Secuity-Tips Eli (White) talks to us about practical tips you can use to help make your application more secure. - Jon ___

[nyphp-talk] Google Gears / Apollo / FF3 ...

2007-06-03 Thread Jon Baer
Anyone played w/ it yet? Just saw that Apollo will *also* support SQLite in the end (and combine APIs w/ Google) ... http://www.mikechambers.com/blog/2007/05/30/apollo-beta-will-include- sqlite-embedded-database/ Does it mean the end of P(*) + MySQL on the backend? ;-) While I don't think

Re: [nyphp-talk] Modifying an XML tag name OR cloning an entire node including childnodes

2007-05-27 Thread Jon Baer
Is it something you can do client side? http://docs.jquery.com/DOM/Manipulation#remove.28_expr_.29 SimpleXML will remove HTML but I think if you wrap w/ CDATA and use that instead of text might work? - Jon On May 27, 2007, at 9:56 PM, Dynamic Ink wrote: I need to modify an XML tag name and

  1   2   >