Re: [PHP] Does this seem wrong to anyone else?

2008-08-21 Thread Yeti
How about this one? function recursive_mkdir($dir) { if (is_dir($dir)) return true; if (recursive_mkdir(dirname($dir))) return @mkdir($dir); return false; } On Thu, Aug 21, 2008 at 1:04 AM, Ashley Sheridan [EMAIL PROTECTED] wrote: Whats even more fun is inheriting

Re: [PHP] Accountancy for a webshop/ecommerce system

2008-08-21 Thread Per Jessen
Rene Veerman wrote: What i'm worried about is the accounting part of a webshop system. I've downloaded some accounting manuals and programs, to see 'how its done'. I've also downloaded some other webshop php apps (notably oscommerce.com) to see how they do things. OS-commerce provides very

RE: [PHP] Re: Breaking a line in two

2008-08-21 Thread Warren Vail
Right, that's what I can't imagine why he would possibly need to keep the space. Warren Vail -Original Message- From: Micah Gersten [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2008 9:24 AM To: [EMAIL PROTECTED]; PHP General Subject: Re: [PHP] Re: Breaking a line in two

Re: [PHP] Accountancy for a webshop/ecommerce system

2008-08-21 Thread Lester Caine
Per Jessen wrote: Rene Veerman wrote: What i'm worried about is the accounting part of a webshop system. I've downloaded some accounting manuals and programs, to see 'how its done'. I've also downloaded some other webshop php apps (notably oscommerce.com) to see how they do things.

[PHP] ?=class::$lang[$this-lang]['_key_']? Not working

2008-08-21 Thread Sancar Saran
Hello, I god very weird problem on cent os server. I use php templates on TYPO3 based system. which uses short tags some how ?=class::$lang[$this-lang]['_key_']? was not working. System works perfectly on my ubuntu machine. Another problem was. I can get $this-lang I can get

Re: [PHP] Forward slashes and header requests

2008-08-21 Thread Ashley Sheridan
I had a similar thing happen with a file management system. I found the best way to fix it was to use $location = str_replace('//','/', $_SERVER['REQUEST_URI']); Ash www.ashleysheridan.co.uk ---BeginMessage--- PHP List, I have built my own CMS system, and I've just finished setting it up so

Re: [PHP] ?=class::$lang[$this-lang]['_key_']? Fixed myBAD

2008-08-21 Thread Sancar Saran
Sorry to bothering list. my_bad I damn bug generated by mysef and ignited by sort order... /my_bad Sorry. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Semi-ADVERT, not really spam, sorry for it

2008-08-21 Thread Kevin Waterson
This one time, at band camp, Robert Cummings [EMAIL PROTECTED] wrote: Your assumption that this will occur is clearly based on false presumptions. For instance you assume that what has happened before will happen again. Secondly, your assertion that there are pedants waiting to pick apart

[PHP] include methods of one class in another

2008-08-21 Thread Pavel
Hello, firstly, sorry for my English... I have class: //--- class manageClassError{ private $errorsList=array(); private function addError($ex){ $errorsList[]=$ex; } public function isError(){ return (bool)(count($this-errorsList)); } public

Re: [PHP] Licensing

2008-08-21 Thread Per Jessen
Richard Heyes wrote: Okay, I've taken your points on board and come up with this: http://www.phpguru.org/static/license.html Better? License costs in EUR, CHF and DKK? Seriously, I would quote the price in one currency only, and leave it for people to convert. There's one 'm' too many in

Re: [PHP] Timing problem, putting PNG into PDF

2008-08-21 Thread Thodoris
I'm using GD to crop save an uploaded image, and then embedding it into a PDF made with FPDI. It works great when the image is small or low-res. When the uploaded file is bigger, more than a couple hundred K or so, it fails. I think that the image is not done writing yet by the time I try

Re: [PHP] Timing problem, putting PNG into PDF

2008-08-21 Thread David Otton
2008/8/12 Brian Dunning [EMAIL PROTECTED]: I'm using GD to crop save an uploaded image, and then embedding it into a PDF made with FPDI. It works great when the image is small or low-res. When the uploaded file is bigger, more than a couple hundred K or so, it fails. I think that the image

Re: [PHP] include methods of one class in another

2008-08-21 Thread Eric Butera
On Thu, Aug 21, 2008 at 6:10 AM, Pavel [EMAIL PROTECTED] wrote: Hello, firstly, sorry for my English... I have class: //--- class manageClassError{ private $errorsList=array(); private function addError($ex){ $errorsList[]=$ex; } public function isError(){

Re: [PHP] RE: Sale 79% OFF !!!

2008-08-21 Thread Ashley Sheridan
Ooh, ooh, I must go and rush out to buy some. No wait, I'm a programmer, I have no love life... How did this get through? And do they really expect it to work?! Ash www.ashleysheridan.co.uk ---BeginMessage--- Dear php-general@lists.php.net, Canadian Doctor Beatriz Best Price 2008!

Re: [PHP] Does this seem wrong to anyone else?

2008-08-21 Thread Jochem Maas
Yeti schreef: How about this one? function recursive_mkdir($dir) { if (is_dir($dir)) return true; if (recursive_mkdir(dirname($dir))) return @mkdir($dir); return false; } covers half of one of my gripes about the OP's originally posted function. and it introduces a

Re: [PHP] ?=class::$lang[$this-lang]['_key_']? Not working

2008-08-21 Thread Jochem Maas
Sancar Saran schreef: Hello, I god very weird problem on cent os server. I use php templates on TYPO3 based system. which uses short tags some how ?=class::$lang[$this-lang]['_key_']? was not working. ah ... so the typo3 code is just as much of a nightmare as the interface, which I never

Re: [PHP] include methods of one class in another

2008-08-21 Thread Jochem Maas
Pavel schreef: Hello, firstly, sorry for my English... I have class: //--- class manageClassError{ private $errorsList=array(); private function addError($ex){ $errorsList[]=$ex; } public function isError(){ return (bool)(count($this-errorsList));

Re: [PHP] Semi-ADVERT, not really spam, sorry for it

2008-08-21 Thread Jochem Maas
Robert Cummings schreef: On Thu, 2008-08-21 at 08:23 +1000, Kevin Waterson wrote: This one time, at band camp, V S Rawat [EMAIL PROTECTED] wrote: Sorry for bothering the rest of you. I hope you wouldn't really mind if some of our colleagues who are doing such a lovely volunteer work here get

Re: [PHP] RE: Sale 79% OFF !!!

2008-08-21 Thread Per Jessen
Ashley Sheridan wrote: And do they really expect it to work?! Yes, and it does. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Does this seem wrong to anyone else?

2008-08-21 Thread daniel danon
Hi, I am new here.. Hmm, I think what you should add in your function, Yeti, is else - wont it will be for better performance? and not the suppress the error, and Jochem, then it will be perfect - wont it? I am not sure about the else - but as long you provide to the PHP Processor more information

Re: [PHP] RE: Sale 79% OFF !!!

2008-08-21 Thread Ashley Sheridan
I don't understand how people can fall for this kind of thing, all those Nigerian scams and the like. For every person that falls for it, a million more emails get sent, making everyone elses lives hell :( Ash www.ashleysheridan.co.uk ---BeginMessage--- Ashley Sheridan wrote: And do they really

Re: [PHP] Does this seem wrong to anyone else?

2008-08-21 Thread Jochem Maas
daniel danon schreef: Hi, I am new here.. Hmm, I think what you should add in your function, Yeti, is else - wont it will be for better performance? and not the suppress the error, and Jochem, then it will be perfect - wont it? no, see my original critique. and note what Stut said about php5

Re: [PHP] Developing a game using Ming

2008-08-21 Thread Larry Garfield
On Wednesday 20 August 2008 4:42:19 pm Jochem Maas wrote: Yasir Malik schreef: What about FlashDevelop? I'm on the Papervision list, and a lot of people are raving abut that at the moment, and best of all it's open source. Could be a much better option than creating SWF files from

[PHP] New Bie Issues

2008-08-21 Thread sathish balachandran
hi all! I am running behind an issues for a couple of days [SOAP is killing me] Please find the code attached here - which is used to call data from a .NET server. [I got this code from another site] Some modifications have been done.- but am getting a result - *Server was unable to process

Re: [PHP] RE: Sale 79% OFF !!!

2008-08-21 Thread Wolf
Because there is 1 or more out there who don't know any better and get sucked in. And when you look at it as being able to use a name book or dictionary (readily available mind you) along with a list of domains.Once you add them together, the resources needed for sending the emails is

Re: [PHP] Developing a game using Ming

2008-08-21 Thread Larry Garfield
On Thursday 21 August 2008 8:59:58 am Larry Garfield wrote: If you're trying to be cheap and/or Open Sourcy about it, have a look at OpenLazlo. It's an XML/JS framework, all open source, that compiles to SWF and plays in a normal Flash 9 browser plugin. I've only recently started looking

Re: [PHP] RE: Sale 79% OFF !!!

2008-08-21 Thread Ashley Sheridan
Oh yes, I understand the technicalities involved, I just despair at peoples stupidity! Ash www.ashleysheridan.co.uk ---BeginMessage--- Because there is 1 or more out there who don't know any better and get sucked in. And when you look at it as being able to use a name book or dictionary

Re: [PHP] Semi-ADVERT, not really spam, sorry for it

2008-08-21 Thread Robert Cummings
On Thu, 2008-08-21 at 14:50 +0200, Jochem Maas wrote: Robert Cummings schreef: On Thu, 2008-08-21 at 08:23 +1000, Kevin Waterson wrote: This one time, at band camp, V S Rawat [EMAIL PROTECTED] wrote: Sorry for bothering the rest of you. I hope you wouldn't really mind if some of our

Re: [PHP] Semi-ADVERT, not really spam, sorry for it

2008-08-21 Thread Ashley Sheridan
What was that? You just quoted his email but didn't add anything! Ash www.ashleysheridan.co.uk ---BeginMessage--- On Thu, 2008-08-21 at 14:50 +0200, Jochem Maas wrote: Robert Cummings schreef: On Thu, 2008-08-21 at 08:23 +1000, Kevin Waterson wrote: This one time, at band camp, V S Rawat

Re: [PHP] Semi-ADVERT, not really spam, sorry for it

2008-08-21 Thread Robert Cummings
On Thu, 2008-08-21 at 16:04 +0100, Ashley Sheridan wrote: What was that? You just quoted his email but didn't add anything! I added an evil smiley face... probably looks like part of the quote though since it leads with the character. The blanks lines hsould have helped resolve that. Cheers,

Re: [PHP] Semi-ADVERT, not really spam, sorry for it

2008-08-21 Thread Ashley Sheridan
Ah, I see! Ash www.ashleysheridan.co.uk ---BeginMessage--- On Thu, 2008-08-21 at 16:04 +0100, Ashley Sheridan wrote: What was that? You just quoted his email but didn't add anything! I added an evil smiley face... probably looks like part of the quote though since it leads with the character.

Re: [PHP] RE: Sale 79% OFF !!!

2008-08-21 Thread Bastien Koert
On Thu, Aug 21, 2008 at 10:28 AM, Ashley Sheridan [EMAIL PROTECTED]wrote: Oh yes, I understand the technicalities involved, I just despair at peoples stupidity! Ash www.ashleysheridan.co.uk -- Forwarded message -- From: Wolf [EMAIL PROTECTED] To: [EMAIL PROTECTED]

Re: [PHP] Developing a game using Ming

2008-08-21 Thread Yasir Malik
If you're trying to be cheap and/or Open Sourcy about it, have a look at OpenLazlo. It's an XML/JS framework, all open source, that compiles to SWF and plays in a normal Flash 9 browser plugin. I've only recently started looking into it, but it looks impressive. And of course I

[PHP] Re: Sale 79% OFF !!!

2008-08-21 Thread Colin Guthrie
Bastien Koert wrote: I never cease to be amazed at the continuing stupidity of the human race. There is a movie called Idiocracy that sums up the stupidity of the human race quite well it's a very funny movie if you're in the right mood, otherwise it's. well... stupid! Col --

Re: [PHP] Re: Sale 79% OFF !!!

2008-08-21 Thread Luke
Indeed. Hehe, i forgot about that film it's pretty good 2008/8/21 Colin Guthrie [EMAIL PROTECTED] Bastien Koert wrote: I never cease to be amazed at the continuing stupidity of the human race. There is a movie called Idiocracy that sums up the stupidity of the human race quite well

Re: [PHP] include methods of one class in another

2008-08-21 Thread Pavel
use a decorator pattern or wait till hell freezes over and the core devs actually allow the Traits functionality into php. I must read about patterns, thanks :) -- === С уважением, Манылов Павел aka [R-k] icq: 949-388-0 mailto:[EMAIL PROTECTED] === А ещё говорят

