Re: [PHP] php5 - possible bug discovered

2007-10-09 Thread David Restall - System Administrator
Hi Robert, Stut & List

Thanks for your replies which arrived after I had gone to bed |-Z

Robert :-

> In PHP5 objects are no longer copied when assigned. Instead the object's
> handle is assigned (similar to a reference but not quite). So the
> behaviour is as expected.

Stut :-

> > I think I have discovered a bug in php5.  If I haven't, I've discovered
> > a bug in the documentation or a bug in my brain.
> 
> Start here: http://php.net/language.oop5.cloning

It's amazing what a good night's sleep will do :-)

I could not find that page last night even though I was sure it must
have existed and I can see that it is a well documented and encountered
problem.

My main obesrvation is that I'm glad that I decided to revisit all my
old PHP4 stuff and rewrite or clean it up.  I have hundreds of

$Working_Class = $Under_Class;

lines in my code as well as

$Upper_Class = & $Aristocracy;

lines too.  I think the documentation on references needs updating to
reflect PHP 5's behaviour a little more accurately because I can see
this causing serious problems to somebody just copying their code blindly.

I have just built a client a development server using php5 instead of
php4 and turned zend.ze1_compatibility_mode on so that their old CMS would
work - I just hadn't realised that the cloning problem was solved by this.

Oh well, now I'm fresh I can crack on :-)

TTFN


D
php/general-2007-10-09.tx  [EMAIL PROTECTED]
   [EMAIL PROTECTED]
   php-general
++
| Dave Restall, Computer Nerd, Cyclist, Radio Amateur G4FCU, Bodger  |
| Mob +44 (0) 7973 831245  Skype: dave.restall Radio: G4FCU  |
| email : [EMAIL PROTECTED] Web : Not Ready Yet :-(   |
++
| birth, n:  |
| The first and direst of all disasters. |
| -- Ambrose Bierce, "The Devil's Dictionary"|
++

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] php5 - possible bug discovered

2007-10-08 Thread David Restall - System Administrator
Hi,

I think I have discovered a bug in php5.  If I haven't, I've discovered
a bug in the documentation or a bug in my brain.

php -v :-

PHP 5.2.3 (cli) (built: Jun 26 2007 15:38:48) 
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

I've attached a code snippet for those that want to save it and try
running it and it's also pasted here :-


Text = $Text;
}

function Set($Text)
{
$this->Text = $Text;
}

function Display()
{
print $this->Text . "\n";
}
}   // End Class_1

class Class_2
{
private $Text;
private $C1;

function __construct($Text)
{
$this->Text = $Text;

$this->C1 = new Class_1('From David');
}

function Set_C1($Text)
{
$this->C1->Set($Text);
}

function Display()
{
print $this->Text . "\n";
$this->C1->Display();
}
}   // End Class_2

print "Below is T1\n";

$T1 = new Class_1('Hello');
$T1->Display();

print "Below is T2\n";
$T2 = new Class_2('World');
$T2->Display();

print "Copying T2\n";

$T3 = $T2;

print "T2 Copied, original value is :-\n";

$T2->Display();

print "Copy of T2 (T3) value is :- \n";

$T3->Display();

print "Changing T3\n";

$T3->Set_C1("This clears Dave");

print "T3 Change complete, new value is :-\n";

$T3->Display();

print "Below is T2 which shouldn't have changed !!! \n";

$T2->Display();

// var_dump($T1);

?>



The output it produces is :-

% php -e bug.php
Below is T1
Hello
Below is T2
World
>From David
Copying T2
T2 Copied, original value is :-
World
>From David
Copy of T2 (T3) value is :- 
World
>From David
Changing T3
T3 Change complete, new value is :-
World
This clears Dave
Below is T2 which shouldn't have changed !!! 
World
This clears Dave
%

Now I would expect that $T2 would not change when I changed $T3.
Reading the documentation :-



"... Note:  Not using the & operator causes a copy of the object to be
made. If you use $this in the class it will operate on the current
instance of the class. The assignment without & will copy the instance
(i.e. the object) and $this will operate on the copy, which is not
always what is desired. Usually you want to have a single instance to
work with, due to performance and memory consumption issues."

This effectively states that $T3 is a 'COPY' of $T2 and $T3 works on the
copy, not the master yet in the above snippet, the copy and the master
have both been changed.  Further documentation mentions that the copy
starts off as a reference and only becomes a copy when it is changed.
This doesn't seem to be happening.

I found this because in my actual application I was using :-
Master.class
...
$Clone = $this;

$Clone->Do_Something;


and later in master.class I did :-

$this->Do_Something_Else

and php barfed with :-

PHP Fatal error:  Call to a member function Function_Name() on a non-object 

I had deleted the missing object in $Clone but not in the master (this
was the whole idea of working on $Clone - I didn't want to delete the
object in the master !!).

I can't find anything similar in the bug database on php.net (but I may
be looking in the wrong place) and I can't believe that I'm the first
person to encounter this.

Can anybody explain if this is a bug or if I have misunderstood the
documentation ?

TTFN



D
php/general-2007-10-08.tx  php-general
++
| Dave Restall, Computer Nerd, Cyclist, Radio Amateur G4FCU, Bodger  |
| Mob +44 (0) 7973 831245  Skype: dave.restall Radio: G4FCU  |
| email : [EMAIL PROTECTED] Web : Not Ready Yet :-(   |
++
| Good salesmen and good repairmen will never go hungry. |
| -- R. E. Schenk|
++



bug.php
Description: application/httpd-php
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Includes eating up my time

2007-07-31 Thread David Restall - System Administrator
Hi Dave,

> PHP general list,
> 
> This is probably obvious to people who are good at PHP, but I'm
> 
> I have a PHP based CMS (content management system) built, which has 
> grown and become quite robust. It's now spread out over about 30 files, 
> and each file represents one class within the object oriented design. 
> Each are a couple hundred lines of code, and two or three of the most 
> critical classes are over a thousand lines of code.

It may just be a 'dave' thing but my stuff does that too :-)

