Re: [PHP] OOP Newbie - why does this not work?

2005-10-21 Thread Jesper Gran
On 2005-10-21 06:17, Stephen Leaf wrote: most likely var is depreciated in php5. (can someone confirm this?) Well, if I try to use Var in a class i get this message: Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in C:\code\test\var.php on line 3*

Re: [PHP] OOP Newbie - why does this not work?

2005-10-21 Thread Jochem Maas
Bob, 'wrapping' you class definition within HTML like you have done is not only weird but down right ugly. I recommend sticking each class you write in a seperate file and using include_once() or require_once() before you output anything to the browser. basically try to seperate you code into

Re: [PHP] PHP and files Upload

2005-10-21 Thread Andy Pieters
Hi As a security precaution, all uploaded files are automatically deleted when the script goes out of scope. Use the move_uploaded_file function to move the file somewhere else before your script ends. There are various other security precautions you have to consider. And by all means don't

Re: [PHP] How can I count the usage of mail function in scripts?

2005-10-21 Thread Andy Pieters
Hi While it *is* possible to do what you ask for, it would be worthless. I can write from scratch a php script that * looks up the mx record for a given email address * connects to the mail server looked up * send the message. Since the SMTP protocol is fairly simple, I am sure many others can

[PHP] Preference for User Permissions system

2005-10-21 Thread Richard Davey
Hi php-general, I'm interested to know what everyones preference is for user permissions / roles in php apps? For example do you employ a Unix style groups system, is there a ready-rolled class or package you use, or have you just built your own and stick with it? Cheers, Rich -- Zend

Re: [PHP] LDAP and a pain in my neck

2005-10-21 Thread Jochem Maas
André Medeiros wrote: Check your webserver logs. If PHP couldn't use the extension, it will accuse that in the logs. probably the best use of the word 'accuse' ever (with a slight nod to commercials for Carlsberg lager :-) On 10/20/05, Jay Blanchard [EMAIL PROTECTED] wrote: [snip]

[PHP] Re: Preference for User Permissions system

2005-10-21 Thread James Benson
What I do is have different classes that build upon each other, authentication permissions class, common database access extending PEAR DB. then i have a custom class for specific actions like editing pages, my database is just either either an email or username and password then another

Re: [PHP] php 5.0.5 segfaults apache2 on ubuntu, 5.0.4 ok

2005-10-21 Thread Jon Hill
I think this could be related to your _destruct method Can't you just rely on the parent class destruct method? Sorry to be a bit vague, I'll look into it a little further. Jon I've just installed php 5.0.5 to newest ubuntu breezy and apache2 started (sometimes) segfaulting (teste two computers

[PHP] Designing a complicated multipage form with sessions

2005-10-21 Thread Andy Pieters
Hi List I am quite experienced in PHP. I have been asked to design a complicated form in php that spans multiple pages and has many subitems. For instance if they select one checkbox, more details are required in the form of a dropdown list or radio buttons. It would allow browsing the

Re: [PHP] Designing a complicated multipage form with sessions

2005-10-21 Thread Raz
One definite thing to look out for is multiple submission of forms... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: OOP Newbie - why does this not work?

2005-10-21 Thread John Taylor-Johnston
Here,s my guess: var $liveclass; $liveclass = new(Test); echo $liveclass-get() ; echo BR ; echo This is in the php code block ; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[suspicious - maybe spam] [PHP] [suspicious - maybe spam]

