Re: [PHP] Re: HTTP Error 500 - IsapiModule

2008-12-19 Thread Stut
-Stuart -- http://stut.net/ > - Original Message - From: "Stut" > Newsgroups: php.general > To: > Cc: > Sent: Friday, December 19, 2008 11:58 AM > Subject: Re: [PHP] Re: HTTP Error 500 - IsapiModule > > >> 2008/12/19 David Robley : >>> &

Re: [PHP] Re: HTTP Error 500 - IsapiModule

2008-12-19 Thread Stut
2008/12/19 David Robley : > Gary Maddock-Greene wrote: > >> Hi, Don't know if this is the right group but I am having real problems >> trying to connect to my MySQL db with php. I am trying to create a search >> form. I can connect and display in my browser a simple call to a db record >> but when

Re: [PHP] error flashing on redirect

2008-12-17 Thread Stut
2008/12/17 Terion Miller : > I am working on the login script I have been troubling over, and when I hit > submit it throws an error and even though I have error reporting E_All on > because its on a redirect or something I can see the error for only a split > second so I can't catch it to figure i

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

2008-12-11 Thread Stut
king the site" instead of "hacking the site". Hacking: Getting something to do something it was not designed to do. Cracking: Getting something to do something it was specifically designed to prevent. IMHO. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2008-12-10 Thread Stut
Please keep the discussion on the list, or offer me a contract. On 10 Dec 2008, at 14:29, Terion Miller wrote: On Tue, Dec 9, 2008 at 4:03 PM, Stut <[EMAIL PROTECTED]> wrote: On 9 Dec 2008, at 21:54, Terion Miller wrote: On Tue, Dec 9, 2008 at 3:49 PM, Stut <[EMAIL PROTECTED]> wro

Re: [PHP] usort for sorting an array of objects

2008-12-10 Thread Stut
eate a function that compares two of the objects, in whatever way you need it to, and returns -1, 0 or 1. The pass that to the usort function - it doesn't care what type of thing is in the array. Full details available at http://php.net/usort. -Stut -- http://stut.net/ -- PHP Genera

Re: [PHP] Re: file_exists and wildcard/regex