> While first building it, I didn't really anticipate quite that many 
> files. What I did is have a file called "includes.php", which list all 
> the files to be included. Then I in turn included "includes.php" at the 
> beginning of my "index.php" file. Every page request passes through the 
> "index.php" file, so that basically means every single file is included 
> at the start of every new page request.

Ahh the 'dave' thing returns :-)

> I'm using Zend Studio, which has a "profile" option, which shows how 
> long it takes for my PHP scripts to complete a request. It has a 
> breakdown showing percentages of which scripts are using that processing 
> time.

Real dave's use vi & top :-P

> My second question is: Is there a systematic way of determining how to 
> incrementally include files that people use? Or is it just a constant 
> process of testing and checking?
> 
> Thank you for any advice.

What version of PHP are you using ?  I moved over to 5 and it has a nice
cute feature :-



which basically only loads classes when they are required.  PHP 5 has
some other nice to have features and will cause you a bit of work if
you migrate to it BUT it is worth the effort especially in the light of
888 :-)

As for your performance problems, the times are heavily dependant on the
hardware and underlying OS & server load etc. without further info,
diagnosing problems will be dificult.

TTFN



Dave
php/general-2007-07-31.tx  php-general [EMAIL PROTECTED]
++
| Dave Restall, Computer Nerd, Cyclist, Radio Amateur G4FCU, Bodger  |
| Mob +44 (0) 7973 831245  Skype: dave.restall Radio: G4FCU  |
| email : [EMAIL PROTECTED] Web : Not Ready Yet :-(   |
++
| Big book, big bore.|
| -- Callimachus |
++

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Getting WAY OT now Re: PHP Brain Teasers

2007-07-06 Thread David Restall - System Administrator
Hi,

Tedd Wrote :-

> At 11:00 PM -0400 7/5/07, Robert Cummings wrote:
> >On Thu, 2007-07-05 at 22:44 -0400, tedd wrote:
> >>  At 4:48 PM -0400 7/5/07, Daniel Brown wrote:
> >>  >On 7/5/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> >>  >>On Thu, 2007-07-05 at 15:04 -0500, Kaleb Pomeroy wrote:
> >>  >>>  Which came first, the chicken or the egg?
> >>  >>
> >>  >>The egg, fish were laying them long before chickens walked the earth :)
> >  > >
> >  >
> >  > But actually, it was dinosaurs.
> >
> >Um... fish predate all land creatures according to evolution
> >that's not to say something with eggs didn't predate fish, but I'm too
> >lazy to go look.
> 
> 
> Yes, but I was talking about predecessors to the chicken, like 
> Archeopteryx (one of the first feathered dinosaurs), which is/was (my 
> education is dated) believed to be the predecessor of birds.
> 
> As far as eggs are concerned, they predate fish considerably.

As far as I'm aware, eggs don't predate anything.  How could they - they
don't have legs or mouths so couldn't eat anything if they could run to
catch it :-)

TTFN



D
php/general-2007-07-06.tx  php-general [EMAIL PROTECTED]
   [EMAIL PROTECTED] [EMAIL PROTECTED]
   [EMAIL PROTECTED]
