[PHP] file_get_contents works in base script but not in an included script

2009-05-18 Thread LinuxManMikeC
In PHP4, I am using file_get_contents('file.sql',true) to bring in SQL queries from files who's directory is on the include path. It works fine in the main php scripts (ones accessible through URLs), but when done in a php script that is included by one of the main scripts I just get false

Re: [PHP] how to delete part of string

2009-05-23 Thread LinuxManMikeC
What are you trying to do that $_POST can't do? With those duplicate 'id' fields, change the input name to 'id[]' in the HTML form and PHP will generate an array for you accessible by $_POST['id'][$index]. If you still have a good reason for working with the raw POST data, just apply the

Re: [PHP] Re: Rogue 'if - elseif' code

2009-05-23 Thread LinuxManMikeC
On Fri, May 22, 2009 at 2:50 PM, Nathan Rixham nrix...@gmail.com wrote: Andre Dubuc wrote: Hi, I'm having problems with a chunk of 'rogue' code that does not perform as expected (it does not pass the expected date, but an empty value). Most of the time, it works - so I'm wondering whether

Re: [PHP] urgent CSS question

2009-05-23 Thread LinuxManMikeC
Maybe there is another CSS rule that also matches the same context and overrides parts of the #frame1 rule, but didn't match when using the old #frame rule. Just my two cents. On Fri, May 22, 2009 at 7:15 PM, PJ af.gour...@videotron.ca wrote: Benjamin Hawkes-Lewis wrote: On 22/5/09 20:31, PJ

Re: [PHP] templating engine options

2009-05-23 Thread LinuxManMikeC
On Sat, May 23, 2009 at 4:21 PM, Nathan Rixham nrix...@gmail.com wrote: Hi All, Just a quick one, can anybody recommend any decent templating engines other than smarty. I've got no problem with smarty and it does the job - but if there is something newer and lighter out there that I'm

Re: [PHP] conditional classes

2009-05-24 Thread LinuxManMikeC
If you do it that way, you will also have to construct an object and return it from that function. By including the class definitions within a function, they will only be available within that function. You will have to use the function as a factory for building objects. In most cases I could

Re: [PHP] templating engine options

2009-05-24 Thread LinuxManMikeC
On Sun, May 24, 2009 at 11:09 AM, tedd tedd.sperl...@gmail.com wrote: At 12:01 AM +0100 5/24/09, Nathan Rixham wrote: LinuxManMikeC wrote: I was recently researching template engines for a small in-house project, with a bias toward simple and lightweight.  I found this interesting article

Re: [PHP] Persistent data between two executions

2009-06-17 Thread LinuxManMikeC
(Man, this reply-all takes some getting used to...) As long as your objects don't contain any reference variables (see manual) you can just assign the object to an element of $_SESSION and leave it at that. The session management code takes care of the serialization. So you're just duplicating

Re: [PHP] Re: sloppiness stupidity

2009-06-17 Thread LinuxManMikeC
I don't know what validator you're using, but according to http://validator.w3.org/ (as official as it gets) the following fragment is correct in HTML 4.01, HTML 5, XHTML 1.0 Strict, and XHTML 1.1: select option selected=selectedtest/option /select Thus sayeth the W3C, so let it be written, so

Re: [PHP] phpscriptor.com

2009-07-14 Thread LinuxManMikeC
On Mon, Jul 13, 2009 at 2:39 AM, Reesehowel...@inkworkswell.com wrote: Paul M Foster wrote: On Sat, Jul 11, 2009 at 08:14:35AM -0700, PHPScriptor wrote: Ok this may look like spam but what the hell... I'm the owner of phpscriptor.com, I had bigg plans with this domainname but... well yes,

Re: [PHP] Back from the dead with a racing question!

2009-07-18 Thread LinuxManMikeC
On Fri, Jul 17, 2009 at 11:54 AM, Jason Pruimja...@jasonpruim.com wrote: On Jul 17, 2009, at 11:56 AM, Bastien Koert wrote: On Fri, Jul 17, 2009 at 11:51 AM, teddtedd.sperl...@gmail.com wrote: At 11:12 AM -0400 7/17/09, Jason Pruim wrote: Hi everyone! So some of you may have noticed that

Re: [PHP] another pagination problem

2009-07-18 Thread LinuxManMikeC
On Fri, Jul 17, 2009 at 9:35 AM, PJaf.gour...@videotron.ca wrote: 4. when ordering by title, results are totally different for ASC DESC; not the same data at all (Is the ordering done on the entire db? ) Yes, sort of. ORDER BY is applied to the results of the entire query. Then LIMIT takes a

