RE: [PHP] Mail Function Using PEAR Issues

2010-04-19 Thread David McGlone
On Mon, 2010-04-19 at 08:25 -0400, Alice Wei wrote: > I have not changed any of my SMTP settings since my new installation of > PHP with Pear. So, I am not sure what the settings are supposed to be. > Would I need to install anything else even when the Pear Mail package > has been installed? A

Re: [PHP] How to do i18n better?

2010-04-19 Thread tedd
At 12:17 AM +0100 4/20/10, Ashley Sheridan wrote: Links within the site itself allow the user to change their language afterwards, and you could store that in a cookie to it remembers their choice. Thanks, Ash Ash: This is something I found interesting. http://php1.net/c/language-example/ C

Re: [PHP] How to do i18n better?

2010-04-19 Thread Ashley Sheridan
On Mon, 2010-04-19 at 19:17 -0400, Jason Pruim wrote: > On Apr 18, 2010, at 6:55 PM, Andre Polykanine wrote: > > > Hi everyone, > > > > I posted this in the PHP-i18n list, however got no answer so trying > > here). > > We are making a blog platform (http://oire.org/) which is provided in > > seve

Re: [PHP] How to do i18n better?

2010-04-19 Thread Jason Pruim
On Apr 18, 2010, at 6:55 PM, Andre Polykanine wrote: Hi everyone, I posted this in the PHP-i18n list, however got no answer so trying here). We are making a blog platform (http://oire.org/) which is provided in several languages (currently they are Russian, Ukrainian, and English). Now the i18

Re: [PHP] How to do i18n better?

2010-04-19 Thread Michiel Sikma
On 19 April 2010 15:56, Robert Cummings wrote: > -snip- > > > Unless you have namespaces (and I can't remember if they completed > namespaced based functions) then don't use something so commuon as a > function named underscore :/ > > Cheers, > Rob. > > No, you're actually absolutely right about

Re: [PHP] Class constants

2010-04-19 Thread David Harkness
On Mon, Apr 19, 2010 at 7:25 AM, Peter Lind wrote: > Per the PHP manual: "The value must be a constant expression". Is > something that depends on other classes, variables or functions > constant? > When I came up against this problem myself, I read "a constant expression" to mean "an expression

Re: [PHP] Adding reCAPTCHA to form using PHP

2010-04-19 Thread tedd
At 2:10 PM -0400 4/19/10, Andrew Ballard wrote: On Mon, Apr 19, 2010 at 12:50 PM, tedd wrote: At 12:21 PM -0400 4/19/10, Ernie Kemp wrote: Need help with reCAPTCHA. Never installed it before. When Submit is clicked the "quoterequest-redirect.php" is run but I think it would be better to

Re: [PHP] Adding reCAPTCHA to form using PHP

2010-04-19 Thread Andrew Ballard
On Mon, Apr 19, 2010 at 12:50 PM, tedd wrote: > At 12:21 PM -0400 4/19/10, Ernie Kemp wrote: >> >> Need help with reCAPTCHA. Never installed it before. >> >> When Submit is clicked the "quoterequest-redirect.php" is run but I think >> it >> would be better to test the reCAPTCHA before the >> "quot

RE: [PHP] Adding reCAPTCHA to form using PHP

2010-04-19 Thread Ernie Kemp
Thanks for your reply Tedd. Maybe my reCAPTCHA is more complicated than it needs to be but when you click the "Submit" button the form triggers the action="quoterequest-redirect.php" which goes to another program without checking the CAPTCHA. I test in the called program and display a message if it

RE: [PHP] Array to csv or excel in php

2010-04-19 Thread Jay Blanchard
[snip] to export them on an csv or excel format[/snip] Stupid browser tricks http://www.evolt.org/node/26896 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Adding reCAPTCHA to form using PHP

2010-04-19 Thread tedd
At 12:21 PM -0400 4/19/10, Ernie Kemp wrote: Need help with reCAPTCHA. Never installed it before. When Submit is clicked the "quoterequest-redirect.php" is run but I think it would be better to test the reCAPTCHA before the "quoterequest-redirect.php" program has been run. I check the CAPTCHA i

Re: [PHP] PHP include security

2010-04-19 Thread Micky Hulse
Hi Michiel! > One thing to keep in mind is that this one doesn't take eval() vs regular > include execution time into account, in case you were still considering > using it. According to this page, it's many times I was still considering it... I mean, I am still exploring all my options for the s

Re: [PHP] Class constants

2010-04-19 Thread Adam Richardson
On Mon, Apr 19, 2010 at 10:25 AM, Peter Lind wrote: > On 19 April 2010 16:18, Gary . wrote: > > On Mon, Apr 19, 2010 at 2:37 PM, Peter Lind > wrote: > >> On 19 April 2010 14:24, Gary wrote: > >>> On Mon, Apr 19, 2010 at 10:36 AM, Peter Lind wrote: > > > So no, you shouldn't be able to do t

[PHP] Adding reCAPTCHA to form using PHP

2010-04-19 Thread Ernie Kemp
Need help with reCAPTCHA. Never installed it before. When Submit is clicked the "quoterequest-redirect.php" is run but I think it would be better to test the reCAPTCHA before the "quoterequest-redirect.php" program has been run. I check the CAPTCHA in "quoterequest-redirect.php", it displays a in

Re: [PHP] Directory permissions question

2010-04-19 Thread Peter Lind
On 19 April 2010 17:18, Al wrote: > > > On 4/19/2010 11:11 AM, Adam Richardson wrote: >> >> On Mon, Apr 19, 2010 at 10:59 AM, Al  wrote: >> >>> I'm working on a hosted website that was hacked and found something I >>> don't >>> fully understand. Thought someone here may know the answer. >>> >>> Th

Re: [PHP] Directory permissions question

2010-04-19 Thread Al Rider
Apache 2.0.63 php 5.2.8 I know both are obsolete and need updating. I told my client to request same from their ISP. Al On 4/19/2010 12:01 PM, Jim Lucas wrote: Al wrote: I'm working on a hosted website that was hacked and found something I don't fully understand. Thought someone here ma

Re: [PHP] Array to csv or excel in php

2010-04-19 Thread Ken Guest
For non-simple data I have been using PEAR's File_CSV package. It's proven itself very useful in regards to not having to determine in my own code whether something needs to be quoted etc etc - especially if the output CSV needs to be wholly RFC 4180 compliant. The documentation of it is rather mi

Re: [PHP] Directory permissions question

2010-04-19 Thread Jim Lucas
Al wrote: > I'm working on a hosted website that was hacked and found something I > don't fully understand. Thought someone here may know the answer. > > The site has 4 php malicious files in directories owned by "system" [php > created dirs on the site are named "nobody"] and permissions 755. >

Re: [PHP] Array to csv or excel in php

2010-04-19 Thread Peter Lind
On 19 April 2010 17:40, Andrew Ballard wrote: > On Mon, Apr 19, 2010 at 11:14 AM, Peter Lind wrote: >> On 19 April 2010 17:00, Andrew Ballard wrote: >>> On Mon, Apr 19, 2010 at 9:45 AM, Manolis Vlachakis   1. $save=split("[|;]",$listOfItems); and what i want i s after making some

Re: [PHP] Array to csv or excel in php

2010-04-19 Thread Andrew Ballard
On Mon, Apr 19, 2010 at 11:14 AM, Peter Lind wrote: > On 19 April 2010 17:00, Andrew Ballard wrote: >> On Mon, Apr 19, 2010 at 9:45 AM, Manolis Vlachakis >>> 1. $save=split("[|;]",$listOfItems); >>> >>> and what i want i s after making some changes to the attributes on the array >>> above to ex

Re: [PHP] Directory permissions question

2010-04-19 Thread Al
On 4/19/2010 11:11 AM, Adam Richardson wrote: On Mon, Apr 19, 2010 at 10:59 AM, Al wrote: I'm working on a hosted website that was hacked and found something I don't fully understand. Thought someone here may know the answer. The site has 4 php malicious files in directories owned by "syste

Re: [PHP] Array to csv or excel in php

2010-04-19 Thread Peter Lind
On 19 April 2010 17:00, Andrew Ballard wrote: > On Mon, Apr 19, 2010 at 9:45 AM, Manolis Vlachakis > wrote: >> hallo there everyone.. >> i got an array from my database >> Help with Code >> Tags >> *PHP Synt

Re: [PHP] Directory permissions question

2010-04-19 Thread Adam Richardson
On Mon, Apr 19, 2010 at 10:59 AM, Al wrote: > I'm working on a hosted website that was hacked and found something I don't > fully understand. Thought someone here may know the answer. > > The site has 4 php malicious files in directories owned by "system" [php > created dirs on the site are named

Re: [PHP] Array to csv or excel in php

2010-04-19 Thread Andrew Ballard
On Mon, Apr 19, 2010 at 9:45 AM, Manolis Vlachakis wrote: > hallo there everyone.. > i got an array from my database > Help with Code > Tags > *PHP Syntax* (Toggle Plain > Text

[PHP] Directory permissions question

2010-04-19 Thread Al
I'm working on a hosted website that was hacked and found something I don't fully understand. Thought someone here may know the answer. The site has 4 php malicious files in directories owned by "system" [php created dirs on the site are named "nobody"] and permissions 755. Is there any way t

Re: [PHP] Class constants

2010-04-19 Thread Peter Lind
On 19 April 2010 16:18, Gary . wrote: > On Mon, Apr 19, 2010 at 2:37 PM, Peter Lind wrote: >> On 19 April 2010 14:24, Gary wrote: >>> On Mon, Apr 19, 2010 at 10:36 AM, Peter Lind wrote: > So no, you shouldn't be able to do that. >>> >>> Okay. Why not? >> >> Hate to ask, but did you at any po

Re: [PHP] Class constants

2010-04-19 Thread Gary .
On Mon, Apr 19, 2010 at 3:12 PM, Ashley Sheridan wrote: > On 19 April 2010 14:24, Gary wrote: > > Okay. Why not? ... > Class constants must be defined with static values, not variables. They are > constants after all! If they relied on the value of a variable, surely that > would mean that their

Re: Re[2]: [PHP] How to do i18n better?

2010-04-19 Thread Peter Lind
On 19 April 2010 12:54, Andre Polykanine wrote: > Hello Peter, > > Regarding the URL switching suggested by you and Michiel, how do I do > this if I have a rather complicated .htaccess file? For instance, a > blog entry URL is formed as follows: > http://oire.org/menelion/entry/190/ which is phisi

Re: [PHP] solution

2010-04-19 Thread tedd
At 7:26 PM +0200 4/18/10, Michiel Sikma wrote: On 17 April 2010 13:03, Paulo-WORK wrote: I have reached a solution for my problem with js. Following all the sugestions and using jquery turned out to be quite simple. using .hide( ) and .show( ) i am able to change the #div with Js enabled

Re: [PHP] How to do i18n better?

2010-04-19 Thread Robert Cummings
Peter Lind wrote: On 19 April 2010 15:56, Robert Cummings wrote: Unless you have namespaces (and I can't remember if they completed namespaced based functions) then don't use something so commuon as a function named underscore :/ Cheers, Rob. You might want to have a look at http://pl2.php

Re: [PHP] How to do i18n better?

2010-04-19 Thread Peter Lind
On 19 April 2010 15:56, Robert Cummings wrote: > > > Unless you have namespaces (and I can't remember if they completed > namespaced based functions) then don't use something so commuon as a > function named underscore :/ > > Cheers, > Rob. > You might want to have a look at http://pl2.php.net/_

Re: [PHP] Class constants

2010-04-19 Thread Gary .
On Mon, Apr 19, 2010 at 2:37 PM, Peter Lind wrote: > On 19 April 2010 14:24, Gary wrote: >> On Mon, Apr 19, 2010 at 10:36 AM, Peter Lind wrote: >>> So no, you shouldn't be able to do that. >> >> Okay. Why not? > > Hate to ask, but did you at any point consider to read the PHP docs on > this? The

Re: [PHP] How to do i18n better?

2010-04-19 Thread Robert Cummings
Michiel Sikma wrote: On 19 April 2010 00:55, Andre Polykanine wrote: Now the i18n process is made as follows: we set a cookie on the site and depending on it we select the language to display the site in. We have three (currently) interface files: rus.lng, ukr.lng, and enu.lng (for English U

[PHP] Array to csv or excel in php

2010-04-19 Thread Manolis Vlachakis
hallo there everyone.. i got an array from my database Help with Code Tags *PHP Syntax* (Toggle Plain Text ) 1. $save=split("[|;]",$listOfItems); and wha

Re: [PHP] Class constants

2010-04-19 Thread Ashley Sheridan
On Mon, 2010-04-19 at 14:37 +0200, Peter Lind wrote: > On 19 April 2010 14:24, Gary . wrote: > > On Mon, Apr 19, 2010 at 10:36 AM, Peter Lind wrote: > >> On 19 April 2010 10:30, Gary wrote: > >>> Should I be able to do this: > >>> > >>> class X > >>> { > >>> const FOO = 'foo'; > >>> const FOOBA

Re: [PHP] Class constants

2010-04-19 Thread Peter Lind
On 19 April 2010 14:24, Gary . wrote: > On Mon, Apr 19, 2010 at 10:36 AM, Peter Lind wrote: >> On 19 April 2010 10:30, Gary wrote: >>> Should I be able to do this: >>> >>> class X >>> { >>>  const FOO = 'foo'; >>>  const FOOBAR = X::FOO . 'bar'; >>> >>> ... >>> } > >> So no, you shouldn't be able

RE: [PHP] Mail Function Using PEAR Issues

2010-04-19 Thread Alice Wei
> Date: Sun, 18 Apr 2010 21:39:19 -0500 > From: k...@daleco.biz > To: aj...@alumni.iu.edu > CC: k...@designdrumm.com; php-general@lists.php.net > Subject: Re: [PHP] Mail Function Using PEAR Issues > > Alice Wei wrote: > > > >> Date: Sun, 18 Apr 2010 21:02:29 -0500 > >> From: k...@daleco.biz > >

Re: [PHP] Class constants

2010-04-19 Thread Gary .
On Mon, Apr 19, 2010 at 10:36 AM, Peter Lind wrote: > On 19 April 2010 10:30, Gary wrote: >> Should I be able to do this: >> >> class X >> { >>  const FOO = 'foo'; >>  const FOOBAR = X::FOO . 'bar'; >> >> ... >> } > So no, you shouldn't be able to do that. Okay. Why not? -- PHP General Mailing L

Re: [PHP] How to do i18n better?

2010-04-19 Thread Per Jessen
Andre Polykanine wrote: > etc. I know that PHP does support somehow exporting the strings into a > .pod file. Maybe it would be better to do that? If so, how can I do > it? > Could you suggest me maybe a better solution than we currently have? For mostly dynamic messages or pages, I would take a

Re[2]: [PHP] How to do i18n better?

2010-04-19 Thread Andre Polykanine
Hello Peter, Regarding the URL switching suggested by you and Michiel, how do I do this if I have a rather complicated .htaccess file? For instance, a blog entry URL is formed as follows: http://oire.org/menelion/entry/190/ which is phisically http://oire.org/oire.php?o=menelion&e=190 If I need to

Re: [PHP] Does PHP support multi-thread ?

2010-04-19 Thread Richard Quadling
On 18 April 2010 14:17, ttplayer wrote: > Hello, everyone, please answer me. Thank you. >  Does PHP support multi-thread ? As you've been informed, PHP doesn't natively support threading. But, the issue of forking was mentioned. I'm on Windows, and by using a combination of MS's WinCache (I'm us

Re: [PHP] PHP include security

2010-04-19 Thread Michiel Sikma
On 18 April 2010 21:43, Micky Hulse wrote: > On Sun, Apr 18, 2010 at 10:23 AM, Michiel Sikma > wrote: > > I would prefer to use include() since it runs the code in the same > context, > > .. > > with your data rather than printing it right away. > > Thanks for the reply Michiel, I really app

Re: [PHP] How to do i18n better?

2010-04-19 Thread Michiel Sikma
On 19 April 2010 00:55, Andre Polykanine wrote: > > Now the i18n process is made as follows: we set a cookie on the site > and depending on it we select the language to display the site in. We > have three (currently) interface files: rus.lng, ukr.lng, and enu.lng > (for English US). the format i

Re: [PHP] Get Power Saving Settings of the Server

2010-04-19 Thread Richard
Hi, > My PHP script is running as CLI. Can I get the Power Management > Settings of the server ? > > I am using PHP 5.3.2 on Fedora 12 Machine (2.6.32.10-90.fc12.i686) Your server management software may provide a way to get this information either through the command line or through a network in

[PHP] Get Power Saving Settings of the Server

2010-04-19 Thread kranthi
Hi all, My PHP script is running as CLI. Can I get the Power Management Settings of the server ? I am using PHP 5.3.2 on Fedora 12 Machine (2.6.32.10-90.fc12.i686) KK. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Class constants

2010-04-19 Thread Peter Lind
On 19 April 2010 10:30, Gary . wrote: > Should I be able to do this: > > class X > { >  const FOO = 'foo'; >  const FOOBAR = X::FOO . 'bar'; > > ... > } > > ? > > Because I can't. I get "syntax error, unexpected '.', expecting ',' or > ';'". I assume this is because the constants are like statics

[PHP] Class constants

2010-04-19 Thread Gary .
Should I be able to do this: class X { const FOO = 'foo'; const FOOBAR = X::FOO . 'bar'; ... } ? Because I can't. I get "syntax error, unexpected '.', expecting ',' or ';'". I assume this is because the constants are like statics which can't be initialised by functions etc. but is there rea

Re: [PHP] Mail Function Using PEAR Issues

2010-04-19 Thread Peter Lind
Most, if not all, mail servers keep log files. You should look for the log files to see if the mail server has sent your mail properly or is experiencing problems (those may not feed back into PHP). Regards Peter -- WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/pli

Re: [PHP] How to do i18n better?

2010-04-19 Thread Peter Lind
Consider checking out http://php.net/gettext - it's the set of functions in PHP for i18n. With regards to language switching, you should consider using a url hierarchy for it, instead of just serving all pages with changing content. Regards Peter -- WWW: http://plphp.dk / http://plind.dk Linke