++
| Dave Restall, Computer Nerd, Cyclist, Radio Amateur G4FCU, Bodger  |
| Mob +44 (0) 7973 831245  Skype: dave.restall Radio: G4FCU  |
| email : [EMAIL PROTECTED] Web : Not Ready Yet :-(   |
++
| "Mind if I smoke?" |
| "I don't care if you burst into flames and die!"   |
++

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP Brain Teasers

2007-07-03 Thread David Restall - System Administrator
Hi,

there are two in this one :-

function Cat($Danger = "")
{
static int $Lives = 9;

if (preg_match("/^curiosity$/i", $Danger))
die("Cat Killed");

$Threats = array("dog", "flu", "fall", "drowning");

if (in_array(strtolower($Danger), $Threats))
$Lives --;

if ($Lives == 0)
die("No More Chances");
}   // Cat

TTFN



D
php/general-2007-07-03.tx  php-general
++
| Dave Restall, Computer Nerd, Cyclist, Radio Amateur G4FCU, Bodger  |
| Mob +44 (0) 7973 831245  Skype: dave.restall Radio: G4FCU  |
| email : [EMAIL PROTECTED] Web : Not Ready Yet :-(   |
++
| "People should have access to the data which you have about them.  |
| There should   |
|  be a process for them to challenge any inaccuracies." |
| -- Arthur Miller   |
++

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP Brain Teasers

2007-06-27 Thread David Restall - System Administrator
Hi,

> Colin Guthrie wrote:
> > Daniel Brown wrote:
> >>What the hell?  Why not start a thread that can be fun and
> >> challenging for all of us.  It's something I haven't seen done
> > 
> > Here's another quickie: Dead simple one!
> > 
> >  > 
> > function x($x)
> > {
> >   switch ($x)
> >   {
> > case 1: return 'bitten';
> > case 2: return 'shy';
> >   }
> > }
> > 
> 
> Surely this should be...
> 
> function x()
> {
>  static $count = 0;
>  $count++;
>  switch ($count)
>  {
>  case 1: return 'bitten';
>  case 2: return 'shy';
>  }
>  return '';
> }
> 
> -Stut

Probably a more accurate solution would be :-

function x()
 {
 static $count = 0;
 $count++;
 switch ($count % 3)
 {
 case 0:
 case 2: return 'shy';

 case 1: return 'bitten';
 }
 }  // x

And it's commented :-P

TTFN


D
php/general-2007-06-27.tx  php-general
++
| Dave Restall, Computer Nerd, Cyclist, Radio Amateur G4FCU, Bodger  |
| Mob +44 (0) 7973 831245  Skype: dave.restall Radio: G4FCU  |
| email : [EMAIL PROTECTED] Web : Not Ready Yet :-(   |
++
| Sooner or later you must pay for your sins.  (Those who have already   |
| paid may disregard this cookie).   |
++

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] R: Re: [PHP] Which PHP-script crashes my server?

2006-12-19 Thread David Restall - System Administrator
Hi Phil,

> Linux, of course. :-)
> It is a Gentoo server with Confixx Pro on it. The PHP safe mode is 
> disabled for some accounts, so it is clear that problems like this 
> happen. But I can not enable it because of several scripts.
> 
> Thats all I know. I dit not setup the server. If you need some special 
> information, tell me which one.

It's not the answer but it may help you minimise rebooting, have you had
a look at

 ?

It may be set to something odd.  You could use this as a starting point.

Regards,



Dave
php/general-2006-12-19.tx  php-general [EMAIL PROTECTED]
++
| Dave Restall, Computer Nerd, Cyclist, Radio Amateur G4 FCU, Bodger |
| Mob +44 (0) 7973 831245  Skype: dave.restall Radio: G4 FCU |
| email : [EMAIL PROTECTED] Web : Not Ready Yet :-(   |
++
| "Spare no expense to save money on this one."  |
| -- Samuel Goldwyn  |
++

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] RE: non-text data

2006-08-14 Thread Dave Shariff Yadallee - System Administrator a.k.a. The Root of the Problem
On Mon, Aug 14, 2006 at 02:40:53PM +1000, Chris wrote:
> John Meyer wrote:
> >Gd,
> >BTW, came into this late, have we gotten the old "store your images in the
> >filesystem and save the file name in the database" argument yet?
> 
> Nope, haven't done that one yet, do you want to start it off or shall I? ;)
> 
> -- 
> Postgresql & php tutorials
> http://www.designmagick.com/
>

Careful where you light your match.

You may blow up if you are not careful.
 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] install issue (affects 4.4.0 and 5.0.5) [/usr/include/rpc/rpc_msg.h, /usr/include/rpc/rpc.h, /usr/include/crypt.h, standard/crypt.c

2005-10-20 Thread Administrator
Running FreeBSD 5.4/RELEASE on Sparc64 and Apache 1.3.33

When attempting to install 4.4.0 and 5.0.5, from ports or from source, I am
getting the following error: (This specific error is from 4.4.0 from ports
[/usr/ports/lang/php4]

/bin/sh /usr/ports/lang/php4/work/php-4.4.0/libtool --silent
--preserve-dup-deps --mode=compile cc  -Iext/standard/
-I/usr/ports/lang/php4/work/php-4.4.0/ext/standard/ -DPHP_ATOM_INC
-I/usr/ports/lang/php4/work/php-4.4.0/include
-I/usr/ports/lang/php4/work/php-4.4.0/main
-I/usr/ports/lang/php4/work/php-4.4.0
-I/usr/ports/lang/php4/work/php-4.4.0/TSRM
-I/usr/ports/lang/php4/work/php-4.4.0/Zend-O -pipe   -c
/usr/ports/lang/php4/work/php-4.4.0/ext/standard/crypt.c -o
ext/standard/crypt.lo
In file included from /usr/include/rpc/rpc.h:59,
 from /usr/include/crypt.h:9,
 from
/usr/ports/lang/php4/work/php-4.4.0/ext/standard/crypt.c:31:
/usr/include/rpc/rpc_msg.h:66: error: syntax error before numeric constant
*** Error code 1

Stop in /usr/ports/lang/php4/work/php-4.4.0.
*** Error code 1

Stop in /usr/ports/lang/php4.

Any ideas would  be helpful.  If anyone requires more information, just ask
& I will provide.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Delivery failed

2005-07-07 Thread Mail Administrator
ALERT!

This e-mail, in its original form, contained one or more attached files that 
were infected with a virus, worm, or other type of security threat. This e-mail 
was sent from a Road Runner IP address. As part of our continuing initiative to 
stop the spread of malicious viruses, Road Runner scans all outbound e-mail 
attachments. If a virus, worm, or other security threat is found, Road Runner 
cleans or deletes the infected attachments as necessary, but continues to send 
the original message content to the recipient. Further information on this 
initiative can be found at http://help.rr.com/faqs/e_mgsp.html.
Please be advised that Road Runner does not contact the original sender of the 
e-mail as part of the scanning process. Road Runner recommends that if the 
sender is known to you, you contact them directly and advise them of their 
issue. If you do not know the sender, we advise you to forward this message in 
its entirety (including full headers) to the Road Runner Abuse Department, at 
[EMAIL PROTECTED]

The original message was received at Thu, 7 Jul 2005 01:23:04 -0700
from 43.2.68.104

- The following addresses had permanent fatal errors -
php-general@lists.php.net

- Transcript of session follows -
... while talking to 58.82.219.98:
550 5.1.2 ... Host unknown (Name server: host not 
found)

file attachment: text.zip

This e-mail in its original form contained one or more attached files that were 
infected with the [EMAIL PROTECTED] virus or worm. They have been removed.
For more information on Road Runner's virus filtering initiative, visit our 
Help & Member Services pages at http://help.rr.com, or the virus filtering 
information page directly at http://help.rr.com/faqs/e_mgsp.html. 
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Report

2005-07-03 Thread Mail Administrator
ALERT!

This e-mail, in its original form, contained one or more attached files that 
were infected with a virus, worm, or other type of security threat. This e-mail 
was sent from a Road Runner IP address. As part of our continuing initiative to 
stop the spread of malicious viruses, Road Runner scans all outbound e-mail 
attachments. If a virus, worm, or other security threat is found, Road Runner 
cleans or deletes the infected attachments as necessary, but continues to send 
the original message content to the recipient. Further information on this 
initiative can be found at http://help.rr.com/faqs/e_mgsp.html.
Please be advised that Road Runner does not contact the original sender of the 
e-mail as part of the scanning process. Road Runner recommends that if the 
sender is known to you, you contact them directly and advise them of their 
issue. If you do not know the sender, we advise you to forward this message in 
its entirety (including full headers) to the Road Runner Abuse Department, at 
[EMAIL PROTECTED]

The original message was received at Sun, 3 Jul 2005 21:58:56 -0400
from lists.php.net [84.204.92.195]

- The following addresses had permanent fatal errors -
php-general@lists.php.net

- Transcript of session follows -
... while talking to mail server 81.238.161.150:
550 5.1.2 ... Host unknown (Name server: host not 
found)

file attachment: attachment.zip

This e-mail in its original form contained one or more attached files that were 
infected with the [EMAIL PROTECTED] virus or worm. They have been removed.
For more information on Road Runner's virus filtering initiative, visit our 
Help & Member Services pages at http://help.rr.com, or the virus filtering 
information page directly at http://help.rr.com/faqs/e_mgsp.html. 
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Mail System Error - Returned Mail

2005-06-26 Thread Mail Administrator



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Returned mail: see transcript for details

2005-06-20 Thread Mail Administrator
ALERT!

This e-mail, in its original form, contained one or more attached files that 
were infected with a virus, worm, or other type of security threat. This e-mail 
was sent from a Road Runner IP address. As part of our continuing initiative to 
stop the spread of malicious viruses, Road Runner scans all outbound e-mail 
attachments. If a virus, worm, or other security threat is found, Road Runner 
cleans or deletes the infected attachments as necessary, but continues to send 
the original message content to the recipient. Further information on this 
initiative can be found at http://help.rr.com/faqs/e_mgsp.html.
Please be advised that Road Runner does not contact the original sender of the 
e-mail as part of the scanning process. Road Runner recommends that if the 
sender is known to you, you contact them directly and advise them of their 
issue. If you do not know the sender, we advise you to forward this message in 
its entirety (including full headers) to the Road Runner Abuse Department, at 
[EMAIL PROTECTED]

Dear user of lists.php.net,

Your e-mail account has been used to send a huge amount of junk e-mail during 
this week.
Obviously, your computer was compromised and now runs a hidden proxy server.

We recommend you to follow our instruction in order to keep your computer safe.

Virtually yours,
lists.php.net user support team.

file attachment: file.zip

This e-mail in its original form contained one or more attached files that were 
infected with the [EMAIL PROTECTED] virus or worm. They have been removed.
For more information on Road Runner's virus filtering initiative, visit our 
Help & Member Services pages at http://help.rr.com, or the virus filtering 
information page directly at http://help.rr.com/faqs/e_mgsp.html. 
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Delivery failed

2005-06-13 Thread Mail Administrator
ALERT!

This e-mail, in its original form, contained one or more attached files that 
were infected with a virus, worm, or other type of security threat. This e-mail 
was sent from a Road Runner IP address. As part of our continuing initiative to 
stop the spread of malicious viruses, Road Runner scans all outbound e-mail 
attachments. If a virus, worm, or other security threat is found, Road Runner 
cleans or deletes the infected attachments as necessary, but continues to send 
the original message content to the recipient. Further information on this 
initiative can be found at http://help.rr.com/faqs/e_mgsp.html.
Please be advised that Road Runner does not contact the original sender of the 
e-mail as part of the scanning process. Road Runner recommends that if the 
sender is known to you, you contact them directly and advise them of their 
issue. If you do not know the sender, we advise you to forward this message in 
its entirety (including full headers) to the Road Runner Abuse Department, at 
[EMAIL PROTECTED]

Message could not be delivered

file attachment: message.zip

This e-mail in its original form contained one or more attached files that were 
infected with the [EMAIL PROTECTED] virus or worm. They have been removed.
For more information on Road Runner's virus filtering initiative, visit our 
Help & Member Services pages at http://help.rr.com, or the virus filtering 
information page directly at http://help.rr.com/faqs/e_mgsp.html. 
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Returned mail: Data format error

2005-06-11 Thread Mail Administrator
ALERT!

This e-mail, in its original form, contained one or more attached files that 
were infected with a virus, worm, or other type of security threat. This e-mail 
was sent from a Road Runner IP address. As part of our continuing initiative to 
stop the spread of malicious viruses, Road Runner scans all outbound e-mail 
attachments. If a virus, worm, or other security threat is found, Road Runner 
cleans or deletes the infected attachments as necessary, but continues to send 
the original message content to the recipient. Further information on this 
initiative can be found at http://help.rr.com/faqs/e_mgsp.html.
Please be advised that Road Runner does not contact the original sender of the 
e-mail as part of the scanning process. Road Runner recommends that if the 
sender is known to you, you contact them directly and advise them of their 
issue. If you do not know the sender, we advise you to forward this message in 
its entirety (including full headers) to the Road Runner Abuse Department, at 
[EMAIL PROTECTED]



file attachment: Text.cmd

This e-mail in its original form contained one or more attached files that were 
infected with the [EMAIL PROTECTED] virus or worm. They have been removed.
For more information on Road Runner's virus filtering initiative, visit our 
Help & Member Services pages at http://help.rr.com, or the virus filtering 
information page directly at http://help.rr.com/faqs/e_mgsp.html. 
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Message could not be delivered

2005-06-07 Thread Mail Administrator
ALERT!

This e-mail, in its original form, contained one or more attached files that 
were infected with a virus, worm, or other type of security threat. This e-mail 
was sent from a Road Runner IP address. As part of our continuing initiative to 
stop the spread of malicious viruses, Road Runner scans all outbound e-mail 
attachments. If a virus, worm, or other security threat is found, Road Runner 
cleans or deletes the infected attachments as necessary, but continues to send 
the original message content to the recipient. Further information on this 
initiative can be found at http://help.rr.com/faqs/e_mgsp.html.
Please be advised that Road Runner does not contact the original sender of the 
e-mail as part of the scanning process. Road Runner recommends that if the 
sender is known to you, you contact them directly and advise them of their 
issue. If you do not know the sender, we advise you to forward this message in 
its entirety (including full headers) to the Road Runner Abuse Department, at 
[EMAIL PROTECTED]

Dear user php-general@lists.php.net,

Your account was used to send a huge amount of unsolicited commercial email 
messages during the last week.
Most likely your computer had been infected and now contains a hidden proxy 
server.

Please follow our instruction in order to keep your computer safe.

Best regards,
The lists.php.net team.

file attachment: transcript.zip

This e-mail in its original form contained one or more attached files that were 
infected with the [EMAIL PROTECTED] virus or worm. They have been removed.
For more information on Road Runner's virus filtering initiative, visit our 
Help & Member Services pages at http://help.rr.com, or the virus filtering 
information page directly at http://help.rr.com/faqs/e_mgsp.html. 
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] about PHP Graphic .

2005-06-04 Thread NeginGostar.com :: Administrator
Hello Dear
I want know about PHP Graphic .
I want use graphic in php but i cant setup GD library , in my server
My Server is Windows 2003
and i want install graphic in php

please help me,
thanks

[PHP] Returned mail: Data format error

2005-06-03 Thread Mail Administrator
ALERT!

This e-mail, in its original form, contained one or more attached files that 
were infected with a virus, worm, or other type of security threat. This e-mail 
was sent from a Road Runner IP address. As part of our continuing initiative to 
stop the spread of malicious viruses, Road Runner scans all outbound e-mail 
attachments. If a virus, worm, or other security threat is found, Road Runner 
cleans or deletes the infected attachments as necessary, but continues to send 
the original message content to the recipient. Further information on this 
initiative can be found at http://help.rr.com/faqs/e_mgsp.html.
Please be advised that Road Runner does not contact the original sender of the 
e-mail as part of the scanning process. Road Runner recommends that if the 
sender is known to you, you contact them directly and advise them of their 
issue. If you do not know the sender, we advise you to forward this message in 
its entirety (including full headers) to the Road Runner Abuse Department, at 
[EMAIL PROTECTED]

The original message was included as attachment

file attachment: message.zip

This e-mail in its original form contained one or more attached files that were 
infected with the [EMAIL PROTECTED] virus or worm. They have been removed.
For more information on Road Runner's virus filtering initiative, visit our 
Help & Member Services pages at http://help.rr.com, or the virus filtering 
information page directly at http://help.rr.com/faqs/e_mgsp.html. 
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] delivery failed

