php-general Digest 2 Nov 2007 05:52:15 -0000 Issue 5105

2007-11-01 Thread php-general-digest-help
php-general Digest 2 Nov 2007 05:52:15 - Issue 5105 Topics (messages 263937 through 263956): Re: Function variables in classes 263937 by: Robert Cummings Re: Help with OOPHP (SOLVED) 263938 by: Andrew Peterson Re: Transfer query result to another script 263939 by:

[PHP] Function variables in classes

2007-11-01 Thread Paul van Haren
Hi there, I'm trying to execute function variables. This works fine outside class code, but gives a fatal error when run within a class. The demo code is here: ?php function bar1 () { echo Yep, in bar1() right now\n; } function foo1 () {

Re: [PHP] Function variables in classes

2007-11-01 Thread Ivar van der Burg
Try using parent::bar2(); instead of foobar::bar2(); Op 1-nov-2007, om 12:10 heeft Paul van Haren het volgende geschreven: Hi there, I'm trying to execute function variables. This works fine outside class code, but gives a fatal error when run within a class. The demo code is here:

[PHP] Re: Help with OOPHP

2007-11-01 Thread Sebastian Hopfe
Dear Andrew, I think normaly it isn't possible to use another class in a class, without using extends. But you should use your array as a container. After you use as a container, you can make new instance into a array field. Now you can use the content of the container to administrate the

Re: [PHP] Function variables in classes

2007-11-01 Thread Paul van Haren
I just did. The result is the same however Regards, Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Function variables in classes

2007-11-01 Thread Sebastian Hopfe
It seems to be a PHP Bug, because normaly it should very well. but you can solve this problem, by a workarround. using eval($a.();); instead of $a(); in the class. Best regards Sebastian Paul van Haren [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] Hi there, I'm trying to

[PHP] Re: Function variables in classes

2007-11-01 Thread Paul van Haren
Thanks, this helps. The code now works. In case this is truely a bug in PHP, where should I log it? Anything that I should do to make sure that it gets followed up? Regards, Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP Won't Access Files Outside Web Root (Leopard/MacOS X 10.5)

2007-11-01 Thread Rahul Sitaram Johari
Ave, Somehow my PHP won't access, won't even acknowledge the existence of a file that is outside the /Library/WebServer/Documents folder. This was never a a problem before in any Mac version - it just started with Leopard. I don't know what has changed where, in httpd.conf or php.ini or

[PHP] Re: Function variables in classes

2007-11-01 Thread Sebastian Hopfe
I think you should log it, because it seems to be, and you found this error. Regard Sebastian Paul van Haren [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] Thanks, this helps. The code now works. In case this is truely a bug in PHP, where should I log it? Anything that I

Re: [PHP] PHP Won't Access Files Outside Web Root (Leopard/MacOS X 10.5)

2007-11-01 Thread Robert Cummings
On Thu, 2007-11-01 at 09:06 -0400, Rahul Sitaram Johari wrote: Ave, Somehow my PHP won't access, won't even acknowledge the existence of a file that is outside the /Library/WebServer/Documents folder. This was never a a problem before in any Mac version - it just started with Leopard. I

Re: [PHP] Re: Function variables in classes

2007-11-01 Thread Nathan Nobbe
On 11/1/07, Sebastian Hopfe [EMAIL PROTECTED] wrote: I think you should log it, because it seems to be, and you found this error. i would not consider this a bug. what paul is asking about is the variable function syntax in php. http://www.php.net/manual/en/functions.variable-functions.php

Re: [PHP] Re: Email question

2007-11-01 Thread Daniel Brown
On 10/31/07, Jake [EMAIL PROTECTED] wrote: Jake wrote: while($begin $end) { if ($start == 'false') { if (empty($temp[$begin])) { $start = 'true'; } } else { $data .= chop($temp[$begin]) . \n; } $begin++;

Re: [PHP] PHP Won't Access Files Outside Web Root (Leopard/MacOS X 10.5)

2007-11-01 Thread Daniel Brown
On 11/1/07, Robert Cummings [EMAIL PROTECTED] wrote: On Thu, 2007-11-01 at 09:06 -0400, Rahul Sitaram Johari wrote: Ave, Somehow my PHP won't access, won't even acknowledge the existence of a file that is outside the /Library/WebServer/Documents folder. This was never a a problem before

Re: [PHP] PHP Won't Access Files Outside Web Root (Leopard/MacOS X 10.5)

2007-11-01 Thread Rahul Sitaram Johari
On 11/1/07 9:46 AM, Robert Cummings [EMAIL PROTECTED] wrote: On Thu, 2007-11-01 at 09:06 -0400, Rahul Sitaram Johari wrote: Ave, Somehow my PHP won't access, won't even acknowledge the existence of a file that is outside the /Library/WebServer/Documents folder. This was never a a problem

Re: [PHP] PHP Won't Access Files Outside Web Root (Leopard/MacOS X 10.5)

2007-11-01 Thread Rahul Sitaram Johari
On 11/1/07 10:22 AM, Daniel Brown [EMAIL PROTECTED] wrote: On 11/1/07, Robert Cummings [EMAIL PROTECTED] wrote: On Thu, 2007-11-01 at 09:06 -0400, Rahul Sitaram Johari wrote: Ave, Somehow my PHP won't access, won't even acknowledge the existence of a file that is outside the

Re: [PHP] PHP Won't Access Files Outside Web Root (Leopard/MacOS X 10.5)

2007-11-01 Thread Daniel Brown
On 11/1/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: 1.) Did you restart Apache after making any changes to php.ini or httpd.conf? 2.) The path is cAsE-sEnSiTiVe. Did you make sure that it's EXACTLY the same? 3.) Is any part of that symlinked, and if so, does Apache