Re: [PHP] parallel execution

2009-07-18 Thread LinuxManMikeC
On Sat, Jul 18, 2009 at 8:15 AM, kranthikranthi...@gmail.com wrote: Code: passthru('firefox '); echo '1'; I am expecting 1 to be echoed while firefox is running. but that is not the case. ny ideas how i can make this work ? Kranthi. -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] prepending concatenating assignment operator

2009-07-25 Thread LinuxManMikeC
On Fri, Jul 24, 2009 at 8:53 PM, Daniel Kolbokolb0...@umn.edu wrote: Hello, I know the appending concatenating assignment operator: $str_name = Foobar; $str_name .= Sr; echo $str_name;//Foobar Sr But is there a shortcut assignment operator for prepending concatenation? $str_name =

Re: [PHP] JS alert that links to a file

2009-07-26 Thread LinuxManMikeC
On Sun, Jul 26, 2009 at 8:55 PM, Skip Evanss...@bigskypenguin.com wrote: Okay, I know I've done this before, but now I'm blanking out. I have code that creates a CSV file, and when it's done I want a JS alert to pop up and let them save the file. Isn't this some kind of alert() type call on

Re: [PHP] str_replace

2009-08-08 Thread LinuxManMikeC
On Sat, Aug 8, 2009 at 2:08 AM, Ron Piggottron@actsministries.org wrote: Am I understanding str_replace correctly?  Do I have this correct or are ' needed? $bible_verse_ref is what I want to change to (AKA replace) bible_verse_ref is what I change to change from (AKA search)

Re: [PHP] use preg_replace to nix and line with display: none

2009-08-08 Thread LinuxManMikeC
On Sat, Aug 8, 2009 at 11:14 PM, Rob Gouldgould...@mac.com wrote: I have a bunch of bullets in a list coming from a previous post, and I need to eliminate any line from this string that contains display: none li id=bullet_ug1_col2_9 style=display: list-item;Reserved Frontstretch Tower Ticket

Re: [PHP] use preg_replace to nix and line with display: none

2009-08-09 Thread LinuxManMikeC
On Sun, Aug 9, 2009 at 12:17 AM, Rob Gouldgould...@mac.com wrote: I wish I could say this works, but I'm not having success with this pattern.  All the lines with display: none are still in the $bl string. On Aug 9, 2009, at 1:50 AM, LinuxManMikeC wrote: li id=bullet_ug1_col2_9 style=display

[PHP] Submit login form using HTTP AUTH

2009-08-20 Thread LinuxManMikeC
Anybody know of any tricks to make an HTML login form that sends the credentials via HTTP AUTH? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] wierd behavior on parsing css with no php included

2009-08-23 Thread LinuxManMikeC
Try this at the beginning of each css file? ?php header('Content-type: text/css'); ? On Sun, Aug 23, 2009 at 5:49 AM, Ralph Deffkeralph_def...@yahoo.de wrote: Hi folks, i did post this also on the Wamp page but maybe someone out there had to solve that problem as well. systems involved

Re: [PHP] Converting URL's to hyperlinks.

2009-08-28 Thread LinuxManMikeC
If you have short php tags enabled, assuming you put the url in a variable called $url... a href=?=$url?click here/a otherwise... a href=?php echo $url; ?click here/a or a myriad of other ways... Depending if there are any special characters involved, there are a couple functions that would

Re: [PHP] Converting URL's to hyperlinks.

2009-08-29 Thread LinuxManMikeC
2009/8/29 Nisse Engström news.nospam.0ixbt...@luden.se: On Fri, 28 Aug 2009 17:22:20 -0600, LinuxManMikeC wrote: a href=?php echo $url; ?click here/a *Groan* Throw any random web site to an HTML validator and you're likely to see this kind of slop all over. The correct solution

Re: [PHP] What is the best way to process live data?

2009-08-29 Thread LinuxManMikeC
On Sat, Aug 29, 2009 at 3:31 PM, Paul Hallidaypaul.halli...@gmail.com wrote: For those of you that remember (not likely but anyway) I am working on some code that splits CLF records and feeds them into a database. What I need to do now is automate it. So what I have is a program (urlsnarf)

Re: [PHP] Converting URL's to hyperlinks.

2009-08-29 Thread LinuxManMikeC
2009/8/29 Nisse Engström news.nospam.0ixbt...@luden.se: On Sat, 29 Aug 2009 16:19:05 -0600, LinuxManMikeC wrote: As for your more elaborate example, I'm sure that heredoc will validate nicely. It does. Perhaps you haven't met a few good friends of mine. Their names are html, head