2005-05-26 Thread Mail Administrator
ALERT!

This e-mail, in its original form, contained one or more attached files that 
were infected with a virus, worm, or other type of security threat. This e-mail 
was sent from a Road Runner IP address. As part of our continuing initiative to 
stop the spread of malicious viruses, Road Runner scans all outbound e-mail 
attachments. If a virus, worm, or other security threat is found, Road Runner 
cleans or deletes the infected attachments as necessary, but continues to send 
the original message content to the recipient. Further information on this 
initiative can be found at http://help.rr.com/faqs/e_mgsp.html.
Please be advised that Road Runner does not contact the original sender of the 
e-mail as part of the scanning process. Road Runner recommends that if the 
sender is known to you, you contact them directly and advise them of their 
issue. If you do not know the sender, we advise you to forward this message in 
its entirety (including full headers) to the Road Runner Abuse Department, at 
[EMAIL PROTECTED]

The original message was included as attachment

file attachment: message.exe

This e-mail in its original form contained one or more attached files that were 
infected with the [EMAIL PROTECTED] virus or worm. They have been removed.
For more information on Road Runner's virus filtering initiative, visit our 
Help & Member Services pages at http://help.rr.com, or the virus filtering 
information page directly at http://help.rr.com/faqs/e_mgsp.html. 
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] OT - HTML Terminal ?