Re: [PHP] RE: Sale 79% OFF !!!

2008-08-21 Thread Jay Moore
I never cease to be amazed at the continuing stupidity of the human race. Agreed. A person is smart; people are stupid. Besides, 79% off! How could I go wrong? Jay I only pay 21% Moore -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Ejecutar comando con php con otro usuario.

2008-08-21 Thread CanihoJR
Como puedo ejecutar un comando de sistema con otro usuario que no sea www-data??? si realizo un exec(sh miscript.sh); se ejecuta con www-data y me gustaria ejecutarlo con mi usuario. (linux) Gracias d antemano

Re: [PHP] Ejecutar comando con php con otro usuario.

2008-08-21 Thread Wolf
CanihoJR [EMAIL PROTECTED] wrote: Como puedo ejecutar un comando de sistema con otro usuario que no sea www-data??? si realizo un exec(sh miscript.sh); se ejecuta con www-data y me gustaria ejecutarlo con mi usuario. (linux) Gracias d antemano Check your permissions. Wolf -- PHP

Re: [PHP] Re: Sale 79% OFF !!!

2008-08-21 Thread James Ausmus
On Thu, Aug 21, 2008 at 9:32 AM, Colin Guthrie [EMAIL PROTECTED] wrote: Bastien Koert wrote: I never cease to be amazed at the continuing stupidity of the human race. There is a movie called Idiocracy that sums up the stupidity of the human race quite well it's a very funny movie if