Re: [PHP] Re: Function variables in classes

2007-11-01 Thread Jochem Maas
Sebastian Hopfe wrote: I think you should log it, because it seems to be, and you found this error. it's not a bug - especially because nobody has bothered to mention the php version. I'm guessing that it's being run on a version php5, in which case the fatal error seems correct - you have a

[PHP] Transfer query result to another script

2007-11-01 Thread C.R.Vegelin
Hi All, Q: Is it possible to transfer a query result to another script ? For example with (fragments of) the following 2 scripts: Engine.php $result = mysqli_query($connect, $myquery); if (!$result) error ... if (mysqli_num_rows($result) == 0) error ... $_SESSION['result'] =

Re: [PHP] Re: Function variables in classes

2007-11-01 Thread Nathan Nobbe
On 11/1/07, Jochem Maas [EMAIL PROTECTED] wrote: Sebastian Hopfe wrote: I think you should log it, because it seems to be, and you found this error. it's not a bug - especially because nobody has bothered to mention the php version. this issue has the same implications in php4 and php5,

Re: [PHP] Re: Function variables in classes

2007-11-01 Thread Robert Cummings
On Thu, 2007-11-01 at 16:10 +0100, Jochem Maas wrote: I've completely lost track of the state of the exact OO rules in any given version of php5) Haha, you too eh!? BTW, I finally bothered to download PHP 5.2.4 last night and checked it out. This is the first time I've seen a speed improvement

[PHP] Perl style chomp()

2007-11-01 Thread Jim Lucas
I noticed, while perusing the chop() manual page, that some people were giving examples of Perl's chop() and chomp() functions. Comments made about both said the examples were good, but not correct. A person gave an explanation of what the chomp() function did. So, I took it upon myself to

RE: [PHP] RE: Reaching the PHP mailing list owners

2007-11-01 Thread John Moss
Thanks, Alan - I probably should admit to being totally complacent! I haven't gone back to validate those pages for years (they 'appear' to work) and am chagrined to find so many errors! I have my work cut out for me - and honestly appreciate the time you've taken to provide feedback. Thank you

Re: [PHP] PHP Won't Access Files Outside Web Root (Leopard/MacOS X 10.5)

2007-11-01 Thread Rahul Sitaram Johari
On 11/1/07 10:41 AM, Daniel Brown [EMAIL PROTECTED] wrote: On 11/1/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: 1.) Did you restart Apache after making any changes to php.ini or httpd.conf? 2.) The path is cAsE-sEnSiTiVe. Did you make sure that it's EXACTLY the same? 3.)

Re: [PHP] Foreign Key Problem

2007-11-01 Thread Jochem Maas
Kulluji wrote: Hi Everybody, I am working in WAMP server for a small project. I am useing mysqlAdmin to create my tables. In this version of Mysql I am unable to set foreign key constraint. How do we do that? ask someone in on a mysql or phpmyadmin mailing list - we are not here to support

Re: [PHP] Re: Function variables in classes

2007-11-01 Thread Jochem Maas
Robert Cummings wrote: On Thu, 2007-11-01 at 16:10 +0100, Jochem Maas wrote: I've completely lost track of the state of the exact OO rules in any given version of php5) Haha, you too eh!? BTW, I finally bothered to download PHP 5.2.4 last night and checked it out. This is the first time

Re: [PHP] PHP Won't Access Files Outside Web Root (Leopard/MacOS X 10.5)

