Re: [PHP] Apply the hyper link ( javascript functon ) with php

2006-10-11 Thread Andrei
Make sure your $dir variable isn't containing the path to your file from your OS file system. This should be an apache (or whatever) path (an URL). Andy [EMAIL PROTECTED] wrote: Richard Lynch wrote: On Sun, October 8, 2006 6:53 pm, [EMAIL PROTECTED] wrote: How to apply the following

Re: [PHP] ftp_put and ftp_chmod does not work

2006-10-11 Thread Chris
When safe mode is enabled, PHP checks whether the files or directories you are about to operate on have the same UID (owner) as the script that is being executed. In addition, you cannot set the SUID, SGID and sticky bits. It means that the UID (owner) of the folder ought to be the apache

Re: [PHP] need help to build a query

2006-10-11 Thread Ivo F.A.C. Fokkema
On Tue, 10 Oct 2006 14:22:54 -0500, Richard Lynch wrote: On Mon, October 9, 2006 2:58 pm, John Wells wrote: On 10/9/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: but I know there must be much better solution then this one. You're right: Simply JOIN your queries... SELECT order_id,

Re: [PHP] foreach

2006-10-11 Thread Ivo F.A.C. Fokkema
On Tue, 10 Oct 2006 14:34:54 -0400, John Nichel wrote: Chris Boget wrote: $last = end ( $numbers ); reset ( $numbers ); I thought foreach() already performed a reset()? Why do it again here? Well, corn my fritters, according to TFM, it does this indeed. Maybe an old dog can learn

Re: [PHP] ereg_replace with user defined function?

2006-10-11 Thread Frank Arensmeier
10 okt 2006 kl. 19.25 skrev Roman Neuhauser: # [EMAIL PROTECTED] / 2006-10-09 22:01:34 +0200: Thank you Ilaria and Roman for your input. I did not know that preg is able to deal with PCRE patterns. preg is obviously short for Perl REGular expressions, while PCRE positively means

Re: [PHP] Re: moving to other web server

2006-10-11 Thread David Robley
Chris wrote: David Robley wrote: Afan Pasalic wrote: hi to all, we are moving our web server from one to other hosting company. we have chance to request what version of php i want to be installed, 4 or 5. Current web server works on php 4.3.4 we don't use any classes, functions only. as

Re: [PHP] Re: moving to other web server

2006-10-11 Thread Chris
David Robley wrote: Chris wrote: David Robley wrote: Afan Pasalic wrote: hi to all, we are moving our web server from one to other hosting company. we have chance to request what version of php i want to be installed, 4 or 5. Current web server works on php 4.3.4 we don't use any classes,

Re: [PHP] ereg_replace with user defined function?

2006-10-11 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-10-11 09:52:51 +0200: 10 okt 2006 kl. 19.25 skrev Roman Neuhauser: # [EMAIL PROTECTED] / 2006-10-09 22:01:34 +0200: Thank you Ilaria and Roman for your input. I did not know that preg is able to deal with PCRE patterns. preg is obviously short for Perl

Re: [PHP] Seperate HTML from PHP

2006-10-11 Thread Glenn Richmond
Yes - separation of HTML and PHP code is not really a question of speed or efficiency. It's about coding style. Combining the two together might be fine for small projects, but when that project grows and grows, the readability of your code deteriorates if you don't separate the languages, not to

[PHP] RE: Seperate HTML from PHP

2006-10-11 Thread Jürgen Wind
brilliant! -- View this message in context: http://www.nabble.com/Seperate-HTML-from-PHP-tf2415209.html#a6753706 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] OOP slow -- am I an idiot?

2006-10-11 Thread Chris de Vidal
--- Johan Martin [EMAIL PROTECTED] wrote: You should look into getting Professional PHP5 by Lecky-Thompson, Eide-Goodman, Nowicki and Cove from WROX. ... The collection class in chapter 5 discusses a programming problem just like yours. I will look into that, thank you. CD Think

Re: [PHP] OOP slow -- am I an idiot?

2006-10-11 Thread Chris de Vidal
--- Larry Garfield [EMAIL PROTECTED] wrote: For your rudimentary example of object-relational mapping below, yes, performance is going to be atrocious. That's because you're not taking any advantage of the features that using OOP gives you. Well, I /thought/ I was taking advantage of black

