[PHP] PHP5 release HTTP Authentication not working on FreeBSD.

2004-07-15 Thread William Bailey
_USER is on longer being set. Does anybody else have this issue or know of a fix? - -- Regards, William Bailey. Pro-Net Internet Services Ltd. http://www.pro-net.co.uk/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.1 (MingW32) Comment: Using GnuPG with Thunderbird

[PHP] How does one get strtotime() real NOW now that the function behaves according to GNU date syntax?

2004-06-15 Thread William Bailey
tried the following but this fails and results in -1: $t = strtotime('@'.time().' + 2 seconds') p.s. I know that for the example posted i could just do: $t = time() +2 But i also want situations where i could have 'next thursday + 3 hours' e

[PHP] Re: [PHP-DB] Request database_queryf() functions.

2004-05-20 Thread William Bailey
If you need a better source example/layout goto: http://nopaste.php-q.net/59720 William Bailey wrote: Hi All, After having been talking to lots of people in irc lately who are haveing problems with SQL injection etc i think that haveing a *_queryf() function would be really useful to help

[PHP] Request database_queryf() functions.

2004-05-20 Thread William Bailey
d=%d AND name=\'%\'.-34s\' AND account=\'%0.2f\' AND blah=%06d AND value > \'30%%\'', NULL, '1 OR', 'name\'s'); ?> Output: Query is: SELECT * FROM blah WHERE id=1 AND name='name\'s...&

[PHP] SimpleXML node detection.

2004-03-24 Thread William Bailey
ideas on how i can check to see it the ignore node exists or not? - -- Regards, William Bailey. Pro-Net Internet Services Ltd. http://www.pro-net.co.uk/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.1 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozde

Re: [PHP] PHP5 simpleXML bug or am i just being silly :)

2004-02-27 Thread William Bailey
isAuth = true; break; } } if(!$isAuth){ print($nl.$nl.'Invalid User.'.$nl); die(); } // So lets output the variables to see what we have... print('$user is:'.$nl); print_r($user); print($nl.$nl); print('$user->site is:'.$nl); print_r($user->site);

Re: [PHP] PHP5 simpleXML bug or am i just being silly :)

2004-02-27 Thread William Bailey
To follow up my question from yesterday i have made a test script that will produce the problem that i am seeing. The attached script will produce the following output on both my windows box (which runs a 2 day old php5 snapshot) and my FreeBSD box which uses a version out of the ports. The php

[PHP] PHP5 simpleXML bug or am i just being silly :)

2004-02-26 Thread William Bailey
Hi All, I am currently working with PHP5 beta and have found something strange with the simplexml objects. It seems to be forgetting its values. Below is an example.. [[the PHP5 code]] print(''); print('$this->user::'); print_r($this->user); print('$this->user->site::');

Re: [PHP] Re: Issue with 'W' in the date() function?

2004-02-03 Thread William Bailey
'W', $time)); }else{ return sprintf('%d%02d', date('Y', $time), date('W', $time)); } } William Bailey wrote: Ok. Its been a long day and my brain is starting to shut down so... How would i work out which year the 'W' relates to? I

Re: [PHP] Re: Issue with 'W' in the date() function?

2004-02-03 Thread William Bailey
Ok. Its been a long day and my brain is starting to shut down so... How would i work out which year the 'W' relates to? I have a unix timestamp value and want to end up with the correct 'YW' value. William Bailey wrote: Hi Mike, Because week 1 is defined as the first we

Re: [PHP] Re: Issue with 'W' in the date() function?