2008-12-09 Thread Stut
and you do glob('*.txt') you'll get all .txt files in /var/www/htdocs. And if you do glob('/tmp/*.txt') you'll get all .txt files in /tmp. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] file_exists and wildcard/regex

2008-12-09 Thread Stut
now. Use glob (http://php.net/glob) and get the size of the array returned. Note that if there could be thousands of matching files you may want to use opendir and readdir to look for matches instead. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscri

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

2008-12-09 Thread Stut
header ("Location: Main.php?AdminID=". $row->AdminID); } else { $msg = "Invalid Login"; } } ?> No need to pass AdminID in the URL at all. Store that ID in the AdminLogin session variable instead of "OK" and you can get it from there o

Re: [PHP] get calling function name

2008-12-09 Thread Stut
unc_caller(); } a(); where this would print the calling function is a (i made func_caller() up) I hope this is clear, and i hope there is a quick solution and i just can't find it in the documentation. http://php.net/debug_backtrace -Stut -- http://stut.net/ -- PHP General Mai

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-05 Thread Stut
because it doesn't. Your control over the data starts when your server-side script is executed, not before. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] why this code needs mysql.sock instead of mysqld.sock

2008-12-02 Thread Stut
On 2 Dec 2008, at 20:15, ann kok wrote: The location of the socket is compiled into the mysql lib. I believe it can be changed from php.ini - check the manual for details. If not then your easiest option is to create a symlink, or alternatively recompile the extension. -Stut -- http

Re: [PHP] PostTrack Reminder

2008-11-24 Thread Stut
On 24 Nov 2008, at 20:35, Ashley Sheridan wrote: On Mon, 2008-11-24 at 20:30 +, Stut wrote: On 24 Nov 2008, at 20:21, Ashley Sheridan wrote: On Mon, 2008-11-24 at 15:04 -0500, Daniel Brown wrote: On Mon, Nov 24, 2008 at 3:00 PM, Ashley Sheridan <[EMAIL PROTECTED]> wrote: What e

Re: [PHP] PostTrack Reminder

2008-11-24 Thread Stut
I think the question you meant to ask was "Is it official?". The answer is no, it's just something that Dan knocked up, but that doesn't make it any less interesting. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Help with understanding an error

2008-11-24 Thread Stut
t a valid MySQL result resource. This is usually caused by an error in the SQL query. Check that. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: file_Exists() and case

2008-11-24 Thread Stut
w I can proceed to my next problem. You never answered one of my questions. Where are you getting $basePicture from? Why does it differ in case from the actual file on disk. If you ask me you'd be better off trying to resolve this problem further upstream at the point where the case g

Re: [PHP] Re: file_Exists() and case

2008-11-23 Thread Stut
DOESN't exist. Please don't shout at me, it won't encourage me to help you further. I apologise for misunderstanding, I missed the start of this thread. The realpath function may be the answer to your problem but I don't have time to test it at the moment. -Stut -- http

Re: [PHP] Re: file_Exists() and case

2008-11-23 Thread Stut
rent case, surely you know the rules around how that works so you can build that logic in when checking for the existence of a file. Or maybe I'm missing something. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [Fwd: Re: [PHP] Displaying information from table graphically]

2008-11-22 Thread Stut
d at least since IE5? Imagemaps have absolutely nothing to do with divs. I suggest you read this: http://www.elated.com/articles/creating-image-maps/ -Stut -- http://stut.net/ On 22 Nov 2008, at 16:23, [EMAIL PROTECTED] wrote: At least that eliminates GD as an option for this particular

Re: [Fwd: Re: [PHP] Displaying information from table graphically]

2008-11-22 Thread Stut
lion times :) Since you would be using coordinates to composite the images, building an imagemap at the same time should be really simple. However, I'd still go with constructing the images in divs or a table due to the relative simplicity. -Stut -- http://stut.net/ On Sat, 2008-11-22

Re: [PHP] Displaying information from table graphically

2008-11-22 Thread Stut
principle mentioned below stands for please? KISS === Keep It Simple, Stupid http://en.wikipedia.org/wiki/KISS_principle -Stut -- http://stut.net/ On 21 Nov 2008, at 17:55, [EMAIL PROTECTED] wrote: I have a PHP application that accesses data from MySQL. There is table called "rooms&quo

Re: [PHP] in_array breaks down for 0 as value

2008-11-21 Thread Stut
On 22 Nov 2008, at 00:06, Ashley Sheridan wrote: On Fri, 2008-11-21 at 09:11 +, Stut wrote: On 20 Nov 2008, at 23:09, Ashley Sheridan wrote: On Thu, 2008-11-20 at 09:25 +, Stut wrote: On 20 Nov 2008, at 06:55, Yashesh Bhatia wrote: I wanted to use in_array to verify the results of a

Re: [PHP] Displaying information from table graphically

2008-11-21 Thread Stut
rooms of any dimensions with any number of beds. Personally I'd opt for 2 based on the KISS principle, but you could potentially run into browser compatibility issues depending on your target platforms. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] in_array breaks down for 0 as value

2008-11-21 Thread Stut
On 20 Nov 2008, at 23:09, Ashley Sheridan wrote: On Thu, 2008-11-20 at 09:25 +, Stut wrote: On 20 Nov 2008, at 06:55, Yashesh Bhatia wrote: I wanted to use in_array to verify the results of a form submission for a checkbox and found an interesting behaviour. $ php -v PHP 5.2.5 (cli

Re: [PHP] store class zithin session

2008-11-20 Thread Stut
aches work during the compilation phase, so any dynamic loading such as that provided by autoloaders cannot be optimised. This has been discussed in the past on this list, check the archives for more details. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To u

Re: [PHP] Invalid Arguements

2008-11-20 Thread Stut
88x31 and 300x250 120x240option> 940x30 - Pencil Ad but your saying it should be That's a single select field, why are you trying to implode it?? -Stut -- http://stut.net/ On

Re: [PHP] store class zithin session

2008-11-20 Thread Stut
red in the session along with the rest of the object. If you still can't get it to work after reading this, send us the code. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] in_array breaks down for 0 as value

2008-11-20 Thread Stut
he array is evaluating to boolean FALSE and in_array returns TRUE. Use strict mode to work around this peculiarity. This only seems to occur when there is an integer 0 in the array. A string '0' will return FALSE for the first test above (at least in 5.2.6). So use strict

Re: [PHP] fread() behaviour

2008-11-20 Thread Stut
an check the incoming data for some terminating string. If not then you've got a problem that can't be reliably solved. You could mess around with the timeout and/or make use of functions like socket_select to check for waiting data, but what you'll end up with will be problematic

Re: [PHP] Invalid Arguements

2008-11-19 Thread Stut
nd it would be well- worth your while taking the time to get the basics before you do any flying. -Stut -- http://stut.net/ On Wed, Nov 19, 2008 at 8:51 AM, Boyd, Todd M. <[EMAIL PROTECTED]> wrote: Taking this back on-list... From: Terion Miller [mailto:[EMAIL PROTECTED] Sent

Re: [PHP] Re: anchor name on URL

2008-11-19 Thread Stut
ore and similar companies. It's unfortunate that Google stopped publishing their stats as those would probably be as accurate as they could get. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Experience (was: while-question)

2008-11-17 Thread Stut
n 1) don't ever expect a job from me, and 2) get over yourself and try living in the real world where the problem that matters more than the solution. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] while-question

2008-11-17 Thread Stut
); Elemental my dear Mr Rixham... function add($a , $b) { $answer = $a ^ $b; while (0 != ($a & $b)) { $b = ($a & $b) << 1; $answer = $answer ^ $b; } return $answer; } -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] while question

2008-11-17 Thread Stut
ually be empty. I would guess that your lecturers point is that you shouldn't call count on every iteration as it's a waste of time. He may also be confusing while for foreach in which case I'd leave because you're unlikely to learn anything from him. -Stut -- http:

Re: [PHP] Weird Syntax Error

2008-11-13 Thread Stut
see anything wrong with that line (except that I don't think those variables will interpolate correctly, and you don't seem to be escaping stuff going into your SQL which is, ya know, bad!!). Your problem is probably on the line before, possible several lines before. Post a bit o

Re: [PHP] Missing DLLs

2008-11-12 Thread Stut
the effort required to improve it better spent on other problems. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP Startup: Unable to load dynamic library

2008-11-12 Thread Stut
On 12 Nov 2008, at 16:58, Thiago H. Pojda wrote: On Wed, Nov 12, 2008 at 1:56 PM, Thiago H. Pojda <[EMAIL PROTECTED] >wrote: On Wed, Nov 12, 2008 at 1:54 PM, Stut <[EMAIL PROTECTED]> wrote: On 12 Nov 2008, at 16:53, Thiago H. Pojda wrote: I switched PCs and now when I load PHP I ge

Re: [PHP] PHP Startup: Unable to load dynamic library

2008-11-12 Thread Stut
ot;) and I gave "Everyone" access to it. Which extension? This message usually indicates that it can't find a DLL the extension depends upon. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP - Web/list Question...

2008-11-09 Thread Stut
On 9 Nov 2008, at 20:30, Robert Cummings wrote: On Sun, 2008-11-09 at 20:16 +, Stut wrote: On 9 Nov 2008, at 18:37, Robert Cummings wrote: On Sun, 2008-11-09 at 18:22 +, Stut wrote: On 9 Nov 2008, at 18:14, Robert Cummings wrote: On Sun, 2008-11-09 at 18:00 +, Stut wrote: On 9

Re: [PHP] PHP - Web/list Question...

2008-11-09 Thread Stut
On 9 Nov 2008, at 18:37, Robert Cummings wrote: On Sun, 2008-11-09 at 18:22 +, Stut wrote: On 9 Nov 2008, at 18:14, Robert Cummings wrote: On Sun, 2008-11-09 at 18:00 +, Stut wrote: On 9 Nov 2008, at 07:16, Robert Cummings wrote: On Sat, 2008-11-08 at 20:26 -0800, bruce wrote: I&#x

Re: [PHP] PHP - Web/list Question...

2008-11-09 Thread Stut
On 9 Nov 2008, at 18:14, Robert Cummings wrote: On Sun, 2008-11-09 at 18:00 +, Stut wrote: On 9 Nov 2008, at 07:16, Robert Cummings wrote: On Sat, 2008-11-08 at 20:26 -0800, bruce wrote: I've got a question/issue that I want to bounce off the list. I have a list that extends

Re: [PHP] PHP - Web/list Question...

2008-11-09 Thread Stut
On 9 Nov 2008, at 18:05, Micah Gersten wrote: Stut wrote: On 9 Nov 2008, at 07:16, Robert Cummings wrote: On Sat, 2008-11-08 at 20:26 -0800, bruce wrote: I've got a question/issue that I want to bounce off the list. I have a list that extends over multiple pages. there might be 200

Re: [PHP] PHP - Web/list Question...

2008-11-09 Thread Stut
go with a persisted GET var or a cookie. No need to drag server-side storage into this. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] removing text from a string

2008-11-06 Thread Stut
got that wrong I meant no offense and I still don't. That doesn't meet the objectives. Consider that $line might be "1. 100 apples". Your solution has reduced it to "apples" rather than the required "100 apples". Calling it three times as was suggested

Re: [PHP] php exec()

2008-11-03 Thread Stut
et included when the output is piped elsewhere. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] take me off the list

2008-11-03 Thread Stut
might start to make sense. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Write my own extensions

2008-11-02 Thread Stut
... Do you know where I can find concrete things to do function or class/ objects for PHP in C++ ? The online documentation for writing extensions is severely lacking. This book will tell you everything you need to know: http://jmp.li/cf -Stut -- http://stut.net/ -- PHP General Mailing List

Re: [PHP] Count the Number of Elements Using Explode

2008-10-31 Thread Stut
simply exploding it to count the elements, but count would be better if you need to explode them too. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Reg Ex

2008-10-31 Thread Stut
like this needs a regex?? http://php.net/pathinfo -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] VAT number validation

2008-10-31 Thread Stut
that this relies upon you having the allow_url_fopen configuration option enabled. If you don't then you could do this with curl or raw sockets. Again the manual is your friend. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: htt

Re: [PHP] Mailing lists

2008-10-30 Thread Stut
Why is this not acceptable? -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Newbie: can I store flash file into Mysql DB

2008-10-29 Thread Stut
On 29 Oct 2008, at 10:32, vuthecuong wrote: Stut wrote: On 29 Oct 2008, at 10:20, vuthecuong wrote: technically can I store flash file into Mysql DB using PHP? Yes. what point should I pay attention for that? The blob field type. But I would recommend against it. Why not store the

Re: [PHP] Newbie: can I store flash file into Mysql DB

2008-10-29 Thread Stut
On 29 Oct 2008, at 10:20, vuthecuong wrote: technically can I store flash file into Mysql DB using PHP? Yes. what point should I pay attention for that? The blob field type. But I would recommend against it. Why not store the files on disk and only store the filenames in the DB? -Stut

Re: [PHP] preg_match

2008-10-27 Thread Stut
Please keep the conversation on the list! On 27 Oct 2008, at 16:06, Alex Chamberlain wrote: -Original Message- From: Stut [mailto:[EMAIL PROTECTED] Sent: 27 October 2008 15:54 To: Alex Chamberlain Cc: 'PHP General list' Subject: Re: [PHP] preg_match On 27 Oct 2008, at 1

Re: [PHP] preg_match

2008-10-27 Thread Stut
{ // No need for realpath here, it's not doing anything useful // The _once is probably redundant too, but it may be required // depending on how your code is arranged. require FS_CONTROLLER.'/'.strtolower($class).'.inc.php'; } } ...but there's always

Re: [PHP] preg_match

2008-10-27 Thread Stut
e any regular expressions at all. We're not here to write code for you, we're here to help when you have problems. Try it, see how far you get and send us the code if/when you get stuck. Unless you want to hire me to do it. My rates are pretty reasonable for simple stuff like this.

Re: [PHP] how to kill a session by closing window or tab clicking on X?

2008-10-27 Thread Stut
g at all. A sensible session timeout is the only real solution to this "issue", possibly aided by a periodic keepalive request. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] CSV Files

2008-10-22 Thread Stut
suggest you post the exact code you're using, anything else just makes it harder for us to provide effective help. -Stut -- http://stut.net/ On Oct 22, 2008, at 5:12 PM, Stut wrote: On 23 Oct 2008, at 00:59, Jason Todd Slack-Moehrle wrote: After I right out the column headers do

Re: [PHP] CSV Files

2008-10-22 Thread Stut
On 23 Oct 2008, at 00:59, Jason Todd Slack-Moehrle wrote: After I right out the column headers do I have to put a '/n' to have it start a new line in the CSV file? I think I do. A new line is \n not /n, and it must be in double quotes (") not single ('). -Stut -- http

Re: [PHP] MkDir Help

2008-10-22 Thread Stut
(3rd) parameter was added in 5.0. AFAIK the only way it would think mkdir takes no more than 2 parameters is if you're using an older version. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] XCache, APC, Memcached... confused

2008-10-22 Thread Stut
sible that is I have no idea. I suggest you find the eAccelerator mailing list, subscribe to that and ask your question there. -Stut -- http://stut.net/ Stut napsal(a): On 22 Oct 2008, at 22:19, Martin ZvarĂ­k wrote: I became confused after an hour trying to understand the PHP cache solu

Re: [PHP] Re: XCache, APC, Memcached... confused

2008-10-22 Thread Stut
and software that implements gzip compression for TCP connections. Nothing at all to do with PHP. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] XCache, APC, Memcached... confused

2008-10-22 Thread Stut
the total size of all the PHP scripts in your site and you'll see that even on modest hardware you'll have a lot of headroom. Obviously you need to take other users of the server into account, especially if you're on a shared hosting account, but in most cases you won't have

Re: [PHP] Re: Difficulty navigating symlinks

2008-10-22 Thread Stut
at's needed. After you've admitted to not reading the question you might find it beneficial to go back and do that before arguing that your suggestion will work. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] E_STUPID

2008-10-22 Thread Stut
and having it spit out "Array" is less than helpful. I think the same should be true of resources except that you should be able to force a resource to a string with an explicit cast. Loose typing is great but there are some conversions that never really make sense. -Stut --

Re: [PHP] Re: Question about __destruct()

2008-10-22 Thread Stut
On 22 Oct 2008, at 09:35, Jochem Maas wrote: Stut schreef: On 22 Oct 2008, at 00:22, Jochem Maas wrote: Stut schreef: I use destructors to update dirty objects in memcache. care to eloborate ... sounds interesting. Nothing complicated. The core objects in my application are all cached

Re: [PHP] Re: Question about __destruct()

2008-10-22 Thread Stut
On 22 Oct 2008, at 14:42, Dan Joseph wrote: On Tue, Oct 21, 2008 at 5:14 PM, Stut <[EMAIL PROTECTED]> wrote: When a script ends everything is released (with some small exceptions), thus also all references to instances of classes. Thus AFAIK a deconstructor will always be called at the

Re: [PHP] Difficulty navigating symlinks

2008-10-22 Thread Stut
ver is configured. Create a script with just the following code to see what's there... -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] DLL

2008-10-22 Thread Stut
"dll" should be able to be dynamically loaded by PHP script, not by server. Sure. Write an extension [1] and use the dl function [2]. [1] http://jmp.li/ca [2] http://jmp.li/cb -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, v

Re: [PHP] Re: Question about __destruct()

2008-10-22 Thread Stut
On 22 Oct 2008, at 00:22, Jochem Maas wrote: Stut schreef: I use destructors to update dirty objects in memcache. care to eloborate ... sounds interesting. Nothing complicated. The core objects in my application are all cached in memcache. If anything changes in an object it changes an

Re: [PHP] Re: Question about __destruct()

2008-10-21 Thread Stut
that ... personally I find dtors run at end of script to be nigh on useless. I use destructors to update dirty objects in memcache. I also use them in my template class to optionally automagically output the footer without needing an explicit call on each page. They're far from useless. -Stu

Re: [PHP] Mass email

2008-10-20 Thread Stut
call Phostal. It's a long way off being ready for public consumption but it regularly sends emails to a subscriber base of over 800k users as well as several smaller lists, automatically handles bounces, implements several unsubscribe mechanisms and includes open tracking. -Stut

Re: [PHP] How to Execute Exe File from PHP

2008-10-20 Thread Stut
tely better to stick to one or the other. 4) There is no 4! -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Singletons

2008-10-20 Thread Stut
n instance of that class in your object. Implement the __call magic method to proxy function calls through to that instance throwing an exception (or error) if the method requested doesn't exist. Not particularly pretty, but definitely simple. -Stut -- http://stut.net/ -- PHP Gener

Re: [PHP] Singletons

2008-10-20 Thread Stut
et/ and you'll probably get told the reason it's like that. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Singletons

2008-10-20 Thread Stut
Var($val) { $this->var = $val; } public function GetVar() { return $this->var; } } $obj1 = Singleton::Instance(); $obj1->SetVar('arse'); $obj2 = Singleton::Instance(); echo $obj2->GetVar(); // This will echo 'arse' Singletons are not rocket science, but as with all patterns you really need to understand the theory before trying to implement and use it. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] when mysql is down

2008-10-17 Thread Stut
rary it also indicates to search engines that they should not index this page right now but that the URL is still valid. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP Dev Facts

2008-10-17 Thread Stut
Class* MySQLi. *Preferred OS CMS* Wordpress. *Anything else you use frequently in you're PHP'ing that's worth mentioning:* Git, MySQL, Memcache and Gearman. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Information on Cookies

2008-10-15 Thread Stut
okies will instantly become invalid. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Information on Cookies

2008-10-15 Thread Stut
ie in plain text whereas an encrypted value is, erm, encrypted. I suggest you Google encryption and hashing as these are pretty basic concepts. -Stut 2008/10/15 Stut <[EMAIL PROTECTED]> On 15 Oct 2008, at 15:23, Ben Stones wrote: I've read a few videos on cookie security and it

Re: [PHP] Information on Cookies

2008-10-15 Thread Stut
ssionless-sessions-2/ -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Microsoft China to Punish private windows users

2008-10-15 Thread Stut
On 15 Oct 2008, at 14:53, Shelley wrote: It will punish private Windows XP and Office 2003, Office 2007 users. This is extremely off-topic. Please don't abuse this list in an attempt to drive traffic to your blog. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.ph

Re: [PHP] Output text status on a long class

2008-10-14 Thread Stut
the output. How is your output formatted? Browsers won't necessarily display content until they get closing tags. This is probably the issue you're running into. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Output text status on a long class

2008-10-14 Thread Stut
remove any output buffers and your script should then output stuff as it happens. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sphinx Open Source Text Based Search

2008-10-14 Thread Stut
ormat... http://www.ibm.com/developerworks/library/os-php-sphinxsearch/ -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] New to this group....a continuation

2008-10-13 Thread Stut
up gateway. You're receiving replies in your mailbox because most contributors are subscribed by email and hitting "Reply to All" is the standard way to respond. An alternative to filtering would be to subscribe to the mailing list rather than the newsgroup but whatever floats

Re: [PHP] New to PHP

2008-10-13 Thread Stut
d bottom-posting ensures this and makes list archives more valuable as a reference for Googlers. Of course that's just my opinion and I know many people disagree but on this issue discussion is generally pointless since it's a religious bike shed. Praise FSM! -Stut -- http

Re: [PHP] Setcookie()

2008-10-13 Thread Stut
before your business logic is done then (IMHO) it's wrong and needs to be rewritten anyway, regardless of the need to set a cookie. -Stut -- http://stut.net/ Ben Stones wrote: What I mean is I cannot use setcookie, I need to check if user credentials are correct first (which is

Re: [PHP] security and database

2008-10-11 Thread Stut
ed procedure request. Aside from the extra overhead, if someone gets access to your database you have other problems which won't be solved by requiring a username and password to execute stored procedures. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Login

2008-10-08 Thread Stut
On 8 Oct 2008, at 22:32, Ashley Sheridan wrote: On Wed, 2008-10-08 at 22:15 +0100, Stut wrote: I don't disagree that it's not the best model, but it is the best paying I have to disagree. Each and every time I've come across this, I've gone elsewhere. The model doesn&#x

Re: [PHP] Login

2008-10-08 Thread Stut
On 8 Oct 2008, at 22:05, Ashley Sheridan wrote: On Wed, 2008-10-08 at 21:45 +0100, Stut wrote: On 8 Oct 2008, at 21:44, Ashley Sheridan wrote: The only redirects that have p!ssed me off before are those ones that big sites put in to make room for their adverts. On more than one occassion

Re: [PHP] magic_quotes

2008-10-08 Thread Stut
wing up the PHP generated html. Is there a way to avoid this? http://stut.net/blog/2008/06/08/where-are-these-backslashes-coming-from/ -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Login

2008-10-08 Thread Stut
ything on the Internet is supposed to be free?!?!?!? Find your stuff elsewhere by all means, but don't slate sites for using advertising to pay for your FREE usage of their service. -Stut PS. For those sarcasm-detector-challenged out there the first paragraph was full of sarcasm. -- h

Re: [PHP] sms interfaces?

2008-10-08 Thread Stut
I've found is Clickatell (www.clickatell.com) but I've not really looked too hard. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Login

2008-10-08 Thread Stut
ay also hash the user to prevent injection # http://us.php.net/manual/en/function.include.php # http://en.wikipedia.org/wiki/Code_injection#PHP_Injection I see nothing in that code that would be open to code injection. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] strtotime problem

2008-10-08 Thread Stut
On 8 Oct 2008, at 12:58, Thodoris wrote: Actually this means that strtotime() was made with Americans *only* in mind... :-) . As far as I know it uses the configured timezone to decide between ambiguous formats. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net

Re: [PHP] Re: strtotime problem

2008-10-08 Thread Stut
to do that. If you *know* the date always comes in as that format you can simply do this... function dateWebToMysql($webdate) { list($day, $month, $year) = explode('/', $webdate); return $year.'-'.$month.'-'.$day; } -Stut -- http://stut.net/ -- PHP

Re: [PHP] $_SERVER["REMOTE_ADDR"] returning ::1

2008-10-07 Thread Stut
s well understood that IP addresses should not be used for authentication or continuity purposes. I've not come across a session implementation that uses them for a very long time. -Stut -- http://stut.net/ Stut wrote: On 18 Sep 2008, at 16:37, David Rocks wrote: Stut wrote: On 18 Sep 200

Re: [PHP] Question about date()

2008-10-07 Thread Stut
On 7 Oct 2008, at 12:48, Jason Pruim wrote: On Oct 7, 2008, at 7:41 AM, Stut wrote: On 7 Oct 2008, at 12:38, Jason Pruim wrote: I am trying to track down an error and can't seem to figure it out... Here is the error out of my log: [Tue Oct 7 07:31:43 2008] [error] PHP Warning:

Re: [PHP] Question about date()

2008-10-07 Thread Stut
clean code... And this is my last error... It's a total cosmetic thing since it still displays everything right... Any ideas? :) Do a var_dump($row['timeout']) on the line before the one giving the warning to check that it contains what you think it does. -Stut -- http://

  1   2   3   4   5   6   7   8   9   10   >