Re: [PHP] OOP slow -- am I an idiot?

2006-10-11 Thread Satyam
- Original Message - From: Chris de Vidal [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Wednesday, October 11, 2006 12:42 PM Subject: Re: [PHP] OOP slow -- am I an idiot? --- Johan Martin [EMAIL PROTECTED] wrote: You should look into getting Professional PHP5 by

Re: [PHP] foreach

2006-10-11 Thread Jo�o C�ndido de Souza Neto
Thanks for your tip, but unfortunately it wouldn´t help me. Richard Lynch [EMAIL PROTECTED] escreveu na mensagem news:[EMAIL PROTECTED] On Tue, October 10, 2006 1:14 pm, João Cândido de Souza Neto wrote: $numbers=array(1,2,3,4,5); foreach ($numbers as number) { ... } Inside foreach,

Re: [PHP] ereg_replace with user defined function?

2006-10-11 Thread Frank Arensmeier
Thanks again for your suggestions. Actually, - believe it or not - I have never written a class (I am still learning PHP after three years working with that language). So I am not quite sure of the benefits of your class. One thing I do realise is the benefit of replacing the foreach loop

Re: [PHP] Re: moving to other web server

2006-10-11 Thread afan
no. there is no such variable name in my code. Afan Pasalic wrote: hi to all, we are moving our web server from one to other hosting company. we have chance to request what version of php i want to be installed, 4 or 5. Current web server works on php 4.3.4 we don't use any classes,

Re: [PHP] Re: moving to other web server

2006-10-11 Thread Dave Goodchild
$this is a bad choice of variable name!

Re: [PHP] ereg_replace with user defined function?

2006-10-11 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-10-11 14:28:21 +0200: Actually, - believe it or not - I have never written a class (I am still learning PHP after three years working with that language). So I am not quite sure of the benefits of your class. Nevermind then. I don't know how to fit my

RE: [PHP] Re: Understanding persistent connections with oci8

2006-10-11 Thread Bauer, Jay W
Hi Richard, Yes there have been some trigger-happy, bug-bogus-marking going on, but that happens. And yes, this stays alive without anything going on. And we have tested your other wrinkle and that is how we have been able to end the persistent connections by making connections to a

Re: [PHP] Stored procs and transactions using Linux/PHP and Windows/MSSQL

2006-10-11 Thread Rick Emery
Quoting Chris [EMAIL PROTECTED]: Rick Emery wrote: Is anyone using PHP5 on Linux to connect to MS SQL Server 2000 on Windows and execute stored procedures with output parameters within a transaction? If so, how? I'm trying to do something like this in the PHP application: begin

Re: [PHP] Disable all caching

2006-10-11 Thread tedd
At 11:17 AM -0400 10/10/06, Benjamin Adams wrote: I have a php (ver 4.x) script that is being cached. I have placed: META HTTP-EQUIV=CACHE-CONTROL CONTENT=NO-CACHE but the page is still being cached. I'm not sure if its apache or the php. How can I disable all caching? is there something I

[PHP] Can i take the variable name in a function?

2006-10-11 Thread Jônata Tyska Carvalho
How can i take the variable name inside a function, ex: definition: function example( $ex ){ echo Variable Name is $ex ; // how to do this? } use: example($ball); output: Variable Name is ball; another: example($sportCar); output: Variable Name is sportCar; is that possible? --

Re: [PHP] Re: moving to other web server

2006-10-11 Thread tedd
At 2:32 PM +0100 10/11/06, Dave Goodchild wrote: $this is a bad choice of variable name! $what is a bad choice of variable name? :-) tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Re: moving to other web server

2006-10-11 Thread Dave Goodchild
$this is

Re: [PHP] [JOB] PHP Book Tech Reviewer

2006-10-11 Thread tedd
At 3:53 PM -0400 10/10/06, Larry E. Ullman wrote: I'm currently writing the second edition of my PHP Advanced book and need a technical reviewer. It is a paid job and some people think it's interesting/looks good on a resume/etc. Obviously you'll need to be an expert in PHP and pay close

Re: [PHP] PHP Mailer and SMTP = SPAM?

2006-10-11 Thread tedd
At 5:30 PM + 10/10/06, Roman Neuhauser wrote: How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. Troll. tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing

Re: [PHP] Re: moving to other web server

2006-10-11 Thread afan
currently using mysql 4.0.18. want to move to 5.0 (latest stable version for commercil use). is there anytihng I have to be considered DB will not work? thanks. no. there is no such variable name in my code. Afan Pasalic wrote: hi to all, we are moving our web server from one to other

RE: [PHP] Re: Understanding persistent connections with oci8

2006-10-11 Thread Bauer, Jay W
Hello everyone, I followed up on Richards suggested new-wrinkle and automated the time recording a bit better than before. Here is what I did and the results: This time I first enabled the access_log on maggie, so I had that history, and used browser windows to connect to

Re: [PHP] Question about Arrays

2006-10-11 Thread tedd
At 7:04 PM +0100 10/10/06, Alex Major wrote: Hi List. I have a table, which contains 'setting' information for my website. The table has the following columns: setting_id, setting_name and setting_value. Now there are currently 30 settings stored in this table, however i am having trouble

Re: [PHP] moving to other web server

2006-10-11 Thread Jochem Maas
Afan Pasalic wrote: hi to all, we are moving our web server from one to other hosting company. we have chance to request what version of php i want to be installed, 4 or 5. Current web server works on php 4.3.4 we don't use any classes, functions only. as far as I know, in our case moving

Re: [PHP] Can i take the variable name in a function?

2006-10-11 Thread Jochem Maas
Jônata Tyska Carvalho wrote: How can i take the variable name inside a function, ex: definition: function example( $ex ){ echo Variable Name is $ex ; // how to do this? } use: example($ball); output: Variable Name is ball; another: example($sportCar); output: Variable

Re: [PHP] Can i take the variable name in a function?

2006-10-11 Thread Andy Hultgren
Would something like this work? Definition: function example($$ex) { echo Variable Name is $ex; } example($ball); I'm fairly new to php and not so familiar with variable variables, but I thought I'd throw it out there as a thought! Andy On 10/11/06, Jochem Maas [EMAIL PROTECTED] wrote:

Re: [PHP] Can i take the variable name in a function?

2006-10-11 Thread Jochem Maas
Andy Hultgren wrote: Would something like this work? did you try it? ;-) it won't work Definition: function example($$ex) { echo Variable Name is $ex; } example($ball); I'm fairly new to php and not so familiar with variable variables, but I thought I'd throw it out there

Re: [PHP] Can i take the variable name in a function?

2006-10-11 Thread Andy Hultgren
u no... I suppose I should have though! :) On 10/11/06, Jochem Maas [EMAIL PROTECTED] wrote: Andy Hultgren wrote: Would something like this work? did you try it? ;-) it won't work Definition: function example($$ex) { echo Variable Name is $ex; } example($ball); I'm