2004-02-03 Thread William Bailey
Hi Mike, Because week 1 is defined as the first week with four or more days in the new year. Therefore, working backwards, the 29th-31st are also in week 1 in 2004. Thanks, So now i will just have to check the year and then work out from that what the correct year should be. (i need to get a Y

[PHP] Issue with 'W' in the date() function?

2004-02-03 Thread William Bailey
Hi all, Can somebody please explain this for me... [EMAIL PROTECTED]:/usr/home/wb [11]-> php $time = strtotime('now -5 weeks'); printf("\n\n%s is in week %d of the year %d\n\n", date('Y-m-d', $time), date('W', $time), date('Y', $time)); ?> ^D 2003-12-30 is in week 1 of the year 2003 [EMAIL P

Re: [PHP] PHP5 XSLT how to.

2003-12-05 Thread William Bailey
ionNode->appendChild($dom->createTextNode('Its a test')); $xsl = new domDocument(); $xsl->load('loading.xsl'); $proc = new xsltprocessor; $proc->importStylesheet($xsl); print($proc->transformToXml($dom)); loading.xsl --- http://www.w3.org/1999/XSL/Transform";>

[PHP] PHP5 XSLT how to.

2003-12-05 Thread William Bailey
documentation in the online php manual but am finding it to be all out of date in respect to the php5 implementation so if anybody could also point me to the correct information i would be very happy. - -- Regards, William Bailey. Pro-Net Internet Services Ltd. http://www.pro

Re: [PHP] Getting the required GD Memmory Usage.

2003-11-27 Thread William Bailey
error out. Is there a way to calculate the memory required to load the image without haveing to load it? Would the following work... $memSize = $imageWidth * $imageHeight * 4 This assumes that gd uses 32bits per pixel. Regards, William Bailey. Pro-Net Internet Service

[PHP] Getting the required GD Memmory Usage.

2003-11-26 Thread William Bailey
if i could work out the GD memory requirement without having to load the image it would be most useful. - -- Regards, William Bailey. Pro-Net Internet Services Ltd. http://www.pro-net.co.uk/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.1 (MingW32) Comment: Using GnuPG

[PHP] PHP5 interfaces

2003-11-12 Thread William Bailey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I am currently starting a new personal project and thought that i would start to implement it in PHP5. Now the new object model in PHP5 is really nice and haveing objects bassed by reference by default saves a lot of head aches :)

[PHP] PHP5 interfaces

2003-11-12 Thread William Bailey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I am currently starting a new personal project and thought that i would start to implement it in PHP5. Now the new object model in PHP5 is really nice and haveing objects bassed by reference by default saves a lot of head aches :)

[PHP] PHP5 interfaces

2003-11-12 Thread William Bailey
ct == null){ ~$method = null; ~} ~if($object != null && !is_object($object)){ ~$this->onChange(); ~}else{ ~$this->onChangeObject = $object; ~$this->onChangeMethod = $method; ~} ~ } - -- Regards, Will

Re: [PHP] seems like magic_quotes_gpc is turning itsself on!

2003-10-21 Thread William Bailey
database connections or anything else apart from class and function declarations have taken place. CPT John W. Holmes wrote: | From: "William Bailey" <[EMAIL PROTECTED]> | |>I have a strange problem with one of the sites i work on and provide |>support for. I the following block

[PHP] seems like magic_quotes_gpc is turning itsself on!

2003-10-21 Thread William Bailey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi All, I have a strange problem with one of the sites i work on and provide support for. I the following block of code that checks to see if magic_quotes_gpc is enabled and if it is it dies with an error message: if((integer)ini_get('magic_quo

Re: [PHP] How can one find out what Headers have been sent by a script.

2003-09-18 Thread William Bailey
I have found something that seems to work: Typical i get stuck on something for ages and then as soon as i post to the list i figure something out :) oh well hope it helps somebody else. :) On Thursday 18 September 2003 15:10, William Bailey wrote: > Hello all, > > Does anybod

[PHP] How can one find out what Headers have been sent by a script.

2003-09-18 Thread William Bailey
Thanks in advance. -- Regards, William Bailey. Pro-Net Internet Services Ltd. http://www.pro-net.co.uk/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Zip to postcode

2003-04-02 Thread William Bailey
nge the following code: > if (!ereg("^[0-9]{5,5}(\-[0-9]{4,4})?$",$postcode)) > > to a UK postcode QQ1 1QQ > When i fill out the form it tells me that the postcode is not valid and i > think it is because it is in zip code format. > > Thank you > > Andy -- Rega

[PHP] Adding to md5 checksums.

2003-04-02 Thread William Bailey
: $checksum=md5("abcdef\x00\x00"); -- Regards, William Bailey. Pro-Net Internet Services Ltd. http://www.pro-net.co.uk http://wb.pro-net.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Problem: Only 1 fsockopen() connection for apache at a time.

