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

2009-08-05 Thread Konstantin Rozinov
Thanks for both suggestions. On Sat, Aug 1, 2009 at 10:02 PM, John Campbell wrote: > On Sat, Aug 1, 2009 at 3:35 AM, Konstantin Rozinov wrote: > >> Any ideas, comments, or suggestions would be greatly welcomed! > > For improved security, you should not do: > >>      

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

2009-08-05 Thread Konstantin Rozinov
pingsorry just wanted to see one last time if anyone had any suggestions/ideas? On Sat, Aug 1, 2009 at 3:35 AM, Konstantin Rozinov wrote: > Hey guys, > > Anyone doing session validation between HTTP requests?  I know that > the HTTP headers can all be changed and spoofed, but fo

[nyphp-talk] session validation between http requests

2009-08-01 Thread Konstantin Rozinov
Hey guys, Anyone doing session validation between HTTP requests? I know that the HTTP headers can all be changed and spoofed, but for legitimate users, I expect the HTTP headers I'm using below to NOT change between requests, during the same session. I've been looking into this lately, but ran a

[nyphp-talk] best way to run script?

2009-07-19 Thread Konstantin Rozinov
Hey guys, I'm trying to run the same php script via the command line interface on several remote servers. I'd like to do it securely preferably over ssh. Right now, I'm using the ssh2 class from php, but getting very inconsistent results (sometimes the script runs, sometimes it doesn't via ssh2_e

Re: [nyphp-talk] Using APC to improve performance.

2009-07-19 Thread Konstantin Rozinov
apc_compile_file() seems to only work if you run it via the webserver. If you try to run it via the command line, it will fail. In other words, I have a script that apc_compile_file() a file that changes often. Calling that script from the command line fails to update the cached version. Calling

Re: [nyphp-talk] Using APC to improve performance.

2009-07-17 Thread Konstantin Rozinov
Ah yes! I should've been more careful reading the documentation. Thanks for the tip! Konstantin On Fri, Jul 17, 2009 at 2:23 PM, Eddie Drapkin wrote: > On Fri, Jul 17, 2009 at 1:47 PM, Konstantin Rozinov wrote: >> Hey guys, >> >> Just a follow-up question about APC. &

Re: [nyphp-talk] Using APC to improve performance.

2009-07-17 Thread Konstantin Rozinov
Hey guys, Just a follow-up question about APC. In production, I have apc.stat set to 0, so files aren't stat()ed everytime they're accessed for improved performance. Is it possible to have APC just re-stat() a single configuration file if I made some changes to it (without setting apc.stat to 0

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

2009-07-01 Thread Konstantin Rozinov
If you're installing linux packages/apps into /usr/local, which is most common, it's highly recommended to use gnu stow to manage them. I create /usr/local/stow dirinstall all my linux packages there (apache, php, mysql, etc)...and then do a simple `stow -v package_dir/` from /usr/local/stow.

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

2009-06-25 Thread Konstantin Rozinov
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 mysql, you should emulate them.  I am > actually all for "prepared" style queries, if I ever see

Re: [nyphp-talk] Header() Redirect!!

2009-06-11 Thread Konstantin Rozinov
You should place all of your PHP code that validates/redirects in the beginning of the HTML/PHP file, BEFORE any HTML is spit out. ... On Thu, Jun 11, 2009 at 7:31 PM, tu...@netzero.net wrote: > Hi everybody! > > I need help in redirecting my link to a different page within my website. I >

Re: [nyphp-talk] Management class for CSV files

2009-06-08 Thread Konstantin Rozinov
http://code.google.com/p/parsecsv-for-php/ I've used it before...it's pretty good, but had some minor issues, which may have been fixed in later versions. On Mon, Jun 8, 2009 at 9:34 AM, Damion Hankejh (ingk) wrote: > Greetings, > > Any recommendations for a class to handle CSV files?  Import CS

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

2009-06-03 Thread Konstantin Rozinov
gt; -- Mitch > > On Tue, Jun 2, 2009 at 6:49 PM, Konstantin Rozinov wrote: >> Thanks guys for the info and links.  I will check out akismet and Disqus. >> >> I also found this article, which was a simple explanation of some >> techniques using hidden fields: >>

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

2009-06-02 Thread Konstantin Rozinov
Thanks guys for the info and links. I will check out akismet and Disqus. I also found this article, which was a simple explanation of some techniques using hidden fields: http://www.rustylime.com/show_article.php?id=676 I'll let you all know if I find anything interesting regarding this topic.

[nyphp-talk] stopping comment spam with PHP

2009-06-02 Thread Konstantin Rozinov
Hi guys, I'm interested in hearing what kind of classes, packages, solutions the professionals on this list use to protect their sites against spam in relation to comments. For example, users commenting on other user's pages like Facebook or any social networking site. I am not using WordPress, D

Re: [nyphp-talk] Zip code radius

2009-05-22 Thread Konstantin Rozinov
Paul, I would be interested in looking at the code of the class too, just to see how something like that works. Thanks Konstantin On Fri, May 22, 2009 at 2:29 PM, Paul McGrane wrote: > Aaron: > > I have one...but need to dig it up...ping me off list if you are interested. > > BTW...does your d

Re: [nyphp-talk] [fw-general] Survey: Development environment for PHP/ZFW

2009-05-07 Thread Konstantin Rozinov
1. Ubuntu 2. localhost 3. UltraEdit, but will be moving to Eclipse+PDT+Subversive (thanks to this thread) 4. SVN 5. Zend Debugger, and the standard echos, print_r, error_log On Wed, May 6, 2009 at 10:47 AM, Joelle Tegwen wrote: > 1 Ubuntu - upgrading to Jaunty today. :) > 2 localhost with separ

