[PHP] PHP Image Host - Sending HTTP Headers Twice?

2010-05-10 Thread APseudoUtopia
I have a php script which serves an image. It's very simple: header('Content-Type: image/' . $ImageData['content_type']); readfile($File); When viewing the script with the Firefox Extension: LiveHTTPHeaders, it gives the following output for a SINGLE request:

Re: [PHP] File encryption under PHP

2010-04-01 Thread APseudoUtopia
On Thu, Apr 1, 2010 at 4:05 PM, Ashley Sheridan wrote: > On Thu, 2010-04-01 at 16:04 -0400, Paul M Foster wrote: > >> On Thu, Apr 01, 2010 at 08:45:53PM +0100, Ashley Sheridan wrote: >> >> > On Thu, 2010-04-01 at 15:47 -0400, Paul M Foster wrote: >> > >> >     Folks: >> > >> >     If I wanted to e

Re: [PHP] File encryption under PHP

2010-04-01 Thread APseudoUtopia
On Thu, Apr 1, 2010 at 3:47 PM, Paul M Foster wrote: > Folks: > > If I wanted to encrypt a file in PHP and then write it out to disk > (one-way encryption, requiring a password), what PHP built-ins might you > recommend to encrypt the contents of the file before writing it out to > disk? > > Paul

Re: [PHP] Global Var Disappearing After Function

2010-03-22 Thread APseudoUtopia
On Mon, Mar 22, 2010 at 5:13 PM, Peter van der Does wrote: > On Mon, 22 Mar 2010 16:58:33 -0400 > APseudoUtopia wrote: > >> Hey list, >> >> I have a very odd problem which has been driving me crazy for two >> days. I've been trying to debug my code and gav

[PHP] Global Var Disappearing After Function

2010-03-22 Thread APseudoUtopia
Hey list, I have a very odd problem which has been driving me crazy for two days. I've been trying to debug my code and gave up. I finally coded a very simple representation of what the code does, and I get the same problem. However, I still don't understand what's causing it. The representationa

Re: [PHP] protecting pages with a login system

2010-03-18 Thread APseudoUtopia
On Thu, Mar 18, 2010 at 11:42 AM, Ashley Sheridan wrote: > > On Thu, 2010-03-18 at 11:40 -0400, David Mehler wrote: > > > Hi, > > I am wanting to protect some pages by requiring a user to log in to > > access them. I'd prefer this be as simple as possible, and without > > requiring a database. > >

Re: [PHP] MySQL ID -- what happens when you run out of range?

2010-01-25 Thread APseudoUtopia
On Mon, Jan 25, 2010 at 10:00 PM, Michael A. Peters wrote: > Shawn McKenzie wrote: >> >> Joseph Thayne wrote: >>> >>> That is incorrect.  What will happen is as follows: >>> >>> 1.  The value will be incremented by 1 causing the value to be greater >>> than the maximum integer allowed. >>> 2.  MyS

[PHP] OOP: __construct() and "extend"

2009-12-22 Thread APseudoUtopia
Hey list, I'm writing my own class which extends upon the Memcached class (php.net/memcached). I'm a bit confused as to how the constructor works when extending a class. class caching extends Memcached { function __construct() { echo "Caching Class Construct!"; } } For something like the above

Re: [PHP] Performance of while(true) loop

2009-09-09 Thread APseudoUtopia
On Wed, Sep 9, 2009 at 10:39 PM, Eddie Drapkin wrote: > On Wed, Sep 9, 2009 at 10:32 PM, APseudoUtopia > wrote: >> Hey list, >> >> I have a php cli script that listens on a UDP socket and, when data is >> sent to the socket, the script inserts it into a database. I&

[PHP] Performance of while(true) loop

2009-09-09 Thread APseudoUtopia
Hey list, I have a php cli script that listens on a UDP socket and, when data is sent to the socket, the script inserts it into a database. I'm using the real BSD socket functions, not fsock. The script runs socket_create(), then socket_bind(). Then it starts a while(TRUE) loop. Within the loop,

