php-general Digest 1 Jul 2012 06:34:38 -0000 Issue 7872
php-general Digest 1 Jul 2012 06:34:38 - Issue 7872 Topics (messages 318347 through 318355): Re: Depreciation message I can't make out 318347 by: Gary Lebowitz 318348 by: tamouse mailing lists Re: log tailing 318349 by: Daniel Brown 318350 by: Daniel Brown 318352 by: tamouse mailing lists Re: php batch/queue framwork 318351 by: Larry Garfield 318355 by: Robert Williams embedding php inside of php 318353 by: Tim Dunphy 318354 by: Bastien Administrivia: To subscribe to the digest, e-mail: php-general-digest-subscr...@lists.php.net To unsubscribe from the digest, e-mail: php-general-digest-unsubscr...@lists.php.net To post to the list, e-mail: php-gene...@lists.php.net -- ---BeginMessage--- By the way, I told GoDaddy about the # deprecation issue and they told me that I could simply change my root directory php5.ini file. But the error message is related to the PHP.ini file in /web/config, as I said. I could almost hear them shrugging their shoulders, what-me-worry style. If anyone with more might than i could explain this error might affect others when multiplied hundreds of times it could be useful. Am 30.06.2012 19:23 schrieb Daniel Brown danbr...@php.net: On Thu, Jun 28, 2012 at 8:37 PM, tamouse mailing lists tamouse.li...@gmail.com wrote: Just a quick followup -- # comments are deprecated for .ini files, only, correct? They are still full citizens in php source, aren't they? Correct, Tam. -- /Daniel P. Brown Network Infrastructure Manager http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ---End Message--- ---BeginMessage--- On Sat, Jun 30, 2012 at 12:57 PM, Gary Lebowitz gurqi...@gmail.com wrote: By the way, I told GoDaddy about the # deprecation issue and they told me that I could simply change my root directory php5.ini file. But the error message is related to the PHP.ini file in /web/config, as I said. I could almost hear them shrugging their shoulders, what-me-worry style. If anyone with more might than i could explain this error might affect others when multiplied hundreds of times it could be useful. Am 30.06.2012 19:23 schrieb Daniel Brown danbr...@php.net: On Thu, Jun 28, 2012 at 8:37 PM, tamouse mailing lists tamouse.li...@gmail.com wrote: Just a quick followup -- # comments are deprecated for .ini files, only, correct? They are still full citizens in php source, aren't they? Correct, Tam. -- /Daniel P. Brown Network Infrastructure Manager http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php By the way, I told GoDaddy about the # deprecation issue and they told me that I could simply change my root directory php5.ini file. But the error message is related to the PHP.ini file in /web/config, as I said. I could almost hear them shrugging their shoulders, what-me-worry style. If anyone with more might than i could explain this error might affect others when multiplied hundreds of times it could be useful. Sadly, my only advice is to get away from GoDaddy. ---End Message--- ---BeginMessage--- On Fri, Jun 29, 2012 at 4:49 AM, Mihamina Rakotomandimby miham...@rktmb.org wrote: [snip!] Typically, a log line like: Jun 29 11:24:10 dev5 sshd[12775]: Accepted password \ for dev5 from 192.168.0.12 port 50544 ssh2 [snip!] So that I can: INSERT INTO ssh_activity \ VALUES ('2012-06-29 11:24:10', '192.168.0.12') I just need help on the right regexp function to use. Would you know some PHP/regexp tutorials for that? You could take the pattern-matching load off of PHP entirely if you used something along these lines. Just remember to adjust and clean up as necessary. ?php $ssh_entries = explode(PHP_EOL,trim(`tail /var/log/syslog | awk {'print $1,$2,$3 | $5 | $11'}`)); foreach ($ssh_entries as $s) { $l = explode('|',$s); // Remember to do whatever sanity necessary! $sql = INSERT INTO ssh_activity VALUES('.$l[0].','.$l[1].','.$l[2].'); } ? -- /Daniel P. Brown Network Infrastructure Manager http://www.php.net/ ---End Message--- ---BeginMessage--- On Sat, Jun 30, 2012 at 2:30 PM, Daniel Brown danbr...@php.net wrote: ?php $ssh_entries = explode(PHP_EOL,trim(`tail /var/log/syslog | awk {'print $1,$2,$3 | $5 | $11'}`)); Actually, the above was intended to grab just sshd entries, so instead of 'tail' you should use 'grep sshd' in the line above. foreach ($ssh_entries as $s) { $l = explode('|',$s); // Remember to do whatever sanity necessary! $sql = INSERT INTO ssh_activity VALUES('.$l[0].','.$l[1].','.$l[2].'); } ? -- /Daniel P. Brown Network Infrastructure Manager http://www.php.net/ -- /Daniel P. Brown Network
php-general Digest 1 Jul 2012 23:22:34 -0000 Issue 7873
php-general Digest 1 Jul 2012 23:22:34 - Issue 7873 Topics (messages 318356 through 318358): Re: embedding php inside of php 318356 by: Tim Streater 318357 by: Yared Hufkens Hello again 318358 by: RGraph.net support Administrivia: To subscribe to the digest, e-mail: php-general-digest-subscr...@lists.php.net To unsubscribe from the digest, e-mail: php-general-digest-unsubscr...@lists.php.net To post to the list, e-mail: php-gene...@lists.php.net -- ---BeginMessage--- On 01 Jul 2012 at 01:00, Tim Dunphy bluethu...@gmail.com wrote: I am trying to get the hang of php using some examples that I found in a book. I've been making progress lately, but one thing has me a bit stumped. In an HTML form that I am echoing through PHP I would like to embed smaller chunks of php in the code like so: echo 'br /br / form method=post action=sendemail.php label for=subjectSubject of email:/labelbr / input id=subject name=subject type=text value=?php echo $subject;?br / label for=elvismailBody of email:/labelbr / textarea id=elvismail name=elvismail rows=8 cols=40?php echo $text;? /textareabr / input type=submit name=Submit value=Submit / /form'; You don't need the nested echoes. Just concatenate instead: echo 'br /br / form method=post action=sendemail.php label for=subjectSubject of email:/labelbr / input id=subject name=subject type=text value=' . $subject . 'br / label for=elvismailBody of email:/labelbr / textarea id=elvismail name=elvismail rows=8 cols=40' . $text . ' /textareabr / input type=submit name=Submit value=Submit / /form'; In short you're doing this : echo 'Some HTML text here ' . $subject . ' some more HTML text ' . $text . ' and finally other stuff here'; -- Cheers -- Tim ---End Message--- ---BeginMessage--- If you are using PHP 5.4 or short_open_tag is 1, you can also do this: Some HTML text here?=subject?some more HTML text?=$text?and finally other stuff here Am 01.07.2012 14:01, schrieb Tim Streater: On 01 Jul 2012 at 01:00, Tim Dunphy bluethu...@gmail.com wrote: I am trying to get the hang of php using some examples that I found in a book. I've been making progress lately, but one thing has me a bit stumped. In an HTML form that I am echoing through PHP I would like to embed smaller chunks of php in the code like so: echo 'br /br / form method=post action=sendemail.php label for=subjectSubject of email:/labelbr / input id=subject name=subject type=text value=?php echo $subject;?br / label for=elvismailBody of email:/labelbr / textarea id=elvismail name=elvismail rows=8 cols=40?php echo $text;? /textareabr / input type=submit name=Submit value=Submit / /form'; You don't need the nested echoes. Just concatenate instead: echo 'br /br / form method=post action=sendemail.php label for=subjectSubject of email:/labelbr / input id=subject name=subject type=text value=' . $subject . 'br / label for=elvismailBody of email:/labelbr / textarea id=elvismail name=elvismail rows=8 cols=40' . $text . ' /textareabr / input type=submit name=Submit value=Submit / /form'; In short you're doing this : echo 'Some HTML text here ' . $subject . ' some more HTML text ' . $text . ' and finally other stuff here'; -- Cheers -- Tim ---End Message--- ---BeginMessage--- Hi, Just thought I'd say hello again. Back to brush up on my PHP a little after a bit of a break - more reading than replying I'd imagine. I have some pretty bad jokes too that I might surreptitiously insert here and there... Cheers. -- Richard Heyes, RGraph.net support RGraph: JavaScript charts for your website http://www.rgraph.net ---End Message---
Re: [PHP] Re: php batch/queue framwork
Zend Server includes a job queue. http://www.zend.com/en/products/server/zend-server-job-queue It supports queuing up jobs directly in the UI or via a PHP API, and it includes a variety of scheduling and load management options. -- Bob Williams Notice: This communication, including attachments, may contain information that is confidential. It constitutes non-public information intended to be conveyed only to the designated recipient(s). If the reader or recipient of this communication is not the intended recipient, an employee or agent of the intended recipient who is responsible for delivering it to the intended recipient, or if you believe that you have received this communication in error, please notify the sender immediately by return e-mail and promptly delete this e-mail, including attachments without reading or saving them in any manner. The unauthorized use, dissemination, distribution, or reproduction of this e-mail, including attachments, is prohibited and may be unlawful. If you have received this email in error, please notify us immediately by e-mail or telephone and delete the e-mail and the attachments (if any). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] embedding php inside of php
On 01 Jul 2012 at 01:00, Tim Dunphy bluethu...@gmail.com wrote: I am trying to get the hang of php using some examples that I found in a book. I've been making progress lately, but one thing has me a bit stumped. In an HTML form that I am echoing through PHP I would like to embed smaller chunks of php in the code like so: echo 'br /br / form method=post action=sendemail.php label for=subjectSubject of email:/labelbr / input id=subject name=subject type=text value=?php echo $subject;?br / label for=elvismailBody of email:/labelbr / textarea id=elvismail name=elvismail rows=8 cols=40?php echo $text;? /textareabr / input type=submit name=Submit value=Submit / /form'; You don't need the nested echoes. Just concatenate instead: echo 'br /br / form method=post action=sendemail.php label for=subjectSubject of email:/labelbr / input id=subject name=subject type=text value=' . $subject . 'br / label for=elvismailBody of email:/labelbr / textarea id=elvismail name=elvismail rows=8 cols=40' . $text . ' /textareabr / input type=submit name=Submit value=Submit / /form'; In short you're doing this : echo 'Some HTML text here ' . $subject . ' some more HTML text ' . $text . ' and finally other stuff here'; -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] embedding php inside of php
If you are using PHP 5.4 or short_open_tag is 1, you can also do this: Some HTML text here?=subject?some more HTML text?=$text?and finally other stuff here Am 01.07.2012 14:01, schrieb Tim Streater: On 01 Jul 2012 at 01:00, Tim Dunphy bluethu...@gmail.com wrote: I am trying to get the hang of php using some examples that I found in a book. I've been making progress lately, but one thing has me a bit stumped. In an HTML form that I am echoing through PHP I would like to embed smaller chunks of php in the code like so: echo 'br /br / form method=post action=sendemail.php label for=subjectSubject of email:/labelbr / input id=subject name=subject type=text value=?php echo $subject;?br / label for=elvismailBody of email:/labelbr / textarea id=elvismail name=elvismail rows=8 cols=40?php echo $text;? /textareabr / input type=submit name=Submit value=Submit / /form'; You don't need the nested echoes. Just concatenate instead: echo 'br /br / form method=post action=sendemail.php label for=subjectSubject of email:/labelbr / input id=subject name=subject type=text value=' . $subject . 'br / label for=elvismailBody of email:/labelbr / textarea id=elvismail name=elvismail rows=8 cols=40' . $text . ' /textareabr / input type=submit name=Submit value=Submit / /form'; In short you're doing this : echo 'Some HTML text here ' . $subject . ' some more HTML text ' . $text . ' and finally other stuff here'; -- Cheers -- Tim
[PHP] Hello again
Hi, Just thought I'd say hello again. Back to brush up on my PHP a little after a bit of a break - more reading than replying I'd imagine. I have some pretty bad jokes too that I might surreptitiously insert here and there... Cheers. -- Richard Heyes, RGraph.net support RGraph: JavaScript charts for your website http://www.rgraph.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php