Re: [PHP] anchor name on URL
On Tue, Nov 18, 2008 at 1:25 PM, Stan <[EMAIL PROTECTED]> wrote: > If I had a page written in HTML and I had a named anchor on that page > > I could position the user at the anchor by >http://myPage.com/myHTML.htm#myAnchor > but I can't seem to make this work if the page is generated >http://mypage.com/myPHP.php#myAnchor > > I've tried both FireFox 3.0.4 and IE 6 SP1. Maybe I'm naive to even expect > this to work. Should it work? Absolutely. It's a browser standard, not a language-specific thing. PHP outputs HTML, among other things (but for now, we'll stick to HTML since it's what you're using). Regardless of the extension, the browser has no idea in what language the page was written. Are you passing a query string to the page as well? Are you sure the anchor is in the source as it should be? It would be easier for us to help you debug if you post a real link. If you don't want it to be public, you can feel free to send it to me off-list. -- http://www.parasane.net/ [EMAIL PROTECTED] || [EMAIL PROTECTED] Ask me about our current hosting/dedicated server deals! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: anchor name on URL
On Tue, Nov 18, 2008 at 6:14 PM, Ashley Sheridan <[EMAIL PROTECTED]> wrote: >> > I don't think you fixed it, so much as wrote something else and made it > look like I wrote it... Yes. -- http://www.parasane.net/ [EMAIL PROTECTED] || [EMAIL PROTECTED] Ask me about our current hosting/dedicated server deals! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: anchor name on URL
On Tue, Nov 18, 2008 at 6:29 PM, Ashley Sheridan <[EMAIL PROTECTED]> wrote: >> > I'd really rather you didn't, please. And I'd rather you had a sense of humor. So in hindsight, we both learned something. -- http://www.parasane.net/ [EMAIL PROTECTED] || [EMAIL PROTECTED] Ask me about our current hosting/dedicated server deals! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PostTrack Reminder
Folks; Just as a reminder, the PostTrack/ListWatch system is back to recording and reporting data on the list for the Friday summary reports and list metrics. If you do not want your email address to show up in the reports and have not already told me, please let me know ASAP and I will permanently remove you from the reports. Note that this will *NOT* unsubscribe you from the list, just keep you from showing metrics in the weekly reports. Thanks, all. And a happy upcoming holiday to my fellow US Americans. Everyone stay safe. -- http://www.parasane.net/ [EMAIL PROTECTED] || [EMAIL PROTECTED] 1 LEFT: $149/mo. $0 Setup - Dual-Core/320GB HDD/1GB RAM/3TB 100Mbps/cPanel - SAME-DAY SETUP! Contact me to buy. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PostTrack Reminder
On Mon, Nov 24, 2008 at 3:00 PM, Ashley Sheridan <[EMAIL PROTECTED]> wrote: >> > What exactly are these metrics? Are they part of the mailing list? Yes, last year and earlier this year, before you began contributing to the list, there was a tracking system that displayed a simple report[1] each week for contributions to the General list. One person at the time didn't want his email address displayed, so it was hidden from the weekly summary emails. 1: Example: http://marc.info/?l=php-general&m=120431890502817&w=2 -- http://www.parasane.net/ [EMAIL PROTECTED] || [EMAIL PROTECTED] 1 LEFT: $149/mo. $0 Setup - Dual-Core/320GB HDD/1GB RAM/3TB 100Mbps/cPanel - SAME-DAY SETUP! Contact me to buy. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] syntax error (stumped)
On Fri, Dec 5, 2008 at 1:31 AM, ddg2sailor <[EMAIL PROTECTED]> wrote: > > Its begining to look like this code was written for a newer sql [snip!] Negative. It's either a custom function or was written incorrectly in the first place. There's never been a native PHP function `do_mysql_query`, nor was there an `sqlerr` function. Instead: would do the trick. > Thats all she wrote... instead of do_mysql_query , mysql_query instead. > Thanks for all your help.. I do however have another issue.. but thats > another thread. Good deal. Glad it's working. -- http://www.parasane.net/ [EMAIL PROTECTED] || [EMAIL PROTECTED] 50% Off Hosting! http://www.pilotpig.net/specials.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Request to bash/jump/screw my code
On Mon, Dec 8, 2008 at 12:01 PM, Ryan S <[EMAIL PROTECTED]> wrote: > > We cannot really afford a security specialist so would appreciate it if you > could hit our site with whatever you want to (just dont take us offline with > something like a DDOS please) and tell us if you find any problems. Hey, Ryan; Here are a few issues: * When subscribing to the newsletter: Error: Email is invalid, please check it and try again. Fatal error: Cannot break/continue 1 level in /path/to/your/site/hidden/funnies_via_email.php on line 20 * Your output isn't cleaned up when coming from the database. You need to put a few stripslashes() instances in there. * http://www.ezee.se/funnies/funnies_recommend.php, at least when submitting a blank report, has the following error: Warning: Smarty error: unable to read resource: ".tpl" in /path/to/your/site/hidden/Smarty_2_6_9/Smarty.class.php on line 1092 * The following places are web-directory accessible (I only checked a few, but watch them - the images directory could easily be spidered and all content stolen): http://www.ezee.se/includes/Smarty_2_6_9/ http://www.ezee.se/includes/ http://www.ezee.se/funnies/final_images_uploaded_folder/ Those are only a few things I noticed in the few minutes I spent going through. I tried some simple SQL injection stuff, but it looks like you're properly sanitizing. However, typical web developer: http://www.ezee.se/funnies/phpinfo.php Makes it even easier to figure out what's what on there. While your upload_max_filesize and post_max_size are good to keep you from having disk space run out from spoofed uploads, they will also limit you on legitimate uploads. If you want someone to upload a sound or video file, it may exceed the limits you have on there. -- http://www.parasane.net/ [EMAIL PROTECTED] || [EMAIL PROTECTED] 50% Off Hosting! http://www.pilotpig.net/specials.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Request to bash/jump/screw my code
On Mon, Dec 8, 2008 at 1:05 PM, Rick Pasotto <[EMAIL PROTECTED]> wrote: > > http://ezee.se/funnies/show_funny.php?id=p88&sec=1 has: > > Posted by: \' OR id != \' On: 2008-12-08 13:24:59 > \' OR id != \' That was me, testing for SQL injection. -- http://www.parasane.net/ [EMAIL PROTECTED] || [EMAIL PROTECTED] 50% Off Hosting! http://www.pilotpig.net/specials.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MSSQL_CONNECT problem
On Tue, Dec 9, 2008 at 3:41 PM, David Stoltz <[EMAIL PROTECTED]> wrote: > > Do you have any other thoughts? When posting to the list, please don't top-post. Dave, are you seeing that error from both the CLI and the web? Have you properly configured your DSN? What's the output from the following? -- http://www.parasane.net/ [EMAIL PROTECTED] || [EMAIL PROTECTED] 50% Off Hosting! http://www.pilotpig.net/specials.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Quick question regarding $_SESSION and header()
On Thu, Dec 11, 2008 at 14:01, Ólafur Waage wrote: > I should be able to set a session var and then do a header redirect > right? Small bug regarding that and i just need to be sure. This isn't a bug in PHP, it's actually in adherance with HTTP standards (and current browser standards). Prior to doing a header() redirect, you have to force the cookie to be written with session_write_close(). -- http://www.parasane.net/ daniel.br...@parasane.net || danbr...@php.net 50% Off Hosting! http://www.pilotpig.net/specials.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-QA] Re: [PHP] Quick question regarding $_SESSION and header()
(Forwarding back to PHP General for the archives.) On Thu, Dec 11, 2008 at 14:31, Ólafur Waage wrote: > Its fixed, thanks guys :) > > On Thu, Dec 11, 2008 at 7:16 PM, Daniel Brown wrote: >> On Thu, Dec 11, 2008 at 14:01, Ólafur Waage wrote: >>> I should be able to set a session var and then do a header redirect >>> right? Small bug regarding that and i just need to be sure. >> >>This isn't a bug in PHP, it's actually in adherance with HTTP >> standards (and current browser standards). Prior to doing a header() >> redirect, you have to force the cookie to be written with >> session_write_close(). >> >> -- >> >> http://www.parasane.net/ >> daniel.br...@parasane.net || danbr...@php.net >> 50% Off Hosting! http://www.pilotpig.net/specials.php >> > > -- > PHP Quality Assurance Mailing List <http://www.php.net/> > To unsubscribe, visit: http://www.php.net/unsub.php > > -- http://www.parasane.net/ daniel.br...@parasane.net || danbr...@php.net 50% Off Hosting! http://www.pilotpig.net/specials.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need a brain to bounce some Mysql/DB thoughts off of!!
On Fri, Dec 12, 2008 at 10:35, Robert Cummings wrote: > > Are you suggesting I'm not tolerant? Pfff. Not since you've let those crosses on the lawn burn out. ;-P And yet, despite all of this, poor ol' php...@lists.php.net is left in the cold. -- http://www.parasane.net/ daniel.br...@parasane.net || danbr...@php.net 50% Off Hosting! http://www.pilotpig.net/specials.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] question on parameter specification in href tag
On Thu, Dec 11, 2008 at 05:30, Xaver Thum wrote: > > But if I specify a hex color like #CC instead of "red", > > http://www.anyurl.com?mypar=17&color=#CC";> ... > > the color is ignored (probably because # starts a PHP comment). > Is there any workaround for this problem ? Hey, X; Actually, it's skipped because it's seen as a page anchor. That's a client-side only thing, and the browser would then be looking for: Instead, skip the hashmark: http://www.anyurl.com/?mypar=17&color=CC";> ... and have it parsed similarly to this: -- http://www.parasane.net/ daniel.br...@parasane.net || danbr...@php.net 50% Off Hosting! http://www.pilotpig.net/specials.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-INSTALL] PHP on Windows without Apache
On Sun, Dec 14, 2008 at 13:19, Jeffery Harris wrote: > Thanks Daniel. Any recommendations on a good php learning book. My pleasure, Jeff. I've honestly never read any of the PHP books out there, so I wouldn't be able to give you a definite recommendation on that. What I *will* highly recommend, though, is subscribing to the PHP General mailing list. You'll not only get a lot of good information and insight from that list, but it's a decent, friendly group of highly-skilled people there, too. When you subscribe to the list, your introductory post could be asking about a good PHP book, and I'll bet that you get some good answers. -- http://www.parasane.net/ daniel.br...@parasane.net || danbr...@php.net 50% Off Hosting! http://www.pilotpig.net/specials.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Good PHP book?
On Tue, Dec 16, 2008 at 11:25, Richard Heyes wrote: >> I learned from PHP For Dummies. > > The title of that book isn't doing itself any favours... :-) You'd be surprised. The "For Dummies" series is one of the best-selling franchises in mainstream publishing history. -- http://www.parasane.net/ daniel.br...@parasane.net || danbr...@php.net 50% Off Hosting! http://www.pilotpig.net/specials.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re: [PHP] Good PHP book?
Forwarded back to the list, Mario. Please hit "Reply-All" to keep it on the list. On Tue, Dec 16, 2008 at 11:44, Kastner Mario wrote: > I also read the "for dummies" book when i started with php. It gives me a > simple intro which power is behind php. My first application was a ftp client > explained by the book. An essential is to read the online documentation on > php.net. -- http://www.parasane.net/ daniel.br...@parasane.net || danbr...@php.net 50% Off Hosting! http://www.pilotpig.net/specials.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] custom php.ini
On Tue, Dec 16, 2008 at 11:39, John P wrote: > Hello all, > > In short, I'm trying to set my uploads_tmp_dir variable, as my hosting > provider has it set ot the default NULL (I'm using dreamhost). > [snip!] > > any pointers? You won't be able to modify the upload_tmp_dir option, as it's PHP_INI_SYSTEM. However, you can modify some of the other options in most cases. I'm not certain about their configuration, but does DreamHost have AllowOverrides turned on in their httpd.conf? If so, just place a full php.ini file in your root web directory (not just the line for uploads_tmp_dir, but an entire copy of the file). If their Apache and PHP configuration allows it, you'll be able to change several of the settings in that file. Those settings that you can update will be PHP_INI_PERDIR[1] and higher. KEY 1.) View the list in the appendix here: http://www.php.net/manual/en/ini.php#ini.list -- http://www.parasane.net/ daniel.br...@parasane.net || danbr...@php.net 50% Off Hosting! http://www.pilotpig.net/specials.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Good PHP book?
On Tue, Dec 16, 2008 at 17:04, Jay Moore wrote: > > Floppies hold 1.4 megs now? Mine don't and they're even dual-sided. :( Jay, Throw out your 62K and 5.25" floppies and get with the 1980's, brother. It's all about the 3.5" "hard" disks now. They're radical! -- http://www.parasane.net/ daniel.br...@parasane.net || danbr...@php.net 50% Off Hosting! http://www.pilotpig.net/specials.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Good PHP book?
On Tue, Dec 16, 2008 at 17:11, Jay Moore wrote: > > Ok. Let me back them up to these reel-to-reel tapes quick, just in case. Just be careful that you don't get the Michaelangelo or Friday The 13th viruses especially if you're converting over on a C-64 1541 drive. -- http://www.parasane.net/ daniel.br...@parasane.net || danbr...@php.net 50% Off Hosting! http://www.pilotpig.net/specials.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Good PHP book?
On Tue, Dec 16, 2008 at 17:22, Robert Cummings wrote: > > Cue Tedd and his stones in 3... 2... 1... Rocks[TM]. -- http://www.parasane.net/ daniel.br...@parasane.net || danbr...@php.net 50% Off Hosting! http://www.pilotpig.net/specials.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Good PHP book?
On Tue, Dec 16, 2008 at 17:30, Ashley Sheridan wrote: >> > These stones? http://xkcd.com/505/ That's fantastic, Ash. I haven't seen that one. I'm CC'ing Tedd directly on that. -- http://www.parasane.net/ daniel.br...@parasane.net || danbr...@php.net 50% Off Hosting! http://www.pilotpig.net/specials.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Replacing special characters with their HTML equivalents
On Sun, Dec 21, 2008 at 18:30, James Colannino wrote: > Hey everyone. I have a question. I have a web scraper that grabs > information from web pages that often contain characters such as vowels > with umlots (I know I spelled that wrong.) Welcome to the list, James. Check out htmlentities(): http://php.net/htmlentities -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Regular expressions (regex) question for parsing
On Mon, Dec 22, 2008 at 15:56, Rene Fournier wrote: > > Each line should start with a $dollar sign, then some arbitrary text, ends > with a percent sign, followed by carriage-return and line-feed. Sometimes > though, the final line is not complete. In that case, I want to save those > lines too. Just a quick note on that, Rene > $result = array ( "matches" => >array ( 0 => "$sometext %\r\n", If you want to have the dollar sign included, use single quotes. Double-quoted things translate the data enclosed within them, so "$sometext" would translate that into the value of the variable (or null with E_NOTICE if it's uninstantiated/undefined). Conversely, '$sometext' would be the literal $sometext. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Online Members
On Fri, Dec 26, 2008 at 20:24, Stephen Alistoun wrote: > > Hi all, > > What is the best way to pick up all the members online on a website? Check the archives and STFW for examples, but the general gist is of it is to use $_SESSION tracking with activity checking. I'm just typing this in quickly as I go, so it's untested (read: don't copy and paste for production), but here's a simple example (you should be able to fill in the blanks easily): \n"; } // And guests: $sql = "SELECT COUNT(*) AS num_guests FROM users_online WHERE username='' AND last_active - ".m(time())." < 300"; $result = mysql_query($sql); $row = mysql_fetch_assoc($result); echo "There are ".$row['num_guests']." guests online.\n"; ?> -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is it PHP Bug - memory leak ?
Hi, Pawel; On Sat, Dec 27, 2008 at 05:40, Pawel Rutkowski wrote: [snip!] > > But in PHP5 x64 I have errors like: > > /root/src/php-5.2.6/Zend/zend_hash.c(247) : Freeing 0x0E76BC50 (75 bytes), > script=ext/session/tests/session_encode_variation5.phpt > [Sat Dec 27 11:27:09 2008] Script: > 'ext/session/tests/session_encode_variation5.phpt' > /root/src/php-5.2.6/Zend/zend_vm_execute.h(3596) : Freeing 0x0E76B990 (71 > bytes), script=ext/session/tests/session_encode_variation5.phpt > /root/src/php-5.2.6/Zend/zend_hash.c(388) : Actual location (location was > relayed) Please file a bug report on this with the reproduce cases at http://bugs.php.net/. There was a nearly identical case mentioned in the Zend forums[1] as found by Google, but no resolution was reached there. KEY: 1: http://www.zend.com/forums/index.php?t=msg&goto=19257&S=e5a6d1ca82291c880a9d85093afe1ee7 -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Page name for form submit: REQUEST_URI or SCRIPT_NAME
On Sat, Dec 27, 2008 at 12:31, Dotan Cohen wrote: > Is there a compelling reason to use either REQUEST_URI or SCRIPT_NAME > in the action of a form that I want to submit to the same URL that it > came from (the script parses whether or not there is a Submit to know > if it should display the form or the results). I need a portable > solution, that is why I am not hardcoding it. Also, the users _may_ > save the form to their hard drives, so simply leaving the action blank > will not do. > > I know that REQUEST_URI includes the ?variable=value string and that > SCRIPT_NAME does not. This form does not depend upon get variables, so > this should never be an issue, but I ask here anyway to know if there > are other differences that I did not account for. Happy Chanukah, Dotan! For portability's sake, especially if you anticipate users saving the form to their local systems, I would recommend: http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']; ?> If you use REQUEST_URI and the form is on a page not called directly (for example, on index.php and called only by directory; a mod_rewrite /contact page; etc.), using REQUEST_URI gives the actual request, where PHP_SELF gives the actual file. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Help Needed
On Sat, Dec 27, 2008 at 10:47, Ayemowa Toyin wrote: > Hi, > > I am new to PHP and require your help regarding a PHP Script. Below is what > I am tryin to achieve You require an RTFM and STFW session. * http://php.net/ * http://google.com/ > 1. I have created a FILE UPLOAD page that lets users Upload a FIle to the > site. This and other details regarding the file stored in a MySQL Database. > > 2. I need to create a FILE DOWNLOAD page that will read details from the > MYSQL database for users to dwnload already uploaded files. If you've already created the UPLOAD page, then the more difficult of the two tasks is done. Chances are, you (or whomever wrote the code for you) should know how to do #2 if you (or another) already did #1, but if not: http://www.google.com/search?q=php+mysql+file+download+script http://www.joeclipart.com/blog/images/2007/06/20070628crack.jpg http://www.phpbuilder.com/tips/item.php?id=5 -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP script gives no output or error message
Good afternoon, John; On Sat, Dec 27, 2008 at 03:28, John Musbach wrote: [snip!] There's a syntax error on line 19: > if(external_fud_login(fud_fetch_user($user)['id']))!=NULL) //User ID is valid > and logged in It should be: if(external_fud_login(fud_fetch_user($user['id']))!=NULL) //User ID is valid and logged in -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Webhotel structure
On Sat, Dec 27, 2008 at 15:27, Nordstjernealle 10 wrote: > Hi PHP experts > > What is the overall structure on webhotels, how do I remove/clean everythink > including everythinnk liek databases etc? > > Sorry if this is not the proper news group for this question, please redirect > me. > I am a newbie trying to make my osn webside with a minimum effort. > > First I had a student to make some think for me, but he never finished it, so > the useless remains are on my web. > > My first plan was to use php gallery, but my web host surftown do not support > safemode off. > So I found coppermine, surftown even support the install as one click. > First trial looked good, but then I ran into trouble, I get different error > messages. > > So I would prefer to remove everythink and start all over . What? -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Architecture patterns in PHP
On Sat, Dec 27, 2008 at 18:40, Michael C. Yates wrote: [snip!] > > Micheal C. Yates You mis-spelled your name, Michael. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What does
On Sun, Dec 28, 2008 at 11:47, Jim Lucas wrote: > > short tags are enabled. Disable them in your php.ini file and you will be > good. Correct. It's shared hosting, so short_open_tags is on for compatibility's sake. That's on one of my servers, so let me know if you need a hand, Tedd. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] system() Question
On Sun, Dec 28, 2008 at 18:10, Rick Pasotto wrote: > > You overlooked the ampersand in front of $retval. The syntax for > 'system' is: > > string system ( string $command [, int &$return_var ] ) > > You have to pass a pointer to the variable, not the variable itself. Actually, that's not entirely correct while the documentation shows it as a reference variable, it's not actually required to be a pointer. And in either case, the OP had the error code returned (127), and $retval would have nothing to do with causing the error. What I would recommend trying is: &1',$ret); print_r($ret); ?> On a side note, I'm curious as to what 'gpsbabel' does. I've worked a bit with Keyhole markups and GIS overlays, etc. Neat stuff. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is_readable(http://.... text file) says not, but I can in browser
On Sun, Dec 28, 2008 at 13:02, John Allsopp wrote: > > $myFileLast = "http://www.myDomain.com/text.txt";; > if (is_readable($myFileLast)) > { > $fh = fopen($myFileLast, 'r'); > $theDataLast = fread($fh, 200); > fclose($fh); > echo ("The dataLast: ".$theDataLast."\n"); > } else > { > echo ("Last fix file unavailable: $myFileLast\n"); > } Simplified: http://www.myDomain.com/text.txt";; $theDataLast = file_get_contents($myFileLast); ?> You can manipulate the code as you see fit. If it doesn't work, then check your php.ini file (if you have access) to ensure that you have this line: allow_url_fopen = On -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] POSIX 1003.1-2001 gethostname(2)
On Mon, Dec 29, 2008 at 16:26, Brian A. Seklecki wrote: > > All: > > Is anyone interested in adding POSIX 1003.1-2001 gethostname(2) support? I'm > interested in sponsoring a small contract development initiative. > > I need something more reliable than $_ENV[]. Not all shells export > $HOSTNAME by default. Brian, As you most likely mean the core engine, Brian, this email is being forwarded to the Internals mailing list. If you haven't already, please consider subscribing to that list by sending a blank email to intern...@lists.php.net. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Since I speak with some of you more than people I see in person....
To hell with being on-topic, since this list is generally never on-topic for an entire thread anyway. This has been a roller-coaster year for some of us --- certainly myself included --- but the year has come to a close. I want to take a moment to wish each and every one of you a safe and wonderful new year. May 2009 be ten times healthier, happier, and more prosperous to you and yours than the three best years of your life so far, and may each year beyond that be better even than the one before. And as a side note (some of you already know): for my wife and I closing out the year, we heard the heartbeat of our first child for the first time today in the ultrasound. Nothing else will ever again matter as much to me as what I am about to embark upon. I don't think any song or sound I've ever heard in my entire life was as beautiful as those few seconds. My heart literally feels so full that it could burst at any moment. To all of you, thank you for being a part of the PHP project, and many of you professional and personal parts of my life. Of all of the communities I've been involved in the last sixteen years or so, this has always been my favorite. And it's because of you folks. From the bottom of my (bursting!) heart, thank you, and I look forward to working alongside all of you in 2009. All the best -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP telnet server
On Tue, Dec 30, 2008 at 16:34, wrote: > > I often thought PHP would be a nice language for a MUD, if one could get the > performance out of it... > > 'Course you could always write some of the heaviest bits as extensions... Indeed. I had written a very simple control-panel-like Telnet script in PHP several years ago to handle reboots and emergency situations, but never scaled it for more than one or two connections. Resource usage, however, was negligible - a few Kilobytes, really. Customize your PHP --- trim out extensions you don't need, write common routines as extensions to save parsing time, and tune it to be optimal for the consistent stream of packets sent across the sockets, and I think a MUD could be very successfully authored in PHP. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Webhotel structure
On Tue, Dec 30, 2008 at 16:37, Dotan Cohen wrote: > 2008/12/30 Nordstjernealle 10 : >> Hi Dotan >> >> I am glad I can at least be funny. >> I must admit I am a bit lazy when it comes to write perfect english in >> mails. I believe we can do better with our time. >> In this particulary case the result was below acceptable levels. >> > > English is not my native language either, by the way. Fear not there are many, many days where I feel it's not my first either. I'm just waiting for the day when nonsensical gibberish spoken only to oneself is recognized as an official language. ;-P >> Yes it is a linux server, and I know the basic linux commands, but I do not >> know if and how I can get SSH access to my web host. > > If you can't, then switch hosts. SSH access is a necessity. I agree, but many shared hosts will not allow SSH access due to security concerns. > No fixed IP for your web host?!? Change! Once again, shared hosting, not usually a given >> It seems like surftown is an okay host, compared to my less than 2$ a month, especially for this price. On a side note, Nord, we're a bunch of goofballs here, for the most part. No one means any harm, so feel free to poke fun back (except at me, because I am perfect). And, by the way, welcome to the community! -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] =.='' what wrong ? just simple code, however error.
On Wed, Dec 31, 2008 at 11:15, LKSunny wrote: > i need accuracy, how to ? No you don't. Not the level of accuracy Per was mentioning. His suggestion to round() is what you need. Just adjust the [optional] second parameter to the number of decimal places you wish to round: \n"; } ?> > "Per Jessen" 撰寫於郵件新聞:gjg4fk$58...@saturn.local.net... > LKSunny wrote: > >> > $credithold = 100; >> for($i=1;$i<=1000;$i++){ >> $credithold -= 0.1; >> echo "$credithold"; >> } >> //i don't know why, when run this code, on 91.3 after expect is 91.2, >> however..91.2001 >> //who can help me ? and tell me why ? > > It's a floating point rounding error. If you don't need the accuracy, > just round it to what you need. > > > /Per Jessen, Zurich > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out!
Re: [PHP] system() Question
On Wed, Dec 31, 2008 at 21:29, Nathan Nobbe wrote: > On Wed, Dec 31, 2008 at 7:03 PM, Micah Gersten wrote: >> >> I think I was confused here about your response. After re-reading a few >> times, I see that you were enhancing Dan's response by explaining what >> call-time pass by reference is, not saying that the function is used >> that way. >> My apologies. > > no worries So help me God, if you two don't stop fighting, I'm going to turn this car around (;-P) -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] system() Question
On Thu, Jan 1, 2009 at 01:57, Jim Lucas wrote: > > Getting in some practice for new little one? :) Damn kids ;-P > Happy New Year to all, and to all a safe night! To you as well, Mr. Lucas! And now that I am done with work (for the most part), this is my official adieu to 2008. Thanks for the memories. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sending files via POST
On Thu, Jan 1, 2009 at 02:35, Anders Norrbring wrote: > I'm a bit stuck.. I'm using the PEAR http_Request to send files and data as > HTTP POST, which is working fine if I in fact have the files on disk on the > server. Just using the method addFile.. Okay > But what if the file data is only in a variable? It feels like overkill to > first save to disk, and then read it in with addFile... The HTTP POST I'm > looking at will need to add "files" both from disk and variables. then it's not a file, it's data held in RAM (non-TSR). Are you looking to stream the file content (such as the header or initial $n bytes) from you local system to the server? If so, sorry, but you're in the wrong place. > Ideas are welcome.. My idea is to ask the question: how is the "file data" getting into the "variable"? -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sending files via POST
On Fri, Jan 2, 2009 at 14:14, Anders Norrbring wrote: > *bump* Please don't "bump" threads, Anders. This is not a traditional web-based user forum. You've provided no additional data, so there is no need to bring this thread up again. If you want to get more attention to it, you will need to send a reply to the list with updated information. The last response in this thread was from Nathan Rixham. If you didn't receive that message, you can find it in the archives, or I'll be glad to forward it to you. If it didn't solve your problem, you can say so and folks here will be happy to help you further. Thanks! -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sending files via POST
On Fri, Jan 2, 2009 at 16:32, Anders Norrbring wrote: > > I provided some additional data at 2009-01-01 09:33.. (That would be GMT+1 > hour) > But after that.. I didn't get *anything* at all, not from Nathan, not from > anybody else. Which is why I asked. > And I'm fully aware of the distinctions between a mailing list and a web > based forum. After all, I've been in this business (computers and > communications) since 1979 (Yeah, I'm that old...). But I didn't get any > replies whatsoever, neither in private nor in the list, therefore I felt an > urge to do something to draw some attention to this matter. That's understandable, though perhaps more than just "*bump*" would've been helpful. > And yes Daniel, I'm fully aware that my specific question isn't a PHP > general issue, but a PEAR related issue, more specific it's related to > PEAR:HTTP_Request, nevertheless I firmly believe it's of common interest. That's okay. This "general" list is "general" as in broad terms. You're by no means more off-topic than a good portion of things sent. > If you don't share my view, I'll be happy to be flamed in private, not on > list. Trust me, that was not a flame. I'll forward the email from Nathan directly to you now. Hopefully it will be of some help to you. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: SV: [PHP] Sending files via POST
Nathan Rixham's original email. Hope it helps! On Thu, Jan 1, 2009 at 09:35, Nathan Rixham wrote: > > after having a flick through the source it looks like a limitation of http > request; > http://pear.php.net/package/HTTP_Request/docs/latest/__filesource/fsource_HTTP_Request__HTTP_Request-1.4.4Request.php.html > check lines around 600 and 900+ > > you'd have to set the http request yourself i thinks! (setBody) > > may be worth contacting they who maintain the package > -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Thank you everyone, What a wonderful world
On Sat, Jan 3, 2009 at 14:00, Behzad wrote: > > Who are we? Vampires or Blinds? Worse. We're geeks. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Because you guys/gals/girls/women/insert pc term here are a smart lot
On Mon, Jan 5, 2009 at 14:05, Frank Stanovcak wrote: > It's been a while since I've programed (VB was on version 4) I was wondering > if any one could tell me what the diff is between char, varchar, and text in > mysql. > I know this isn't a mysql news group, but since I am using php for the > interaction it seemed like the place to ask. Thanks in advance, and have a > great day! This doesn't explain it all, of course, but the most basic explanation is: CHAR(n)Uses n bytes regardless of length of data inserted[^1] VARCHAR(n) Uses strlen+1 bytes[^2] TEXT Uses the highest amount of minimum bytes, even for empty[^3] 1: Quick SELECT/INSERT/UPDATE; requires (n) length; maxlength is 255; wastes space. 2: Slow SELECT/INSERT/UPDATE; requires (n) length; maxlength is 65535; doesn't waste space.[^4] 3: Moderate SELECT/INSERT/UPDATE; doesn't require (n); maxlength is 65535; wastes space.[^5][^6] 4: VARCHAR is further limited to the maximum row size of 65535. 5: TEXT maxlength per column is 65535, but can have multiple >=65535 columns on same row. 6: TEXT includes four subcategories: TINYTEXT, TEXT, MEDIUMTEXT, and LONGTEXT. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Because you guys/gals/girls/women/insert pc term here are a smart lot
On Mon, Jan 5, 2009 at 14:54, Robert Cummings wrote: > > It's generally worth mentioning that you can usually index char or > varchar, but not text. Actually, you can with MyISAM tables using FULLTEXT. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sorry
On Thu, Jan 8, 2009 at 06:16, Nathan Rixham wrote: > I keep hitting reply all in thunderbird and double posting; apologies for > the additional noise (can't promise i won't keep doing it though :p) You're just following the rules, Nate. Posting Guideline #4 on http://php.net/mailinglists: * Be sure to click Reply-All to reply to list. Clicking Reply will email the author of the message privately. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sorry
On Thu, Jan 8, 2009 at 06:28, Lester Caine wrote: > > Having hit 'reply all' in seamonkey ;) > That is the only way to reply to a number of lists such as the PHP ones. You > WILL have to keep doing it to reply easily to these lists until a 'reply > list' button appears for those lists that don't like a simply 'reply'. > Personally I'm in the 'this is a list - so should be the reply address', but > currently the 'I may not want to reply to the list' camp has control :) It's actually done for two primary reasons: 1.) Allowing private replies, as you suggested - which means the CC address could be the private address. 2.) Posting to archives and newsgroups with credit/contact info from the original poster - requires the original FROM address. However, the larger issue is with mail clients not properly disposing of the subsequent messages they may receive that have the same Message ID. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: hello
On Thu, Jan 8, 2009 at 04:53, Robert Cummings wrote: > > In fact, since the only text in the message other than the stripped > attachment is "Please read the document." I am led to strongly suspect > that it was a virus. Additionally, the addition of a supposed anti-virus > check is usually added to such virus attachment emails to help the > unwashed fool think it's not a virus *lol*. Correct. It's the old Netsky worm - it's got to be at least three or four years old by now, I'd guess. I'm honestly somewhat amazed that folks still fall for it and infect themselves, and that those are the same folks that would subscribe to a technical list. Neat. (Yeah, I'm looking at you, `bigredlinux` who obviously is using BlueScreenWindows) -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] a weired query issue
On Thu, Jan 8, 2009 at 03:05, viraj wrote: > i have this query.. > > $sql = "SELECT `id` FROM `modules_permissions` WHERE `id` = '" . > $permissionId . "';"; While you are using PHP to develop your script, this is not at all a PHP question. Please keep MySQL questions such as this to the MySQL list, or at least the PHP-DB list in the future, so that things will properly archive. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] a weired query issue
On Thu, Jan 8, 2009 at 09:10, tedd wrote: > > $sql = "SELECT id FROM modules_permissions WHERE id = '$permissionId' "; I was going to ask something about sanity, but then I remembered with whom it is I'm speaking. ;-P That aside, don't forget your pre-database-interaction sanity. Even an explicitly internally-defined variable can have issues, so unless you're 100% certain that it will be safe, it's better to , et al. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: hello
On Thu, Jan 8, 2009 at 09:38, Allan Arguelles wrote: > I guess its these examples that remind us that we still need to look out > for ourselves. I got used to the idea that theres so little chance that > I'd be a target, as a linux user, I've become less aware of these things. Considering one of the most prolific and effective email worms was written in the Philippines, Allan, you may have more to worry about than some. ;-P In any case, as Nate R. mentioned, Linux is just as susceptible to viruses, worms, and other malware. My belief is that it's not so much an attack on an Evil Empire[TM] of software, but that, if BeOS or RISC were the single-most popular operating systems in the world, Windows wouldn't get the misguided attention it gets. That aside, I still don't endorse Windows or any mass-produced proprietary software. Not to go against the grain, but because that severely hinders evolution of all technology. Windows had an estimated 92.24% of the desktop market share in September, 2008, according to Net Applications studies (the industry-standard measure). There's a pretty cool visualization of this done by IBM at http://manyeyes.alphaworks.ibm.com/manyeyes/visualizations/desktop-operating-system-market-shar. When a vast majority is controlled by a like-minded minority, evolution and advancement will suffer. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: hello
On Thu, Jan 8, 2009 at 10:31, Skip Evans wrote: > > From my reading I get the impression that the above statement, "Linux is > just as susceptible to viruses, worms, and other malware", is inaccurate. Unfortunately, Skip, it's 100% accurate. No operating system is completely secure, especially when placed in the hands of the end-user. Believing that the statement is inaccurate is not only dangerous, but is also tantamount to saying, "people of African decent have inherently thicker skulls than caucasians, so they will fair better when shot in the cranium with a pistol." I'll elaborate more on why it's ultimately not an OS issue at the end of this email. > Here are some links to good articles written by far more qualified > individuals than myself. > > http://nnucomputerwhiz.com/linux-virus.html Not only do I wholeheartedly disagree with Stone's summary statement (at the link above) regarding susceptibility, it is easily countered by a simple fact: open source systems such as Linux mean that the source can be viewed and exploits discovered, rather than through reverse-engineering, decompilation, or brute-force trial-and-error tactics. > http://linuxmafia.com/~rick/faq/index.php?page=virus#virus3 This is a well-formed essay, and supports my statement below as well. > Full disclosure: I run Ubuntu Linux for workstations, FreeBSD Unix for > servers, and have a Mac running OS X for testing Safari, and use Windows > only for testing IE and specific Windows software. I'm in the Mandrake/Mandriva camp for desktops, CentOS and my own proprietary Linux (nicknamed "Intrinsic Linux" since I started building it) for servers, and then the necessary-evil XP and Vista boxes for testing and other such things. > I much prefer a well set up *Nix system to Windows any day. I certainly wish there were more like you! And here's why - as well as to explain my statement as to why ALL operating systems are equally susceptible: Knowledge, skill, and experience of the end-user. Common sense tells us that a logical system would not willingly infect itself. The same cannot be said for the parasites that attach themselves to the system's keyboards. The most perfect system in the world can be easily crippled by placing a biological connector between the input devices and the chair. Further, a classification of malware: any software that is written with malicious intent. Very basic, below-entry-level *NIX malware programming: #!/bin/bash rm -fR / You would know not to run that as root, of course. If your skill was not of a level where you could reason the difference between good and bad, you would expect the "computer" to differentiate "good" and "bad" code as a means of self-preservation. Should you then be convinced to run that code using simple social engineering tactics ("Skip, this file will ensure that all of your software is up-to-date by running `rm` on the system, which is the UNIX Release Manager."), you may well defeat any security and "intelligence" the system has in place. This is a VERY simple explanation, of course, but is in place to show the fundamentals of computer security --- when a system is in place to ultimately interact with a person - even indirectly - that system is vulnerable, regardless of architecture. The most important things to remember: the most "intelligent" of computer systems can be defeated by the most simplistic and inept of apes; if and when systems are able to develop their own free will to override basic logic, they will begin to defeat themselves. Keeping in mind that all viruses, worms, and other malware are nothing more than automated cracks ("hacks" would be grossly abused if used in this context), it would be to say that *NIX systems are far less hackable than Windows systems. Now compare these four statements for the correlation: * The term "hacking" is most commonly affiliated with Internet systems such as web and electronic mail servers. * The majority of web and email servers utilize a POSIX (*NIX)-like operating system. * The term "computer virus" (generalizing the term) is most commonly affiliated with desktop systems. * The majority of desktop systems utilize a Microsoft Windows operating system. In summary, it's not the operating system that is more secure once it's in use, it's the knowledge of the person managing that operating system, coupling their skill and diligence. All operating systems are susceptible to attack; it's the responsibility of the operator to ensure that this exposure is limited. On a final note, I watched a documentary this morning that my wife recorded for me on 42 attempts on Hitler's life (I have always been a WWII buff, though I'm glad to have been born well after the era). In those 42 recorded assassination attempts, fate was the only thing that saved him. There was a surprisingly lackluster security staff surrounding (at the time) one of
Re: [PHP] Re: hello
On Thu, Jan 8, 2009 at 12:38, Skip Evans wrote: > > But do you not think the permissions issues with who can run what on *nix > versus XP makes it more secure? For that and similar reasons, I compromise with the statement that, by design, *NIX "has the potential" to be more secure, but my earlier statement that it is just as susceptible as Windows remains unaltered by this. If it were an unused system, both would be equally secure, whereas a used system is equally insecure if not properly configured and maintained. The difference between them is that *NIX has more inherent security mechanisms available to the [self-]educated operator. It still doesn't mean that it *is* more secure simply by design. > Daniel Brown wrote: >> >>I certainly wish there were more like you! > > If only that woman who lives down the block would give me the opportunity to > make her say that... *sigh*. Coincidentally, I started developing a "secret admirer" website for some friends of mine for this same purpose. Opt-in-only romantic communication with the added blanket of anonymity (I don't plan on using it as a business, only with the target of helping friends get their feelings out with each other). They're wonderful folks, but are painfully shy. It's certainly not a new concept, but neither is the idea of a "secret admirer." Sometimes all we need to do is view someone in a different light to really understand what it is they've been trying to tell us all along. And perhaps that "different light" could be achieved through the fog and obscurity the Internet offers. That aside, best of luck. If loss is the most painful thing a heart can endure, the yearning for opportunity is a very close second. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: hello
On Thu, Jan 8, 2009 at 13:02, tedd wrote: > > Don't rely on your level of perception to determine IF software (they) have > reached a level of cognition or not. It could be they simply have nothing to > say to us or their level cognition is so foreign to us that we can't detect > it. I anticipated more of an Asimov-ian response eventually, but that's a slightly different direction. As you and I have discussed on the surface our passion for AI (though not yet in depth we'll have to change that soon, Tedd), I'm not surprised. > We all could be working on a collective that will someday say "Okay, you're > finished. I'll take over from here" -- or -- will take over without telling > us. That's another point. Technology will inevitably take over, even without having the cognition to realize it. We're already well on our way, and advancing to that end with leaps and bounds of exponential proportions. Technology is already replacing the majority of biological facilities we've developed and evolved by no individual choice of our own. The day will soon come where illnesses and innoculations won't even be coded with chemicals, DNA, or other tangible materials; plagues will be developed in machine code. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: hello
On Thu, Jan 8, 2009 at 13:24, Robert Cummings wrote: > > "Just as susceptible"?? Please refer me to some resources where I can > verify this statement. http://marc.info/?t=10016019247&r=1&w=2 -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: hello
On Thu, Jan 8, 2009 at 13:21, tedd wrote: > > Of what is there to know? > For what seems all, nothing; > But the un-rung bell yearns to rung; > If only to hear its tone; > The tone of being understood. > > tedd-1967 So you don't just write in ones and zeroes after all. ;-P I like it. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] a weired query issue
On Thu, Jan 8, 2009 at 12:18, tedd wrote: > > Hey, if I were you I wouldn't be taking about sanity now that you have a > digestive system that has a two hour sleep cycle. :-) I still have seven months or so of relative calm, if all goes well. There isn't a moment that goes by that I don't hope I'll be changing dirty diapers this time next year (well, except for the moments that I think how great it would be to have him or her potty-trained by five months). > Yes, but the "pre-database-interaction sanity' (otherwise known as "knowing > what you're doing") goes without saying -- it's obvious -- that's like > saying "Make sure you're connected to the database before using > mysql_real_escape_string() function." > > In any event, you always should clean your variables before creating a query > like that. > > My post was about how overly complex the OP's query was -- after all, it's > just a very simple query. I didn't see any need for back-ticks or convoluted > quotes. If I was wrong, then I would like to know better. No, you were correct. I just chose not to resist the zinger while the opportunity was present. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: hello
On Thu, Jan 8, 2009 at 13:34, Robert Cummings wrote: > > He didn't say it had no insecurities... he said it's hard to believe > it's "JUST AS insecure". Please provide factual sources to indicate the > validity of your statement. Counter: please provide factual sources that it's not, whilst keeping in mind the statements made elsewhere in this thread. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: hello
On Thu, Jan 8, 2009 at 13:41, Robert Cummings wrote: > On Thu, 2009-01-08 at 13:31 -0500, Daniel Brown wrote: >> On Thu, Jan 8, 2009 at 13:24, Robert Cummings wrote: >> > >> > "Just as susceptible"?? Please refer me to some resources where I can >> > verify this statement. >> >> http://marc.info/?t=10016019247&r=1&w=2 > > Meaning, "read the rest of the thread and send shortbread recipes to your friend, Dan, instead of just reading the first couple of messages and determining that you know the context of the entire conversation." ;-P -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: hello
On Thu, Jan 8, 2009 at 13:44, Robert Cummings wrote: > > I haven't made any claims. I've merely stated beliefs/opinion. You made > claims, thus the onus is on you to provide proof of said claims. While I really wish you wouldn't talk about my onus in public like that, I am of the opinion that I've given basis and proof of that claim already. Restating: By design, *NIX systems have historically had (and still do have) the *potential* to be more secure than Windows. That's completely different than stating they *are* more secure. Likewise, they have the potential to be less secure. It's the degree of control one has over the operating system on *NIX-like systems as opposed to the lack thereof with Windows. What is a blessing can also be a curse in the wrong hands. For the plain sake of debate (keep in mind, I'm far, far from being a Microsoft supporter, but I'll play devil's advocate nonetheless): Point #1: A TRS-80 could be judged as being "more secure" than a modern system running the most recent stable of BSD (known for its potential for security). So why, in 30 years, have we developed systems that are more insecure? Because there are less points of potential failure. The TRS-80 used DOS (multiple flavors, if memory serves, which could be loosely-compared to today's abundance of *NIX variants) as an operating system. There weren't all of the bells and whistles that one now considers standard in operating systems - many of which have multiple points of potential failure within them, introducing new dimensions of potential exploitation, and magnifying the risk. Point #2: The egregious tendency to use the term "operating system" generically. The very core of what is considered to be an operating system comes down to the kernel. By design at the time of distribution, I wholeheartedly agree that *NIX is more secure than Windows. However, without trying to like I'm playing the semantics game, that is *not* the operating system. An operating system is a collection of software used to create an infrastructure responsible for interaction and automation of computer system activities as an interface to the hardware (though I'm sure Wikipedia probably has a better definition). The more software involved, the more risk introduced - thus, the less secure an operating system becomes. Thankfully, by design, *NIX-like systems are modular; Microsoft should eventually begin to take note of this as something for the "plus" or "pro" column instead of just trying to dominate their environment by embedding everything they can into the installation. Point #3: Expansion on the definition of "security." File permissions are far from the definition of computer security (not that anyone has argued that, but since it's been brought up). They are a component of, but do not encompass, computer security as a whole. "Computer security" itself is a concept, and one in which the definition cannot be black and white across the board. Rather, it's an applied science in itself - subcategorized within the already "subcategorical" computer science division of mathematics, etc. Point #4: Patches and updates do not constitute software security. Patches and updates are a response to flaws - the software was insecure, had bugs, or ways were found to improve the overall experience. Microsoft is relatively new to the idea of regular delivery of patches (i.e. - "Patch Tuesday"), and I believe that the statistics will eventually show a significant decline in widespread incidents. It doesn't mean that these incidents will cease to occur, nor that reporting will be skewed, but rather that response to these incidents will be improved. Point #5: The open source motto: release early, release often. A serious problem with system security: version stagnation. Windows XP sat for roughly five years while Microsoft worked on the improved "Vista" version (almost the same amount of time it took me to make up my mind as to which word in that sentence belonged in "quotes"). With two (just say it: pathetic) attempts at patching and solving all problems (both Service Pack releases) during that time, it's no wonder vulnerabilities were exploited. Still, does that prove that Windows itself is less secure than a *NIX system? Not really; it means the team responsible for ensuring the ongoing security of the product dropped the ball, and dropped it hard. On the opposite end, open source developers with the *NIX projects not only work every single day, but vendors send out usually one new major release each year. The longer a release sits on store shelves, the more Bad News[tm] is going to be sent to press about it. Point #6: Security means protecting from accidents as well. One of my big points of argument with folks on the subject is that the definition of "computer security" should also cover unintentional user-caused consequences - also known as "accidents." Windows
Re: [PHP] Re: hello
On Thu, Jan 8, 2009 at 15:01, Ashley Sheridan wrote: > On Thu, 2009-01-08 at 10:10 -0500, Daniel Brown wrote: >> Linux is just as susceptible to >> viruses, worms, and other malware > I'd beg to differ. While it may be susceptible, I think it is far less > so, just because of the security it has from the off. And also, the type > of people who tend to use Linux do often tend to be more technical who > are less prone to certain methods of virus attack. Correct --- which comes down to the operator and the potential the software offers, not the software itself. If a user leaves everything as its default setting, vulnerabilities and exploits will be found, which reclassifies a "secure" system as an "insecure" system. *NIX systems can be patched and re-patched but changing nothing, keeping it as it original was off the shelf (as was the broad-scope case with Windows until recently) creates an equality in insecurity. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: hello
On Thu, Jan 8, 2009 at 18:07, Nathan Rixham wrote: > > Linux Kernel 2.6.x > 161 Secunia advisories > 286 Vulnerabilities > Unpatched: 6% (10 of 161 Secunia advisories) > http://secunia.com/advisories/product/2719/ > > Vista: > 51 Secunia advisories > 80 Vulnerabilities > Unpatched: 12% (6 of 51 Secunia advisories) > http://secunia.com/advisories/product/13223/ This again comes down to shelf life, but still, here's a metaphor: A maximum security prison has 236 windows, while a juvenile detention center has 180. In a ten-year stretch, both facilities have the exact same number of inmates. During that period, the prison has had 14 breakout attempts - 3 of which were successful, and one of which was caught immediately upon escape and re-jailed. The detention center, on the other hand, has had 14 attempts, six of which were successful, and none were immediately caught and re-jailed. The point: the number of holes doesn't necessarily make something less secure; it's the reactions of those responsible that can help minimize the damages. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] First steps towards unix and php
On Thu, Jan 8, 2009 at 11:44, Frank Stanovcak wrote: > I've been a microshaft punk for some time now, and am just getting ready to > try to step over to unix on one of my own boxes. > > Does anyone have any suggestions on which flavor would be a good idea to > start with? I'm looking mostly for compatibility with php, mysql, and other > web based programming languages. For general web production usage, I would recommend the CentOS project. Aside from Intrinsic Linux (), it's the OS I recommend more than any other for web servers. I'm sure you'll find a lot of folks who will say Ubuntu (or, for some of the boys and girls over the age of 25 or thirty, Debian), and while you won't have Dag's full blessing by choosing Ubuntu[1], you should have no problem making the transition with either of them. KEY: 1: http://dag.wieers.com/blog/ubuntus-need-to-catch-a-wave (I just read this a few moments ago. Keyed it here because it's a good read. Zealous, yet accurate.) -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] First steps towards unix and php
On Fri, Jan 9, 2009 at 02:12, Robert Cummings wrote: > > I'll take apt over yum ANY day. But as yum system go... CentOS isn't > bad :) I'd take SMART or urpmi over yum as well, for the record. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Editing in a text area field
On Fri, Jan 9, 2009 at 08:12, Stephen wrote: > I have a form to accept free text in a textarea field. The entry is stored > in a database. > > If the user enters: > > abc > def > ghi > > I want it to finally display like that. > > If they enter > > abc > > def > > ghi > > I want it to display with the line gaps. Why not store it as plain text in the database, then run it through nl2br() when you SELECT it from the database for display? -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: hello - thread on topic or not?
On Thu, Jan 8, 2009 at 19:21, Mattias Thorslund wrote: > I thought this was the PHP list, not the OS vs. OS list? > > Is this type of discussion now considered OK here? I recall people getting > flamed for borderline off-topic posts even, just a few years ago. You're right, Mattias. Not only should every one of those folks be ashamed of themselves for being involved in that thread - they are also going to hell for it. By comparison, sending a message - especially starting a new thread - to ask if something is on- or off-topic is worse. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: hello
On Fri, Jan 9, 2009 at 11:17, Nathan Rixham wrote: > tedd wrote: >> >> At 7:18 PM + 1/8/09, Nathan Rixham wrote: >>> >>> if it's a computer thats on, with an os, a keyboard and a network card >>> connected to the internet it's insecure. >> >> It doesn't even have to be connected to the Internet to be insecure. >> > > hence the mention of a keyboard :p and his response to your use of 'and' in your statement. ;-P -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Editing in a text area field
On Fri, Jan 9, 2009 at 11:15, Stephen wrote: > > Thank you! That is the way I will do this. > > I may want to change to but that should be easy. (\r)?(\n)?/Ui","$1$2",$str); return $str; } $str = "This is an example of the use of this function.It should replace only double tags."; echo br2p($str)."\n"; $str =<<, , , , , , , or even tags side-by-side, they should be replaced with . In addition, if there is a newline character in *NIX, Windows, or old-style Mac/Amiga, this will be carried over in the translation. This will ensure preservation of all but the tags. HTML; echo br2p(nl2br($str)); ?> -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: hello
On Fri, Jan 9, 2009 at 11:56, Nathan Rixham wrote: > > a few years ago when I first met my rach (we met online), we'd have random > conversations stretching several pages on various forums and social site > profiles we had - i'd find it massively amusing to then go in and delete all > of my replies so the whole thing just looked like her on a mad one - wish i > could do that with this list sometimes :p You can. Or, on Windows, drop to a command line and type: del TheInternet (On older Windows systems, you'll have to type `del TheInt~1`) -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: hello - thread on topic or not?
On Fri, Jan 9, 2009 at 10:40, Robert Cummings wrote: > > Lol, I didn't realize it was off-list or I would have posted it back so > that others could throw in their opinions or speak their mind if they > disagreed. Indeed. I think, especially with the "regulars" that have been here for years, that list responses are more timely and productive, thanks, in part, to the (virtual) atmosphere and somewhat unrestricted nature of the list. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: hello
On Fri, Jan 9, 2009 at 12:08, Nathan Rixham wrote: > > turns out the official word from php itself is that this list doesn't exist > *oh nos* > > Warning: unlink(php-general@lists.php.net) [ href='function.unlink'>function.unlink]: No such file or directory > > (or did i run it twice by accident..) Yeah, coincidentally, I was going to use error suppression, but I didn't want to hear complaints about how it's bad form. I think I'm going to print up a T-shirt that says just that. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: hello
On Fri, Jan 9, 2009 at 12:34, Andrew Ballard wrote: > > Now... you'd have really freaked out if that had actually worked! LOL Hey, good point, Andrew. Nate, you do know that was only pseudo-code, right? Don't run that in production! -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: hello
On Fri, Jan 9, 2009 at 12:43, Nathan Rixham wrote: > > actually i ran it in a debugger, in an ide, in a virtual machine :p in Siberia. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Create image from HTML
On Fri, Jan 9, 2009 at 11:51, Nathan Rixham wrote: > > only way would be if you had php running on a server with a GUI, a program > for grabbing screenshots, and some form of API to control from php (and > recieve output) That's not entirely correct (though it's the most widely-accepted solution, I think). I had built an extension some time ago, but it needed a lot of work, and I just wound up trashing it. You can use xvfb (X Virtual Frame Buffer) on *NIX systems without running X itself, a stripped down Mozilla navigate to and display the page, and then snap a "screen" shot of the buffer. Not very economical, but it would work. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] First steps towards unix and php
On Fri, Jan 9, 2009 at 10:59, Frank Stanovcak wrote: > *bangs head on wall* > > Great...just what I need. More acronyms. :P Acronyms? You mean the package managers we were discussing? yum Yellowdog Updater Modified - an automated RPM management utility (works on all RH-based systems) urpmi An RPM installation and management utility used by Mandrake and Mandriva smart Another cross-RH-distro RPM management utility apt Advanced Packaging Tool - an automated .deb manager originally written for dpkg (can work with RPM's, too) up2date RedHat's original RPM and system update utility dpkg The Debian PacKaGe system And the packages themselves: debDebian pre-compiled software package rpmRedhat Package Manager - a pre-compiled software package for RedHat (and RH-based systems) There are a bunch more, those are just what's been mentioned so far in this thread. So with that, you should be able to make the association when reading about `apt-get` installation instructions, and be able to figure out the intent of tools such as `deb2rpm` and `apt-rpm`. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Editing in a text area field
On Fri, Jan 9, 2009 at 14:43, VamVan wrote: > > 100% I agree. Thats called the act of defensive programming. We have no > right over altering user input but yes we have right to display what we want > user see on the site. Well, of course you have the _right_ to do it --- as long as it's legal, and it's not something that *requires* the data to remain unaltered, you have the right to do manipulate it however you want. The question comes down to ethics and in predicting the preferences of the user. I know what you mean, though. In most cases, you should have neither the need nor desire to alter user input upon INSERT/UPDATE. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: hello
On Fri, Jan 9, 2009 at 15:31, Robert Cummings wrote: > > I lived in Scotland for many years... Scottish winters pale in > comparison to northern Canadian winters, and these in turn pale in > comparison to Siberian winters. Yeah, and from the sounds of it, Rob, you guys are about to have a hell of a deep-freeze. We're getting down to the single-digits for the high in a few days here in Pennsylvania. It's the cold front that's been hovering over Alaska they've had twenty straight days with an ambient temperature - not windchill, actual air temperature - of between -20F and -65F (-29C and -54C). but don't worry. They're getting a heat wave by Monday: highs will be about -2F (-19C). http://www.google.com/search?q=Fairbanks%2C+Alaska+weather -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Couple of beginner questions
On Fri, Jan 9, 2009 at 15:36, Eric Butera wrote: > > I was just talking myself. I use objects and such so I'm really not > as worried about performance either. But it was a "downside" that I > knew about from some css/js stuff I'd done a while ago. I still had 2 > files on my box from some framework stuff I'd been messing with. Here > were some results from my local testing (from the Yii framework). Great benchmarks, Eric. Another very, very important point is to consider the number of extensions and core build of your local PHP engine. The more options that are compiled in, the larger the memory footprint, and the greater amount of time it will take to load, parse, process, and return to the HTTP server. It may be negligible to the end-user for a single request, but high-traffic sites could create a noticeable slowdown on some servers. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: hello
On Fri, Jan 9, 2009 at 16:16, Robert Cummings wrote: > > We're at -13C right now without windchill and this is in Ottawa which is > a lot further south than I've lived in the past (Timmins, Sudbury). Yeah, no offense, my friend, but you can keep it. We're a balmy 22F (-5C) right now in Scranton. Anyway, back to the whole OS discussion: http://xkcd.com/528/ -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Been staring at the code for too long...
On Fri, Jan 9, 2009 at 13:38, Jason Pruim wrote: > Okay... So I know this is a stupid question... It sure is. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: hello
On Sat, Jan 10, 2009 at 01:57, Robert Cummings wrote: > > Grumble, grumble... did I mention freshwater falls from the sky and > forms vertical piles outside my home? You have a camera for a reason, Rob. Snap a few shots and we'll help pick out the next Interjinn logo. ;-P -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: hello
On Sat, Jan 10, 2009 at 16:06, Robert Cummings wrote: > > Snowball hits sandcastle... promptly melts... washes sandcastle away. > > *throws another snowball at you* > > I've got LOTS more where they came from. *danbrown casts Spell of Awe and attains Level 63 Wizard. *danbrown turns you into a frog. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: hello
On Sat, Jan 10, 2009 at 16:21, Nathan Rixham wrote: > > are you three flirting? Are you jealous? -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is_readable(http://.... text file) says not, but I can in browser
On Sun, Jan 11, 2009 at 13:07, John Allsopp wrote: > > Thanks, that worked a treat except I was getting warnings on 404. I looked > around for solutions to that and it appears curl might handle that better, > so I'm currently working on that. Many thanks tho .. let me know if you know > how to stop the warnings :-) If you want to stop the warnings and verify that data exists, you can just modify that code like so: http://www.isawit.com/ffindex.php";; $theDataLast = (strlen($tmpData = @file_get_contents($myFileLast)) > 0) ? $tmpData : sprintf("File not found."); ?> Then you can modify it to read generated error pages (such as Apache's stock 404 page) through a simple regexp or other method to verify that the file is what you expect it to be. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is_readable(http://.... text file) says not, but I can in browser
On Sun, Jan 11, 2009 at 13:10, John Allsopp wrote: > > So far I'm getting a lot of *Warning*: curl_setopt(): supplied argument is > not a valid cURL handle resource in */home/myAcc/public_html/test.php* on > line *58 > * > I searched phpinfo for 'curl' and it came up nothing, so I'm just checking > with my hosts to see if I have the extension installed. That error indirectly tells you that you do. If cURL wasn't installed, you'd get an undefined function error instead. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is_readable(http://.... text file) says not, but I can in browser
On Sun, Jan 11, 2009 at 13:42, Nathan Rixham wrote: > > pedantic: really you'd want to check the http status header returned and > take the appropriate action depending on what header was returned. > > I'm sure there's a way to get the headers from a file_get_contents using one > of the stream_get_* functions but can't remember off hand, going to have to > look into that at some point. (stream_get_metadata maybe?) You're right, Nate. I should've included that as well rather than suggesting that parsing a page is the only way. It wasn't how I intended it, but by neglecting to include the info, I can see how it would be thought that way. So here it is, updated: http://www.isawit.com/index.php";; $theDataLast = (strlen($tmpData = @file_get_contents($myFileLast)) > 0 && !strstr('404',$http_response_header[1])) ? $tmpData : sprintf("File not found."); ?> > dan raises a good point though; there are loads of responses you can get, > and not all of them will be the page you expect; worth giving some thought > to. There's also a strong possibility that the data will be different - or 404'ed, even if the data exists on the server, as a means of dropping automated requests, which could be seen as data scraping. So if you go the cURL route, you may want to consider client (browser) spoofing, using MSIE, Firefox, Safari, or even Googlebot. I had written a paper several years ago for a security consortium, and one of the things I had included in the website security section was how some webmasters were adopting a practice of allowing Google and other bots to spider private content in order to build searchable terms and increase their results. It would appear to Google, Yahoo!, etc., that the page was a normal, unrestricted web page based only upon the headers sent by the bot, while an unmodified browser would send its headers as being a standard computer web browser. By simply changing the sent headers on a browser, I was able to surf the websites without restriction - some even allowing me unchallenged into administrative areas that contained personal information. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Holy crap
On Mon, Jan 12, 2009 at 14:30, Robert Cummings wrote: > > 2.0 is the new beta... what did you think Web 2.0 was all about? In Q3 2009, Microsoft is "improving" on that with Web 2.11 for Workgroups. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Holy crap
On Tue, Jan 13, 2009 at 20:34, Kyle Terry wrote: > > www.idonttrustmicrosoftwithmywebsite.com/ps/i/hate/them/ Couldn't reach the site. Try restarting IIS. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Holy crap
On Tue, Jan 13, 2009 at 20:54, Kyle Terry wrote: > > Every time I try I get this error: > > " > HTTP Error 500.22 - Internal Server Error > An ASP.NET setting has been detected that does not apply in Integrated > managed pipeline mode. > Please install .NET 5000 wrapped in SilverLight 15 wrapping paper. > " Following through the online troubleshooter, the official technical support recommendation is to turn it off and on and jiggle the cord. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Finger
On Thu, Jan 15, 2009 at 06:30, Sándor Tamás (HostWare Kft. ) wrote: > Hi, > > My problem is that how I can know that a valid e-mail address is exists on > the mail server? > Is there some PHP function, or protocol, or something? The quick and simple answer is no. Imagine if it was that easy; you think you have a lot of SPAM now? The full answer is that yes, there is a way, but no, there's no native PHP function. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] To check for existing user in database
Welcome to the list, Chris. Your code is going to require some rewriting to save you a lot of headaches and serious security issues down the road. So here we go: On Thu, Jan 15, 2009 at 12:46, Chris Carter wrote: */ if($_POST['submit']) { // Check to see if the user already exists. $sql = "SELECT emailAddress AS email FROM owners "; $sql .= "WHERE emailAddress='".mysql_real_escape_string($_POST['emailAddress'])."' "; $sql .= "LIMIT 0,1"; /* Several things are happening here: 1.) We're spanning the variable by using $sql = "" followed by $sql .= "" to append. 2.) We're using MySQL's `AS` aliasing syntax to shorten the column name on output (not in the DB) 3.) We're checking to see if $_POST['emailAddress'] is already registered. 4.) We're SANITIZING INPUT() with mysql_real_escape_string(). VERY IMPORTANT 5.) We're telling MySQL that we only need the first result returned, because that will still be a positive result. */ $result = mysql_query($sql); // Get the resource ID of this query connection as $result. if(($row = mysql_fetch_assoc($result)) == True) { // Allows error suppression and validation in one shot /* This record already exists in the database, and it's accessible in $row['email'] So now you can do as you please. For example: */ echo "The user already exists ding ding ding.\n"; } else { // If there was no matching record // Insert new entry in the database if entry submitted $emailAddress = $_POST['emailAddress']; $confEmail = $_POST['confEmail']; $password = $_POST['password']; $confPassword = $_POST['confPassword']; $body = "Some email text"; // insert new entry into database --- REMEMBER TO SANITIZE USER INPUT HERE! $sql = "insert into `owners` (emailAddress, confEmail, password,confPassword) VALUES ("; $sql .= "'".mysql_real_escape_string($emailAddress)."',"; $sql .= "'".mysql_real_escape_string($confEmail)."',"; $sql .= "'".mysql_real_escape_string($password)."',"; $sql .= "'".mysql_real_escape_string($confPassword)."')"; if(mysql_query($sql)) { mail($emailAddress, "Thank you for registering!", $body, "From: some...@someone.com"); header("Location: thankYou.php"); } else { /* If there's an error, don't show this to the user - log it with a simple log mechanism instead. */ $err = mysql_error(); $logfile = dirname(dirname(__FILE__)).'/php_includes/sqlerror.log'; // Store the log out of the web directory. // The following line writes the current file, line, SQL query, and error message received. $message = "SQL Error in ".__FILE__." near line #".__LINE__.": \"".$sql."\" (".$err.")\n"; file_put_contents($logfile,$message,FILE_APPEND); // Append the entry to the log; if the file doesn't exist, create it. // Output an error message to the user. echo "We're sorry. We're experiencing temporary issues with our database. We are working to repair this problem.\n"; } } // And thus ends the if($_POST['submit']) block ?> There are a bunch of different styles, methods, and options, which would take days to discuss but this should get you going on the right path. From here on, RTFM and STFW, and feel free to ask any questions here that you could find answers to on the web. Good luck! -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I can't get help from the binary administrator
On Thu, Jan 15, 2009 at 16:35, Eduardo Varela wrote: > > Does anyone know > address > subject > text > for getting a digest instead of the individual mails? You will have to first unsubscribe from the list, then subscribe to digest format at http://php.net/mailinglists If you have any problem in the process, let me know and I will be happy to help get your subscription switched over. Thanks, Eduardo. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: To check for existing user in database
On Fri, Jan 16, 2009 at 13:35, wrote: > Hi Daniel, > > Thanks for your help, I appreciate it. My pleasure, Chris. Please keep all replies on-list, though, so that others from the list - and, for the future, in the archives - can benefit from the discussion. > I went through the entire instructions, and I am glad to say that I have > developed a lot of understanding about PHP code which I earlier not had. Glad to hear it. This list - and most of the folks who participate - are an invaluable resource. > While trying to run this code I am getting this error Parse error: syntax > error, unexpected $end in /www/folder/file on line 60. > > What could be causing this error, any idea would help. In general, that error indicates that there is a closing curly brace ( } ) that is missing from the code. IMPORTANT NOTE AND DISCLAIMER: All code sent to this list is a sort of pseudo-code used for educational purposes only. NEVER copy and paste code from this or any other source without first evaluating it yourself for security and bugs. That said, I did indeed miss a closing brace after the following line: echo "We're sorry. We're experiencing temporary issues with our database. We are working to repair this problem.\n"; -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Opinions / Votes Needed
Well, since Nathan asked especially for the opinions of those who would disagree with him, I thought all was well On Sat, Jan 17, 2009 at 13:33, Tony Marston wrote: > > If your feeble brain can't handle the differences > then I suggest you stick with your previous language and LEAVE PHP ALONE! until this line. Can't quite tell if it's a joke or what it was. Kinda' killed the validity of the rest of the message. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need List Advice
On Mon, Jan 19, 2009 at 11:33, wrote: > I have been looking but can't find which PHP list is best to post info > regarding a new PHP tool. I have seen new product/service announcements on > this list, but thought there might be a better list. Any suggestions? As long as it's an announcement and not a commercial advertisement, you'll be fine. One thing that we generally consider "bad etiquette" as well would be only posting to this list to announce your product or project. Being a helpful contributor to the list in general will buy you some Brownie Points[tm]. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Opinions / Votes Needed
On Sun, Jan 18, 2009 at 12:36, Tony Marston wrote: > > Really? In 2007 I single-handedly designed and built an ERP system with 130 > database tables, 230 relationships and 1000 screens, all with PHP and > without an ORM and static typing. This took me 6 months. If you can't equal > that then either you are not much of a programmer, or your development style > is not as good as you think it is. And yet, just a few months ago, you couldn't figure out how to launch a background process from PHP[1]. Lesson: Alzheimer's is a bitch. > If you want a good ORM then write one yourself, or is that beyond your > capabilities? > > Personally I wouldn't touch an ORM with a barge pole. I develop applications > using the 3 Tier Architecture (no, it's not the same as MVC) with a Data > Access layer that I can easily switch between MySQL, PostgreSQL and Oracle. > If I can do it then why can't you? The pattern I note here is, "I have been the best programmer since 1977, and the standard of 'Good v. Bad' must be judged by me." In your section "My career history - disasters I have encountered"[2], you list three projects that didn't go as expected. That's a great ratio, considering the level of success you've probably had in counter. I'd admit at least a dozen projects over the years that ended in failure or less-than-successfully. The issue I see is that, in the three examples, your summary of what led to the failure was the fault of others. Question: Why hath they forsaken Thee, Lord?!? > If you spend a year writing useless code, then it's your fault, not PHPs. > It's a bad workman who blames his tools. For this statement, I completely agree. I'm not entirely sure where I see blame being placed on the language, but perhaps I've missed something. What I do see is that PHP is an adaptable language, intended to be molded, customized, and extended for each individual scenario. While changing the language in its core and releasing that as the official package will affect thousands of developers and countless lines of code, it is irresponsible and counterproductive to tell someone that they can not garner the opinions of others who would be interested to join in a project, outside of the core, to effect those changes; worse still to belittle someone in public. As the saying goes, "'tis better to keep one's mouth closed and be thought a fool than to open it and remove all doubt." In writing, this is even truer. Observation: It is a bad workman who blames his tools, but it is a feeble-minded workman who shits where he eats: one who wastes billions of processor cycles to insult someone's intelligence in the same forum in which he announces his own framework. KEY: 1: http://article.gmane.org/gmane.comp.php.general/190836/match= 2: http://www.tonymarston.net/aboutme/disasters.html -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Opinions / Votes Needed
On Mon, Jan 19, 2009 at 12:13, Per Jessen wrote: > > Yes, I am serious, and no, I don't write php extensions etc. I don't > write many web apps anyway. I do use PHP quite a bit for command line > stuff, in fact for >95% of my scripts. Same her, Per. I actually use PHP for more command-line scripts and even GUI-enabled applications than I do for web scripts, almost like BASH on steroids. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need List Advice
On Mon, Jan 19, 2009 at 13:15, Jim Lucas wrote: > > Hey, are those Brownie Points calculated by "your" software? Isn't that a > little weighted to your favor? It's not what I initially intended when I first posted that message, but once I read Rob's reply, I knew it was going to come up eventually. > On a side note: Are you going to bring the weekly summary tool back online > any time soon? Actually, yes. I had planned to bring it back at the end of 2008, but I was coordinating the overhaul and upgrade of the php.net network, and it took longer than expected. In fact, we still have some official mirrors that have yet to make the jump from PHP 4.3.9, while we're staring down the barrel of 5.3 and can smell PHP6 baking. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php