[PHP] GeoIP Character Encoding

2009-07-28 Thread APseudoUtopia
Hey, I'm using the PECL GeoIP module on php 5.2.10. When I look up an IP address, the geoip_record_by_name() function is giving me a string that contains "special" characters, such as the following: 'Portugal, 09, Vila Real De Santo António' 'Norway, 08, Ålesund' 'Portugal, 04, Vila Nova De Famal

[PHP] Spawn-FCGI, PHP-FPM

2009-05-15 Thread APseudoUtopia
Hey, I'm looking into moving my site over to Nginx from apache. I've been reading up on how FastCGI works with PHP, and I've found two main solutions, either use spawn-fcgi or use php-fpm. However, it looks like there isn't any php-fpm code for the current stable version of PHP. Does anyone use ph

Re: [PHP] Cookies/Sessions and how they work

2009-03-09 Thread APseudoUtopia
On Mon, Mar 9, 2009 at 10:26 PM, Paul M Foster wrote: > This is in two parts. First cookies. I'm a little unclear on how they > work. From what I've read, cookies are stored by the browser. When a > request for that cookie comes in from the server, the browser returns > only the value, and no othe

Re: [PHP] Which file "Included" me?

2009-02-18 Thread APseudoUtopia
On Wed, Feb 18, 2009 at 1:16 PM, Ed Curtis wrote: > Is there a function or variable that will tell me if a file has asked > another file to include something much the same as $_SERVER['HTTP_REFERER'] > works. I have a script that is included on every page of a site but also > needs to include some

Re: [PHP] PHP AS an FTP server

2009-02-17 Thread APseudoUtopia
On Tue, Feb 17, 2009 at 10:53 AM, Michael Kubler wrote: > Hi, > This is probably a bit stupid, but I've been having issues getting any of > the good FTP servers running on my Ubuntu 6.06 (LTS) box. > I've tried Pro-FTP, Pure-FTP, and briefly installed some others, but the > versions available for

Re: [PHP] APC problem with PHP

2009-02-11 Thread APseudoUtopia
On Tue, Feb 10, 2009 at 10:11 PM, Nathan Nobbe wrote: > On Tue, Feb 10, 2009 at 5:53 PM, Jamie Krasnoo wrote: > > > Hmm, I'll try taking down the optimizer and seeing if it segfaults or > > not. If that's what it is it's a crying shame that apc and > > zend_optimizer can't get along. > > > maybe

[PHP] PHP IRC Bot - Listening on a Socket

2009-01-22 Thread APseudoUtopia
Hey, I'm writing an IRC bot from scratch in PHP. I'd like to be able to announce events, such as SVN commit notifications, through the bot. The only way to do this that I can think of is to have the bot listen on a socket and have the program (in this example, the SVN post-commit hook script) send

Re: [PHP] Is MD5 still considered safe for storing application user passwords?

2008-12-30 Thread APseudoUtopia
On Tue, Dec 30, 2008 at 9:02 PM, Murray wrote: > Hi All, > > I've been vaguely aware that more and more effort is going into proving that > MD5 isn't secure anymore, but this article in particular - > http://www.win.tue.nl/hashclash/rogue-ca/ - has me wondering if MD5 is still > safe for storing h

Re: [PHP] how to not show login info in the url ...what am I looking for?

2008-12-10 Thread APseudoUtopia
On Wed, Dec 10, 2008 at 10:03 AM, tedd <[EMAIL PROTECTED]> wrote: > At 9:52 PM + 12/9/08, Ashley Sheridan wrote: >> >> > >>> >>> Thanks guys and gals! >> >> You shouldn't be passing info like that over the URL; use sessions >> instead. >> >> I saw a shopping cart system once that passed the p

[PHP] Memcached as Session Handler

2008-11-10 Thread APseudoUtopia
Hey list, I run a website that integrates MemCache, MySQL, and PHP sessions very heavily. I recently came across some documentation on the PHP site that informs me that I can use MemCache as the session.save_handler, instead of files. I know there would be no redundancy of the session data with t