Re: [PHP] Re: Sale 79% OFF !!!

2008-08-21 Thread Robert Cummings
On Thu, 2008-08-21 at 13:26 -0700, James Ausmus wrote: On Thu, Aug 21, 2008 at 9:32 AM, Colin Guthrie [EMAIL PROTECTED] wrote: Bastien Koert wrote: I never cease to be amazed at the continuing stupidity of the human race. There is a movie called Idiocracy that sums up the stupidity of

Re: [PHP] Re: Sale 79% OFF !!!

2008-08-21 Thread Ashley Sheridan
I thought Hackers might be more appropriate. Angelina Jolie looked a lot better back then too... Ash www.ashleysheridan.co.uk ---BeginMessage--- On Thu, 2008-08-21 at 13:26 -0700, James Ausmus wrote: On Thu, Aug 21, 2008 at 9:32 AM, Colin Guthrie [EMAIL PROTECTED] wrote: Bastien Koert wrote:

[PHP] Quick question regarding getcwd() and directory location.

2008-08-21 Thread Ólafur Waage
I'll throw out an example here. I have a directory structure of: /var/www/example/ And in that i have a file: index.php That file echo's getcwd() and returns: /var/www/example/ Now i tell Apache or Lighty that if a directory does not have an index.php file, that it should use /example/index.php