Re: [PHP] Can i take the variable name in a function?

2006-10-11 Thread Andy Hultgren
Check this out: http://www.php.net/manual/en/functions.arguments.php Specifically this example: Making arguments be passed by reference By default, function arguments are passed by value (so that if you change the value of the argument within the function, it does not get changed outside of

Re: [PHP] Can i take the variable name in a function?

2006-10-11 Thread Eric Butera
On 10/11/06, Andy Hultgren [EMAIL PROTECTED] wrote: ?php function add_some_extra($string) { $string .= 'and something extra.'; } $str = 'This is a string, '; add_some_extra($str); echo $str;// outputs 'This is a string, and something extra.' ? I think that does what you want? In the

Re: [PHP] Can i take the variable name in a function?

2006-10-11 Thread Eric Butera
On 10/11/06, Paul Scott [EMAIL PROTECTED] wrote: On Wed, 2006-10-11 at 13:19 -0400, Eric Butera wrote: In the add_some_extra example you gave he wants the named value of the passed parameter which is $str. Isn't that what the Reflection API is there for? --Paul All Email originating

Re: [PHP] Can i take the variable name in a function?

2006-10-11 Thread Paul Scott
On Wed, 2006-10-11 at 13:19 -0400, Eric Butera wrote: In the add_some_extra example you gave he wants the named value of the passed parameter which is $str. Isn't that what the Reflection API is there for? --Paul All Email originating from UWC is covered by disclaimer

