Re: [PHP] Re: array_map() with multiple callback functions
On 2013-05-08, at 1:48 PM, Jim Giner wrote: > On 5/7/2013 5:29 PM, George Langley wrote: >> Hi all. I want to apply strtolower() AND trim() to all items in an array. >> But I don't see a way to call multiple callbacks with the array_map() >> function. >> Are my two choices the following: >> >> // 1) nesting two array_map() calls >> $cleanData = array_map('trim',(array_map('strtolower',$rawData))); >> >> >> // 2) call my own function with array_walk() >> $cleanData = array_walk('myCleaner',$rawData); >> >> function myCleaner($passedData){ >> $cleanData = array_map('strtolower',$passedData); >> $cleanData = array_map('trim',$cleanData); >> } >> //(Of course, wouldn't bother with a function, just to call array_map >> twice...) >> >> Just seeing if there's a better way than having to go through the array >> twice to apply each callback separately. Thanks, >> > Not sure if you have an answer to this yet, so I'll present my simpler > approach. > > foreach ($my_array as &$v) > { > $v = trim($v); > $v = strtolower($v); > } > > -- On 2013-05-07, at 3:43 PM, Alex Nikitin wrote: > Something like: > > $cleanData = array_map(function($str){return strtolower(trim($str));}, > $passedData); -- Thanks guys - will check both out to see what works best in my situation. George -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] array_map() with multiple callback functions
Hi all. I want to apply strtolower() AND trim() to all items in an array. But I don't see a way to call multiple callbacks with the array_map() function. Are my two choices the following: // 1) nesting two array_map() calls $cleanData = array_map('trim',(array_map('strtolower',$rawData))); // 2) call my own function with array_walk() $cleanData = array_walk('myCleaner',$rawData); function myCleaner($passedData){ $cleanData = array_map('strtolower',$passedData); $cleanData = array_map('trim',$cleanData); } //(Of course, wouldn't bother with a function, just to call array_map twice...) Just seeing if there's a better way than having to go through the array twice to apply each callback separately. Thanks, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Affordable low-fee e-commerce - DIY?
Hi all. Am wanting to build a site where people can donate $1.00 but is not for charity or other non-profit per se. So if I use PayPal, with their 2.9% + .30 per transaction fee, that equals .33 cents for each dollar - that's a full third of the amount the people would be giving. Credit cards appear to be similar, with some percantage and about .22 cents per transactions. Am wondering what other options I'm missing, that won't take such a chunk out of the low price? Is it easy enough to code to some other API for free (or at least cheaper)? Thanks. George Langley Interactive Developer www.georgelangley.ca
[PHP] Basic Statistics
Can anyone recommend a basic php stat package, easy to install and use. Just basic stuff like mean, median, range std dev etc thanks george
[PHP] SOAP problem
Hi, My first post for several years. Using PHP 5.2.6 on Debian. I'm trying to connect to an external SOAP server where no WSDL file exists. I've been unsuccessful in getting a response which I've put down to the message being sent. My code is: $params = array( 'RequestSystem' => 'PackTrackerTest', 'SenderName' => 'George', 'MessageId'=> '1234' ); $client = new SoapClient(null, array( 'soap_version' => 'SOAP_1_2', 'location' => "XX", 'uri' => "XX", 'trace'=> TRUE, )); $result = $client->__soapCall("GetReferenceData",array("GetReferenceData"=>$params)); Which generates the following message: http://schemas.xmlsoap.org/soap/envelope/"; xmlns:ns1="http://"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:ns2="http://xml.apache.org/xml-soap"; xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"; SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";> RequestSystem PackTrackerTest SenderName George MessageId 1234 The SOAP server is expecting to get something like: http://www.w3.org/2003/05/soap-envelope"; xmlns:v1="XXXX"> PackTrackerTest George 1024 Does anyone have any suggestions as to how I can format my xml message accordingly? MTIA George The information in this message is intended solely for the addressee and should be considered confidential. Publishing Technology does not accept legal responsibility for the contents of this message and any statements contained herein which do not relate to the official business of Publishing Technology are neither given nor endorsed by Publishing Technology and are those of the individual and not of Publishing Technology. This message has been scanned for viruses using the most current and reliable tools available and Publishing Technology excludes all liability related to any viruses that might exist in any attachment or which may have been acquired in transit.
[PHP] PHP Subroutine Call Blowing UP with Strings
All, I am new to PHP (about 3 weeks) and am testing the return of strings from a external database subroutine. This database is not relational, not MySQL, MSSQL or others. Thanks to all in advance for any help. Some info which might be helpful: phpinfo() PHP Version => 5.3.3-7+squeeze8 System => Linux dellT710 2.6.32-5-amd64 #1 SMP Mon Mar 26 07:00:19 UTC 2012 x86_64 root@dellT710:/var/www# php -i | grep extension_dir extension_dir => /usr/lib/php5/20090626+lfs => /usr/lib/php5/20090626+lfs root@dellT710:/usr/lib/php5/20090626+lfs# ls -la total 812 drwxr-xr-x 2 root root 4096 May 3 20:28 . drwxr-xr-x 5 root root 4096 May 2 07:35 .. -rw-r--r-- 1 root root 62936 Feb 10 08:31 curl.so -rw-r--r-- 1 root root 95596 Feb 10 08:31 gd.so -rw-r--r-- 1 root root 38272 Feb 10 08:31 mcrypt.so -rw-r--r-- 1 root root 109220 Feb 10 08:31 mysqli.so -rw-r--r-- 1 root root 42352 Feb 10 08:31 mysql.so -rw-r--r-- 1 root root 26116 Feb 10 08:31 pdo_mysql.so -rw-r--r-- 1 root root 87588 Feb 10 08:31 pdo.so -rwxr-xr-x 1 root root 173342 May 3 20:28 qmphp.so -rw-r--r-- 1 root root 141336 Aug 19 2010 suhosin.so The qmphp.so is the extension that is doing the call. Written by someone else installed by me. The subroutine returns 14 characters or less but blows up when I increase the string to 15 characters. Here is the successful return of two arguments and with 14 characters in the second argument. root@dellT710:/var/www# php test.php errorMsg ThereAre14Char The test code:
Re: [PHP] Re: Script failing on extension_dir
Matijin and Shawn, I added to /etc/php5/apache2/php.ini the line extension_dir = "/usr/lib/php5/20090626+lfs" but when I run qm_ext_build I still get You need to create the php extensions directory: /usr/lib/php5/20090626+lfs no could the error be in the qm_ext_build script. Here is the section of code producing the error. echo --- echo get the directory where PHP extension are stored echo --- EXTDIR=`php -i 2> /dev/null | grep -i "extension_dir" | cut -d" " -f3` if [ ! -d "$EXTDIR" ]; then echo -n -e "\n" echo echo You need to create the php extensions directory: echo $EXTDIR echo echo -n -e "\n" exit fi When I run manually I get: root@dell350:/usr/qmsys/qmphp# php -i 2> /dev/null | grep -i "extension_dir" | cut -d" " -f3 /usr/lib/php5/20090626+lfs no root@dell350:/usr/qmsys/qmphp# I am doing this so I can connect the database I use and have only been studying PHP for 5 days. I have attached a file with the results of php -I and the build script. Thanks again George -Original Message----- From: Matijn Woudt Sent: Tuesday, April 10, 2012 11:05 AM To: Shawn McKenzie Cc: George R Smith ; php-general@lists.php.net Subject: Re: [PHP] Re: Script failing on extension_dir On Tue, Apr 10, 2012 at 5:18 PM, Shawn McKenzie wrote: On 04/09/2012 03:16 PM, George R Smith wrote: EXTDIR=`php -i 2> /dev/null | grep -i "extension_dir" | cut -d" " -f3` Error message follows, what does the no mean ? get the directory where PHP extension are stored You need to create the php extensions directory: /usr/lib/php5/20090626+lfs no There is something wrong with the cut where it is getting a 'no' from the next line. No time to test fixing that now but the simple fix on your machine is this: EXTDIR="/usr/lib/php5/20090626+lfs" While I agree that it will fix the problem, it does sound suspicious. You can check what php -i returns, to check if there is any problem with your PHP configuration. root@dell350:/# php -i PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf .d/ming.ini on line 1 in Unknown on line 0 PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf .d/ps.ini on line 1 in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/2009062 6+lfs/qmphp.so' - /usr/lib/php5/20090626+lfs/qmphp.so: cannot open shared object file: No such file or directory in Unknown on line 0 phpinfo() PHP Version => 5.3.3-7+squeeze8 System => Linux dell350 2.6.32-5-686 #1 SMP Mon Mar 26 05:20:33 UTC 2012 i686 Build Date => Feb 10 2012 14:08:33 Server API => Command Line Interface Virtual Directory Support => disabled Configuration File (php.ini) Path => /etc/php5/cli Loaded Configuration File => /etc/php5/cli/php.ini Scan this dir for additional .ini files => /etc/php5/cli/conf.d Additional .ini files parsed => /etc/php5/cli/conf.d/curl.ini, /etc/php5/cli/conf.d/gd.ini, /etc/php5/cli/conf.d/idn.ini, /etc/php5/cli/conf.d/imagick.ini, /etc/php5/cli/conf.d/imap.ini, /etc/php5/cli/conf.d/mcrypt.ini, /etc/php5/cli/conf.d/memcache.ini, /etc/php5/cli/conf.d/ming.ini, /etc/php5/cli/conf.d/mysql.ini, /etc/php5/cli/conf.d/mysqli.ini, /etc/php5/cli/conf.d/pdo.ini, /etc/php5/cli/conf.d/pdo_mysql.ini, /etc/php5/cli/conf.d/pdo_sqlite.ini, /etc/php5/cli/conf.d/ps.ini, /etc/php5/cli/conf.d/pspell.ini, /etc/php5/cli/conf.d/recode.ini, /etc/php5/cli/conf.d/snmp.ini, /etc/php5/cli/conf.d/sqlite.ini, /etc/php5/cli/conf.d/sqlite3.ini, /etc/php5/cli/conf.d/suhosin.ini, /etc/php5/cli/conf.d/tidy.ini, /etc/php5/cli/conf.d/xmlrpc.ini, /etc/php5/cli/conf.d/xsl.ini PHP API => 20090626 PHP Extension => 20090626 Zend Extension => 220090626 Zend Extension Build => API220090626,NTS PHP Extension Build => API20090626,NTS Debug Build => no Thread Safety => disabled Zend Memory Manager => enabled Zend Multibyte Support => disabled IPv6 Support => enabled Registered PHP Streams => https, ftps, compress.zlib, compress.bzip2, php, file, glob, data, http, ftp, phar, zip Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, sslv3, sslv2, t ls Registered Stream Filters => zlib.*, bzip2.*, convert.iconv.*, string.rot13, str ing.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, mc rypt.*, mdecrypt.* This server is protected with the Suhosin Patch 0.9.9.1 Copyright (c) 2006-2007 Hardened-PHP Project Copyright (c) 2007-2009 SektionEins GmbH This program makes use of the Zend Scripting Language Engine: Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologi
[PHP] Script failing on extension_dir
All, I am tying to install php that will talk to the database I us (QM, a pick type database). As I am new to pdp don’t have much experience in figuring out what the qm_ext_build script is failing. Thanks for you help in advance. george I am trying to run following: root@dell350:/usr/qmsys/qmphp# ./qm_ext_build It is failing here with the message after the script. echo --- echo get the directory where PHP extension are stored echo --- EXTDIR=`php -i 2> /dev/null | grep -i "extension_dir" | cut -d" " -f3` if [ ! -d "$EXTDIR" ]; then echo -n -e "\n" echo echo You need to create the php extensions directory: echo $EXTDIR echo echo -n -e "\n" exit fi Error message follows, what does the no mean ? get the directory where PHP extension are stored You need to create the php extensions directory: /usr/lib/php5/20090626+lfs no There is a directory which contains (I think) the compiled extensions. I am unsure where to go from here. Do I create a extension_dir and if so where do I put it and do I have to copy the file currently in 20090626+lfs to it. Also would have to, I believe, add the extension_dir to the php.ini file. Help would be appreciated. root@dell350:/usr/lib/php5/20090626+lfs# ls -la total 1688 drwxr-xr-x 2 root root 4096 Apr 9 08:33 . drwxr-xr-x 5 root root 4096 Apr 8 08:20 .. -rw-r--r-- 1 root root 62936 Feb 10 08:31 curl.so -rw-r--r-- 1 root root 95596 Feb 10 08:31 gd.so -rw-r--r-- 1 root root 20024 Feb 27 2010 idn.so -rw-r--r-- 1 root root 335288 Jun 1 2010 imagick.so
[PHP] Questionnaire on motivation analysis of open source and open content
Dear Sirs, We are researchers in Technical University of Crete and our current research is in the field of motivation analysis of open source and open content software projects participants. We would like to ask you to fill a questionnaire and forward it to people involved in such teams and projects. The web address is the following: https://docs.google.com/spreadsheet/viewform?formkey=dHdqZUgyay0waXNRbWFvV3hleVBZSWc6MQ All personal information will be kept confidential and will be used for academic purposes only. For further information please do not hesitate to contact with us. Thank you in advance Dr G. Tsinarakis -- --- Dr.George Tsinarakis Production and Management Engineer, CAM Laboratory Department of Production Engineering and Management Technical University of Crete University Campus, 73 100 Chania, Crete , Greece Tel: +30 2821 037306 Fax: +30 2821 037551 E -mail: tsinar@ dpem.tuc.gr ---
Re: [PHP] Sniping on the List
> >> It's another nail in the coffin of deity constructors. - And just as this thread was getting boringly OT! ;-{)] George Langley Interactive Developer www.georgelangley.ca
[PHP] Sniping on the List
Am concerned over the number of posts that appear to be from people trying to over-inflate their self-importance. If you are the world's best coder, then help those of us who aren't. If you happen to know a better way to do something that I'm struggling with, then please share it. But if you just want to take pot shots at us, then please keep your comments to yourself. To that end, I wish to thank Ashley Sheridan, Daniel P. Brown, Tedd Sperling and Tommy Pham, to name but just a few of those who have submitted incredibly-helpful posts, that I have kept for reference. Your contributions are very much appreciated - thanks. George Langley Interactive Developer www.georgelangley.ca
Re: [PHP] Frivolous Friday Fun!
On 2011-11-11, at 11:08 AM, Jason Pruim wrote: > > > And on a serious note... To any Past, Present, Or Future service man (Or > woman) Thank you for your sacrifice in defending our ability to send out > these Frivolous Friday emails! :) You're welcome! CPO2 George Langley HMCS TECUMSEH Naval Reserve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] BP for Looping through an Array
Hi all. Am wondering if there is a best practice for looping through an array, when you need both the item and its position (ie. 1, 2, 3). The two ways I know of: // the for loop tracks the position and you get each item from the array $allFiles = array("coffee.jpg", "tea.jpg", "milk.jpg"); $numberOfFiles = count($allFiles); for ($i=1; $i<=$numberOfFiles; $i++) { $currFile = $allFiles[$i - 1]; // since arrays start with 0 doThisWith($currFile); doThatWith($i); } OR: // the for loop gets each item and you track the position $allFiles = array("coffee.jpg", "tea.jpg", "milk.jpg"); $counter = 1; foreach ($allFiles as $currFile) { doThisWith($currFile); doThatWith($counter); $counter += 1; } Both are the same number of lines, but my tests (see code below) indicate that the foreach loop is twice as fast. Anyone have a "better" way - faster, more efficient, "cooler", etc.? (Or see some flaw in my test code below?) Thanks. George Langley -- TEST CODE -- Loop Test"; // create a large array $theArray = array(); for ($i=1; $i<=100; $i++) { array_push($theArray, $i); } $confirmCount = count($theArray); echo "An array of $confirmCount items (numbers 1 to $confirmCount) has been created."; echo "Type of LoopTime Taken to Add UpaddUp Value"; for ($x=1; $x<=10; $x++) { // run tests 10x // the for loop tracks the position and you get each item from the array $addUp = 0; $time_start = microtime(true); $numberOfItems = count($theArray); for ($i=1; $i<=$numberOfItems; $i++) { $currItem = $theArray[$i - 1]; // since arrays start with 0 $addUp += $currItem; // give it something to do } $time_end = microtime(true); $time = $time_end - $time_start; echo "For (Tracks Position): $time$addUp"; // the for loop gets each item and you track the position $addUp = 0; $time_start = microtime(true); $counter = 1; foreach ($theArray as $currItem) { $addUp += $currItem; // give it something to do $counter += 1; } $time_end = microtime(true); $time = $time_end - $time_start; echo "Foreach (Tracks Items): $time$addUp"; echo " "; } echo ""; ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] different menus for different roles
On 2011-10-20, at 12:31 AM, drupal dev wrote: > I have created two domains in drupal. and two different roles. > > Now i wanted to show different page for each role.can you anybody tell me > how to do it. > > Or share with me if something is readily available. Um, drupal.org would fall into that latter category: http://drupal.org/project/menu_per_role Remember: Google IS your friend. G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with code...
On 2011-10-06, at 6:28 PM, Jason Pruim wrote: > > > //SETUP VARIABLES > > $mailTo = "li...@pruimphotography.com"; > $mailFrom = "li...@pruimphotography.com"; > //These 2 can be changed IF you know what you are doing and why! > $returnPath = $mailFrom; > $replyTo = $mailFrom; > $mailSubject = "New Convention registration!"; > > $message = ""; > > //DO NOT CHANGE UNDER PENALITY OF BEING SLAPPED WITH A WET NOODLE!!! > > $headers = "From: ".$mailFrom."\n"; > $headers .= "Return-Path: ".$returnPath."\n"; > $headers .= "Reply-To: ".$replyTo."\n"; > > function send_email($mailTo, $mailSubject, $mailMessage, $headers) { > > >if(mail( $mailTo, $mailSubject, $mailMessage, $headers )) { > >$message = "Thank you for registering!"; > >}else { >echo "There was an issue with your registration.. Please try again > later"; >} > > }//Close Function > > > if(!empty($errorCount)) { > > >}else { >//Build Email message >$mailmessage = "Full Name: " . $_POST['firstname'] . " " . > $_POST['lastname'] . "\n\n"; >$mailmessage .= "Address: " . $_POST['address'] . "\n\n"; >$mailmessage .= "City, State, Zip: " . $_POST['city'] . " " . > $_POST['state'] . " " . $_POST['zip'] . "\n\n"; >$mailmessage .= "Phone: " . $_POST['phone'] . "\n\n"; >$mailmessage .= "Email address: " . $_POST['email'] . "\n\n"; >if($_POST['affiliation'] == "NFBOther") { >$mailmessage .= "Chapter Affiliation: " . $_POST['other'] . > "\n\n"; >}else{ >$mailmessage .= "Chapter Affiliation: " . > $_POST['affiliation'] . "\n\n"; >} >if($_POST['person'] =="Other"){ >$mailmessage .= "Who will pick up the ticket? " . > $_POST['Pfirstname'] . " " . $_POST['Llastname'] . "\n\n"; > >}else{ >$mailmessage .= "Who will pick up the ticket? I will pick it > up my self! \n\n"; > >} > > $mailmessage .= "Payment Method: " . $_POST['paymentMethod']; > >send_email($mailTo, $mailSubject, $mailmessage, $headers); >} > > ?> > > Sometimes... It is dropping the last $mailmessage line... The payment method > in the actual email it sends... > > Anyone have any ideas? I'm stumped Hi there. First thought is perhaps it is not getting a value for paymentMethod and if it doesn't exist, will the line still get added? I would always check to see if every post variable isset, before adding the line. Can write a default line in its place if missing. George Langley Interactive Developer "RIP, Mr. Jobs."
Re: [PHP] book quest
On 2011-09-29, at 8:53 AM, Andy McKenzie wrote: >> Is there something wrong with the PHP.net manual? Or you just want >> something physical to be able read any where and stay unplugged? If the >> latter and there's nothing wrong with the official manual, try downloading >> the chm or single html file and print as you go. No need to lug around >> thick that manual/reference ;) >> >> Regards, >> Tommy > > > I didn't find that there was anything wrong with the PHP.net manual, > except that it wasn't a book about learning to program. It's a > fantastic reference guide; if I can't remember what order the inputs > to that one function go in, it's my first resort. But I prefer to > read paper for learning theory, and I find it more useful to flip > through pages trying to find something I half remember than to click > through links. Put simply, I like to learn the basics from books > rather than web pages. -- And as the OP said, something that they can carry around - websites don't always cut it on the morning commute! (Although I hope the OP wouldn't "smoke" anything!) I too prefer books, as they are usually organized as a training course, starting you with the basics and walking you through a logical progression of learning, as well as giving real-world lessons and experience. Not saying that php.net is or isn't, but more often than not, the manuals that come with software are organized by sections or features, and do not give you the basics from which to start. It's no good to start with "This is the drawing tool", if you don't know how to create a canvas to draw on. Reference books/sites are good once you know the basics on proper techniques, best practices and sensible workflows, and you can now expand into the full features that the software can offer. Plus, they can target your skills and desired learning - am currently researching Drupal, and have found some books that teach the basics on using it within its limits, and then others that teach how to build your own modules and plugins. Depending on what you are looking for, you can quickly target the skills you need to learn. And, is easier to make your notes in the margins on a piece of paper! Having said that, one of the main books I used for PHP was Apress' "Beginning PHP and MySQL", which is now in a 4th edition: http://www.apress.com/9781430231141 It provided a logical approach to both technologies and how to integrate them, all in one book. Then get one that focuses on security. O'Reilly has one (or more), but the one I picked up was "Securing PHP Web Applications": http://www.amazon.ca/Securing-PHP-Applications-Tricia-Ballad/dp/0321534344 and was a good read. I just wish book publishers offered an upgrade path if you bought an earlier edition, the way software publishers do! Perhaps that will be the greatest advantage an iPad or Kobo will have over paper. George Langley Multimedia Developer
Re: [PHP] Any free online tests to test my PHP knowledge?
On 2011-09-22, at 11:53 AM, Mike Hansen wrote: > Does anyone know of a site that has an online test of PHP skills? I'd like to > review my PHP knowledge. > > I've already run across this site: > http://vladalexa.com/scripts/php/test/test_php_skill.html Doesn't appear to be working. Just has a link to some blog and no results. George -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] While on the topic of PHP Web Site Stats - SharePoint...
Hi all. Had a meeting today where I was rather condescendingly told that most CMS web sites use SharePoint. Last I checked: <http://trends.builtwith.com/cms> Wordpress, Joomla! and Drupal (PHP, PHP and oh look, PHP) kind of had the CMS market wrapped up, with numerous other systems fighting for the remains. In fact, I don't see SharePoint even listed at the above link. Any stats on (warning - buzzwords ahead) "External-facing" web sites using SharePoint? At $$$ for the required server software, compared to <$ for just about anything PHP-based, can only imagine companies using SharePoint must have their IT department in charge of the web site. Am sure it's fine as an internal project management tool, but am very concerned when other developers tell me to run away from anyone who chooses to use SharePoint on anything public. Thanks. George Langley Interactive Developer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Repetitive answers . . .
On 2011-09-09, at 12:39 PM, Larry Martell wrote: > On Fri, Sep 9, 2011 at 12:36 PM, Daniel Brown wrote: >> On Fri, Sep 9, 2011 at 14:30, Robert Cummings wrote: >>> >>> Oblig: http://www.youtube.com/watch?v=sUntx0pe_qI >> >>I didn't know it was possible to fill almost four minutes with a >> single note, outside of a test pattern. That's got to be the worst >> "singer" I've ever heard in my entire life. > > I agree, I only lasted 1 minute. Oh, so you didn't see the (as my kids like to say) "totally random" 30-something-year-old male rapper suddenly appearing in a 14-year-old girl's video about partying like she's an adult? Something very wrong with a who that pays to get her daughter into a video like that... But thanks for reminding me that it is Friday. They all blend together when you're between jobs... And now, back to the job search George Langley Interactive Developer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Repetitive answers . . .
On 2011-09-09, at 11:34 AM, Marc Guay wrote: > That low-hanging fruit is too hard for some to resist... --- Phishing is a art. George -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code should be selv-maintaining!
On 2011-08-31, at 11:44 PM, Ross McKay wrote: > On Tue, 30 Aug 2011 10:04:54 -0400, Tedd Sperling wrote: > >> I prefer the Whitesmiths style: >> >> http://rebel.lcc.edu/sperlt/citw229/brace-styles.php >> >> But "style" is really up to the individual -- what works best for you >> is the "best" (unless it's a team effort or the clients demand). > > I note on your page that you prefer Whitesmiths (truly ugly!) style even > for JavaScript. I'd strongly recommend against that, and also Allman > style, due to semicolon insertion. e.g. (randomly selected from Google) > > http://encosia.com/in-javascript-curly-brace-placement-matters-an-example/ > http://robertnyman.com/2008/10/16/beware-of-javascript-semicolon-insertion/ > > Sure, instances of the problem are minimal, but if you're in the habit > of Dangerous Open Brace Placement then you just might fall afoul of it. > > Besides, my editor (Geany) folds code mostly neatly with K&R :) --- FWIW, am working my way through an O'Reilly book (HTML5 Canvas) right now and they appear to use The One True Brace Style in their code examples. Not religious about it, but it does help me know which code I wrote and what was touched by someone else! George -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Code should be selv-maintaining!
"The One True Brace Style": <http://en.wikipedia.org/wiki/Indent_style> Didn't know there was a name for the way I learned to indent! Make sense to me - looks so much cleaner and less scrolling/printing. And, I already add a comment to confirm the end brace: } // end if($myVar) to clarify any long nests. George On 2011-08-29, at 2:05 PM, Richard Riley wrote: > Robert Cummings writes: > >> On 11-08-29 03:42 PM, Rico Secada wrote: >>> You go into your homemade library of code to re-use some piece that you >>> already are using 12 other places in production. Now, last time you >>> worked on the code you thought it was almost perfect. While working on >>> the code this time you find an undiscovered bug or some part of the >>> code that looks like you where on drugs when you made it. > > More an issue with library management :) "git checkout releaseV1.1" ; > >> >> *lol* Yes, I think we've all seen it from time to time. Have you ever gone >> back >> and looked at your school assignments in coding? *shudder*. The horror is >> compounded by the fact I was using K&R style indentation back then ;) > > small point of order : K&R indentation is still considered by many as > the cleanest and is used on many many large code bases. Personally I > much prefer > > f(){ > a; > } > > to > > f() > { > } > > as the first one is two boundary balanced. But like emacs vs vi it's a > religious issue > > > > > -- > 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] Fwd: ezmlm warning
On 2011-07-20, at 5:40 AM, Jan Reiter wrote: > Hi, I'm in Germany and I got it, too. I get those about once in 6 month ... > nothing to worry about, is it?? > > Regards Got it here: Canada with Shaw ISP. But am getting this thread now, so assume it's "fixed"? George -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re: [PHP] Your language sucks because...
- Original Message - From: Micky Hulse > On Thu, Jul 14, 2011 at 4:02 AM, Richard Quadling > wrote: > > My daughter (6 or 7 at the time) came up with T, M and E. I was > > abso-bloody-lutely amazed she managed to find a word starting > with T, > > M and E. > > What was the word? -- He gave you a beautiful hint: tmesis |təˈmēsis| noun ( pl. -ses |-sēz|) the separation of parts of a compound word by an intervening word or words, heard mainly in informal speech (e.g., a whole nother story; shove it back any-old-where in the pile). ORIGIN mid 16th cent.: from Greek tmēsis ‘cutting,’ from temnein ‘to cut.’ George -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Your language sucks because...
On 2011-07-14, at 4:36 AM, Ashley Sheridan wrote: > > That's a massive pet hate of mine, along with using here/hear in the wrong > way and those who have no idea of the difference between "there", "their" & > "they're". Makes me want to beat them upside the head with a dictionary :) Mine are it's and its (Remember: it's its!), people who say "people that" (It should be "People WHO!") and the complete lack of regard to plural versus singular verbs ("There's lots?" "No, there ARE lots of examples of that out there!"). As far as the original list: http://wiki.theory.org/YourLanguageSucks#PHP_sucks_because: it's just a tongue-in-cheek way to point out inconsistencies in the various languages. However, is kind of out-dated, referring to PHP 4 and CSS 2, so am wondering how many of the entries have been rectified? (For instance, CSS 3 does have multiple background images.) As well, I suspect that some of them may actually make sense if analyzed as to why they are that way, instead of how the author has grouped them. George Langley Multimedia Developer
Re: [PHP] Report generation as pdf and csv in php application for huge record set
On 2011-07-14, at 12:50 AM, Midhun Girish wrote: > > > On Thu, Jul 14, 2011 at 11:18 AM, George Langley > wrote: > On 2011-07-13, at 11:20 PM, Midhun Girish wrote: > > > Hi, > > > > > > - Browsers generally have a 5 minute time-out. If you send the PDF directly > > to the browser and reach the limit, it will be lost. It is therefore > > advised for very big documents to generate them in a file, and to send some > > data to the browser from time to time (with a call to flush() to force the > > output). When the document is finished, you can send a redirection to it or > > create a link. > > Remark: even if the browser times out, the script may continue to run on > > the server. > > > > > > When it comes to the user end, they wont wait for more than 1 min. So > > redirection after generating the report is not possible. But creating link > > may be a good idea. How can it be done? I mean shouldn't there be a service > > running in the server to process these request after the execution of the > > php script is completed? Also shouldn't we post all the report generation > > request to a database so that serial processing can be done? > --- >We're helping each other here, as I'm facing a similar situation! Read > up on how to store as a file here: > > <http://www.sitepoint.com/generate-pdfs-php/> > > You should then be able to generate an email notification to send once the > file is complete, with the link to the newly-created file. > > > George Langley > Multimedia Developer > > > Suppose we are using this tool at sever side. We have set up the php page so > that all request will be saved in a db. And based on the conditions in > request a pdf CAN be generated by this tool. My question is how will we give > the trigger for generating this pdf? We cant do it in the php script due to > the timeout problem. The only solution i can think of is a cron which is > repeated every 5 min or so which fetches records from the db and generates > the pdf. But even with a cron we will face the timeout problem. Is there any > alternative to a cron like a server side service or something? > > > Midhun Girish -- As I understand it, the "server-side" timeout can be increased in the php.ini setting. So the PHP script can run as long as required if that is set sufficiently high enough. As long as you send something to the browser to confirm that the process has started, the browser-side timeout will not be a problem and your user will know to wait until notified by email that the file is ready. Once the script has completed, it stores the final db record and sends the email. George
Re: [PHP] Report generation as pdf and csv in php application for huge record set
On 2011-07-13, at 11:20 PM, Midhun Girish wrote: > Hi, > > > - Browsers generally have a 5 minute time-out. If you send the PDF directly > to the browser and reach the limit, it will be lost. It is therefore advised > for very big documents to generate them in a file, and to send some data to > the browser from time to time (with a call to flush() to force the output). > When the document is finished, you can send a redirection to it or create a > link. > Remark: even if the browser times out, the script may continue to run on the > server. > > > When it comes to the user end, they wont wait for more than 1 min. So > redirection after generating the report is not possible. But creating link > may be a good idea. How can it be done? I mean shouldn't there be a service > running in the server to process these request after the execution of the php > script is completed? Also shouldn't we post all the report generation request > to a database so that serial processing can be done? --- We're helping each other here, as I'm facing a similar situation! Read up on how to store as a file here: <http://www.sitepoint.com/generate-pdfs-php/> You should then be able to generate an email notification to send once the file is complete, with the link to the newly-created file. George Langley Multimedia Developer
Re: [PHP] Report generation as pdf and csv in php application for huge record set
On 2011-07-13, at 9:59 PM, Midhun Girish wrote: > > I have an erp application developed in php (zend framework actually). There > are many reports which the admin level users can take from the application. > Some reports have more than 600,000 records. The viewing of reports in the > browser is fine as i have paginated the result. But when it comes to > exporting the entire report as pdf and in excel format, im in trouble. I use > fpdf for pdf generation and a custom class for converting result to excel. > Both these fails when the number of records exceeds 500. Now i have > pagianted the report generation and users can download the pdf page wise. > But that is not the exact requirement. Im in need of a tool to generate pdf > and excel(or csv) for large data set. I came across > http://www.htmldoc.org/when i googled for one. Has anyone in the list > has faced a similar problem. > How exactly is report generation possible when the number of records is > extremely huge? Is there a good solution which can be implemented in php? > Please help. - Hi there. FAQ #16 on: <http://www.fpdf.org/en/FAQ.php#q16> has some useful info on handling large files: 16. What's the limit of the file sizes I can generate with FPDF? There is no particular limit. There are some constraints, however: - The maximum memory size allocated to PHP scripts is usually 8MB. For very big documents, especially with images, this limit may be reached (the file being built into memory). The parameter is configured in the php.ini file. - The maximum execution time allocated defaults to 30 seconds. This limit can of course be easily reached. It is configured in php.ini and may be altered dynamically with set_time_limit(). - Browsers generally have a 5 minute time-out. If you send the PDF directly to the browser and reach the limit, it will be lost. It is therefore advised for very big documents to generate them in a file, and to send some data to the browser from time to time (with a call to flush() to force the output). When the document is finished, you can send a redirection to it or create a link. Remark: even if the browser times out, the script may continue to run on the server. HTH George Langley Multimedia Developer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Self-whitelisting (WAS: Top Posting)
On 2011-07-06, at 8:02 AM, Jim Giner wrote: > > "George Langley" wrote : >> On 2011-07-05, at 8:52 PM, Jim Giner wrote: >> >>> Huh? You have a problem with a person having a spam filter that requires >>> one valid response to ensure that the mail from an address is from a real >>> person ONE TIME ONLY? >> -- >> I know that I do. I monitor our web site's registration system, and will get >> a number of notices from things like Boxbe, stating that they've delayed the >> email with the confirmation link that we send our clients, until we confirm >> receipt of their notice. But, this can be used against you, as they now know >> that your address is valid, and can in turn spam you! >> * > > But they can't spam me until they do make a response. And if they are > actually in-human (!) enough to go to that length (and I suspect that the > laziness factor of a spammer will reduce that possibility), I can easily > blacklist them - which I have only had to do a couple of times in the last > 5-6 years. Depends if they only require your response once for ALL of their "customers". If they require it for each one, and you blacklist them, you won't receive the notices from any subsequent customers. George -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Self-whitelisting (WAS: Top Posting)
On 2011-07-05, at 8:52 PM, Jim Giner wrote: > Huh? You have a problem with a person having a spam filter that requires > one valid response to ensure that the mail from an address is from a real > person ONE TIME ONLY? -- I know that I do. I monitor our web site's registration system, and will get a number of notices from things like Boxbe, stating that they've delayed the email with the confirmation link that we send our clients, until we confirm receipt of their notice. But, this can be used against you, as they now know that your address is valid, and can in turn spam you! Can read the ugly details on Wiki: <http://en.wikipedia.org/wiki/Boxbe> I won't subject my company to that nuisance. George Langley Multimedia Developer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Class not used as an object (Scope Resolution Operator)
Thanks all. Assuming is best then to add the static in this case. But it isn't required if I birthed an object first and referenced the object, correct? Am wanting to add some variables to the class so not calling the same query so many times... Thanks again. George On 2011-06-09, at 5:23 PM, David Harkness wrote: > All of the above with a clarification: they are instance methods which you > are calling statically. The object is not instantiated in this case. PHP > allows this but will issue an E_STRICT warning. To remove the warning just > add "static" before each of them, assuming they are only ever called > statically: > > class myClass { > static function &doThis($passedVar) { > doSomething; > } > > static function &doThat($anotherVar) { > doSomethingElse; > } > } > > David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Class not used as an object (Scope Resolution Operator)
Hi all. Am fixing some inherited code, and the previous coder created a class, ie: class myClass { function &doThis($passedVar) { doSomething; } function &doThat($anotherVar) { doSomethingElse; } } BUT, I don't see anywhere where he created an object, ie: $myObject = new myClass(); or $myObject = myClass::doThis("value"); Instead, it's only ever just called directly with a "Scope Resolution Operator", ie: myClass::doThis("valueOne"); myClass::doThat($whatever); myClass::doThis("valueTwo"); myClass::doThat($andSoOn); It seems that this would be making an object, and then destroying it again, on each of the four calls above, which I would think would be wasteful - time, memory, cpu usage, etc. The class has no constants or variables (properties) for any need for persistence, and is just a collection of functions (methods), so I don't see a reason to group them into a class - they could all reside as independent functions within the php file. Is this good? Is there some advantage to making a non-persistent class? Thanks! George Langley Multimedia Developer Audio/Video Editor Musician, Arranger, Composer
Re: [PHP] array_multisort into Natural order?
Hi there! Correct me if I'm wrong but merge() just makes one array of all items. array_multisort() keeps each array separate, while applying the same re-ordering to all three arrays. This allows you to use the same position number to get the required elements from each array, especially where each array is a list of different properties. For example: $name = array("Joe", "Charlie", "Jack"); $age = array(30, 12, 66); $job = array("Plumber", "Student", "Retired"); array_multisort($name, $age, $job); // will re-order all three arrays based on a "regular" alphanumeric sort of the names: // $name is now array("Charlie", "Jack", "Joe"); // $age is now array(12, 66, 30); // $job is now array("Student", "Retired", "Plumber", ); // can now do: $firstName = $name[0]; // returns "Charlie" $firstAge = $age[0]; // returns Charlie's age 12 $firstJob = $job[0]; // returns Charlie's job "Student" A merge of these arrays will lose the different types of info each array currently has, and make it impossible to match a name to the age or job. Now, my other option is to group the items into a set of arrays: $array1 = array('name' => 'Joe', age => '30' job => 'Plumber'); $array2 = array('name' => 'Charlie', age => '12' job => 'Student'); $array3 = array('name' => 'Jack', age => '66' job => 'Retired'); $largeArray = array($array1, $array2, $array3); But, is there a way to the sort $largeArray, based on the "name" value in each individual array? And if so, can that use the natsort()? I don't think an asort() can do either. Note that the original source of this info is a mySQL db call, and it is initially sorted in the query, but again, there doesn't appear to be a way to natural sort an SQL query either. So I get file1, file10, file2, file20, file5 instead of file1, file2, file5, file10, file20 G - Original Message - From: Jim Lucas Date: Monday, December 13, 2010 16:00 Subject: Re: [PHP] array_multisort into Natural order? To: George Langley Cc: php-general@lists.php.net > On 12/13/2010 11:59 AM, George Langley wrote: > > Hi all. Can use natsort($array1) to sort a single array of > filenames into a "natural "alphanumeric order - 1.php, 2.php, > 5.php, 10.php, 20.php, etc. > > But using array_multisort($array1, $array2, $array3) doesn't > offer a natsort option, so I end up with 1.php, 10.php, 2.php, > 20.php, 5.php, etc. > > > > Anyone have a solution to this limitation already? Nothing > found in the archives or Googling. > > Thanks. > > assuming that you are not using other options of > array_multisort(), why not do > something like this. > > $ar = array_merge($array1, $array2, $array3); > natsort($ar); > > > > > > > George Langley Multimedia > Developer Audio/Video Editor > Musician, Arranger, Composer www.georgelangley.ca > > > > > > > > > George Langley Multimedia Developer Audio/Video Editor Musician, Arranger, Composer www.georgelangley.ca
Re: [PHP] Brandon Rampersad wants to chat
Actually, it's been SEVEN times since 19 May, including today's. Perhaps the List Mom could step in here? George On 10-Jun-10, at 3:07 PM, Ashley Sheridan wrote: Please could you not send out these auto messages Brandon as I believe this is the second time a message has hit both my email address and the mailing list with a request for Google chat from you. Thanks, Ash http://www.ashleysheridan.co.uk On Thu, 2010-06-10 at 13:46 -0700, Brandon Rampersad wrote: --- Brandon Rampersad wants to stay in better touch using some of Google's coolest new products. If you already have Gmail or Google Talk, visit: http://mail.google.com/mail/b-b89a7a894d-87f44ca42c-QxVqdDj-Y-taKgwQ_V0g-Q8WRBY You'll need to click this link to be able to chat with Brandon Rampersad. To get Gmail - a free email account from Google with over 2,800 megabytes of storage - and chat with Brandon Rampersad, visit: http://mail.google.com/mail/a-b89a7a894d-87f44ca42c-QxVqdDj-Y-taKgwQ_V0g-Q8WRBY Gmail offers: - Instant messaging right inside Gmail - Powerful spam protection - Built-in search for finding your messages and a helpful way of organizing emails into "conversations" - No pop-up ads or untargeted banners - just text ads and related information that are relevant to the content of your messages All this, and its yours for free. But wait, there's more! By opening a Gmail account, you also get access to Google Talk, Google's instant messaging service: http://www.google.com/talk/ Google Talk offers: - Web-based chat that you can use anywhere, without a download - A contact list that's synchronized with your Gmail account - Free, high quality PC-to-PC voice calls when you download the Google Talk client We're working hard to add new features and make improvements, so we might also ask for your comments and suggestions periodically. We appreciate your help in making our products even better! Thanks, The Google Team To learn more about Gmail and Google Talk, visit: http://mail.google.com/mail/help/about.html http://www.google.com/talk/about.html (If clicking the URLs in this message does not work, copy and paste them into the address bar of your browser). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] $_GET is Mangling Base64 value
Hi again. Thanks for all the info! Not sure I'd agree that GET should just "assume" it was URLencoded, but hey - who am I to argue? :-{)] As mentioned, this is eventually buried into a Joomla! site's login functions (displays any errors). So not sure I'd have access to the originating call to URLencode it before sending, if it's part of the standard Joomla! login function and not some of our custom code. However, Mike's suggestion to "pre-parse" it at our end: $_GET['foo'] = str_replace(' ', '+', $_GET['foo']); appears to work fine. I put the above in in just before the GET in my bare-bones PHP-only test, and in the actual Joomla! page just before their equivalent call: echo base64_decode(JRequest::getVar('message', '', 'method', 'base64')); Have tested it with strings that also included a / (being the other non-alphanumeric character that Base64 uses), and it remains unaffected. So, guess I can either add the pre-parse wherever I need to, or try to locate the call to see if I can urlencode it (and who am I to argue why they didn't do that too?!) Thanks again. George
[PHP] $_GET is Mangling Base64 value
Hi all. Is there an issue with $_GET not handling a Base64-encoded value correctly? (PHP is 5.1.6) Am receiving a Base64-encoded value: theurl.com/index.php?message=x and retrieving it with $_GET: echo $_GET["message"]; x is a Japanese phrase, that has been encoded into Base64. So is using the + symbol: ...OODq+OCou... but my $_GET is replacing the + with a space: ...OODq OCou... thus the base64_decode() is failing (displays diamonds with questions marks on my Mac). The Base64-encoded string is 156 characters long, if that has any bearing. My test URL is 230 characters in total, less than the "old" 256 limit. All I can find online is a reference that PHP will no longer assume that a space is a +: <http://ca3.php.net/manual/en/function.base64-decode.php#69298> but my problem is the opposite - the + symbols are there, but the GET is removing them. (And to add a wrinkle, this then goes into a Joomla! page, whose getVar() command completely removes the +, so I couldn't even do a string replace, as I don't know where the + should have been!) Tired of looking at the dark red spot on the wall! Thanks. George Langley Multimedia Developer Audio/Video Editor Musician, Arranger, Composer www.georgelangley.ca
[PHP] mysqli_connect problem
I am a newbie. The following script works but the second one (below) loads the variables from an html form and then fails. The connection commands in the second sript are identical as the first script was copied from the first. Only the variable values have been changed. #!/usr/bin/php # The following program successfully loads the variables from an html form and then fails. The echo entries confirm the variables a have been loaded from an html form. The program just stops after the echo entries - no die message, nothing in /var/log/mysql.err or mysql.log. My system is Debian Squeeze, 64 bit. I have php5 version 5.3.1-5, php5-mysql version 5.3.1-5, mysql-client-5 and mysql-server-5 version 5.1.41-3 installed. Any suggestions? Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mysqli_connect problem
I am a newbie. The following script works but the second one (below) loads the variables from an html form and then fails. The connection command in the second sript are identical as the first script was copied from the first. Only the variable values have been changed. #!/usr/bin/php # The following program successfully loads the variables from an html form and then fails. The echo entries confirm the variables a have been loaded from an html form. The program just stops after the echo entries - no die message, nothing in /var/log/mysql.err or mysql.log. I believe the problem is a permissions problem. I had to make the first script executable so of course I also made the second executable but this did not help. My system is Debian Squeeze, 64 bit. I found I had to install php5-mysql to use the mysqli_connect command. Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sending email with php
<http://articles.sitepoint.com/article/code-html-email-newsletters> is a straight-ahead overview of what you can/should/cant/shouldn't do in HTML e-mails. Or check out: <http://www.devshed.com/c/a/PHP/Composing-Messages-in-HTML-for-MIME-Email-with-PHP/ > for some heavy-duty mail classes (be sure to check the "See Also" section for the full story). I also referenced the following: <http://www.wilsonweb.com/wmt5/html-email-multi.htm> on the basics of sending multi-part e-mail (ie. plain text AND HTML). HTH. George On 23-Dec-09, at 1:58 PM, Sudhakar wrote: $message = 'Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> http://www.w3.org/1999/xhtml";> Email Newsletter '; if(! mail($to, $subject, $message, $headers)){ echo "There was an error is sending the email"; } else{ echo "The email has been sent"; } ?> hi my question is about send an email with php like a newsletter, when we read a newsletter email its similar to a webpage which contains content, images, css and other elements i created a static webpage initially with html css and images folder after creating the page i wanted to test to see how it would look if i were to send this as an email like a newsletter. so i have created a php file with $headers = "Content-type: text/html; charset=iso-8859-1"; $to="myemailaddress"; $subject="Email Newsletter"; and $message as mentioned above has the entire html code as i used it in my static html page i also copied the style.css in the server and created images folder and copied all the images i used in my static page to the server. i created a separate folder in my webserver called newsletter and copied the php file, css file and images folder with the images i used when i accessed the index.php as http://website.com/emailnewsletter i am getting a message that The email has been sent and i am getting the email however my question is when i open this email the styles and images are not being applied and i see only the text in the static page i created. can someone let me know how i can fix this so that when i open the email it would look like the static page i created with all the styles applies and images displayed is this only possible by using specialized email softwares or can it be done by php as well with the logic used. any help will be appreciated. thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ip-to-country
From my experience, I have had reported one incorrect country-level IP from Maxmind's paid service (returned US vrs Canada for a Canadian IP). But their free version is based on the commercial lists, just not updated as often, or automatically (you download and store locally on your server). So should be nearly as accurate as long as you maintain the lists (ie. think is weekly, being 2-weeks behind). That said, someone on another list is running a geo-location service comparison test, where you click links to the various services, then enter the location they returned. He was compiling the results, and so far has reported the following: -QUOTE--- So far some crazy numbers and realities. Of these numbers, all of the vendors missed 25 exact city locations equally. So our continued plan is to measure how far off the approx. 25% are so we can then say, "OK, x vendor is 100% accurate up to x% and then x% accurate within say x-y miles". The shocking thing to us is still how some of the more expensive providers will say their definition of accuracy on a city level can be within 25 miles. Thus you would receive statistical confidence of a 90-100 for an IP that shows Pasadena, Calif. and yet in reality be located in Long Beach, Calif., or the same for San Jose, Ca. and yet be further up the peninsula in San Carlos, Ca. total: 103 ip2: 55 quova: 46 ipiligence: 32 whatis: 62 maxmind: 63 By the way, we are obviously way short still on queries so if you haven't clicked on the link, please do so and follow some ez pz instructions: http://www.stratosanalytics.com/iplookup.html -END QUOTE--- So help him out by clicking the link (although not sure what he means by "e-zed-p-zed instructions" ;-{)] ) George On 14-Dec-09, at 5:07 AM, Angelo Zanetti wrote: -----Original Message- From: George Langley [mailto:george.lang...@shaw.ca] Sent: 19 October 2009 01:38 AM To: php-general@lists.php.net Subject: Re: [PHP] ip-to-country On 18-Oct-09, at 1:03 PM, SED wrote: How can I access an index for IP to a country (or a more detailed location)? <http://www.maxmind.com/app/ip-location> has both free and various paid services. George Hi George, How accurate are the free ones compared to the paid ones? Regards Angelo http://www.elemental.co.za http://www.wapit.co.za
Re: [PHP] ip-to-country
On 18-Oct-09, at 1:03 PM, SED wrote: How can I access an index for IP to a country (or a more detailed location)? <http://www.maxmind.com/app/ip-location> has both free and various paid services. George -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP broadcast mailer
On 16-Oct-09, at 11:56 PM, George Langley wrote: At what point would it be beneficial to subscribe to a mass mail service such as Constant Contact or iContact, to avoid being blacklisted for sending too many e-mails? On 17-Oct-09, at 12:01 AM, Brian Hazelton wrote: I am sorry, but I am confused by your question. I thought that these companies worked with email providers to stay off the blacklists? --- They do - my point exactly. You may be fine for a small mass e-mail campaign (you mentioned 400 but growing). But if you do grow to the point of something getting triggered, and your URL or server, or worse, your ISP, gets black-listed, it may be hard to undo the damage. Am not sure what sort of limits any of these will allow before they start thinking you are spamming. Or how big you have to be to be considered trust-worthy to be allowed to send multiple e-mails. My main ISP (shaw.ca - 100s of 1,000s of customers) has gotten blacklisted a number of times, and suddenly friends would get e-mails to my @shaw address rejected, and had to start using one of my other addresses. A very tiny mail list I belonged to (40 people if even that) refused to send to all of its @shaw members, and I ended up re- registering under a different address because it happened enough times. The company I work for has internal clamps that get triggered if anyone tries to send to more than 50 addresses. They also run a separate mail server from their web site hosting. The site is hosted on Amazon's Cloud - a huge company, and yet every one of their IPs are black-listed: <http://searchcloudcomputing.techtarget.com/news/article/0,289142,sid201_gci1371369,00.html > The result was that even just a single e-mail to confirm registration to the member-only section of the site was getting flagged as spam by hotmail, or rejected outright by some other mail servers. Kinda hard to complete a registration if you never see the e- mail! We ended up relaying through our own mail server, which is fine for a one-at-a-time e-mail. But at over 50,000 customers, I have been strongly recommending the use of service if they do decide to start any mass e-mail newsletters or campaigns. Anyway, my point is - how important is this part of your business, and would it be worth the $ cost to use a service, rather than building, maintaining and potentially protecting your own? Just a thought. George -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP broadcast mailer
Hi there. At what point would it be beneficial to subscribe to a mass mail service such as Constant Contact or iContact, to avoid being blacklisted for sending too many e-mails? George On 16-Oct-09, at 11:41 PM, Brian Hazelton wrote: I am in charge of an email newsletter list and making sure it gets sent out in time. My problem is I have never done broadcast emailing and right now we have 400 subscribers but want to build a system that can scale well regardless of the number of subscribers. Right now I use mysql to store the email and use phpmailer in a loop to send an email to each of the emails in the db, it is already slow with just 400(takes around 10 min (i think that's slow isnt it?). Has anyone built a broadcast email script and willing to help me? -- 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] Web Site Directory Layout
On 26-Sep-09, at 2:38 AM, Ashley Sheridan wrote: I tend to usually go with the following, using what fits with the project: index.php styles/ images/ scripts/ includes/ --- Add files/ for any download-able files. Then for multi-lingual projects, I'll add a content/[language]/ structure, to put my content php files in, while leaving the structural php files on the root. User preferences and cookies form the path to grab the content, but this way you get similar (and shorter) URLs. George Langley Multimedia Developer www.georgelangley.ca
Re: [PHP] header problem
Hi Blueman. As soon as ANYTHING has been drawn to the browser, you cannot use a header command. So you need to work through all of your code, and ensure that all of your logic that could result in a header call is run BEFORE you send any html code. Is going to be tricky if mixing html and php calls. George On 10-Sep-09, at 12:27 AM, A.a.k wrote: hello I recentrly uploaded my project from localhost to a hosting and found many errors and warnings which didnt have in local. one of the most annoying one is header('Location xxx'). I have used header to redirect users from pages, and kinda used it alot. i know about the whitespace causing warning, but most of the pages i'm sending users got html and php mixed so i'm confused about how to remove whitespace in a html/php file. the error is : Warning: Cannot modify header information - headers already sent by here is a simple example, user update page : if($valid) { $msg='111'; $user->dbupdate(); header("Location: /admin/index.php?msg=$msg"); } else { foreach($errors as $val) echo ''.$val.''; } and on admin index i get $msg and display it. .. //lots of stuff '; break; case '421':... } ?> // more html and php how can i fix this? -- 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] Write Japanese text into an existing PDF
On 31-Aug-09, at 6:37 AM, tedd wrote: I used the PDFB library to create this: http://webbytedd.com/bb/pdf/ Here's a link for more information: http://chir.ag/projects/pdfb/ While I've never used Japanese text, I think as long as you have a font for it, it should work. Cool - looks like it could be used to brand a PDF with dynamic text inserted by a visitor to your site. This has potential for me! Thanks! George Langley Musician, Arranger, Composer www.georgelangley.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: File or directory?
is_dir() <http://ca3.php.net/is_dir> is_file() <http://ca3.php.net/manual/en/function.is-file.php> George Langley On 15-Aug-09, at 5:45 PM, Clancy wrote: On Sat, 15 Aug 2009 10:33:07 +0100, a...@ashleysheridan.co.uk (Ashley Sheridan) wrote: On Sat, 2009-08-15 at 09:56 +0200, Ralph Deffke wrote: can u upload ur own files ? can u create a directory ? Yes. are u using a ftp client ? No; I'm using straight PHP FTP "Clancy" wrote in message news:kjhc85hpub7drihgappifphcboolt9u...@4ax.com... I have just got access to a new server, and am playing with upload/download procedures. I looked in the root directory, and see several objects which I assume to be directories. However I was surprised to find there does not appear to be any command to determine if an object is a file or directory, either in PHP FTP or plain FTP. I could try to change to them, or download them, but this seems overkill. Am I overlooking something obvious? That answer doesn't seem to quite come close even to answering the op question. Have you looked at ftp_rawlist which returns a detailed list of files, along with their permissions and directory flags? Or you could use ftp_size to determine the size of a file, which should be nothing for a directory. Thanks, Yes; I found ftp_rawlist eventually, but I still haven't found a definition of the return code, though I think I know most of it. I guess that even a null file will hve some length? I will probably use the leading 'd' in the return code to test for directories.. (And I spent a long time trying to work out how 'drwxr-xr-x 2 riordan riordan 512 Jul 31 06:40 cgi-bin' could contain lots of spaces, before I remembered that, as a result of one of the weirder design decisions, HTML suppresses trailing spaces.) -- 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
[PHP] Can php be cause a strain on a web server
Is there a case where php can become unscalable for a web sever ? If so can anyone please state to me how... Thanks George
Re: [PHP] Sorting mySQL query - one order from multiple fields
In case anyone else was wondering, the command to use is COALESCE() as in: $theQuery = mysql_query("select variousFields from theTable where date = '$currDate' ORDER BY COALESCE(rotime2,rotime1,time)"); COALESCE() will use "one" of the variables, being the one it finds a value for first, for each record. Note how this differs from a multi sort, which sorts by the first field, then subsorts by the second, third, etc. Hope this helps someone. George Langley Multimedia Developer, Audio/Video Editor, Musician, Arranger, Composer http://www.georgelangley.ca ----- On 14-Jun-09, at 8:30 PM, George Langley wrote: Hi all. Am trying to sort baseball games by time, where there can be up to 3 times listed per game. Each game has an original "date" and "time" field, plus fields for 2 rain-out dates/times ("rodate1" "rotime1", "rodate2", "rotime2"), to use if the game gets rained out. Note that rotime1 and rotime2 are NULL if no time has been entered. Also note that the original date and time fields are not changed - they are kept for posterity. Usually, the rain-out date is set to a day that the teams were already going to play each other again, with the rain-out game going first. So need to sort those 2 games in order: rain-out first, then normally-scheduled. But, I can't just sort on the "time" field, as the rain-out game could now have a different time. I need to use the rotime2 (if it exists), else use the rotime1 (if it exists), else use the time. Can not get my query order to work. One of the variations I've tried: $theQuery = mysql_query("select variousFields from theTable where date = '$currDate' ORDER BY CASE WHEN rotime2 THEN rotime2 WHEN rotime1 THEN rotime1 ELSE time"); Is there a query sort that will work in this case? Is not the usual "sort by last name, then sort by first name" scenario! Thanks for any pointers. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sorting mySQL query - one order from multiple fields
Hi all. Am trying to sort baseball games by time, where there can be up to 3 times listed per game. Each game has an original "date" and "time" field, plus fields for 2 rain-out dates/times ("rodate1" "rotime1", "rodate2", "rotime2"), to use if the game gets rained out. Note that rotime1 and rotime2 are NULL if no time has been entered. Also note that the original date and time fields are not changed - they are kept for posterity. Usually, the rain-out date is set to a day that the teams were already going to play each other again, with the rain-out game going first. So need to sort those 2 games in order: rain-out first, then normally-scheduled. But, I can't just sort on the "time" field, as the rain-out game could now have a different time. I need to use the rotime2 (if it exists), else use the rotime1 (if it exists), else use the time. Can not get my query order to work. One of the variations I've tried: $theQuery = mysql_query("select variousFields from theTable where date = '$currDate' ORDER BY CASE WHEN rotime2 THEN rotime2 WHEN rotime1 THEN rotime1 ELSE time"); Is there a query sort that will work in this case? Is not the usual "sort by last name, then sort by first name" scenario! Thanks for any pointers. George Langley Multimedia Developer, Audio/Video Editor, Musician, Arranger, Composer http://www.georgelangley.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Debugging
Understanding that some coders are diametrically opposed to all assistance from debuggers as crutches, I offer this link for the rest of us: http://particletree.com/features/php-quick-profiler/ Mine was pointing to the wrong folder and still has some warnings so I think these guys might have hurried a bit but it still looks awfully cool.
Re: [PHP] Multiple return statements in a function.
On Thu, Apr 23, 2009 at 8:25 AM, Per Jessen wrote: > Peter van der Does wrote: > >> I tend to put my return value in a variable and at the end of the >> function I have 1 return statement. >> I have seen others doing returns in the middle of the function. >> >> Example how I do it: >> function check($a) { >> $return=''; >> if ( is_array( $a ) ) { >> $return='Array'; >> } else { >> $return='Not Array'; >> } >> return $return; >> } >> >> Example of the other method: >> function check($a) { >> >> if ( is_array( $a ) ) { >> return ('Array'); >> } else { >> return ('Not Array'); >> } >> } >> >> What is your take? And is there any benefit to either method? > > It's only about style and coding logic. In essence, all the return does > is pop the previous IP off the stack and adjust the stack pointer. It > doesn't matter where you do that. > > > /Per > > > -- > Per Jessen, Zürich (16.2°C) > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > That's an interesting subject that I've never considered. I usually return immediately. For me, it makes the code easier to read. I work with a number of other coders here and, if the result isn't returned then I have to keep reading through the code to make sure nothing else is done with it. However, when I see the 'return' then I know we're done there. That said, I often see questionable coding practices in use at work. I follow this list (and try to read books about the technologies I use) because I intend to develop good practices for myself. That in mind, if anybody feels strongly about doing it the other way, I'd be interested in understanding its benefits. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ! and !=
Doh, of course! Just not thinking about the scope of the operator. If $var1 = 1, then !$var1 = 0 Thanks everyone! George - Original Message - From: Tom Rogers Date: Wednesday, April 22, 2009 17:01 Subject: Re: [PHP] ! and != To: George Langley Cc: php-general@lists.php.net > Hi, > > Thursday, April 23, 2009, 8:30:34 AM, you wrote: > GL> Hi > all. Maybe I'm just getting confused by all the > GL> languages I'm trying to work with! But, isn't: > > GL> if(!$var1 == $var2){ > > GL> the same thing as > > GL> if($var1 != $var2){ > > GL> #1 doesn't > work, #2 does. > GL> Thanks! > > > GL> George Langley Multimedia Developer Audio/Video Editor > GL> Musician, Arranger, Composer www.georgelangley.ca > > GL> "Too many choices, too little sleep." > > Use brackets to make them the same: > > if(!($var1 == $var2)) { > > -- > regards, > Tom > > George Langley Multimedia Developer Audio/Video Editor Musician, Arranger, Composer www.georgelangley.ca
[PHP] ! and !=
Hi all. Maybe I'm just getting confused by all the languages I'm trying to work with! But, isn't: if(!$var1 == $var2){ the same thing as if($var1 != $var2){ #1 doesn't work, #2 does. Thanks! George Langley Multimedia Developer Audio/Video Editor Musician, Arranger, Composer www.georgelangley.ca "Too many choices, too little sleep."
Re: [PHP] alt() - unknown function?
This is someplace where NetBeans really benefits me. You can hit CTRL-B, or right-click, to take you to a definition. Holding CTRL turns darned-near everything into a hyperlink, doing the same thing. Lastly, CTRL-SHIFT-F lets you search through every file in the project for your string. Finding nothing with those, I'd grep the whole stinkin' drive and go grab a coffee. :) On Wed, Apr 15, 2009 at 10:39 AM, Thodoris wrote: > > Hi all, >> >> I've just started looking at the code of an e-commerce site we are taking >> over the development of, that another company has previously developed . >> Coupled with the difficulty of taking over development of someone else's >> code (also poorly commented), I've been stumped by a fatal error on a >> function call alt() which is dotted everywhere in the main templating >> script >> (sample below): >> >> // Get/Set a specific property of a page >> function getPageProp($prop,$id="") { return >> $this->PAGES[alt($id,$this->getPageID())][$prop]; } >> function setPageProp($prop,$val,$id="") { >> $this->PAGES[alt($id,$this->getPageID())][$prop]=$val; } >> >> It looks to be defining properties for a list of pages, with each page >> providing its own PageID. >> I've never seen this function before, nor can I find any definition of it >> in >> the site code, I was wondering if anyone recognises this, is it from a >> thirdparty templating tool at all? >> >> Thanks >> >> -Tom >> >> >> >> > > > I think that you should check the included files (require, require_once, > include, include_once) in case it is defined somewhere in there. Another > possibility I can think of is to be defined in a framework that you use. > > You can check the user and internal functions using the > get_defined_fumctions(): > > http://us.php.net/manual/en/function.get-defined-functions.php > > -- > Thodoris > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
Re: [PHP] extracting text - regex
On Wed, Apr 8, 2009 at 9:13 AM, George Larson wrote: > I'm what you might consider rather green, myself. > I certainly wouldn't use this code for production but if you're just > debugging or something then how about something like this: > > $handle = @fopen('page.htm', 'r'); > if ($handle) { > while (!feof($handle)) { > $eos = trim(fgets($handle, 4096)); > if (strpos($eos,"") !== FALSE) { $echo_output = TRUE; } > if (strpos($eos,"<\div>") !== FALSE) { $echo_output = FALSE; } > if ($echo_output == TRUE) { echo $eos; } > } > fclose($handle); > } > ?> > > > > > On Wed, Apr 8, 2009 at 8:30 AM, Per Jessen wrote: > >> Merlin Morgenstern wrote: >> >> > Hello, >> > >> > I am trying read text out of a text that is inbetween two divs. >> > Somehow this should be possible with regex, I just can't figure out >> > how. >> > >> > Example: >> > >> > >> > bla blub >> > >> > >> > I would like to extract the text "bla blub" out of this example. >> > >> >> This might do the trick (not tested): >> >> preg_match( "/]*>([^<]*)<\/div>", $yourtext, $match ); >> print $match[1]; >> >> >> /Per >> >> >> -- >> Per Jessen, Zürich (16.8°C) >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > Sorry about the top-post. I forgot. :)
Re: [PHP] extracting text - regex
I'm what you might consider rather green, myself. I certainly wouldn't use this code for production but if you're just debugging or something then how about something like this: ") !== FALSE) { $echo_output = TRUE; } if (strpos($eos,"<\div>") !== FALSE) { $echo_output = FALSE; } if ($echo_output == TRUE) { echo $eos; } } fclose($handle); } ?> On Wed, Apr 8, 2009 at 8:30 AM, Per Jessen wrote: > Merlin Morgenstern wrote: > > > Hello, > > > > I am trying read text out of a text that is inbetween two divs. > > Somehow this should be possible with regex, I just can't figure out > > how. > > > > Example: > > > > > > bla blub > > > > > > I would like to extract the text "bla blub" out of this example. > > > > This might do the trick (not tested): > > preg_match( "/]*>([^<]*)<\/div>", $yourtext, $match ); > print $match[1]; > > > /Per > > > -- > Per Jessen, Zürich (16.8°C) > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
Re: [PHP] Best Practices for Hiding Errors
Thanks for all the info, everyone! Seems like the @ trick is nice for individual lines, but turning off/on every time may be bit much on a complicated page. The ini_set('display_errors', false); also has a hit, as it turns back on after the entire script has run, but seems the easier way and just the one time may not be too bad. So maybe is best to turn it off in the actual ini, and turn on only for me, based on my IP or some other flag. Thanks again! George Langley Multimedia Developer, Audio/Video Editor, Musician, Arranger, Composer http://www.georgelangley.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Best Practices for Hiding Errors
Hi all! Have a question about hiding PHP errors from the end user. I have the following lines: $fp = fsockopen ($host, 80, $errno, $errstr, $timeout); if (!$fp) { // problem, put error handing code here } else { // success, do whatever here } but if fsockopen is unsuccessful, PHP will display an error warning on the page before it even gets to my error handling code. I found the display_errors command at: < http://ie.php.net/manual/en/errorfunc.configuration.php#ini.display-errors> but they give the following warning: "This is a feature to support your development and should never be used on production systems (e.g. systems connected to the internet)." Am unclear what that means - is it okay to add: ini_set('display_errors','Off'); to my page, so that an end user won't ever get the warning displayed and I can deal with the error behind the scenes? Or is there a better way to keep PHP from writing error codes to the screen? Thanks! George Langley Multimedia Developer Audio/Video Editor Musician, Arranger, Composer www.georgelangley.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [php] scheduled task in php
On Thu, Apr 2, 2009 at 10:12 AM, Kyle Smith wrote: > There's no need for third party software, windows has a scheduled task > system. > > Make a scheduled task and for the application select the php executable > (Maybe C:\PHP\bin\php.exe, or some such.). Once the wizard is complete > select the checkbox that says "Open the task when I click Finish". Now > place the full path of your script after the executable in the field > provided so it looks something like: > > "C:\PHP\php.exe" "C:\Documents and Settings\Kyle\My > Documents\scripts\MyCronPHPScript.php" > > HTH, > Kyle > > *Kyle Smith* > UNIX/Linux Systems Administrator > Inforonics, LLC > > > > Jan G.B. wrote: > >> Or even with CRONw if "via window" is an indicator for the evil OS. >> http://cronw.sourceforge.net/ >> (I personally didn't test this software) >> bye >> >> 2009/4/2 Michel OLIVIER : >> >> >>> hi, >>> with a cron and wget? >>> >>> 2009/4/2 Andrew Williams : >>> >>> All, Please how can you run a timed php script file via window scheduled task. or how can u execute a php script on a a time interval for instance every 4minutes -- Best Wishes Andrew Williams >>> -- >>> PHP General Mailing List (http://www.php.net/) >>> To unsubscribe, visit: http://www.php.net/unsub.php >>> >>> >>> >>> >> >> >> > I have found Window's task scheduler utterly insufficient. I understand, and agree with, your desire to keep things native but I have thrown that away for my scheduled events. I swear bt VisualCron [ http://www.visualcron.com/].
Re: [PHP] Workflow app for software
Please quit side-posting. Thanks. On Wed, Apr 1, 2009 at 2:58 PM, Robert Cummings wrote: > I for one don't find you very | On Wed, 2009-04-01 at 11:46 -0700, > funny Bruce. It's common knowledge | bruce wrote: so haliphax... > that it's very difficult to follow | > > side posts. If not already, then | > since you seem to be the primary > they should certainly be | > person with this issue.. at > dictatorily banned from being used.| > least for now... i'll ahead and >| > nominate you to the guy in > Cheers,| > charge of making sure posters > Rob. | > follow the written rule to not >| > top/down/side/left/right post... > | > > | > have fun!!! > | > > | > > | > > | > -Original Message- From: > | > haliphax > | > [mailto:halip...@gmail.com] > | > Sent: Wednesday, April 01, 2009 > | > 11:42 AM To: > | > php-general@lists.php.net > | > Subject: Re: [PHP] Workflow app > | > for software > | > > | > > | > On Wed, Apr 1, 2009 at 1:38 PM, > | > Robert Cummings > | > wrote: > | > > On Wed, 2009-04-01 at 13:30 > | > >> -0500, haliphax wrote: On > | > >> Wed, Apr 1, 2009 at 11:53 > | > >> > AM, bruce > | > >> > > | > >> > wrote: and haliphax... > | > >> > > | > >> > i specifically sent the > | > >> > reply to only you.. you > | > >> > then felt the need to reply > | > >> > to the list as a whole > | > >> > > | > >> > hmm.. ok.. this thread is > | > >> > officially dead!! > | > >> > > | > >> > unless of course it gets > | > >> > back to the initial > | > >> > question... > | > >> > > | > >> > peace!! > | > >> > > | > >> > > | > >> >> > -Original > | > >> >> > Message- From: > | > >> >> > haliphax >| > >> >> > Sent: Wednesday, April > | > >> >> > 01, 2009 5:38 AM To: > | > >> >> > php-general@lists.php.net > | > >> >> > Subject: Re: [PHP] > | > >> >> > Workflow app for > | > >> >> > software > | > >> > | > >> --8<-- > | > >> > | > >> >> Again, please do not > | > >> >> top-post. It is the > | > >> >> agreed-upon procedure in > | > >> >> this list to bottom-post > | > >> >> when replying to threads. > | > >> >> (I am not just going > | > >> >> "renegade thread-Nazi" on > | > >> >> you.) > | > >> > > | > >> > Could you show me the > | > >> > signed agreement list. > | > >> > While it's convention on > | > >> > this list, it's certainly > | > >> > not something everyone > | > >> > agreed upon. > | > >> > | > >> To Rob, I meant agreed-upon > | > >> as in: it's been written... > | > >> so
[PHP] PHP task manager
We've got a homebrew ToDo list (task & project) manager / mailer that we're thinking about replacing with something a little more robust. Any suggestions? I saw TaskFreak! on Google but I am curious if there are any personal recommendations out there. Thanks! G
Re: [PHP] Limit Local Search to Content
Hi Ashley. That's what I'm doing, but want to limit what gets stored to just the content. Every page has a drop-down menu of, for instance, various cities, so I want to exclude that part of the page in my search terms. I don't want every page to think it has content on Calgary, Hamburg, Phoenix, etc. I finally walked myself through the code I had been modifying, and found that they were parsing it line by line with an fgets (rather than word by word). So was able to use Stuart's original idea of surrounding the content with an unique comment line, and setting a flag to tell whether to parse the line or not. If it found the line, it would start parsing, and stop again when it reached the line. Is also nice that I can then specify multiple sections within the page if I need to. On 26-Mar-09, at 6:22 PM, Ashley Sheridan wrote: What about storing all of the page content in the database to start with, then searching with a mysql statement is a breeze! On Thu, 2009-03-26 at 16:29 -0600, George Langley wrote: - Original Message - From: Stuart You can't have any extra info in a closing HTML tag. This problem is usually handled using comments. Something like the following... sofihsod hiosdh sdh gus us u sg You then just start with you see the begin comment and stop when you hit the end comment. - Hmm, they are stripping out the tags before looking at the words, so didn't work quite as I originally thought. The solution seems to be to explode the string based on the entire comment before doing the word-by-word storing. I wrote up the following test code that seems to work and handles any string or error I could think of. Am wondering if this is good or is there better/more efficient code? "; $finalArray = array(); $finalString = ""; $exploded1 = explode($pStart, $pString); // makes array $exploded1 for ($i=1; $iin array { $exploded2 = explode($pStop, $exploded1[$i]); array_push($finalArray, $exploded2[0]); // array of just the wanted sections } foreach ($finalArray as $value3) { $finalString .= $value3 . " "; // " " ensures separation between substrings } $finalString = trim($finalString); // trim any extra white space from beginning/end echo $finalString; echo ""; } // TEST $startTerm = "START"; $stopTerm = "STOP"; // test typical string $theString = "one two START three four STOP five six START seven eight STOP nine ten"; contentString($theString, $startTerm, $stopTerm); // outputs "three four seven eight" // test string with immediate START $theString = "START one two STOP three four START five six STOP seven eight START nine ten"; contentString($theString, $startTerm, $stopTerm); // outputs "one two five six nine ten" // test string with "error" (2 STARTS) $theString = "START one two START three four STOP five six START seven eight STOP nine ten"; contentString($theString, $startTerm, $stopTerm); // outputs "one two three four seven eight" // test string with no space between separators and real content $theString = "STARTone twoSTOP three four STARTfive sixSTOP seven eight STARTnine ten"; contentString($theString, $startTerm, $stopTerm); // outputs "one two five six nine ten" ?> Any thoughts/suggestions? Thanks! George Ash www.ashleysheridan.co.uk George Langley Multimedia Developer, Audio/Video Editor, Musician, Arranger, Composer http://www.georgelangley.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Limit Local Search to Content
- Original Message - > From: Stuart > > You can't have any extra info in a closing HTML tag. This > > problem is > > usually handled using comments. Something like the following... > > > > > > > > sofihsod hiosdh sdh gus us u sg > > > > > > > > You then just start with you see the begin comment and stop > when you > > hit the end comment. > - Hmm, they are stripping out the tags before looking at the words, so didn't work quite as I originally thought. The solution seems to be to explode the string based on the entire comment before doing the word-by-word storing. I wrote up the following test code that seems to work and handles any string or error I could think of. Am wondering if this is good or is there better/more efficient code? "; $finalArray = array(); $finalString = ""; $exploded1 = explode($pStart, $pString); // makes array $exploded1 for ($i=1; $i"; } // TEST $startTerm = "START"; $stopTerm = "STOP"; // test typical string $theString = "one two START three four STOP five six START seven eight STOP nine ten"; contentString($theString, $startTerm, $stopTerm); // outputs "three four seven eight" // test string with immediate START $theString = "START one two STOP three four START five six STOP seven eight START nine ten"; contentString($theString, $startTerm, $stopTerm); // outputs "one two five six nine ten" // test string with "error" (2 STARTS) $theString = "START one two START three four STOP five six START seven eight STOP nine ten"; contentString($theString, $startTerm, $stopTerm); // outputs "one two three four seven eight" // test string with no space between separators and real content $theString = "STARTone twoSTOP three four STARTfive sixSTOP seven eight STARTnine ten"; contentString($theString, $startTerm, $stopTerm); // outputs "one two five six nine ten" ?> Any thoughts/suggestions? Thanks! George
Re: [PHP] Limit Local Search to Content
> 2009/3/26 George Langley : > > How do I STOP it? Is it permissible to add the id again in the > closing div tag ie . > From: Stuart > You can't have any extra info in a closing HTML tag. This > problem is > usually handled using comments. Something like the following... > > > > sofihsod hiosdh sdh gus us u sg > > > > You then just start with you see the begin comment and stop when you > hit the end comment. - Thanks! Will use a unique word like to make sure is located and not accidentally found within the content. George
[PHP] Limit Local Search to Content
Hi all! Am building a Search feature following the excellent tutorial at: <http://www.oreillynet.com/pub/a/php/2002/10/24/simplesearchengine.html> It loops through a page and stores the words found in a mySQL database. I have about 60 pages, and all of them share a number of common items like header, menu, footer, etc. These get added as includes. The result is that every page gets marked as having "Contact Us", "Terms of Use" or any other item in the menu, footer, etc. I would like to limit the word list to items found just in the page's unique content. I do have a div with an id of "divContent" for the actual content. So I could add an if statement to only start storing words found after the word "divContent" has been found. But, my question is: How do I STOP it? Is it permissible to add the id again in the closing div tag ie . If this is allowed, I could keep an eye out for that id again and stop it when found a second time, so that my list doesn't include items in the footer (which again is common to all 60 pages) or any other items outside of the content section. Or is there a better way to trigger the recording of words on/off? Thanks! George Langley Multimedia Developer Audio/Video Editor Musician, Arranger, Composer www.georgelangley.ca
Re: [PHP] So called "PHP Expert"
OMGBBQ I didn't even catch that! He truly is the c0d1ng g0d! On Mon, Mar 23, 2009 at 12:45 PM, haliphax wrote: > On Fri, Mar 20, 2009 at 5:27 PM, דניאל דנון wrote: > > ---8<--- > > > ### > > function h3x($envar){ > >$hax3d = bin2hex($envar); > >$hax3d = chunk_split($hax3d , 2, "%"); > >$hax3d = "%" . substr($hax3d , 0, strlen($hax3d ) - 1); > >return $hax3d; > > } > > ?>* > > Programmers who use 13375p34k ("leet speak") in their code should be > dragged out into the street and shot. > > > -- > // Todd > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
Re: [PHP] Proper code formatting
Well, I was pondering making a recommendation, of sorts. I work in an environment with various levels of coders, perhaps similar to your description. Currently, there are no standards that I have seen. We all are bringing our coding habits with us. I don't know if it is important that I like lower case variable names with underscores for spaces while the next guy likes each letter of a new word in uppercase. However, I can imagine it getting out of control as the code continues to grow. On Mon, Mar 23, 2009 at 8:48 AM, Jason Pruim wrote: > George Larson wrote: > >> On Mon, Mar 23, 2009 at 8:23 AM, Shawn McKenzie > >wrote: >> >> >> >>> Bob McConnell wrote: >>> >>> >>>> From: Michael A. Peters >>>> >>>> >>>>> Angus Mann wrote: >>>>> >>>>> >>>>>> Hi all, I'm fairly new to PHP so I don't have too many bad habits >>>>>> >>>>>> >>>>> yet. >>>> >>>> >>>>> I'm keen to make my code easy to read for me in the future, and for >>>>>> others as well. >>>>>> >>>>>> Are there any rules or advice I can use for formatting (especially >>>>>> indenting) code? >>>>>> >>>>>> for example how best to format / indent this ? >>>>>> >>>>>> >>>>>> >>>>> To each his own. Whatever floats your canoe. >>>>> Just whatever you pick, stick to it throughout your code. >>>>> >>>>> >>>>>> I'm using "PHP designer 2008" which does syntax coloring but if it >>>>>> >>>>>> >>>>> has >>>> >>>> >>>>> something to automatically indent - I haven't found it yet. >>>>>> >>>>>> >>>>> It probably allows you to either set a specify a tab as a real tab or >>>>> >>>>> >>>> a >>>> >>>> >>>>> specified number of spaces. Auto-indenting - this isn't python, the >>>>> compiler doesn't enforce it's way, you follow the convention of the >>>>> project you are working on - so I suspect many php editors tailored to >>>>>php don't have an auto indent. >>>>> >>>>> I've never of course tried that specific product. I use bluefish, vi, >>>>> and emacs. >>>>> >>>>> >>>> To take this question a step further, is there a PHP best practices >>>> document available? I am looking for one that I can give to a new >>>> programmer and tell her "do it this way until you can explain to me why >>>> you shouldn't." >>>> >>>> Bob McConnell >>>> >>>> >>> There are various coding standards. There is one for PEAR, the Zend >>> Framework and most frameworks/large projects that take contributions >>> have them. Here's Zend: >>> >>> http://framework.zend.com/manual/en/coding-standard.html >>> >>> -- >>> Thanks! >>> -Shawn >>> http://www.spidean.com >>> >>> -- >>> PHP General Mailing List (http://www.php.net/) >>> To unsubscribe, visit: http://www.php.net/unsub.php >>> >>> >>> >>> >> >> Being a greenhorn, I too can benefit from this thread. >> >> Is that to say, Shawn, that you personally find this (Zend) standard as >> good >> or better than the rest? >> >> >> > I actually just went through this wit ha group of people that come from all > different levels and back grounds in regards to programing. Trying to decide > whether to use spaces, or tabs, short hand or long hand... It took quite a > bit of discussion before we arrived at an agreement... > > It really didn't matter what format we used as long as we stayed consistent > throughout the file. In other words, if you are going to edit a file and it > uses spaces instead of tabs, use spaces > > So absolutely, develop some standards if you are going to have multiple > coders working on it... But they don't have to be set by someone else... > > Personally though, I go for readability it may at times take longer to > write it out, but since we all type 500 words permit with 100% accuracy it > won't be a problem right? ;) > > And then when you go back to the code in 6 months, a year, 2 years... It's > still easily read able :) >
Re: [PHP] Proper code formatting
On Mon, Mar 23, 2009 at 8:23 AM, Shawn McKenzie wrote: > Bob McConnell wrote: > > From: Michael A. Peters > >> Angus Mann wrote: > >>> Hi all, I'm fairly new to PHP so I don't have too many bad habits > > yet. > >>> I'm keen to make my code easy to read for me in the future, and for > >>> others as well. > >>> > >>> Are there any rules or advice I can use for formatting (especially > >>> indenting) code? > >>> > >>> for example how best to format / indent this ? > >>> > > > >> To each his own. Whatever floats your canoe. > >> Just whatever you pick, stick to it throughout your code. > >>> > >>> I'm using "PHP designer 2008" which does syntax coloring but if it > > has > >>> something to automatically indent - I haven't found it yet. > >> It probably allows you to either set a specify a tab as a real tab or > > a > >> specified number of spaces. Auto-indenting - this isn't python, the > >> compiler doesn't enforce it's way, you follow the convention of the > >> project you are working on - so I suspect many php editors tailored to > > > >> php don't have an auto indent. > >> > >> I've never of course tried that specific product. I use bluefish, vi, > >> and emacs. > > > > To take this question a step further, is there a PHP best practices > > document available? I am looking for one that I can give to a new > > programmer and tell her "do it this way until you can explain to me why > > you shouldn't." > > > > Bob McConnell > > There are various coding standards. There is one for PEAR, the Zend > Framework and most frameworks/large projects that take contributions > have them. Here's Zend: > > http://framework.zend.com/manual/en/coding-standard.html > > -- > Thanks! > -Shawn > http://www.spidean.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Being a greenhorn, I too can benefit from this thread. Is that to say, Shawn, that you personally find this (Zend) standard as good or better than the rest?
Re: [PHP] Web Development/Application Analysis
2009/3/22 OOzy Pal > On Sat, Mar 21, 2009 at 6:33 PM, tedd wrote: > > At 6:15 PM +0300 3/21/09, OOzy Pal wrote: > >> > >> Tedd, > >> > >> You wrote a long story about a client hiring a programmer which not > >> what I am asking. > >> > >> Anyhow, thank you for your post. I learned from it. > >> > >> I don't want to take it further. This php mailing list. > > > > Really -- is that what this is? > > > > I thought it was a place where people could ask: > > > > -- quote > > I have just hired a remote PHP programmer. His main job is web > > development and applications. > > > > I have few concerns, I would be happy if someone can point me to the > > right direction. > > > > 1. How can I provide him the requirements. I mean how can I analyze > > the site and put everything in writing. > > 2. How can I estimate manhours. > > -- unquote > > > > For which I provided advice and example, which apparently fell on deaf > ears. > > > > As such, I won't waste my time entertaining any other questions from you. > > > > Cheers, > > > > tedd > > > > -- > > --- > > http://sperling.com http://ancientstones.com http://earthstones.com > > > > Again, I thank you for your post. It was beneficial. > > If I may ask you to use the time that you will not use for asnwering > my questions in reading about relaxation politness. > > No matter what type disagreement happend between any two, that does > not give any one of them the right to insult the other. > > > -- > OOzy > Ubuntu (8.10) > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > Oozy, Lighten up, brother. I read your original question and I thought "This guy shoulda started asking these questions before her started hiring people." Tedd invested time, thought and energy in to giving you a quality response. I don't have the kind of field experience to give you an answer of that caliber. I personally felt that I benefited from reading Tedd's response to you, so it shouldn't have been too difficult for you to gain from it. After that, you announced yourself the owner. It may have escaped your scrutiny, but the kind people that hang out here trying to assist people with their PHP challenges are *NOT* here to do your job for you. That, in my opinion, is what you asked. "I've started a business and hired a programmer. Now somebody please explain to me how to be his boss, otherwise it is going to be a difficult week." Then you deal a really uninventive insult ("my questions in reading about relaxation politness.") to a guy who has shown vast amounts of patience and politeness to both, you, and the other's that he has helped -- if you've been watching. Then you wrap it up with the decree "No matter what type disagreement happend between any two, that does not give any one of them the right to insult the other." which is particularly rubbish following the sentence where you insulted Tedd. Also, you will find that people do, in fact, have the right to insult each other with, or without, disagreement. This is something that you'll observe quite readily by hanging out on the PHP list. So far, imo, everybody has been pretty nice to you. So why don't you go spend some times with those books about 'relaxation politness' and stop pitching what you ain't prepared to catch?
Re: [PHP] Script Analysis (was Conclusion of "use strict"...)
**On Sat, Mar 21, 2009 at 10:27 AM, Hans Schultz wrote: > Hi Virgilio, > Thanks for that last link, I just know need to figure out why my Netbeans > doesn't work > like that (although I am using latest version) > > On Sat, 21 Mar 2009 10:56:46 +0100, Virgilio Quilario < > virgilio.quila...@gmail.com> wrote: > > Hi Hans, >> >> Is this what you are looking for? >> >> Debug PHP code using Xdebug: You can inspect local variables, set >> watches, set breakpoints, and evaluate code live. Navigate to >> declarations, types and files using Go To shortcuts and hypertext >> links. >> >> It is from this url: >> http://www.netbeans.org/features/php/ >> >> Or maybe this. >> It highlights those variables not initialized. >> See the screencast. >> http://www.netbeans.org/kb/docs/php/php-editor-screencast.html >> >> Maybe should try it sometime. >> >> Best wishes, >> >> Virgil >> http://www.jampmark.com >> > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > XDebug is not easy to set up. I have a couple of Windows (and a couple of Linux) boxes that I have tried. The instructions are generally *really *simple... and ineffective (for me). However, it looks like if you're smart enough then it is really smashing. :)
Re: [PHP] Web Development/Application Analysis
On Sat, Mar 21, 2009 at 9:40 AM, tedd wrote: > At 11:45 PM +0300 3/20/09, OOzy Pal wrote: > >> I guess I did not make it clear. Sorry guys/gals. I forgot to tell you >> that I own a web development/design company. >> >> Thank you >> >> -- >> OOzy >> > > What does that have to do with your questions -- other than you should have > known the answers. > > Some times it's just pointless to provide advice. > > Cheers, > > tedd > > -- > --- > http://sperling.com http://ancientstones.com http://earthstones.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Lol @ Tedd!
Re: [PHP] Dynamic Form 'on The Fly' OT
On Sat, Mar 21, 2009 at 8:58 AM, tedd wrote: > At 1:03 PM -0500 3/20/09, Lists wrote: > >> tedd wrote: >> >>> Now, can you show me how to pull data from a mysql database so that the >>> input statements can be created dynamically? >>> >> >> >> Sure, >> On the WebDNA side, it's something like this >> (form of "names" from a database): >> > > -snip- > > However, like you said, this a PHP list, so I'd better >> refrain from any more WebDNA related posts for a while! ;-) >> I don't want to upset the powers that be. >> > > Donovan: > > There's no "powers that be" on this list. The closest is Dan and we all > ignore him. :-) > > Next question -- how do you keep login's and passwords safe? Is the > following not embedded in the html? > > [SQLConnect > dbType=MySQL&host=192.168.1.1&database=TestNames&uid=sa&pwd=pass&conn_var=conn1] > [/SQLConnect] > > If so, then doesn't that create a security concern? > > Cheers, > > tedd > > -- > --- > http://sperling.com http://ancientstones.com http://earthstones.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > For the record, I'm with Tedd. Regardless of this being a "designated" PHP arena, I'm enjoying this WebDNA conversation and might even give it a test drive...
Re: [PHP] Script Analysis (was Conclusion of "use strict"...)
Ooops! Those were v5.5 videos.. A little newer stuff is here: http://www.netbeans.org/kb/docs/screencasts.html On Fri, Mar 20, 2009 at 7:44 PM, George Larson wrote: > Netbeans does have some sick fanciness... Auto-suggest, leaving your > cursor over a variable momentarily highlights it everywhere in the code and > define labeled folding points. You can press CTRL-R to rename that variable > everywhere it is used in the code. If you can figure out how to set it up > with xdebug (I'm working on it) then you can have step-by-step debugging. > NetBeans is well worth giving a chance, in my opinion. You can check out > some videos if you don't want to risk the time. ( > http://www.netbeans.org/kb/55/flash.html) > > On Fri, Mar 20, 2009 at 5:07 PM, Hans Schultz wrote: > >> >> On Fri, 20 Mar 2009 15:45:09 +0100, Virgilio Quilario < >> virgilio.quila...@gmail.com> wrote: >> >> On Fri, Mar 20, 2009 at 6:47 PM, Pierre Lilliman >>> wrote: >>> >>>> >>>> I have been using same program for some (not very long time), and I find >>>> it very useful, although it has some annoying things (inability to work >>>> with >>>> all kinds of include expressions). Still I think every serious PHP >>>> developer >>>> should consider using something like this. >>>> >>>> Cheers >>>> >>>> --- On Thu, 3/19/09, Hans Schultz wrote: >>>> >>>> If someone is still interested in problem I found litle tool that is >>>> pretty close to detecting errors in PHP at compile time (compile time >>>> rghhh :P). It is Codenizer (http://www.softwarehood.com/Codenizer/), >>>> I am still checking it, if someone uses it it would be nice to share >>>> experience :) >>>> >>>> >>> Hi guys, >>> >>> Check out Netbeans IDE for PHP. >>> http://www.netbeans.org/features/php/ >>> >>> Your wishes answered. >>> Though it doesn't have "use strict" but it tracks variables for you. >>> >>> Virgil >>> http://www.jampmark.com >>> >> >> Can you please elaborate on this (using Netbeans to track variables), I >> know what Codenizer does, but I didn't manage to make Netbeans to do this >> "variable track"? Few guys also mentioned that but I couldn't really find >> that feature? >> >> TIA >> >> -- >> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> >
Re: [PHP] Script Analysis (was Conclusion of "use strict"...)
Netbeans does have some sick fanciness... Auto-suggest, leaving your cursor over a variable momentarily highlights it everywhere in the code and define labeled folding points. You can press CTRL-R to rename that variable everywhere it is used in the code. If you can figure out how to set it up with xdebug (I'm working on it) then you can have step-by-step debugging. NetBeans is well worth giving a chance, in my opinion. You can check out some videos if you don't want to risk the time. ( http://www.netbeans.org/kb/55/flash.html) On Fri, Mar 20, 2009 at 5:07 PM, Hans Schultz wrote: > > On Fri, 20 Mar 2009 15:45:09 +0100, Virgilio Quilario < > virgilio.quila...@gmail.com> wrote: > > On Fri, Mar 20, 2009 at 6:47 PM, Pierre Lilliman >> wrote: >> >>> >>> I have been using same program for some (not very long time), and I find >>> it very useful, although it has some annoying things (inability to work with >>> all kinds of include expressions). Still I think every serious PHP developer >>> should consider using something like this. >>> >>> Cheers >>> >>> --- On Thu, 3/19/09, Hans Schultz wrote: >>> >>> If someone is still interested in problem I found litle tool that is >>> pretty close to detecting errors in PHP at compile time (compile time >>> rghhh :P). It is Codenizer (http://www.softwarehood.com/Codenizer/), >>> I am still checking it, if someone uses it it would be nice to share >>> experience :) >>> >>> >> Hi guys, >> >> Check out Netbeans IDE for PHP. >> http://www.netbeans.org/features/php/ >> >> Your wishes answered. >> Though it doesn't have "use strict" but it tracks variables for you. >> >> Virgil >> http://www.jampmark.com >> > > Can you please elaborate on this (using Netbeans to track variables), I > know what Codenizer does, but I didn't manage to make Netbeans to do this > "variable track"? Few guys also mentioned that but I couldn't really find > that feature? > > TIA > > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
Re: [PHP] PHP blogs?
Got it! Thanks! On Fri, Mar 20, 2009 at 2:53 PM, Stuart wrote: > 2009/3/20 George Larson : > > I'm reorganizing my reader. Anybody suggest any good PHP feeds? > > http://www.planet-php.net/ is an aggregator of some of the good stuff > that's out there. > > -Stuart > > -- > http://stut.net/ >
Re: [PHP] PHP blogs?
Fantastic! No, I had somehow managed to overlook that one. Thanks! On Fri, Mar 20, 2009 at 2:49 PM, Daniel Brown wrote: > On Fri, Mar 20, 2009 at 14:37, George Larson > wrote: > > I'm reorganizing my reader. Anybody suggest any good PHP feeds? > > Are you already using the RSS/RDF stuff straight from the horse's > mouth, George? > >http://new I do have a thick leather belt with your name on > it.s.php.net/ <http://news.php.net/> > > -- > > daniel.br...@parasane.net || danbr...@php.net > http://www.parasane.net/ || http://www.pilotpig.net/ > 50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1 >
Re: [PHP] [News] Affordable Independent Web Developer - Search Engine Optimization Services - March 19th, 2009
> > I do have a thick leather belt with your name on it. I bet it's in uppercase letters, you little vixen. On Fri, Mar 20, 2009 at 2:47 PM, Ginkga Studio, LLC wrote: > Georgeyou are SO close to getting spanked. > > I do have a thick leather belt with your name on it. > > You're funny!!! > > :0) > > Now get to work! > > > > -Original Message- > From: George Larson [mailto:george.g.lar...@gmail.com] > Sent: Friday, March 20, 2009 11:42 AM > To: webdes...@ginkga.com > Cc: Thiago H. Pojda; php-general@lists.php.net > Subject: Re: [PHP] [News] Affordable Independent Web Developer - Search > Engine Optimization Services - March 19th, 2009 > > houses ain't gunna cleen themselfs... > > > On Fri, Mar 20, 2009 at 2:39 PM, Ginkga Studio, LLC > wrote: > > >LOL. > >:0) > >Ok. You guys are fun but I have to get to work. Hope all works out > for you >guys. Sorry for posting to your list. Just block me so I don't > bother you >again. > >Good luck with all your programming. You all seem like pretty good > people. > >Sorry for harassing you George. I'm sure you are sexy in something > short and >lacy. > >Sorry for offending Daniel and all of his greatness. I'm sure he's a > pretty >good guy when he isn't being so defensive. > > >Anyway, nice meeting you all, even it was on such terms. > >God Bless. > >XOXOXOXO > > > > >-Original Message- >From: George Larson [mailto:george.g.lar...@gmail.com] >Sent: Friday, March 20, 2009 11:34 AM >To: Thiago H. Pojda >Cc: webdes...@ginkga.com; php-general@lists.php.net >Subject: Re: [PHP] [News] Affordable Independent Web Developer - > Search >Engine Optimization Services - March 19th, 2009 > >Oh, good; I look forward to polishing your nails... spammer. > > >On Fri, Mar 20, 2009 at 2:29 PM, Thiago H. Pojda > >wrote: > > > On Fri, Mar 20, 2009 at 3:23 PM, Ginkga Studio, LLC >wrote: > > > > > > IF YOU WERE MY HUSBAND I WOULD SPANK YOUR ASS SO HAR YOU'D > NEVER >TALK BACK > > ANY WOMAN EVER AGAIN !!! > > > > > > > Oh, gee. > > Thanks for filters, Gmail. > > -- > Thiago Henrique Pojda > http://nerdnaweb.blogspot.com > > > > > > > > >
Re: [PHP] [News] Affordable Independent Web Developer - Search Engine Optimization Services - March 19th, 2009
houses ain't gunna cleen themselfs... On Fri, Mar 20, 2009 at 2:39 PM, Ginkga Studio, LLC wrote: > LOL. > > :0) > > Ok. You guys are fun but I have to get to work. Hope all works out for you > guys. Sorry for posting to your list. Just block me so I don't bother you > again. > > Good luck with all your programming. You all seem like pretty good people. > > Sorry for harassing you George. I'm sure you are sexy in something short > and > lacy. > > Sorry for offending Daniel and all of his greatness. I'm sure he's a pretty > good guy when he isn't being so defensive. > > > Anyway, nice meeting you all, even it was on such terms. > > God Bless. > > XOXOXOXO > > > > > -Original Message- > From: George Larson [mailto:george.g.lar...@gmail.com] > Sent: Friday, March 20, 2009 11:34 AM > To: Thiago H. Pojda > Cc: webdes...@ginkga.com; php-general@lists.php.net > Subject: Re: [PHP] [News] Affordable Independent Web Developer - Search > Engine Optimization Services - March 19th, 2009 > > Oh, good; I look forward to polishing your nails... spammer. > > > On Fri, Mar 20, 2009 at 2:29 PM, Thiago H. Pojda > wrote: > > >On Fri, Mar 20, 2009 at 3:23 PM, Ginkga Studio, LLC > wrote: > > >> >> IF YOU WERE MY HUSBAND I WOULD SPANK YOUR ASS SO HAR YOU'D NEVER > TALK BACK >> ANY WOMAN EVER AGAIN !!! >> >> > >> Oh, gee. > >Thanks for filters, Gmail. > >-- >Thiago Henrique Pojda >http://nerdnaweb.blogspot.com > > > > >
[PHP] PHP blogs?
I'm reorganizing my reader. Anybody suggest any good PHP feeds?
Re: [PHP] [News] Affordable Independent Web Developer - Search Engine Optimization Services - March 19th, 2009
Oh, good; I look forward to polishing your nails... spammer. On Fri, Mar 20, 2009 at 2:29 PM, Thiago H. Pojda wrote: > On Fri, Mar 20, 2009 at 3:23 PM, Ginkga Studio, LLC >wrote: > > > > > IF YOU WERE MY HUSBAND I WOULD SPANK YOUR ASS SO HAR YOU'D NEVER TALK > BACK > > ANY WOMAN EVER AGAIN !!! > > > > > > Oh, gee. > > Thanks for filters, Gmail. > > -- > Thiago Henrique Pojda > http://nerdnaweb.blogspot.com >
Re: [PHP] [News] Affordable Independent Web Developer - Search Engine Optimization Services - March 19th, 2009
I believe that I read somewhere that she designs all web sites in a French maid uniform. On Fri, Mar 20, 2009 at 1:21 PM, Jay Blanchard wrote: > [snip]"hey, everyone, my name is Samantha[/snip] > > This thread is worthless without pictures. >
Re: [PHP] [News] Affordable Independent Web Developer - Search Engine Optimization Services - March 19th, 2009
Not only that but, judging from the phone number, Samantha cleans also cleans houses: http://betterthancleanmaidandmaintenanceservices.com/choose-us/contact-us-mainmenu-3/12-contacts/1-name.html On Fri, Mar 20, 2009 at 10:57 AM, Jochem Maas wrote: > Ginkga Studio LLC schreef: > > Today's Date: March 19th, 2009 > > > > Hello, > > I'm a real person sending you this email - this is an > > initial contact opt-in request for permission to contact you > > for web development services. > > > > WHO I AM AND MY INTENTIONS: > > I'm an affordable, independent web developer, > > been in business for about 5 years. Interested in building > > a new website for you or help you on your current site. > > you realise you just posted to a list of web developers, right? > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
Re: [PHP] Re: Problems with exec() on windows
I've skimmed some of thread, but I have not been following closely so please disregard if I'm just rambling. However, I've worked with lots of software on DOS boxen that couldn't handle long file names. If they also choke on the tildes then I usually just write a batch file that calls the full path and file with whatever command line parameters I pass to the batch. For example: --- @echo off C:\"Program Files\Mozilla Firefox\firefox.exe" %1 %2 %3 --- HTH, G On Fri, Mar 20, 2009 at 9:26 AM, haliphax wrote: > On Fri, Mar 20, 2009 at 1:47 AM, Kyohere Luke wrote: > > You might have something there - never really thought about how windows > > forms the 8.3 names... & not many resources online about it ... > > > > The actual path is "c:\Program File\Gammu 1.23.91\bin\gammu.exe" > > I'd used "c:\Progra~1\Gammu~1\bin\gammu.exe" > > You should be able to view these truncated path names via the "dir" > command in a CMD.EXE command line. I say this because "Program Files" > and "Programs" would collide with each other (just as an example); one > would be Progra~1 and one would be Progra~2. > > > -- > // Todd > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
Re: [PHP] Form to pdf
I'm going to print one to 'Fork and Zombies' and hang it in my office. I really mean that. On Wed, Mar 18, 2009 at 10:17 AM, Gary wrote: > I'm going to frame that and call my ma > > Can you direct me to how I can learn that? > > Thanks for your help. > > Gary > "Sperling Institute of Technology Honoree" > > > "tedd" wrote in message > news:p06240805c5e6afc21...@[192.168.1.101]... > > At 5:48 PM -0400 3/17/09, Gary wrote: > >>Is it possible to create an online form, that when filled out the fields > >>will can be placed in a pdf form? > > > > Gary: > > > > Sure, here's an example: > > > > http://webbytedd.com/bb/pdf/ > > > > Cheers, > > > > tedd > > > > > > -- > > --- > > http://sperling.com http://ancientstones.com http://earthstones.com > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
Re: [PHP] "/home/{user}/directory"
My question was, as usual, inadequately formed. Realpath() was interesting but I was creating directories to store archived data. In my limited testing, it seemed that realpath returns a relative path. Other words, if you're already in home and you try (realpath("~")."\archive\") then you get only "\archive\". In test situations, I wanted to allow for the user to not be me. It ended up that I used GETCWD() so that it will run from anywhere that it can find the required includes. Nevertheless, the answers given enabled me to find a solution. I found all kinds of interesting stuff with a var_dump($GLOBALS), however. :) As always, thanks everybody! On Wed, Mar 18, 2009 at 5:16 AM, Waynn Lue wrote: > bash also has $HOME, which maps to /home/USERNAME, just in case you wanted > another way. :) > > > On Tue, Mar 17, 2009 at 6:47 AM, George Larson > wrote: > >> Thanks! >> >> On Tue, Mar 17, 2009 at 9:46 AM, Stuart wrote: >> >> > 2009/3/17 George Larson >> > >> > In my scripts, I usually define a boolean constant DEBUG. True looks >> for >> >> local copies of includes and echoes queries as they're used. >> >> >> >> My question is: >> >> >> >> Is there any way for me to reflect the actual home folder of the person >> >> running the script? So it will be "/home/george/foo" when I run it >> but, >> >> for >> >> another user, it would be "/home/their-username/foo"? >> > >> > >> > $dir = realpath('~/foo'); >> > >> > -Stuart >> > >> > -- >> > http://stut.net/ >> > >> > >
Re: [PHP] Re: Fork and zombies
If "Fork and Zombies" was a diner... I would totally eat there. On Tue, Mar 17, 2009 at 5:00 PM, Jochem Maas wrote: > Per Jessen schreef: > > Waynn Lue wrote: > > > >> (Apologies for topposting, I'm on my blackberry). Hm, so you think > >> exiting from the child thread causes the db resource to get reclaimed? > >> > > > > Yeah, something like that. The connection is definitely closed when the > > child exits. > > > > I can confirm this. you definitely need to open a connection for each child > process. > if you require a db connection in the parent process, you should close > it before forking (and then reopen it afterwards if you still need it). > > at least that's what I found I had to do when I ran into this. > incidently my forking loop looks like this, very interested to know if > Per can spot any obvious stupidity: > > $childProcs = array(); > do { >if (count($childProcs) <= $maxChildProcs) { >$site = array_shift($sites); >$pid = pcntl_fork(); >} else { >// stay as parent, no fork, try to reduce number of child processes >$site = null; >$pid = null; >} > >switch (true) { >case ($pid === -1): >cronLog("error: (in {$thisScript}), cannot initialize worker > process in order to run {$script} for {$site['name']}"); >break; > >case ($pid === 0): >// we are child > >$exit = 0; >$output = array(); > >// do we want to exec? or maybe include? >if ($doExec) { >exec($script.' '.$site['id'], $output, $exit); >} else { >$output = inc($script); >$output = explode("\n", $output); >} > >if ($exit != 0) >cronLog("error: (in {$thisScript}), {$script} reported an > error ($exit) whilst processing for {$site['name']}",); > >foreach ($output as $line) >cronLog($line); > >exit($exit); >break; > >default: >// we are parent >$childProcs[] = $pid; > >do { >$status = null; >while (pcntl_wait($status, WNOHANG | WUNTRACED) < 1) >usleep(5); > >foreach ($childProcs as $k => $v) >if (!posix_kill($v, 0)) // send signal 'zero' to check > whether process is still 'up' >unset($childProcs[ $k ]); > >$childProcs = array_values($childProcs); > >if (count($sites)) >break; // more sites to run the given script for >if (!count($childProcs)) >break; // no more sites to run the given script for and > all children are complete/dead > >} while (true); >break; >} > > >if (!count($sites)) >break; // nothing more to do > >usleep(5); > } while (true); > > > > > > /Per > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
Re: [PHP] "/home/{user}/directory"
That is correct. PHP on CLI. Thanks! On Tue, Mar 17, 2009 at 9:51 AM, Thiago H. Pojda wrote: > On Tue, Mar 17, 2009 at 10:42 AM, George Larson > wrote: > >> In my scripts, I usually define a boolean constant DEBUG. True looks for >> local copies of includes and echoes queries as they're used. >> >> My question is: >> >> Is there any way for me to reflect the actual home folder of the person >> running the script? So it will be "/home/george/foo" when I run it but, >> for >> another user, it would be "/home/their-username/foo"? >> > > Just checking, you're running PHP on CLI then, right? > > If it's running on normal apache setup the user would always be the user > which apache is running. > > > Thiago Henrique Pojda > http://nerdnaweb.blogspot DOT com > >
Re: [PHP] "/home/{user}/directory"
Thanks! On Tue, Mar 17, 2009 at 9:46 AM, Stuart wrote: > 2009/3/17 George Larson > > In my scripts, I usually define a boolean constant DEBUG. True looks for >> local copies of includes and echoes queries as they're used. >> >> My question is: >> >> Is there any way for me to reflect the actual home folder of the person >> running the script? So it will be "/home/george/foo" when I run it but, >> for >> another user, it would be "/home/their-username/foo"? > > > $dir = realpath('~/foo'); > > -Stuart > > -- > http://stut.net/ >
[PHP] "/home/{user}/directory"
In my scripts, I usually define a boolean constant DEBUG. True looks for local copies of includes and echoes queries as they're used. My question is: Is there any way for me to reflect the actual home folder of the person running the script? So it will be "/home/george/foo" when I run it but, for another user, it would be "/home/their-username/foo"?
Re: [PHP] Opendir on site root directory?
"but it had become lost in the detritus at the back of my mind" Inappropriate as this is for _the_ PHP list -- that was a beautiful phrase, friend. On Mon, Mar 9, 2009 at 8:05 PM, Clancy wrote: > On Mon, 9 Mar 2009 10:07:33 +, stut...@gmail.com (Stuart) wrote: > > ... > >As in the example script I've posted above you can refer to the current > >working directory with a single period (.), but this is still relying on > the > >current working directory being what you expect it to be. > > Thank you! This is what I had been looking for all along. I dimly > remembered some such > trick, but it had become lost in the detritus at the back of my mind. > > But why the obsession with avoiding getcwd()? When my site is loaded the > current directory > is always the root directory of the page, and as I never change directory I > can rely on it > staying there. (And, incidentally, since getcwd(), dirname(__FILE__), etc, > all return the > complete path including system dependent information, if I really didn't > know the current > directory it would not be a trivial task to determine what was the local > root.) > > For a couple of years I have been using getcwd() to determine whether or > not I am running > on my local PC (if I am the path will start with 'D:'). If I am running on > the local PC I > load various editing and other private facilities, otherwise I omit them. > This is done in > such a way that there is nothing to indicate that anything is either > missing or has been > omitted. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
Re: [PHP] Script execution
That's funny! I've been watching this and a few other lists (MySQL, local Linux Users' Group) for a few days - weeks and I had wondered why the PHP list seemed more hostile. :) On Mon, Mar 9, 2009 at 5:28 PM, Daniel Brown wrote: > On Mon, Mar 9, 2009 at 17:21, Daniel Brown wrote: > > > >Re-read the context of that first paragraph from the OP and you'll > > see why I presume (as opposed to *ass*ume) that, despite his > > experience with Windows, this is a *NIX-like setup. > > DISCLAIMER: This was supposed to be added to my seemingly-gruff > response: ;-P Todd's alright by me. > >George, a cron - if run as the same user that owns the files - > should work with no problem. > > -- > > daniel.br...@parasane.net || danbr...@php.net > http://www.parasane.net/ || http://www.pilotpig.net/ > 50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1 >
Re: [PHP] Script execution
Thanks everybody! I guess I was a little vague. I'm working on an OpenSUSE setup with Apache, MySQL and PHP. I just knew that my confusion was because of my Windows up-bringing. The writing I referred to was to a file. One example is I had a script that was pulling data from a database and using it to generate PDF files. This would work fine from the command line but _not_ if I pointed a browser at it. It wasn't an important difference because that script is a cronjob anyway. I just wanted to understand what was going on and how I could change it -- if I find later that I need to. Again, that's for the rapid and thorough help! G On Mon, Mar 9, 2009 at 5:17 PM, haliphax wrote: > On Mon, Mar 9, 2009 at 4:04 PM, Daniel Brown wrote: > > On Mon, Mar 9, 2009 at 16:59, George Larson > wrote: > >> > >> Am I imagining things? If not, how would I properly make them able to > run > >> through a browser? > > > >You're not imagining things. In general, unless set up with > > SuExec privileges, Apache (which is probably the HTTP server you're > > using) will run as 'nobody,' 'apache,' 'www,' or 'daemon.' If you > > can't configure it to SuExec (check Google for some ideas on this > > you'll need root access), you could use the less-secure (this, not > > recommended) options of changing the file mode permissions to 0777 or > > change the file ownership (if you have the right permissions yourself) > > to be owned by the same user and/or group as which Apache runs. > > > >It may sound a little confusing at first glance, but it's really > > not. Just keep in mind that UNIX and Linux (Mac and similar OS'es > > fall in here, too) are simultaneous multi-user systems, meaning that > > many users (including virtual users that the system uses as aliases > > for individualized permissions) can be "logged in" and run processes > > concurrently. > > OP is a Windows user. I am assuming that they are using Windows. > > George, if you are using IIS as your web server, PHP will be executed > (by default, anyway) under the IUSR_ user account > (pre-Vista). The directories and files your PHP script will need to > mess with should be given the appropriate permissions as related to > that user. > > HTH, > > > -- > // Todd >
[PHP] Script execution
Hi everybody. The "problem" that I'm having is probably because I've got more of a Windows background -- and it isn't so much a problem as a point of curiosity. I've recently noticed that when I write a script that they seem to have different permissions when executed at the command line. Two that I have written recently run just fine when you execute 'php scriptname.php' but they are unable, at least, to write the data if I browse to them on localhost. Am I imagining things? If not, how would I properly make them able to run through a browser? Thanks! G
Re: [PHP] verify data in fields
Ash certainly does raise an interesting point. :) Couldn't you just use DESCRIBE or EXPLAIN the tables through MySQL? On Sun, Mar 8, 2009 at 4:35 PM, Ashley Sheridan wrote: > On Sun, 2009-03-08 at 10:25 -0500, PJ wrote: > > My mysql table contains data. But I don't know how to verify what > > exactly is the data... is it an array, an integer, an alphanumeric > > character or what? > > vardump($whatever) returns null; the structure of the table is no null > > for the column fields and has been filled like this: > > $autoid = 1; > > $test = $_POST['categoriesIN']; // this can be several selections from > form > > $tstring = implode(',' , $test); > > echo $tstring.''; > > $insert_category = "INSERT INTO book_categories (book_id, categories_id) > > VALUES ($autoid, $tstring.)"; > > mysql_query($insert_category,$db); > > > > retrieval of data is: > > > > from SELECT ...snip... > > LEFT JOIN book_publisher as abc ON b.id = abc.bookID > > LEFT JOIN publishers AS c ON abc.publishers_id = c.id > > LEFT JOIN book_categories AS d ON b.id = d.book_id > > LEFT JOIN categories AS e ON d.categories_id = e.id > > > > I have included the publisher stuff - it works, whereas the category > > stuff does not... > > > > -- > > unheralded genius: "A clean desk is the sign of a dull mind. " > > - > > Phil Jourdan --- p...@ptahhotep.com > >http://www.ptahhotep.com > >http://www.chiccantine.com/andypantry.php > > > > > Surely if it is your table, you already know what types of data each > field contains? > > > Ash > www.ashleysheridan.co.uk > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
Re: [PHP] web refreshing problem
Maybe you could use a javascript refresh? But that would still mean resubmitting the form. On Sun, Mar 8, 2009 at 11:35 AM, Andrew Williams wrote: > Hi, > > my php program does not display current result of submitted form > instead the previous content is shown until you refresh manually > (which means resubmitting the form). > > Can someone help me out because, I want to display the result of the > latest form result and not the old one. > > I am using apache server on windows. Please help. > -- > www.willandy.co.uk > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
Re: [PHP] PHP includes
Right. There are several advantages to using included files. You can write routines that you're going to use repeatedly and just include the file with the code, instead of re-inventing the wheel, as they say. Consistency is another advantage. So, if you design your header, sidebar and footer and just include them then you don't need to edit every stinking page on your site when you want to make a change. There's a handful of include-type statements. Include, include_one, require, require_once, etc. I'd read about those four before making a choice about which to use. On Sun, Mar 8, 2009 at 12:06 PM, Gary wrote: > I'm working on learning php and have been toying with includes, and I am > trying to figure the advantages/disadvantages to using them. > > I know that using them eliminates the need to "put" the files once altered > as with a template, however, is that the only advantage. > > My particular concerns are with SEO and if the search engines and the bots > can read the page if it is made completely on includes? > > Any and all comments would be appreciated. > > Gary > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
Re: [PHP] Backend autodatabase update
There are a lot of ways to tackle that problem but everything coming to mind involves third-party software. You can use Sysinternals PsList<http://technet.microsoft.com/en-us/sysinternals/bb896682.aspx>( http://technet.microsoft.com/en-us/sysinternals/bb896682.aspx) to look for your process. If the process is not found then start it. One approach would be to create a batch file that uses PsList piped to find (e.g. 'pslist.exe | find "My Process") and start it if not. The scheduler might satisfy your needs but I have used VisualCron <http://www.visualcron.com/> ( http://www.visualcron.com/) for complex scheduling. If you wrote the process that is running then you could make it check for existing instances of itself and shut down if it is already running. Then you could schedule it to start every 30 minutes because it will just close if the first one is still running. On Sun, Mar 8, 2009 at 4:42 AM, Andrew Williams wrote: > *I want to check that the job is still running and start, if it stopped > because the program is meant to consistently update for the global market? > * > > On Sat, Mar 7, 2009 at 11:19 PM, George Larson > wrote: > >> I'm new to the list, so maybe I've missed something. Please disregard if >> I'm blathering idiotically. >> >> What OS are you using? >> >> Do you mean that you want to run the job repetitively (again and again) or >> *do you mean that you want to check that the job is still running and >> start, if it stopped?* >> >> >> On Sat, Mar 7, 2009 at 6:02 PM, 9el wrote: >> >>> cronjob or deamon to execute the php file >>> >>> >>> On Sun, Mar 8, 2009 at 4:56 AM, Andrew Williams >>> wrote: >>> >>> > Dear All, >>> > >>> > I have written a back end php program that update live stream database >>> and >>> > this data is streamed 24 hours a day. Please, what is the best way to >>> make >>> > sure this program execute or runs 24 hours day. >>> > >>> > Best Wishes >>> > Andrew Williams >>> > www.willandy.co.uk >>> > >>> >> >> > > > -- > Best Wishes > Andrew Williams > > >
Re: [PHP] Backend autodatabase update
I'm new to the list, so maybe I've missed something. Please disregard if I'm blathering idiotically. What OS are you using? Do you mean that you want to run the job repetitively (again and again) or do you mean that you want to check that the job is still running and start, if it stopped? On Sat, Mar 7, 2009 at 6:02 PM, 9el wrote: > cronjob or deamon to execute the php file > > > On Sun, Mar 8, 2009 at 4:56 AM, Andrew Williams > wrote: > > > Dear All, > > > > I have written a back end php program that update live stream database > and > > this data is streamed 24 hours a day. Please, what is the best way to > make > > sure this program execute or runs 24 hours day. > > > > Best Wishes > > Andrew Williams > > www.willandy.co.uk > > >
Re: [PHP] Don't Forget to Punch the Clock, Shorty!
On 12-Feb-09, at 8:55 PM, Kyle Terry wrote: On Thu, 2009-02-12 at 15:58 -0700, Richard Whitney wrote: Anyone care to try this out? Feedback welcome. http://dftpcs.com Thanks -- Hi there! The right panel is not always refreshing correctly in my Mac Safari 3.2.1 Sometimes is leaving lines through the various elements, or not drawing them at all. This is occurring mostly when I click a "Submit" or other button in the right panel, but also when I click an item in the left panel. It does seem to be fine until after I have added a new company to the list, and then it starts having problems. Don't know if something in your code, or just my machine acting up! But may be worth testing somewhere else. HTH. George Langley Multimedia Developer, Audio/Video Editor, Musician, Arranger, Composer http://www.georgelangley.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php