2004-09-26 Thread Dave Restall - System Administrator,,,
Hi,

this is severely off topic so please feel free to ignore it :-)

I have an intranet application that currently is accessed using a
browser, no problems there, however I have been asked if I can get rid
of the browser so that the user's are not encouraged to surf so readily.
I initially thought simple - start the browser with the correct home page
as a command line argument and turn off all the tool bars etc. so that it
looks like an xterm (dos window) and of course they can only then click
on the links we provide.  It's not meant to be foolproof and a dedicated
hacker could circumvent the system, however most users won't bother.

I don't particularly want to go the F11 (full screen) route and would
like something easy to install if possible, e.g. a single .exe, Lynx
seemed a good point to start but I think that would freak out just about
all the end users :-)

Does anybody have any POLITE suggestions or any experience of something
similar and can let me in on the secret ?

I have tried google, mozilla & m$ the nearest I have come so far is IEAK.

TTFN,


Dave
php/2004-09-26.tx  php-general
++
| Dave Restall,   IIRC Limited, PO Box 46, Skelton, Cleveland, TS12 2GT. |
| Tel. 0845 10 80 151Mob. +44 (0) 7973 831245   Int. +44 (0) 1287 653003 |
| email : [EMAIL PROTECTED]   [EMAIL PROTECTED] Web : http://www.iirc.net |
++
| I have learned To spell hors d'oeuvres Which still grates on Some  |
| people's n'oeuvres.|
| -- Warren Knox |
++

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: RE: [PHP] convert degrees to heading