[PHP] gd for php5 under RH ES4

2006-10-11 Thread Doug Fulton
I am trying to use the php gd library (for imagecreate, etc) with php5 under Red Hat ES4. I tried installing php-gd via webmin (which in turn, I see, uses up2date), but get the following error in the apache error log when restarting: PHP Warning: PHP Startup: Unable to load dynamic library

[PHP] Re: [GD-DEVEL] gd for php5 under RH ES4

2006-10-11 Thread Antony Dovgal
On 10/11/2006 10:36 PM, Doug Fulton wrote: I am trying to use the php gd library (for imagecreate, etc) with php5 under Red Hat ES4. I tried installing php-gd via webmin (which in turn, I see, uses up2date), but get the following error in the apache error log when restarting: PHP Warning:

Re: [PHP] gd for php5 under RH ES4

2006-10-11 Thread Richard Lynch
On Wed, October 11, 2006 1:36 pm, Doug Fulton wrote: I am trying to use the php gd library (for imagecreate, etc) with php5 under Red Hat ES4. I tried installing php-gd via webmin (which in turn, I see, uses up2date), but get the following error in the apache error log when restarting: PHP

Re: [PHP] Can i take the variable name in a function?

2006-10-11 Thread Richard Lynch
On Wed, October 11, 2006 9:58 am, Jônata Tyska Carvalho wrote: How can i take the variable name inside a function, ex: definition: function example( $ex ){ echo Variable Name is $ex ; // how to do this? } use: example($ball); output: Variable Name is ball; another:

Re: [PHP] Can i take the variable name in a function?

2006-10-11 Thread Richard Lynch
On Wed, October 11, 2006 12:19 pm, Eric Butera wrote: On 10/11/06, Andy Hultgren [EMAIL PROTECTED] wrote: ?php function add_some_extra($string) { $string .= 'and something extra.'; } $str = 'This is a string, '; add_some_extra($str); echo $str;// outputs 'This is a string, and

RE: [PHP] Re: Understanding persistent connections with oci8

2006-10-11 Thread Richard Lynch
On Wed, October 11, 2006 8:46 am, Bauer, Jay W wrote: Yes there have been some trigger-happy, bug-bogus-marking going on, but that happens. And yes, this stays alive without anything going on. And we have tested your other wrinkle and that is how we have been able to end the persistent

Re: [PHP] OOP slow -- am I an idiot?

2006-10-11 Thread Richard Lynch
On Tue, October 10, 2006 6:14 pm, Chris de Vidal wrote: I want to create a customer class which fetches its attributes from a MySQL database. No, you don't. :-) This is a classic example of the obvious OOP solution being wildly inappropriate. The sad thing is, there are a zillion applications

Re: [PHP] Can i take the variable name in a function?

2006-10-11 Thread Richard Lynch
On Wed, October 11, 2006 2:21 pm, Richard Lynch wrote: If you really really really know what you are doing, you can do this: And if you make no typos like I just did... :-) function example($name){ // global $name; //Whoops! global $$name; //note the TWO $ symbols! echo The variable

Re: [PHP] Working with overly aggressive anti-spam measures [SOLVED]

2006-10-11 Thread Richard Lynch
On Tue, October 10, 2006 8:57 pm, Dave M G wrote: It took me a little while to realize that the Spamassassin always says that an email is possible scam if it has any score above zero, but it takes a score of 5.0 to actually be deleted as spam. I checked through a bunch of emails in my inbox,

Re: [PHP] OOP slow -- am I an idiot?

2006-10-11 Thread Stut
Richard Lynch wrote: On Tue, October 10, 2006 6:14 pm, Chris de Vidal wrote: I want to create a customer class which fetches its attributes from a MySQL database. No, you don't. :-) This is a classic example of the obvious OOP solution being wildly inappropriate. Ok, so I now find myself

RE: [PHP] Re: Understanding persistent connections with oci8

2006-10-11 Thread Bauer, Jay W
Hi Richard, You've asked the $64,000 question. What is a reasonable way for this timeout to work? Unfortunately we haven't gotten far with the bug.php.net folks to ask the question. I agree with you that providing an active thread or process to go out and check for idle persistent

Re: [PHP] PHP Mailer and SMTP = SPAM?

2006-10-11 Thread Google Kreme
On 10 Oct 2006, at 12:37 , Richard Lynch wrote: Very simple to code/implement/maintain. Oh? How simple is it? (yes, this is an oblique request for code :) -- Nothing like grilling a kosher dog over human hair to bring out the subtle flavors. -- PHP General Mailing List

[PHP] PHP 5 Hosting

2006-10-11 Thread Ed Lazor
Anyone ever use A2Hosting.com? Or better yet, any recommendations on a PHP 5 web hosting company that you're happy with - measured in terms of quality support, they know what they're doing, and they have good prices? Bonus points for good drive space, bandwidth, and SSH access. I ran a

Re: [PHP] Can i take the variable name in a function?

2006-10-11 Thread Jônata Tyska Carvalho
i know what i want to do, and im not a rookie in php. example of a use: debug($vetNames); output: The variable vetNames has the follow properties: key1 = value1, key2 = value2 just one example. need it for another things. On 10/11/06, Richard Lynch [EMAIL PROTECTED] wrote: On

Re: [PHP] Re: Understanding persistent connections with oci8

2006-10-11 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-10-11 16:42:06 -0400: And actually, Kiran in our lab proposed that as a very easy fix to implement, and we've tested it and it works fine. In other words we make 50 persistent connections, with the timeout at 10 seconds, wait a minute and then make another round

Re: [PHP] Can i take the variable name in a function?

2006-10-11 Thread Robert Cummings
On Wed, 2006-10-11 at 19:02 -0300, Jônata Tyska Carvalho wrote: i know what i want to do, and im not a rookie in php. example of a use: debug($vetNames); output: The variable vetNames has the follow properties: key1 = value1, key2 = value2 Example: ?php function fooA( $fooA ) {

Re: [PHP] Re: moving to other web server

2006-10-11 Thread Chris
[EMAIL PROTECTED] wrote: currently using mysql 4.0.18. want to move to 5.0 (latest stable version for commercil use). is there anytihng I have to be considered DB will not work? I really suggest you set up a test box (even if it's an unused desktop - they work great for development machines)

Re: [PHP] OOP slow -- am I an idiot?

2006-10-11 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-10-11 21:28:36 +0100: Richard Lynch wrote: On Tue, October 10, 2006 6:14 pm, Chris de Vidal wrote: I want to create a customer class which fetches its attributes from a MySQL database. No, you don't. :-) This is a classic example of the obvious OOP solution

Re: [PHP] Re: moving to other web server

2006-10-11 Thread Afan Pasalic
right. that would be actually the best thing to do. thanks. Chris wrote: [EMAIL PROTECTED] wrote: currently using mysql 4.0.18. want to move to 5.0 (latest stable version for commercil use). is there anytihng I have to be considered DB will not work? I really suggest you set up a test

Re: [PHP] Working with overly aggressive anti-spam measures [SOLVED]

2006-10-11 Thread Google Kreme
On 10 Oct 2006, at 19:57 , Dave M G wrote: It took me a little while to realize that the Spamassassin always says that an email is possible scam if it has any score above zero, but it takes a score of 5.0 to actually be deleted as spam. No no no, this is not at all true. First off,

Re: [PHP] PHP 5 Hosting

2006-10-11 Thread Kyle
Hello, I would suggest dreamhost at www.dreamhost.com. Their prices look a bit hefty at first but there are referral codes all over the internet and you can end up saving $97. Their plans have tons of bandwidth and space and I haven't had any trouble with it. But I would suggest them highly,

RE: [PHP] PHP Mailer and SMTP = SPAM?

2006-10-11 Thread Peter Lauri
[snip] Unless the email is coming from somebody the recipient knows/trusts, then you're going to get marked by them as a spammer -- which will report back to some of the lists marking you as a spammer. [/snip] But is it not a problem sending from the SMTP server thedomain.com using something else

Re: [PHP] OOP slow -- am I an idiot?

2006-10-11 Thread Stut
Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2006-10-11 21:28:36 +0100: Richard Lynch wrote: On Tue, October 10, 2006 6:14 pm, Chris de Vidal wrote: I want to create a customer class which fetches its attributes from a MySQL database. No, you don't. :-) This is a classic example of the