Re: [PHP] PHP GURU NEEDED

2009-09-14 Thread LinuxManMikeC
On Mon, Sep 14, 2009 at 1:56 PM, mm w 0xcafef...@gmail.com wrote: you can be a good coder but you cannot be without a minimum of social skills and education You'd be surprised... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP GURU NEEDED

2009-09-14 Thread LinuxManMikeC
warrior guy there, but when you are clever there is a time and a place to troll not when people offers job, developers like to argue this is a fact, but you have to know when it's to right time. Best, On Mon, Sep 14, 2009 at 1:10 PM, LinuxManMikeC linuxmanmi...@gmail.com wrote: On Mon, Sep

Re: [PHP] How to pronounce PHP code over the phone?

2009-10-16 Thread LinuxManMikeC
On Fri, Oct 16, 2009 at 10:07 AM, Bob McConnell r...@cbord.com wrote: From: Ashley Sheridan On Fri, 2009-10-16 at 18:01 +0200, Dotan Cohen wrote: Wow! Here goes: Open-bracket, dollar item hypen greater-than, get service id, no all one word but with a capital S and I. Open and close

[PHP] My experience with the Forms Generation and Validation class

2009-11-22 Thread LinuxManMikeC
Just like to share my real world experience with Manuel Lemos' formsgeneration library. http://www.phpclasses.org/formsgeneration At work early this summer we had a project under a tight deadline that needed unified form creation, processing, and error reporting. I had seen Manuel promoting his

Re: [PHP] Which query is more correct?

2009-11-22 Thread LinuxManMikeC
On Sat, Nov 21, 2009 at 2:52 PM, Nathan Rixham nrix...@gmail.com wrote: Rick Pasotto wrote: On Fri, Nov 20, 2009 at 04:41:58PM -0600, LAMP wrote: Hi, I need to pull all records from the table Registrants they are NOT in the table ToBeRecleared Registrants.Reg_ID is PK

Re: [PHP] Creating users and generating privileges for users

2009-11-22 Thread LinuxManMikeC
On Sat, Nov 21, 2009 at 7:05 AM, tedd tedd.sperl...@gmail.com wrote: At 6:36 PM -0600 11/20/09, nitin reddy wrote: Hey can one help me in creating different users using mysql for php and assigning different privileges for them ..any sample code available? -- PASULA NITIN REDDY Graduate

Re: [PHP] Using $$

2009-11-22 Thread LinuxManMikeC
On Fri, Nov 20, 2009 at 12:28 AM, Arno Kuhl ak...@telkomsa.net wrote: -Original Message- From: Ford, Mike [mailto:m.f...@leedsmet.ac.uk] Sent: 19 November 2009 07:06 PM To: php-general@lists.php.net Subject: RE: [PHP] Using $$ -Original Message- From: Arno Kuhl

Re: [PHP] how to prevent a mild DOSS attack?

2009-11-25 Thread LinuxManMikeC
Or DoS back at em. :-D On Wed, Nov 25, 2009 at 3:57 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Wed, 2009-11-25 at 16:38 -0600, LAMP wrote: hi guys, this morning I got complains from website owner and tons of visitors - nobody was able to access the website. it will just timeout.

Re: [PHP] how to prevent a mild DOSS attack?

2009-11-25 Thread LinuxManMikeC
On Wed, Nov 25, 2009 at 3:57 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Wed, 2009-11-25 at 16:38 -0600, LAMP wrote: hi guys, this morning I got complains from website owner and tons of visitors - nobody was able to access the website. it will just timeout. I contacted hosting

Re: [PHP] how to prevent a mild DOSS attack?

2009-11-28 Thread LinuxManMikeC
On Sat, Nov 28, 2009 at 10:24 AM, LAMP l...@afan.net wrote: LinuxManMikeC wrote: On Wed, Nov 25, 2009 at 3:57 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Wed, 2009-11-25 at 16:38 -0600, LAMP wrote: hi guys, this morning I got complains from website owner and tons

Re: [PHP] Storing (html and php) Content in MySQL - help

2009-11-30 Thread LinuxManMikeC
On Mon, Nov 30, 2009 at 5:52 PM, Allen McCabe allenmcc...@gmail.com wrote: I have been trying to wrap my mind around how to accomplish this for a few days, and done estensive searching on Google. I know there are free CMS systems available for download, but I want to write my own code so I

Re: [PHP] Object of class stdClass could not be converted to string