2007-11-01 Thread Daniel Brown
On 11/1/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: On 11/1/07 10:41 AM, Daniel Brown [EMAIL PROTECTED] wrote: On 11/1/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: 1.) Did you restart Apache after making any changes to php.ini or httpd.conf? 2.) The path is

[PHP] Foreign Key Problem

2007-11-01 Thread Kulluji
Hi Everybody, I am working in WAMP server for a small project. I am useing mysqlAdmin to create my tables. In this version of Mysql I am unable to set foreign key constraint. How do we do that? Thanks. Francis David Kullu -- View this message in context:

Re: [PHP] PHP Won't Access Files Outside Web Root (Leopard/MacOS X 10.5)

2007-11-01 Thread Rahul Sitaram Johari
On 11/1/07 12:17 PM, Daniel Brown [EMAIL PROTECTED] wrote: On 11/1/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Well FollowSymLinks was present in my httpd.conf, and it's definitely not the problem. I think the problem is the fact that on in Panther, I was able to specify Apache Web

Re: [PHP] Function variables in classes

2007-11-01 Thread Eric Butera
On Nov 1, 2007, at 7:10 AM, Paul van Haren wrote: Hi there, I'm trying to execute function variables. This works fine outside class code, but gives a fatal error when run within a class. The demo code is here: ?php function bar1 () { echo Yep, in bar1() right

Re: [PHP] PHP Won't Access Files Outside Web Root (Leopard/MacOS X 10.5)

2007-11-01 Thread Daniel Brown
On 11/1/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Is there a Terminal way of figuring out the UID/GID of something like admin, apache etcetera? PS: I know it's going OT! Yes, you'll find those UIDs in /etc/passwd. For example:

Re: [PHP] Function variables in classes

2007-11-01 Thread Nathan Nobbe
On 11/1/07, Eric Butera [EMAIL PROTECTED] wrote: I don't know if this has been said yet, but in 5.3 they added this: Dynamic static calls: $c = classname; $c::someMetod(); apparently it works in 5.2.4 as well: ?php class Foo { static public function staticMethod() { echo

Re: [PHP] Re: Function variables in classes

2007-11-01 Thread Robert Cummings
On Thu, 2007-11-01 at 17:16 +0100, Jochem Maas wrote: Robert Cummings wrote: On Thu, 2007-11-01 at 16:10 +0100, Jochem Maas wrote: I've completely lost track of the state of the exact OO rules in any given version of php5) Haha, you too eh!? BTW, I finally bothered to download PHP

Re: [PHP] Re: Help with OOPHP (SOLVED)

2007-11-01 Thread Andrew Peterson
I've figured it out :) Thanks for the help, I just need to walk away for a minute and come back to it. all I need to do is this: myClass.php -- ?PHP require mySecondClass.php; class myClass { /* Now I can create/edit/maninpulate/etc new and old instances of

Re: [PHP] Transfer query result to another script

2007-11-01 Thread David Giragosian
On 11/1/07, C.R.Vegelin [EMAIL PROTECTED] wrote: Hi All, Q: Is it possible to transfer a query result to another script ? For example with (fragments of) the following 2 scripts: Engine.php $result = mysqli_query($connect, $myquery); if (!$result) error ... if

Re: [PHP] Perl style chomp()

2007-11-01 Thread mike
On 11/1/07, Jim Lucas [EMAIL PROTECTED] wrote: I noticed, while perusing the chop() manual page, that some people were giving examples of Perl's chop() and chomp() functions. Comments made about both said the examples were good, but not correct. what about trim(), rtrim() and ltrim() ?

Re: [PHP] Perl style chomp()

2007-11-01 Thread Jim Lucas
mike wrote: On 11/1/07, Jim Lucas [EMAIL PROTECTED] wrote: I noticed, while perusing the chop() manual page, that some people were giving examples of Perl's chop() and chomp() functions. Comments made about both said the examples were good, but not correct. what about trim(), rtrim() and

Re: [PHP] Transfer query result to another script

2007-11-01 Thread Jim Lucas
C.R.Vegelin wrote: Hi All, Q: Is it possible to transfer a query result to another script ? For example with (fragments of) the following 2 scripts: Engine.php $result = mysqli_query($connect, $myquery); if (!$result) error ... if (mysqli_num_rows($result) == 0) error ...

Re: [PHP] PHP Won't Access Files Outside Web Root (Leopard/MacOS X 10.5)

2007-11-01 Thread Rahul Sitaram Johari
On 11/1/07 12:43 PM, Daniel Brown [EMAIL PROTECTED] wrote: On 11/1/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Is there a Terminal way of figuring out the UID/GID of something like admin, apache etcetera? PS: I know it's going OT! Yes, you'll find those UIDs in

[PHP] Threads