Re: [nyphp-talk] Facebook's LAMP Stack

2009-04-23 Thread Konstantin Rozinov
On Thu, Apr 23, 2009 at 12:51 PM, Hans Zaunere wrote: > > What I'd really like is a way to "statically link" a PHP application. > While > this is somewhat possible today, PHP's dynamic nature makes this difficult > to fully realize. For example, it can be cumbersome on the developer to > check

Re: [nyphp-talk] Facebook's LAMP Stack

2009-04-22 Thread Konstantin Rozinov
I think this may have been mentioned in the presentation, but one way to improve performance is to use an opcode cache like APC (with the stat check turned off) so that the included files don't have to be recompiled every single time. The compilation of and the *stat() calls for the included files

Re: [nyphp-talk] Is it safe to log unsanitized, unvalidated user-inputted data into a logfile?

2009-04-07 Thread Konstantin Rozinov
> it's ok to receive garbage. Just don't send garbage. This leads me > back to the OP's question of "do I need to validate user input that is > written to a log file?". The answer is no but you do need to escape > (or rather remove, truncate or flatten) anything that you don't want > to end up bein

Re: [nyphp-talk] Is it safe to log unsanitized, unvalidated user-inputted data into a logfile?

2009-04-07 Thread Konstantin Rozinov
ted. It is treated as a string. Only if I process the logfile with php -f will the code in (2) actually execute. The code in (1) won't even run since it's outside the tags, but that's a minor point. Paul raises a good question about log processing software that might interpret and ru

[nyphp-talk] Is it safe to log unsanitized, unvalidated user-inputted data into a logfile?

2009-04-05 Thread Konstantin Rozinov
Hey guys, I have a question about logging messages. Is it safe to log unsanitized, unvalidated user-inputted data into a logfile? For example, if I have a function called check_username(), which checks that the username only consists of A-Za-z0-9, is it safe to have check_username() write to a l

Re: [nyphp-talk] Using APC to improve performance.

2009-03-31 Thread Konstantin Rozinov
, Konstantin Rozinov wrote: > Thanks for the tips Che and Tom. I will try the debugging tools to > see where the bottlenecks are. I've got apc.stat set to 0, but the > largest # of includes in the application is only about 8 in some > files, so I wouldn't expect it to make t

Re: [nyphp-talk] Using APC to improve performance.

2009-03-31 Thread Konstantin Rozinov
Thanks for the tips Che and Tom. I will try the debugging tools to see where the bottlenecks are. I've got apc.stat set to 0, but the largest # of includes in the application is only about 8 in some files, so I wouldn't expect it to make that much of difference, but every little bit counts :) I

[nyphp-talk] Using APC to improve performance.

2009-03-30 Thread Konstantin Rozinov
Hi folks, I recently installed APC (http://pecl.php.net/package/APC) to see how it works. Currently, I'm just using the opcode (file) caching and already the response time is about 4x faster. No code changes were required and it was as easy as just enabling APC in php.ini. Now I'm interested in

[nyphp-talk] equal (==) vs identical (===) and casting

2009-02-23 Thread Konstantin Rozinov
Hey guys, Some more questions. 1. Is there a significant speed difference between the equal operator (==) and the identical operator (===)? Should I even be concerned about this? For example, if I know a variable will be of type INT 100% of the time, and I pass it to a function which expects th

[nyphp-talk] mysql vs mysqli

2009-02-23 Thread Konstantin Rozinov
Hey guys, I have a lot of PHP code written that uses the mysql extension. Should I rework the code to use mysqli extension? How can I tell if it will be worth the effort and time? Any advice would appreciated. Thanks! Konstantin ___ New York PHP User G

Re: [nyphp-talk] User Input Data scrubbing

2008-11-29 Thread Konstantin Rozinov
does anyone know where I can find a list of sample MALICIOUS data that i can input into my forms to see how the code reacts? i'm not looking for any automation or program, just the actual sample data. i'm trying to do QA on my code. any help would be greatly appreciated. thanks. On Sat, Nov 29

Re: [nyphp-talk] htaccess & php

2008-11-29 Thread Konstantin Rozinov
> I'm trying to lock out remote call to the php files. what do you mean by that? Aren't your php files processed by apache/php and then the output returned to the user? On Fri, Nov 28, 2008 at 3:02 PM, Michele Waldman <[EMAIL PROTECTED]> wrote: > This is not working for me > > > > RewriteCond

Re: [nyphp-talk] NetBeans/PHP

2008-11-05 Thread Konstantin Rozinov
can anyone recommend a good (free would be a big plus but not necessary) IDE for PHP? Is Zend Studio the most popular one out there? Kon On Wed, Nov 5, 2008 at 8:30 AM, Hans Zaunere <[EMAIL PROTECTED]> wrote: > Hello all, > > Out of curiosity, has anyone used NetBeans/PHP as their environment?