Re: [PHP] Help using PHP 5.3.3 mail() with Apache James
On 23-10-2012 23:54, Steven Pogue wrote: Dan, I assume you meant to add a system() call into it...if so, here is what was presented. -rwxrwxrwx. 1 root root 3878 Sep 6 14:45 /opt/james-2.3.2/bin/sendmail.py -rwxrwxrwx. 1 root root 3878 Sep 6 14:45 /opt/james-2.3.2/bin/sendmail.py Steve Hey Steve, first of all: don't top-post. Secondly: no, he didn't. Dan used the backtick operator (`) which is the same as calling system on its parameter. ie: `ls -l` is equal to writing shell_exec('ls -l') ( http://www.php.net/manual/en/language.operators.execution.php ) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help using PHP 5.3.3 mail() with Apache James
On Thu, Oct 25, 2012 at 5:32 AM, Maciek Sokolewicz wrote: > On 23-10-2012 23:54, Steven Pogue wrote: >> >> Dan, >> I assume you meant to add a system() call into it...if so, here is what >> was presented. >> >> -rwxrwxrwx. 1 root root 3878 Sep 6 14:45 /opt/james-2.3.2/bin/sendmail.py >> -rwxrwxrwx. 1 root root 3878 Sep 6 14:45 /opt/james-2.3.2/bin/sendmail.py >> >> >> Steve >> > Hey Steve, > > first of all: don't top-post. > Secondly: no, he didn't. Dan used the backtick operator (`) which is the > same as calling system on its parameter. > > ie: > `ls -l` > is equal to writing > shell_exec('ls -l') > > ( http://www.php.net/manual/en/language.operators.execution.php ) I have "lost" the backtick operator so many times, I've stopped using it, using shell_exec instead. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PCRE Expression
which pcre function do you use ? \{(\n*[a-z\-]*:[a-z\s0-9]*;\n*)*\} seems to work on my regex tester. Le 25/10/2012 18:51, Volmar Machado a écrit : Hi All, I have this expression : '/\{(\n*[a-z\-]*:[a-z\s0-9]*;\n*)\}/s' which grep all single property css like: .chalala{ float:left; } .chalala{float:left;} .chalala{ float:left;} But I want to grep multiples properties like: .chalala{ float:left; float:right; } So I think that I need to repeat subgroup many times and put a '*' after subgroup, like this: '/\{(\n*[a-z\-]*:[a-z\s0-9]*;\n*)*\}/s' but didn't work, how I can check if a subgroup repeat {0,} ? -- Camille Hodoul http://camille-hodoul.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Date manipulation
Is it possible for PHP to accept the following as a date: 04:11:22 Aug 21, 2011 PDT so I may output it as: gmdate(‘Y-m-d H:i:s’) - I want the time zone included Ron Ron Piggott www.TheVerseOfTheDay.info
Re: [PHP] Date manipulation
On Thu, Oct 25, 2012 at 3:06 PM, Ron Piggott wrote: > > Is it possible for PHP to accept the following as a date: > > 04:11:22 Aug 21, 2011 PDT > > so I may output it as: > > gmdate(‘Y-m-d H:i:s’) > > - I want the time zone included Sure. -- Network Infrastructure Manager http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] select function
Hi, I can't remember if this is the PHP list for RPG programmers or not, so apologize if this is the wrong one. Is there an equivalent command in PHP for the SELECT statement in RPG? I see switch, which is a little similar, but far from how it actually functions. For those not familiar with the SELECT statement here is how I envision it working in a PHP format similar to switch: SELECT { WHEN $Auth = 0: WHEN $A = 1: echo('$Aprint_list'); WHEN $B = 1: echo('$Bprint_list'); WHEN $A = 2: echo('$Aprint_list'); echo('$Aprint_list'); WHEN $B = 2: echo('$Bprint_list'); echo('$Bprint_list'); DEFAULT: } The syntax may be a little off, but you get the picture. No breaks are needed because it only performs the first match it comes to, then exits the SELECT statement when finished the commands under that match. Putting a WHEN statement with nothing to perform means exactly that, if this matches, do nothing, then exit the SELECT statement. I hope that makes sense. The big difference is you can put anything behind each WHEN statement as opposed to looking at only the one variable like with switch. I am thinking I just need to get creative with the switch or elseif commands, but thought I would ask the list first if they had any better suggestions. Thanks, Jeff Burcher - IT Dept Allred Metal Stamping PO Box 2566 High Point, NC 27261 (336)886-5221 x229 j...@allredmetal.com
Re: [PHP] select function
On Thu, Oct 25, 2012 at 5:35 PM, Jeff Burcher wrote: > Hi, > > > > I can't remember if this is the PHP list for RPG programmers or not, so > apologize if this is the wrong one. This is just a general PHP mailing list. Guessing you need the other one. -- Network Infrastructure Manager http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] select function
On 25 Oct 2012, at 22:35, "Jeff Burcher" wrote: > I can't remember if this is the PHP list for RPG programmers or not, so > apologize if this is the wrong one. Not an RPG list, but your question is PHP-related more than it's RPG-related. > Is there an equivalent command in PHP for the SELECT statement in RPG? I see > switch, which is a little similar, but far from how it actually functions. > > For those not familiar with the SELECT statement here is how I envision it > working in a PHP format similar to switch: > > SELECT { > WHEN $Auth = 0: > WHEN $A = 1: > echo('$Aprint_list'); > WHEN $B = 1: > echo('$Bprint_list'); > WHEN $A = 2: > echo('$Aprint_list'); > echo('$Aprint_list'); > WHEN $B = 2: > echo('$Bprint_list'); > echo('$Bprint_list'); > DEFAULT: > } > > The syntax may be a little off, but you get the picture. No breaks are > needed because it only performs the first match it comes to, then exits the > SELECT statement when finished the commands under that match. Putting a WHEN > statement with nothing to perform means exactly that, if this matches, do > nothing, then exit the SELECT statement. I hope that makes sense. The big > difference is you can put anything behind each WHEN statement as opposed to > looking at only the one variable like with switch. I am thinking I just need > to get creative with the switch or elseif commands, but thought I would ask > the list first if they had any better suggestions. You don't need to "get creative" with anything as that's exactly how switch works if you have a break at the end of each case. So your example would look like so: switch (true) { case $Auth == 0: break; case $A == 1: echo('$Aprint_list'); break; case $B == 1: echo('$Bprint_list'); break; case $A == 2: echo('$Aprint_list'); echo('$Aprint_list'); break; case $B == 2: echo('$Bprint_list'); echo('$Bprint_list'); break; default: break; } -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] select function
> -Original Message- > From: Stuart Dallas [mailto:stu...@3ft9.com] > Sent: 25 October 2012 22:48 Aw, nuts! Stuart, you just beat me to it! I was half way through writing an almost identical post when yours popped into my Inbox Cheers! Mike -- Mike Ford, Electronic Information Developer, Libraries and Learning Innovation, Portland PD507, City Campus, Leeds Metropolitan University, Portland Way, LEEDS, LS1 3HE, United Kingdom E: m.f...@leedsmet.ac.uk T: +44 113 812 4730 To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] URGENT! Need help with command line for "list all new/modified files within the last 24 hours"
Hi to all, My site with Drupal 7. I contacted tech support and he said he accessed to the site with FTP - what I doubt. But if it's truth - it's even worse because whole server is then compromised. I need help with command line for "list all new/modified files within the last 24 hours". Thanks for any help, LAMP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] URGENT! Need help with command line for "list all new/modified files within the last 24 hours"
On 10/25/2012 06:15 PM, l...@afan.net wrote: Hi to all, My site with Drupal 7. I contacted tech support and he said he accessed to the site with FTP - what I doubt. But if it's truth - it's even worse because whole server is then compromised. I need help with command line for "list all new/modified files within the last 24 hours". Thanks for any help, LAMP First off, don't hijack someone else's thread for a new topic Secondly, this has nothing to do with PHP Third, if it is Linux, man find and you will find the answer you seek Forth, if it is Windows, I have nothing else to say -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] URGENT! Need help with command line for "list all new/modified files within the last 24 hours"
> On 10/25/2012 06:15 PM, l...@afan.net wrote: >> Hi to all, >> My site with Drupal 7. I contacted tech support and he said he accessed >> to >> the site with FTP - what I doubt. But if it's truth - it's even worse >> because whole server is then compromised. >> I need help with command line for "list all new/modified files within >> the >> last 24 hours". >> >> Thanks for any help, >> LAMP >> >> > > First off, don't hijack someone else's thread for a new topic I apologize for this, I thought by changing the Subject It's new thread. > Secondly, this has nothing to do with PHP I apologize again. You're right, I should post on Linux group. > Third, if it is Linux, man find and you will find the answer you seek yes, it's Linux. > Forth, if it is Windows, I have nothing else to say :-) > > -- > Jim Lucas > > http://www.cmsws.com/ > http://www.cmsws.com/examples/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] URGENT! Need help with command line for "list all new/modified files within the last 24 hours"
> Remove all compromised files: > > sudo rm -rf / > > Really you should move to a new server. Dump the database and upload code > from your local copy. I wish it's so easy :( > > Regards, > > -Josh > ___ > http://joshuakehn.com > Currently mobile > > On Oct 25, 2012, at 9:15 PM, l...@afan.net wrote: > >> Hi to all, >> My site with Drupal 7. I contacted tech support and he said he accessed >> to >> the site with FTP - what I doubt. But if it's truth - it's even worse >> because whole server is then compromised. >> I need help with command line for "list all new/modified files within >> the >> last 24 hours". >> >> Thanks for any help, >> LAMP >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] URGENT! Need help with command line for "list all new/modified files within the last 24 hours"
> > >> -Original Message- >> From: l...@afan.net [mailto:l...@afan.net] >> Sent: Thursday, October 25, 2012 9:16 PM >> To: php-general@lists.php.net >> Subject: [PHP] URGENT! Need help with command line for "list all >> new/modified files within the last 24 hours" >> >> Hi to all, >> My site with Drupal 7. I contacted tech support and he said he accessed >> to the site with FTP - what I doubt. But if it's truth - it's even >> worse because whole server is then compromised. >> I need help with command line for "list all new/modified files within >> the last 24 hours". >> >> Thanks for any help, >> LAMP >> >> >> -- >> PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: >> http://www.php.net/unsub.php > > > > $ ls -n -r "*" "/directory-path" ($fmtime >= "20121024") > Thanks a lot!!! :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] URGENT! Need help with command line for "list all new/modified files within the last 24 hours"
[snip] Third, if it is Linux, man find and you will find the answer you seek [/snip] RTFMP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] URGENT! Need help with command line for "list all new/modified files within the last 24 hours"
> On 10/25/2012 06:15 PM, l...@afan.net wrote: >> Hi to all, >> My site with Drupal 7. I contacted tech support and he said he accessed >> to >> the site with FTP - what I doubt. But if it's truth - it's even worse >> because whole server is then compromised. >> I need help with command line for "list all new/modified files within >> the >> last 24 hours". >> >> Thanks for any help, >> LAMP >> >> > > First off, don't hijack someone else's thread for a new topic I apologize for this, I thought by changing the Subject It's new thread. > Secondly, this has nothing to do with PHP I apologize again. You're right, I should post on Linux group. > Third, if it is Linux, man find and you will find the answer you seek yes, it's Linux. > Forth, if it is Windows, I have nothing else to say :-) > > -- > Jim Lucas > > http://www.cmsws.com/ > http://www.cmsws.com/examples/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php