2007-11-01 Thread Stéphane Boisvert
Greetings everyone, I was wondering where I could find information on the status and possibilities of threads being included in PHP. Or if you are knowledge-able on the status of threads, if it is a planned addition or not and the reasons as such. I understand PHP is not thread safe, that the core

Re: [PHP] Foreign Key Problem

2007-11-01 Thread mlists
On Thu, 2007-11-01 at 09:05 -0700, Kulluji wrote: Hi Everybody, I am working in WAMP server for a small project. I am useing mysqlAdmin to create my tables. In this version of Mysql I am unable to set foreign key constraint. How do we do that? Thanks. Francis David Kullu -- View

Re: [PHP] Threads

2007-11-01 Thread Stut
Stéphane Boisvert wrote: Greetings everyone, I was wondering where I could find information on the status and possibilities of threads being included in PHP. Or if you are knowledge-able on the status of threads, if it is a planned addition or not and the reasons as such. I understand PHP is not

[PHP] Generating HTML table from MySQL table based on some criteria

2007-11-01 Thread Sudheer Satyanarayana
Hello, I have a MySQL table with four columns - userid, created_date, username and path_to_picture. path_to_picture column contains the path to the image files of those users who have uploaded pictures. An example path stored in path_to_picture column is picture/username.png. There are

Re: [PHP] Generating HTML table from MySQL table based on some criteria

2007-11-01 Thread Wolf
Sudheer, Post the code you are using and we'll better be able to point you in the right direction to get your code working. Wolf Sudheer Satyanarayana [EMAIL PROTECTED] wrote: Hello, I have a MySQL table with four columns - userid, created_date, username and path_to_picture.

RE: [PHP] Generating HTML table from MySQL table based on some criteria

2007-11-01 Thread Jay Blanchard
[snip] I have a MySQL table with four columns - userid, created_date, username and path_to_picture. path_to_picture column contains the path to the image files of those users who have uploaded pictures. An example path stored in path_to_picture column is picture/username.png. There are some

Re: [PHP] Generating HTML table from MySQL table based on some criteria

2007-11-01 Thread Jim Lucas
Jay Blanchard wrote: [snip] I have a MySQL table with four columns - userid, created_date, username and path_to_picture. path_to_picture column contains the path to the image files of those users who have uploaded pictures. An example path stored in path_to_picture column is

RE: [PHP] Threads

2007-11-01 Thread Instruct ICC
Greetings everyone, I was wondering where I could find information on the status and possibilities of threads being included in PHP. Or if you are knowledge-able on the status of threads, if it is a planned addition or not and the reasons as such. I understand PHP is not thread safe, that the

[PHP] Including GD inside HTML code

2007-11-01 Thread Alberto García Gómez
I trying to include some image generate for a function that use GD. eg.: function myfunct(){ [MY_CODE] } but when I call the function it generate me a lot of symbols, letters and numbers but no image. WHAT CAN I DO? PS.: I actually usgin a iframe to create the iomage in another .php page

Re: [PHP] PHP Won't Access Files Outside Web Root (Leopard/MacOS X 10.5)

2007-11-01 Thread Jim Lucas
Rahul Sitaram Johari wrote: Ave, Somehow my PHP won't access, won't even acknowledge the existence of a file that is outside the /Library/WebServer/Documents folder. This was never a a problem before in any Mac version - it just started with Leopard. I don't know what has changed where, in

Re: [PHP] Including GD inside HTML code

2007-11-01 Thread Jim Lucas
Alberto García Gómez wrote: I trying to include some image generate for a function that use GD. eg.: function myfunct(){ [MY_CODE] } but when I call the function it generate me a lot of symbols, letters and numbers but no image. WHAT CAN I DO? PS.: I actually usgin a iframe to create

RE: [PHP] Including GD inside HTML code

2007-11-01 Thread Instruct ICC
Alberto García Gómez wrote: I trying to include some image generate for a function that use GD. eg.: function myfunct(){ [MY_CODE] } but when I call the function it generate me a lot of symbols, letters and numbers but no image. WHAT CAN I DO? PS.: I

Re: [PHP] Re: Function variables in classes

2007-11-01 Thread Paul van Haren
OK guys, thanks for all your inputs. Based on your guidance, I have tested the following code with a series of variations: class foobar { function bar2 () { echo Yep, in bar2() right now\n; } public function foo2

Re: [PHP] Threads

2007-11-01 Thread Jochem Maas
Instruct ICC wrote: Greetings everyone, I was wondering where I could find information on the status and possibilities of threads being included in PHP. Or if you are knowledge-able on the status of threads, if it is a planned addition or not and the reasons as such. I understand PHP is not