2005-10-21 Thread womodi4
$B(.(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(B $B4|4V8BDj(BPC$B%=%U%HHNGd(B $B(1(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(B $B!!M_$7$+$C$?$$N%=%U%H$,$3$N2A3J!*(B $B!!Cf$K$O(B100$BK|1_0Je$b$9$k%=%U%H$,!D6C$-$N$3$N2A3J!*(B

Re: [PHP] php 5.0.5 segfaults apache2 on ubuntu, 5.0.4 ok

2005-10-21 Thread Petr Smith
Hi, thanks! that was it! when destruct method is removed, all problems are gone. I really don't know why I added the __destruct method to this mysql wrapper. Maybe I saw it somewhere in discussion at php manual bottom This code segfaults my apache: ?php class test extends mysqli {

Re: [PHP] OOP Newbie - why does this not work?

2005-10-21 Thread Stephen Leaf
would have to be. http://smileaf.org/bob.php as you can see it's working great. did make few more changes: class Test { public $saying = ; function __construct() {

RE: [PHP] Re: OOP Newbie - why does this not work?

2005-10-21 Thread Nathan Tobik
You have to show us the definition for your class, also your syntax for new is wrong. It should be: $liveclass = new Test(); Nate Tobik (412)661-5700 x206 VigilantMinds -Original Message- From: John Taylor-Johnston [mailto:[EMAIL PROTECTED] Sent: Friday, October 21, 2005 7:57 AM To:

Re: [PHP] Re: OOP Newbie - why does this not work?

2005-10-21 Thread Jochem Maas
Nathan Tobik wrote: You have to show us the definition for your class, also your syntax for new is wrong. It should be: $liveclass = new Test(); it can also be (if you have nothing to pass to the constructor function): $liveclass = new Test; Nate Tobik (412)661-5700 x206 VigilantMinds

Re: [PHP] Re: OOP Newbie - why does this not work?

2005-10-21 Thread Andy Pieters
While the use of () or not doesn't impede the function of his code, I consider it good programming habit to always add () to the class creator. Since it is considered a function, you wouldn't call a function like x=function but rather x=function(). It is more consistent that way. On Friday

[PHP] compile issue.

2005-10-21 Thread Mark Nernberg
This is a repost, as I have received no response thus far. Running FreeBSD 5.4/RELEASE on Sparc64 and Apache 2.0.55 When attempting to install 4.4.0 or 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] The

[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-21 Thread Mark Nernberg
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

Re: [PHP] php 5.0.5 segfaults apache2 on ubuntu, 5.0.4 ok

2005-10-21 Thread Jon Hill
Accessing this page means immeadiate apacha segfault and actual connection close. Anybody please test this on 5.0.5 and verify if it's reproducible. I am running PHP 5.0.5 on Apache 2 and get the following in my error log if I include the destruct method. Jon *** glibc detected ***

[PHP] Adding the php extension in windows XP with Iis Version 5.1

2005-10-21 Thread Hinojosa, Robert
Does anyone know why I cannot add the php or any extension in the application mappings? When selecting Add and then trying to insert the new extension the Ok button is always grayed out so it does not allow me to insert a new ext.

Re: [PHP] Designing a complicated multipage form with sessions

2005-10-21 Thread Derek Williams
Andy Pieters wrote: Hi List I am quite experienced in PHP. I have been asked to design a complicated form in php that spans multiple pages and has many subitems. For instance if they select one checkbox, more details are required in the form of a dropdown list or radio buttons. It would

[PHP] Submit/Validate triggering problem.

2005-10-21 Thread Uros Dukanac
Dear anyone... :) First, I hope I'm sending this message to correct address. If this is not the case I'm apologizing for wasting your time, and I'm asking you to give me the right e-mail address. === GENERAL LAMP Environment PEAR - HTML_QuickForm 3.2.4pl1 stable Platform: SuSE 9.3

Re: [PHP] Modular Authoring System

2005-10-21 Thread Derek Williams
Sascha, We're starting work on a similar (to be open sourced) project, XML/XSLT based. We're also putting together a process creation and tracking mechanism. I would be glad to take a look at the design and code. We have a great XSLT programmer. Sascha Braun wrote: Hi, I am now working

[PHP] Declaring vars as INT ?

2005-10-21 Thread Chris Knipe
Hi, Uhm... Let's take the below quickly: Function DoSomething($Blah) { $Blah = (int) $Blah; return $Blah } $Blah, cannot be larger than 2147483647, and sometimes, I get negative integers back from the above function. This is with PHP 4.4.0 on FreeBSD 5.4-STABLE. Can anyone else perhaps

Re: [PHP] Declaring vars as INT ?

2005-10-21 Thread Jasper Bryant-Greene
On Fri, 2005-10-21 at 21:39 +0200, Chris Knipe wrote: Function DoSomething($Blah) { $Blah = (int) $Blah; return $Blah } $Blah, cannot be larger than 2147483647, and sometimes, I get negative integers back from the above function. This is with PHP 4.4.0 on FreeBSD 5.4-STABLE. Can

RE: [PHP] Declaring vars as INT ?

2005-10-21 Thread Chris Knipe
Aha :) Thanks. -Original Message- From: Jasper Bryant-Greene [mailto:[EMAIL PROTECTED] Sent: 21 October 2005 22:04 To: [EMAIL PROTECTED] Cc: php-general@lists.php.net Subject: Re: [PHP] Declaring vars as INT ? On Fri, 2005-10-21 at 21:39 +0200, Chris Knipe wrote: Function

Re: [PHP] Declaring vars as INT ?

2005-10-21 Thread Jordan Miller
Hello, you could treat your variable as a string, and use the is_numeric() function (but this will include floats, too). To answer your question precisely and accurately, you may have to do regex matching since you are out of the bounds of int. However, why, *exactly*, are you trying to

Re: [PHP] Declaring vars as INT ?

2005-10-21 Thread Jordan Miller
Also, look at this function: http://www.php.net/ctype_digit Jordan On Oct 21, 2005, at 2:39 PM, Chris Knipe wrote: Hi, Uhm... Let's take the below quickly: Function DoSomething($Blah) { $Blah = (int) $Blah; return $Blah } $Blah, cannot be larger than 2147483647, and sometimes, I get

[PHP] Ugh, w32 anything is making me want to drink!

2005-10-21 Thread Jay Blanchard
IIS5 on W2K PHP 4.4.n php_curl.dll is not commented. libeay32.dll AND ssleay32.dll are in the system folder (system32 too, just in case) path to the extensions is correct Fatal error: Call to undefined function: curl_init() in E:\sitegrp1\TEST20051010\curltest.php on line 3 ack! Can anyone

Re: [PHP] Ugh, w32 anything is making me want to drink!

2005-10-21 Thread Jasper Bryant-Greene
On Fri, 2005-10-21 at 15:11 -0500, Jay Blanchard wrote: IIS5 on W2K PHP 4.4.n php_curl.dll is not commented. libeay32.dll AND ssleay32.dll are in the system folder (system32 too, just in case) path to the extensions is correct Fatal error: Call to undefined function: curl_init() in

RE: [PHP] Ugh, w32 anything is making me want to drink!

2005-10-21 Thread Jay Blanchard
[snip] Done a phpinfo() to see if the CURL extension is really getting loaded? Is your extension_dir (or whatever it's called) correct in php.ini? The other thing that's caught me out when I've been forced to use that degenerate platform, is that sometimes PHP is using a different php.ini from

Re: [PHP] Ugh, w32 anything is making me want to drink!

2005-10-21 Thread John Nichel
Jay Blanchard wrote: [snip] Done a phpinfo() to see if the CURL extension is really getting loaded? Is your extension_dir (or whatever it's called) correct in php.ini? The other thing that's caught me out when I've been forced to use that degenerate platform, is that sometimes PHP is using a

RE: [PHP] Ugh, w32 anything is making me want to drink!

2005-10-21 Thread Jay Blanchard
[snip] I just noticed that extension_dir in phpinfo is c:\php4 THAT AIN'T RIGHT! Why is PHP not loading the proper ini file? This is probably the source of my problems all along! ACK! This is what happens when you go over to the dark side. [/snip] It's not my fault! How do I fix this?

Re: [PHP] Ugh, w32 anything is making me want to drink!

2005-10-21 Thread Derek Williams
Probably a really dumb question: Is php_curl.dll available? Jay Blanchard wrote: IIS5 on W2K PHP 4.4.n php_curl.dll is not commented. libeay32.dll AND ssleay32.dll are in the system folder (system32 too, just in case) path to the extensions is correct Fatal error: Call to undefined function:

Re: [PHP] Ugh, w32 anything is making me want to drink!

2005-10-21 Thread Jordan Miller
I agree with John. It looks like you either need a hammer or the rooftop of a 5-story building... Jordan On Oct 21, 2005, at 3:26 PM, Jay Blanchard wrote: [snip] I just noticed that extension_dir in phpinfo is c:\php4 THAT AIN'T RIGHT! Why is PHP not loading the proper ini file? This is

Re: [PHP] Ugh, w32 anything is making me want to drink!

2005-10-21 Thread John Nichel
Jay Blanchard wrote: [snip] I just noticed that extension_dir in phpinfo is c:\php4 THAT AIN'T RIGHT! Why is PHP not loading the proper ini file? This is probably the source of my problems all along! ACK! This is what happens when you go over to the dark side. [/snip] It's not my

RE: [PHP] Ugh, w32 anything is making me want to drink!

2005-10-21 Thread Jasper Bryant-Greene
On Fri, 2005-10-21 at 15:26 -0500, Jay Blanchard wrote: [snip] I just noticed that extension_dir in phpinfo is c:\php4 THAT AIN'T RIGHT! Why is PHP not loading the proper ini file? This is probably the source of my problems all along! ACK! This is what happens when you go over to

RE: [PHP] Ugh, w32 anything is making me want to drink!

2005-10-21 Thread Jay Blanchard
[/snip] Hell if I know, I haven't touched a Windows machine in years. Move the ini file you want it to read to the location it's looking in? You could symbolic link itoops...wait...no, you can't. ;) [/snip] The ini file IS in the location where phpinfo says that it is reading from --

[PHP] private properties problem

2005-10-21 Thread Pablo Godel
Today I discovered a possible serious problem with the way the latest PHP versions handle private properties. Given the following code: ?php class Base { private $var1 = 0; } class FinalClass extends Base { function Test() { $this-var1 = 10; } } $c = new FinalClass();

RE: [PHP] Ugh, w32 anything is making me want to drink!

2005-10-21 Thread Jay Blanchard
[snip] I haven't used Windows for a while, but Start-Search-Files folders (or something like that) and enter php.ini. Delete all results except the one that you've been editing, and then move the one you've been editing around the following folder until you find the one in which it works: c:\php

RE: [PHP] Ugh, w32 anything is making me want to drink!

2005-10-21 Thread tg-php
Search the machine for php.ini, I'm guessing that you'll find one in your main PHP directory as well as in your main Windows directory. I believe the Windows directory copy is read first. I'm not sure why. At any rate, if it looks like it's reading the wrong copy of PHP.ini, searching your

RE: [PHP] Ugh, w32 anything is making me want to drink!

2005-10-21 Thread Jay Blanchard
[snip] Also3, since you've come over to the dark side as it where :), I'd recommend getting on the PHP Windows mailing list as well since some of your problems are going to be Windows specific and there may be people there with more experience. Good luck Jay! [/snip] There's a PHP Windows

RE: [PHP] Ugh, w32 anything is making me want to drink!

2005-10-21 Thread Jasper Bryant-Greene
On Fri, 2005-10-21 at 15:43 -0500, Jay Blanchard wrote: [snip] I haven't used Windows for a while, but Start-Search-Files folders (or something like that) and enter php.ini. Delete all results except the one that you've been editing, and then move the one you've been editing around the

RE: [PHP] Ugh, w32 anything is making me want to drink!

2005-10-21 Thread Chris W. Parker
Jordan Miller mailto:[EMAIL PROTECTED] on Friday, October 21, 2005 1:32 PM said: I agree with John. It looks like you either need a hammer or the rooftop of a 5-story building... zooom!How is he supposed to smash a computer with the rooftop of a 5-story building? It's too big!!/zooom! --

Re: [PHP] Ugh, w32 anything is making me want to drink!

2005-10-21 Thread John Nichel
Jay Blanchard wrote: [snip] Also3, since you've come over to the dark side as it where :), I'd recommend getting on the PHP Windows mailing list as well since some of your problems are going to be Windows specific and there may be people there with more experience. Good luck Jay! [/snip]

RE: [PHP] Ugh, w32 anything is making me want to drink!

2005-10-21 Thread Jay Blanchard
[snip] I agree with John. It looks like you either need a hammer or the rooftop of a 5-story building... zooom!How is he supposed to smash a computer with the rooftop of a 5-story building? It's too big!!/zooom! [/snip] By dropping the five story building upside down on to the serverduh!

Re: [PHP] private properties problem

2005-10-21 Thread Colin Shreffler
I'm not sure this is a problem. I ran the same test and as you say, it dynamically created a new variable with local scope to the derived (child) class. I would expect this to happen as it can not access private members of its base (parent) class. In your statement: But when trying to access

Re: [PHP] compile issue.

2005-10-21 Thread Greg Maruszeczka
Mark Nernberg wrote: This is a repost, as I have received no response thus far. Running FreeBSD 5.4/RELEASE on Sparc64 and Apache 2.0.55 When attempting to install 4.4.0 or 5.0.5, from ports or from source, I am getting the following error: (This specific error is from 4.4.0 from ports

Re: [PHP] SCRIPT_NAME

2005-10-21 Thread Minuk Choi
... what, the off by one error? Hey, I was just providing suggestion off the top of my head. :-P -Minuk Robert Cummings wrote: On Thu, 2005-10-20 at 23:27, Minuk Choi wrote: Off the top of my head... $filename = $_SERVER['PHP_SELF']; $strippedFilename = substr($filename,

Re: [PHP] SCRIPT_NAME

2005-10-21 Thread Robert Cummings
On Fri, 2005-10-21 at 19:58, Minuk Choi wrote: ... what, the off by one error? Hey, I was just providing suggestion off the top of my head. :-P Oh I know, I was just pointing out that it won't work :) Doesn't work because it only strips off the first path segment (assuming no off by one error

Re: [PHP] SCRIPT_NAME

2005-10-21 Thread Jasper Bryant-Greene
On Fri, 2005-10-21 at 21:01 -0400, Robert Cummings wrote: Oh I know, I was just pointing out that it won't work :) Doesn't work because it only strips off the first path segment (assuming no off by one error also ;). For instance: /a/b/c/d/foo.php becomes: a/b/c/d/foo.php

[PHP] rtrim Null characters

2005-10-21 Thread Richard Lynch
So, for fun, (well, *MY* idea of fun) I implemented a dirt-simple CAPTCHA. The image is totally OCR-able, but anybody wants to work that hard at it can have at it. That's modular enough to (really) fix later anyway/ After lots of encryption/decryption with urlencoding, htmlentities, and

Re: [PHP] rtrim Null characters

2005-10-21 Thread Jasper Bryant-Greene
On Fri, 2005-10-21 at 20:45 -0500, Richard Lynch wrote: Anyway, my question is, what is the morally correct function to use to remove these null characters from the end of my string? I'm guessing 'rtrim' would work, but is a NUL char really whitespace? I think rtrim() is probably your best

Re: [PHP] SCRIPT_NAME

2005-10-21 Thread Robert Cummings
On Sat, 2005-10-22 at 10:02, Jasper Bryant-Greene wrote: On Fri, 2005-10-21 at 21:01 -0400, Robert Cummings wrote: Oh I know, I was just pointing out that it won't work :) Doesn't work because it only strips off the first path segment (assuming no off by one error also ;). For instance:

[PHP] Email Validation built-in? RFC

2005-10-21 Thread Richard Lynch
Given: It is unacceptable to reject perfectly valid email addresses, no matter how arcane. [Like mine. :-)] The CORRECT RegEx for validating an email is 3 pages long, and performance in PHP would probably not be so good... In today's Security-conscious world, data validation is a requirement.

Re[2]: [PHP] Ugh, w32 anything is making me want to drink!

2005-10-21 Thread Tom Rogers
Hi, Saturday, October 22, 2005, 6:26:57 AM, you wrote: JB [snip] I just noticed that extension_dir in phpinfo is c:\php4 THAT AIN'T RIGHT! Why is PHP not loading the proper ini file? This is probably the source of my problems all along! ACK! JB This is what happens when you go over to

[PHP] Pear File_Archive examples or _good_ documentation?

2005-10-21 Thread Tim Rupp
The authors site is unreachable so I cant check it for examples, but last I remember he didnt have very good examples to begin with. Does anyone, who's used this package have decent examples that showcase how to use it and use it well? In particular I'm looking for info on how to extract