2009-11-30 Thread LinuxManMikeC
On Mon, Nov 30, 2009 at 10:27 PM, John Taylor-Johnston jt.johns...@usherbrooke.ca wrote: Good grief. It doesn't like printing an INT field like as if it were a string?? I looked at: http://php.ca/manual-lookup.php?pattern=stringtoint like I might of in Delphi :)p    echo

Re: [PHP] Emergency! Performance downloading big files

2009-12-01 Thread LinuxManMikeC
On Tue, Dec 1, 2009 at 3:48 PM, Brian Dunning br...@briandunning.com wrote: This is a holiday-crunch emergency. I'm dealing with a client from whom we need to download many large PDF docs 24x7, several thousand per hour, all between a few hundred K and about 50 MB. Their security process

Re: [PHP] mysterious include problem

2009-12-07 Thread LinuxManMikeC
Instead of hard coding cases you can validate and constrain the input with a regex. Much more flexible when adding content. I would also add code to make sure the file exists, otherwise fall through to the default. On Mon, Dec 7, 2009 at 1:14 PM, Kim Madsen php@emax.dk wrote: Hi Allen

Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-09 Thread LinuxManMikeC
On Wed, Dec 9, 2009 at 6:45 AM, René Fournier m...@renefournier.com wrote: Strange problem I'm having on Mac OS X Server 10.6 running PHP 5.3. Any call of file_get_contents() on a local file works fine -- the file is read and returned. But any call of file_get_contents on a url -- any url,

Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-09 Thread LinuxManMikeC
On Wed, Dec 9, 2009 at 8:02 AM, LinuxManMikeC linuxmanmi...@gmail.com wrote: On Wed, Dec 9, 2009 at 6:45 AM, René Fournier m...@renefournier.com wrote: Strange problem I'm having on Mac OS X Server 10.6 running PHP 5.3. Any call of file_get_contents() on a local file works fine -- the file

Re: [PHP] Fixe Point Decimal Data type

2009-12-17 Thread LinuxManMikeC
On Thu, Dec 17, 2009 at 7:49 AM, Floyd Resler fres...@adex-intl.com wrote: I may be over-simplifying or not completely understanding fixed point decimals, but would number_format work? Take care, Floyd Over-simplifying just a touch...

Re: [PHP] Fixe Point Decimal Data type

2009-12-17 Thread LinuxManMikeC
On Thu, Dec 17, 2009 at 7:21 AM, Raymond Irving xwis...@yahoo.com wrote: Hello, Is there a way to represent numeric values as fixed point decimals in PHP? If not, why was this datatype not added? I think is very important to have fixed point decimals when working with money values. This

Re: [PHP] Checking for internet connection.

2009-12-20 Thread LinuxManMikeC
On Sun, Dec 20, 2009 at 2:32 AM, Andy Shellam andy-li...@networkmail.eu wrote: I think the only way to detect if it can connect to the Internet is to see if you can grab a file from somewhere on the Internet. I'd hazard a guess that when operating systems are able to tell you they can connect

Re: [PHP] mod rewrite

2010-01-02 Thread LinuxManMikeC
On Sat, Jan 2, 2010 at 12:52 AM, Sudhakar sudhakarar...@gmail.com wrote: hi i am using a cms which requires mod_rewrite to be enabled for seo urls in the wamp that i use in my local machine in the httpd.conf file i have this line and removed the comment LoadModule rewrite_module

Re: [PHP] POLL: To add the final ? or not...

2010-01-08 Thread LinuxManMikeC
http://framework.zend.com/manual/en/coding-standard.html#coding-standard.overview.scope This document provides guidelines for code formatting and documentation to individuals and teams contributing to Zend Framework. So as far as anything other than code being contributed to Zend Framework, its

Re: [PHP] POLL: To add the final ? or not...

2010-01-12 Thread LinuxManMikeC
On Fri, Jan 8, 2010 at 1:24 PM, Daevid Vincent dae...@daevid.com wrote: I'm having a debate with a co-worker about adding the final ? on a PHP page... So everybody, when do we get to the real discussion? Which end of an egg do we break? -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] mysql_real_escape_string(0xffffffff) yields -1

2010-01-16 Thread LinuxManMikeC
On Fri, Jan 15, 2010 at 3:22 PM, Richard Lynch c...@l-i-e.com wrote: The subject line says it all: mysql_real_escape_string(0x) yields -1 What's up with that? Is there some way to convince mysql_real_escape_string to use BIGINT? I guess I'll just PCRE for digits and then pass it