[PHP] Restore Leading Zeros in Zip Codes

2008-08-21 Thread Keith Spiller
Hi, RE: Restore Leading Zeros in Zip Codes Does anyone happen to have a script that will restore the leading zeros in a mixed data set of 5 digit zip codes and 10 digit zip+4 codes? Any suggestions? Thanks, Keith

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-21 Thread Micah Gersten
Once you tell apache to load /example/index.php, that's where you are. You might try looking at the $_SERVER['HTTP_REFERER']. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Ólafur Waage wrote: I'll throw out an example here. I have a directory structure

Re: [PHP] Restore Leading Zeros in Zip Codes

2008-08-21 Thread Micah Gersten
if (strlen($zip) == 4 || strlen($zip) == 9) $zip = 0$zip; Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Keith Spiller wrote: Hi, RE: Restore Leading Zeros in Zip Codes Does anyone happen to have a script that will restore the leading zeros in a

Re: [PHP] Restore Leading Zeros in Zip Codes

2008-08-21 Thread Micah Gersten
That's actually not going to work if there's more than 1 zero missing. This is better. if (strlen($zip) 5) $zip = sprintf('%05d',$zip); else if (strlen($zip) 10) { $zipArray = explode('-', $zip); $zip = sprintf('%05d',$zipArray[0]); $zip .= - . $zipArray[1]; }

Re: [PHP] Forward slashes and header requests

2008-08-21 Thread Dave M G
Ashley, Thank you for responding. best way to fix it was to use $location = str_replace('//','/', $_SERVER['REQUEST_URI']); Unfortunately the trim() command I use seems to destroy all slashes anyway, so this doesn't seem to have an impact. Thank you for the suggestion, though. Anyone

RE: [PHP] Restore Leading Zeros in Zip Codes

2008-08-21 Thread Warren Vail
I'd try something like; If(strlen($zipcode) = 5) $zipcode = sprintf(%05d,$zipcode); Else { $zipcode = sprintf(%09d,$zipcode); $zipcode = substr($zipcode,0,5).-.substr(zipcode,5); } This isn't real elegant, but it should do the trick. You may notice that the 10 character zip code is not

RE: [PHP] Restore Leading Zeros in Zip Codes

2008-08-21 Thread Warren Vail
Dave brought up something I forgot, what if the - is already in the sip code; Modify the code as follows; If(strlen($zipcode) = 5) $zipcode = sprintf(%05d,$zipcode); Else { $zipcode = sprintf(%09d,str_replace(-,,$zipcode)); $zipcode = substr($zipcode,0,5).-.substr(zipcode,5); }

RE: [PHP] Restore Leading Zeros in Zip Codes

2008-08-21 Thread Warren Vail
I never considered the dash a digit, but then I forgot a dollar sign on one of the variable names, but you can probably figure that out. Warren Vail -Original Message- From: Warren Vail [mailto:[EMAIL PROTECTED] Sent: Thursday, August 21, 2008 8:17 PM To: 'Warren Vail'; 'Keith