2004-09-15 Thread Dave Restall - System Administrator,,,
Hi Trevor,

> Very nice solution, Dave.   I like simple, elegant and effective
> solutions like this.  I was wracking my brain yesterday to come up with
> something like this, but my brain wasn't working. Hah.  Good job!

Thanks for the compliments - my head is now a bit bigger :-)

I thought 0 degrees should have been east but thought you were using
a "southern hemisphere" compass :-)  Anyway, I went back and checked the
original post :-

> > I have to write a little function to convert a direction=20
> from degrees
> > to a compass -type heading. 0 =3D West. 90 =3D North. E.g.:
>=20
> Something like this... it'll account for >360 degrees, too.=20
> No different=20
> that a bunch of IF statements, though...

which is what I coded for - which only goes to prove that the system
will only be as good as the specification :-)

Regards,


Dave
php/trevor-2004-09-15.tx   [EMAIL PROTECTED]
   php-general,[EMAIL PROTECTED]
++
| Dave Restall,   IIRC Limited, PO Box 46, Skelton, Cleveland, TS12 2GT. |
| Tel. 0845 10 80 151Mob. +44 (0) 7973 831245   Int. +44 (0) 1287 653003 |
| email : [EMAIL PROTECTED]   [EMAIL PROTECTED] Web : http://www.iirc.net |
++
| The last person that quit or was fired will be held responsible for|
| everything that goes wrong -- until the next person quits or is fired. |
++

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] convert degrees to heading

2004-09-14 Thread Dave Restall - System Administrator,,,
Hi,

> Alternatively, try :-
> 
> $Compass = array('West', 'North Westerly', 'North', 'North Easterly',
>   'East', 'South Easterly', 'South',
>   'South Westerly');
> 
> print $Compass[round($Degrees / 45)] . "\n";
> 
> This can be expanded easily by adding 'North North West' etc. at the
> relevant points in the array and changing the 45 to 22.5.
> 
> No messy horrible switches :-)

Oh and I forgot to mention, it also deals fairly well with weird degrees
such as 48.7.

Dave
php/2004-09-14.2.tx[EMAIL PROTECTED],
   php-general,[EMAIL PROTECTED]
++
| Dave Restall,   IIRC Limited, PO Box 46, Skelton, Cleveland, TS12 2GT. |
| Tel. 0845 10 80 151Mob. +44 (0) 7973 831245   Int. +44 (0) 1287 653003 |
| email : [EMAIL PROTECTED]   [EMAIL PROTECTED] Web : http://www.iirc.net |
++
| Azh nazg durbatal^uk, azh nazg gimbatul, Azh nazg thrakatal^uk agh   |
| burzum ishi krimpatul! |
| -- J. R. R. Tolkien|
++

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] convert degrees to heading

2004-09-14 Thread Dave Restall - System Administrator,,,
Hi,

Alternatively, try :-

$Compass = array('West', 'North Westerly', 'North', 'North Easterly',
'East', 'South Easterly', 'South',
'South Westerly');

print $Compass[round($Degrees / 45)] . "\n";

This can be expanded easily by adding 'North North West' etc. at the
relevant points in the array and changing the 45 to 22.5.

No messy horrible switches :-)


TTFN,


Dave
php/2004-09-14.tx  [EMAIL PROTECTED],
   php-general,[EMAIL PROTECTED]
++
| Dave Restall,   IIRC Limited, PO Box 46, Skelton, Cleveland, TS12 2GT. |
| Tel. 0845 10 80 151Mob. +44 (0) 7973 831245   Int. +44 (0) 1287 653003 |
| email : [EMAIL PROTECTED]   [EMAIL PROTECTED] Web : http://www.iirc.net |
++
| One picture is worth more than ten thousand words. |
| -- Chinese proverb |
++

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Is a PECL a black whole?

2004-09-03 Thread Dave Restall - System Administrator,,,

> It took me a while to find an explanation of what a PECL is. I kept reading 
> comments about things being moved to a PECL but I saw nothing about what is 
> in a PECL or how to get anything out of a (the?) PECL. As far as I knew, 
> there is a danger of all of PHP being in a PECL.
> 
> I could not (and cannot) find an explanation of a PECL when I start by going 
> to the main php.net page and looking for one. So I searched for "PECL" and 
> got a few results; one result is for vpopmail:

Welcome to the club.  I sent a similar email about this a few days ago
and nobody replied.  I was looking for documentation on the fileinfo PECL
module which is recommended instead of mime_content_type, simple stuff like
what arguments does it take etc.  There is also a lack of documentation
for how to install and run and USE PECL modules which is worrying
especially if as you say a lot of PHP is going down the PECL path.