2002-12-03 Thread William Bailey
On Tuesday 03 December 2002 15:46, Roedel, Mark wrote: > > -Original Message- > > From: William Bailey [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, December 03, 2002 6:04 AM > > To: [EMAIL PROTECTED] > > Subject: [PHP] Problem: Only 1 fsockopen() conne

Re: [PHP] php and file uploads/downloads

2002-12-03 Thread William Bailey
ders. example: header('Content-type: application/octet-stream'); header(sprintf('Content-disposition: inline; filename=%s', $fileName)); header(sprintf('Content-length: %d', $fileLength)); // Output file now. Hope this helps. > > TIA, > > Beau --

Re: [PHP] date

2002-12-03 Thread William Bailey
along with the date() function to get what you need. -- Regards, William Bailey. Pro-Net Internet Services Ltd. http://www.pro-net.co.uk http://wb.pro-net.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Problem: Only 1 fsockopen() connection for apache at a time.

2002-12-03 Thread William Bailey
apache processes just sit there and wait for it. The remote server only ever gets 1 connection at a time even though there are free connections available. Has anybody else seen this or know of a way around it. -- Regards, William Bailey. Pro-Net Internet Services Ltd

[PHP] Help needed with speading up a function.

2002-03-06 Thread William Bailey
se i really want to know if their is some way of knowing how close you are to a possiable prime so that if the random number is too far away then it could call itself again and try a different random start location. I look forward to any ideas that you might have. Regards, William. -- Will

[PHP] RSA Encryption with PHP (code attached)

2002-03-05 Thread William Bailey
library so you will need that installed before you are able to run my code. Also please cc me directly on a any responses as they will get to me quicker then by just emailing the list alone. Regards, William. -- William Bailey. http://wb.pro-net.co.uk =0; $i--){

[PHP] PHP cgi/standalone script issue.

2002-02-07 Thread William Bailey
egards, William. -- William Bailey. http://wb.pro-net.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] variable variables and eval

2001-08-13 Thread William Bailey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi All, i have come across a strange problem with variable variables. Basicly i'm doing the following and its not working: $section = 'data["SITE"][0]["NAME"][0]'; $pData = 'My Site.'; ${sprintf('$%s', $section)}.=$pData; but it is not working. But

[PHP] Seg fault when returning True from shutdown function.

2001-08-06 Thread William Bailey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I am just playing with the the register_shutdown_function() function and have found a way to cause php to seg fault. Can somebody else please test the code below this to see if they have the same problem. Code (8 Lines): #!/usr/local/bin

[PHP] UDP Port listening, can it be done?

2001-08-02 Thread William Bailey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi All, I'm currently just playing around with a few things and want to write a script that will listen on a UDP port and then log/process the information. The problem i have it that i don't know if php can do this. I know that you can connec

[PHP] Help: 'php in free(): warning: recursive call'

2001-05-17 Thread William Bailey
Hi, I just created a script that imports data from one data base, reformats it and then saves the data to csv files. Now when i run the script it sometimes outputs the following error: php in free(): warning: recursive call I tried searching the php web site but have had no luck in fin

[PHP] Variables in 'friendly' urls

2001-01-16 Thread William Bailey
Hi, Is there a way to pass variables as 'friendly' urls? So instead of haveing a url like www.blah.co.uk/profile.php?team=tigers i could have www.blah.co.uk/profile.php/team/tigers which would call profile.php and set team to tigers. I've been playing with it but i can't seem to g

Re: [PHP] looking for a PHP editor

2001-01-10 Thread William Bailey
Try Nedit. http://www.nedit.org On 2001.01.10 13:50:53 + Markus H. Maussner wrote: > hi.. > > ..i am curious if theres anny linux (x, KDE, Gnome) php editor with > syntax > highliting and this things... > > markus > > > -- > PHP General Mailing List (http://www.php.net/) > To un

[PHP] include & include_once, how do they work?

2001-01-10 Thread William Bailey
I have just been playing around with include and include_once with one of my classes, basicly there are a lot of functions inside this class so we have put the contance of the function into its own file (so that different people can work on it) and are useing the include function to call it. exa