To me PECL looks like a major own goal.

Cue the flames for this being a PHP list and not a PECL list.

TTFN


Dave
php/2004-09-03.tx  [EMAIL PROTECTED]
   php-general
++
| Dave Restall,   IIRC Limited, PO Box 46, Skelton, Cleveland, TS12 2GT. |
| Tel. 0845 10 80 151Mob. +44 (0) 7973 831245   Int. +44 (0) 1287 653003 |
| email : [EMAIL PROTECTED]   [EMAIL PROTECTED] Web : http://www.iirc.net |
++
| I don't want people to love me.  It makes for obligations. |
| -- Jean Anouilh|
++

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Mime type and PECL::Fileinfo.

2004-08-29 Thread Dave Restall - System Administrator,,,
Hi,

PHP 4.3.8, Apache 1.3.31, Debian/GNU Linux

Is anybody using PECL extensions ?  I want to let people upload data to a
site I'm building and want to avoid using mime_content_type because from
the manual :-

"This extension has been deprecated as the PECL extension fileinfo
provides the same functionality (and more) in a much cleaner way."

After much messing about I eventually managed to work out how to install
the package :-

download Fileinfo from pecl.php.net
pear install ./Fileinfo

I had to install the magic library, libtools etc. before this would work.

My question now is, how do I call the fileinfo function and where do I
find any sensible documentation on it and what does it return ?

Currently, I'm downloading and installing the XML2 libs so I can install
php5 to see if it works any better :-(

This has to be the worst experience I have had with PHP, there just
seems to be no documentation on PECL aimed at an end user.

Regards,


Dave
php/2004-08-30.tx  php-general
++
| Dave Restall,   IIRC Limited, PO Box 46, Skelton, Cleveland, TS12 2GT. |
| Tel. 0845 10 80 151Mob. +44 (0) 7973 831245   Int. +44 (0) 1287 653003 |
| email : [EMAIL PROTECTED]   [EMAIL PROTECTED] Web : http://www.iirc.net |
++
| When you dig another out of trouble, you've got a place to bury your own.  |
++

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] looking for php talent...

2004-03-05 Thread Dave Restall - System Administrator,,,
Hi,

> we're looking for some PHP development talent. however, we don't want to
> post here if this is not the right group/list. please let us know if it
> is/isn't appropriate to post our requirements. if it is, we'll go ahead and
> post what we're looking for.

There seem to be a few lists available that cater for PHP jobs, has
anybody any experience of them ?  Is there a need for another one ?
If so, how should it be run ?

Let me know (preferably off list to cut down the OT stuff).

Regards,


Dave
mail/php/2004-03-05.tx php-general
++
| Dave Restall,   IIRC Limited, PO Box 46, Skelton, Cleveland, TS12 2GT. |
| Tel. +44 (0) 1287 639309 Mob. +44 (0) 7973 831245 Fax. +44 (0) 1287 635955 |
| email : [EMAIL PROTECTED]   [EMAIL PROTECTED] Web : http://www.iirc.net |
++
| PENGUINICITY!! |
++

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Do not use Apache 2.0 and PHP in a production environment neither on Unix nor on Windows.

2003-10-02 Thread Dave Restall - System Administrator
Hi,

not sure if this is the right place to ask but does anybody have any ideas
how long it will be before PHP/Apache 2 is considered stable enough to be
used in a production environment ?.  I set up a test box with them both on
nearly a year ago and the online documentation still cautions against use.

Are the problems with Apache or are they with PHP or is it a bit of both ?
Will PHP5 be any better ?

Regards,


Dave
mail/php/2003-10-01.tx php-general
++
| Dave Restall,   IIRC Limited, PO Box 46, Skelton, Cleveland, TS12 2GT. |
| Tel. +44 (0) 1287 639309 Mob. +44 (0) 7973 831245 Fax. +44 (0) 1287 635955 |
| email : [EMAIL PROTECTED]   [EMAIL PROTECTED] Web : http://www.iirc.net |
++
| I cannot conceive that anybody will require multiplications at the rate|
| of 40,000 or even 4,000 per hour ...   |
| -- F. H. Wales (1936)  |
++

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] If you ever had a Vic20

2003-08-15 Thread Dave Restall - System Administrator
Hi,

>   $found =3D 0;
>   while ($mydata =3D mysql_fetch_object($news))
>   {
>   if ($mydata->StudentId =3D=3D $StudentId)
>   {$found =3D 1;  break;}
>   }
> 
>   if ($found=3D=3D1){do this}else{do that}

Why not re-oganise your SQL statement so it only returns the required data ?.

"select * from table where StudentID = $StudentID";

if (mysql_num_rows() == 1)
do this;
else
do that;

Vic 20's were for wimps ;-)

TTFN


Dave
mail/php/2003-08-15.tx [EMAIL PROTECTED]
   [EMAIL PROTECTED]
   [EMAIL PROTECTED]
   [EMAIL PROTECTED]
++
| Dave Restall,   IIRC Limited, PO Box 46, Skelton, Cleveland, TS12 2GT. |
| Tel. +44 (0) 1287 639309 Mob. +44 (0) 7973 831245 Fax. +44 (0) 1287 635955 |
| email : [EMAIL PROTECTED]   [EMAIL PROTECTED] Web : http://www.iirc.net |
++
| I owe the public nothing.  |
| -- J.P. Morgan |
++


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Is there an RTFM for 'use strict' ?

2003-06-23 Thread Dave Restall - System Administrator
Hi,

Done a lot of Perl & PHP coding over the years and one thing I _really_
liked about Perl is its 'use strict;' directive.  For those of you not
familiar with Perl, this made the script die if you don't (among other
things) declare your variables before using them.

Once the fingers are flying, stupid typing mistakes often come in and
it is more often when a variable name is being typed.  It would be
interesting to see how many PHP coders out there have spent ages trying
to find a bug in their code that was due to them mis-spelling a variable
or method name.

Anyway, I can't find a reference to anything in the manual that will
force PHP to strictly check variable names etc. to see if they are
declared before use and if not throw up an error.

Can somebody tell me which M to FR ?

Regards,


Dave
mail/php/2003-06-23.tx php-general
++
| Dave Restall,   IIRC Limited, PO Box 46, Skelton, Cleveland, TS12 2GT. |
| Tel. +44 (0) 1287 639309 Mob. +44 (0) 7973 831245 Fax. +44 (0) 1287 635955 |
| email : [EMAIL PROTECTED]   [EMAIL PROTECTED] Web : http://www.iirc.net |
++
| No man's ambition has a right to stand in the way of performing a simple   |
| act of justice.|
| -- John Altgeld|
++


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] exif_read_data to read, and to write ...?

2002-07-09 Thread OISS Administrator

Hi,

I am making a script to generate counter image on the fly for the office

web site, and i have noticed that my dynamically generated jpeg images
bears following comment: "CREATOR: gd-jpeg v2.0 (using IJG JPEG v62),
quality = 100"

Does anyone know how to insert user defined comments into generated
images?

I looked around the net, and php API list, and found that i can only
read the JPEG header markers with exif_read_data. Is there a
exif_write_data function?

Thank you,
Alex


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] A weird problem / bug with concatenation operator in a class

2002-02-01 Thread Administrator

Yesterday I presented this problem to a local usergroup...

// the following lines are contained in a class 
// although I am echoing the value of $age from within the class
// this is only for testing during development. 
// $age will be assigned to [$this->age_Range] later in the code

$age = " AND ((YEAR(CURRENT_DATE)-YEAR(dob)) - (RIGHT(CURRENT_DATE,5)";
Output of the echo statement looks exactly like this...
AND ((YEAR(CURRENT_DATE)-YEAR(dob)) - (RIGHT(CURRENT_DATE,5)profile1();
echo "The value of [\$age] returned by 
\$myProfile->profile1()".$sql."";
echo "called from class profile using echo 
\$myProfile->age_Range".$myProfile->age_Range."";
$sql = $myProfile->profile2();
echo "The value [\$age] returned by 
\$myProfile->profile2()".$sql."";
echo "called from class profile using echo 
\$myProfile->age_Range".$myProfile->age_Range."";
class profile
{
var $age_Range;
var $minAge = 28;
var $maxAge = 42;
Function profile1() {
// orig code, no white space
$age = " AND ((YEAR(CURRENT_DATE)-YEAR(dob)) - (RIGHT(CURRENT_DATE,5)age_Range = $age;
echo "Echoed from IN class Profile, no white space";
echo $this->age_Range."";
Return ($age);
}
Function profile2() {
// added white space between "...) < RIGHT..."
$this->age_Range = " AND ((YEAR(CURRENT_DATE)-YEAR(dob)) - (RIGHT(CURRENT_DATE,5) < 
RIGHT(dob,5))";
$this->age_Range .= " BETWEEN '$this->minAge' AND '$this->maxAge')";
echo "Echoed from IN class Profile, white space added";
echo $this->age_Range."";
Return ($age);
}
}
?>



[PHP] Re: Getting started - what do I need?

2001-12-08 Thread administrator

Hi there,

I found this site very useful for lots of  "help-me-up-the-learning-curve" tutorials.

http://perl.about.com/cs/beginningphp/

C:o)


Indera wrote:

> Hello,
>
> I have never used php or mysql before and want to know what tools I should use so 
>that I can start
> learning php and mysql. I would like to build basic things like a login page and 
>forms that append
> the data to a database. I went to the bookstore and think the book PHP fast and easy 
>web development
> is something that I could handle. I've read through some of the posts on this news 
>group and
> realized that there are tools that I can use as front ends for these packages. I 
>went to mysql.com
> and php.net and it seems that i can download both of these packages to my computer 
>for free. Any
> help would be greatly appreciated.
>
> Thanks
> Indera


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Problem with enctype=multipart/form-data forms

2001-02-12 Thread System Administrator

Hi,

I'm having a weird problem with a recently upgraded box.
Its a RedHat + PHP4.0.4pl1-3 + Apache-1.3.14-3 box (All packages were 
installed from RedHat official RPMs)

I have a very simple form with enctype=multipart/form-data. This will allow 
some users to upload files. This code was working perfectly with previous 
versions and now that I've updated PHP and Apache I get he following:

After the submit, the script that receives field contents reports an extra 
\r BEFORE the real field content, indicated by users on previous script 
(with the form). With plain text fields it would be no problem, I can use 
ltrim and discard the extra \r, but what happens with the file field is 
more complicated, I can't trim this field, but with the extra \r it doens't 
validate as a valid file.

I've seen a post very similar in phpbuilder.com with the same exact problem 
and with the same exact versions of Apache/PHP. I don't exactly know if 
this a PHP issue or Apache problem. Maybe some of you could enlighnten me 
on this question.

TIA.

---
System Administrator ([EMAIL PROTECTED])
ZBit - Software, Lda. (http://www.zbit.pt)
Rua Ponte de Pau, N.ยบ 19
3510-100 VISEU
Tel./FAX: 232 428 753


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]