Re[2]: [PHP] Button ???

2004-04-23 Thread Richard Davey
). I'm all for keeping "on topic" - but really, you have to cut some people some slack sometimes. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Counting number of characters without spaces between them?

2004-04-23 Thread Richard Davey
umber of punctuation characters vs. alphanumerics - I don't want the exclamation mark syndrome shown above, so I need to set a friendly trade-off limit somehow. Any thoughts appreciated. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List

Re[2]: [PHP] Counting number of characters without spaces between them?

2004-04-23 Thread Richard Davey
gt; print_r($match); TR> } TR> That will catch everything, except numbers, that is repeated 4 or more TR> times. Absolutely perfect - thank you! -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] OK SQL experts...

2004-04-23 Thread Richard Davey
27;) OR (field2 LIKE '%var%') AND field3 = 'condition' SELECT * FROM table WHERE (field LIKE '%var%' OR field2 LIKE '%var%') AND field3 = 'condition' SELECT * FROM table WHERE field LIKE '%var%' OR field2 LIKE '%var%' AND field3 = &#x

Re[2]: [PHP] Counting number of characters without spaces between them?

2004-04-23 Thread Richard Davey
his to what was left. Using it I can tell if there are vastly more "non-alpha" characters. Seemed to be a bit quicker than looping through arrays, etc, although it does involve the overhead of the preg engine I guess. BTW - Nice piece in Int PHP Mag this month :) -- Best regards, Ric

Re: [PHP] Reristration form

2004-04-23 Thread Richard Davey
RUE; EG> } else { EG> $usermame = FALSE; EG> } $username <> $usermame :) -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] OK SQL experts...

2004-04-23 Thread Richard Davey
he root of the problem. If PHPMyAdmin offers the ability to enter an execute a standard SQL statement - try it for yourself and you'll see what I mean. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP modifying data from DB?

2004-04-23 Thread Richard Davey
ow I want it, but haven't gotten it to work. You are probably using a datetime field in your database, as opposed to a date field - which is where the extra zeros are coming from. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http:

Re[2]: [PHP] PHP modifying data from DB?

2004-04-23 Thread Richard Davey
Yeah that should be fine - you could do: date("m-d-Y 00:00:00", $dbDate); But I'm sure Access will add on the extra zeros if you do not specify them - would be worth testing to make sure though. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PH

Re[2]: [PHP] PHP modifying data from DB?

2004-04-23 Thread Richard Davey
HP itself won't add those extra zeros. The ADOdb library *might* My guess is still that it is Access adding them though and that they were probably present even in your ASP script, except that hide them. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP Ge

Re: [PHP] Vulnerabilities in vBulletin ????

2004-04-23 Thread Richard Davey
ght? So time to use the support package you've gone and paid for! -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: PHP Mag (Was: Counting number of characters without spaces between them?)

2004-04-23 Thread Richard Davey
Hello Chris, Friday, April 23, 2004, 8:28:51 PM, you wrote: CS> Thanks. :-) I haven't seen it yet. Is this in the print or PDF edition? Print. My copy arrived today (with my cover story.. yay!) and a nice Beginners piece from Amy as well. -- Best regards, Richard Dav

Re: [PHP] The COM problem when converting from ASP to PHP

2004-04-23 Thread Richard Davey
r $pubkey anywhere. $com->GenerateSigningKeys($privkey,$pubkey); This is PASSING the values into the GenerateSigningKeys function, it is not setting them. Are you sure they are not set as the return values? Like: $com = new COM("wmrmobjs.WMRMKeys"); $privkey = $com->Privkey; (etc?) -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] adult content censoring

2004-04-25 Thread Richard Davey
<> $stripped_length) { return true; } else { return false; } } and that's it - I pass any string I need to this whenever someone posts a message, subject, etc e

Re[2]: [PHP] adult content censoring

2004-04-25 Thread Richard Davey
ster than preg_replace. But I agree with the preg use for more complex word catching, but even using that method you could spend ages building up a definitive "badwords" array. I guess it depends how anal you want to be ;) (heh) -- Best regards, Richard Davey http://www.phpcommunit

Re: [PHP] parsing value by URL

2004-05-12 Thread Richard Davey
off (and quite rightly) which means try this in script 2: echo $_GET['name']; echo $_GET['firstfile']; See the section of the PHP manual on register globals to understand why. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailin

Re: [PHP] parsing value by URL-worked

2004-05-12 Thread Richard Davey
the lack of quotes) - there is a big difference between the two, the un-quoted version will cause PHP to check its defined constants first, so you're adding un-needed overhead and potential error warnings just by missing out those two little characters :) -- Best regards, Richard Davey http://w

Re: [PHP] Max file size for uploads?

2004-05-12 Thread Richard Davey
up (current error message is RS> not in my brain). RS> Is there a true max size or do I just have something messed up somewhere RS> that I need to tweak?? POST file size is the other one. and that's HELL of a file size.. what is it, an ISO dump site? ;) -- Best reg

Re: [PHP] Constant questions

2004-05-12 Thread Richard Davey
; and then search $array for your value, returning the key if found. -- Best regards, Richard Davey http://www.launchcode.co.uk / PHP Development Services http://www.phpcommunity.org/wiki/296.html / PHP Community -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

Re: [PHP] Variables Help

2004-05-13 Thread Richard Davey
t_defined_vars(); -- Best regards, Richard Davey http://www.launchcode.co.uk / PHP Development Services http://www.phpcommunity.org/wiki/296.html / PHP Community -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Uploaden files to the server

2004-05-11 Thread Richard Davey
your PHP code. When files are uploaded from a browser they are typically owned by "nobody" (as that is who Apache runs as). So if "nobody" doesn't have write access to that folder, it won't be able to copy your files into it so your script will fail. -- Best regards,

Re: [PHP] optimizing arrays

2004-05-11 Thread Richard Davey
ours to process :) -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] rounding average to one decimal point

2004-05-10 Thread Richard Davey
AW> but I don't need that many decimal places. rounding to one decimal place AW> will be fine. anyway to trim off the excess decimal values? Try the round() function? :) ceil() and floor() might help if you decide you don't want the extra decimal places too. -- Best rega

Re: [PHP] Accessing the values of objects

2004-05-10 Thread Richard Davey
his JN> Array [snip] That isn't an Object :) Maybe the object function you called returned an array? You'd treat the data you posted as a normal array. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.

Re: [PHP] How to find path for PHP script

2004-05-10 Thread Richard Davey
ch $_SERVER variable it's hiding under) plus a whole load more you might find useful. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Recommend an IDE for Windows

2004-05-07 Thread Richard Davey
n whatever you need it to. I honestly couldn't code without it now. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] HTML vs. Plain Text Input

2004-05-07 Thread Richard Davey
let me know. Just one way of doing this, but... $userinput = 'blah blah bold! blah'; $test_html = strip_tags($userinput); if ($userinput !== $test_html) { echo 'They included html!'; } else { echo 'Plain text'; } -- Best regards, Richard Davey http://www

Re[2]: [PHP] PHP Website Architecture

2004-05-07 Thread Richard Davey
vs. Unix, cached vs. needing to seek across the hard drive every time), but the difference still surprised me. Of course I could never cope with all of those files "as one", but I will definitely keep them split up locally and combine into one when published live. -- Best regards,

Re: [PHP] Profiling (Was: Re: [PHP] PHP Website Architecture)

2004-05-07 Thread Richard Davey
Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] WHERE clause...getting closer

2004-05-04 Thread Richard Davey
; m> the above code got a parse error m> any ideas, anyone? Your quotes are wrong and you shouldn't use NOW like that: $query_rsENews = "SELECT * FROM NewsArchive WHERE YEAR(datePublished) = YEAR(NOW()) AND MONTH(datePublished) = MONTH(NOW()) ORDER BY sortBy DESC";

Re: [PHP] form validation wih html input FILE

2004-05-05 Thread Richard Davey
ack to the form again. So the user doesn't have to upload a 2nd time - but if they don't bother re-submitting the form, this folder is cleared out every hour via a cron job. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://

[PHP] "Cannot generate system identifier" error while validating

2004-05-05 Thread Richard Davey
uot; links don't explain a thing. Does anyone know what needs to be done in order to get a Querystring value like that through the validator? -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] "Cannot generate system identifier" error while validating

2004-05-05 Thread Richard Davey
Hello Michael, Wednesday, May 5, 2004, 7:27:54 PM, you wrote: MS> You should be using "&" as a separator instead of just "&". HTH... Bloody hell... yes, that's it. Thank you. Oh boy, time for some major re-coding. Damn standards :) -- Best regards, Richar

Re: [PHP] How do I grab the contents of a web page?

2004-05-20 Thread Richard Davey
gFor('www.123.com/index.htm'); If you're talking about the resulting HTML code then there are a variety of ways - look in the manual at the fopen() examples. -- Best regards, Richard Davey http://www.launchcode.co.uk / PHP Development Services http://www.phpcommunity.org/wiki

Re: [PHP] Re: CONSTANTS and good coding practice

2004-05-21 Thread Richard Davey
YWHERE which is very handy indeed! -- Best regards, Richard Davey http://www.launchcode.co.uk / PHP Development Services http://www.phpcommunity.org/wiki/296.html / PHP Community -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] curl + ssl and invalid certificate

2004-05-21 Thread Richard Davey
Does anyone know how to get curl to accept the ssl cert *regardless* of how ballsed-up it is? -- Best regards, Richard Davey http://www.launchcode.co.uk / PHP Development Services http://www.phpcommunity.org/wiki/296.html / PHP Community -- PHP General Mailing List (http://www.php.net/) To unsu

Re: [PHP] concatenating strings

2004-05-22 Thread Richard Davey
yname . "\nMy favorite color is " . $color; \n = new line -- Best regards, Richard Davey http://www.launchcode.co.uk / PHP Development Services http://www.phpcommunity.org/wiki/296.html / PHP Community -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] sessions

2004-05-23 Thread Richard Davey
ch cases ;-) JS> $_SESSION[username] will have the same result as $_SESSION['username'] It cares enough to raise a script Warning ;) Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I am not young enough to know everything." - Os

Re[3]: [PHP] sessions

2004-05-23 Thread Richard Davey
#x27;d care, I code exclusively with E_ALL) Actually, doesn't PHP5 do this? Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I am not young enough to know everything." - Oscar Wilde -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[4]: [PHP] sessions

2004-05-23 Thread Richard Davey
Hello Maarten, Sunday, May 23, 2004, 4:13:27 PM, you wrote: MW> it works back after a reboot MW> but does anybody know how it could have happened? Maybe your temp directory got full? Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I a

[PHP] How to display all keys in a multi-dim array?

2004-05-23 Thread Richard Davey
3"; $array['a']['b']['c']['d'] = "4"; What I need is to be able to somehow print out the values a,b,c and d based on the search result for "4". Is this even possible? Best regards, Richard Davey -- http://www.launchcode.co.uk -

Re: [PHP] Re: How to display all keys in a multi-dim array?

2004-05-23 Thread Richard Davey
7;a']['b']['c']['d'] = "4"; TR> Could you describe a bit more in detail what you mean with "based on search TR> result for 4"? I know that 4 is a *unique value* in my multi-dim array, but I do not know the key names that exist under-neat

Re: [PHP] How to check for a $_GET without throwing a Notice?

2004-05-26 Thread Richard Davey
m is BD> not passed: BD> if ($_GET['id']) BD> if ($_GET['id'] != "") BD> if (isset $_GET['id']) if (isset($_GET['id'])) { $id = $_GET['id']; } Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Devel

Re[2]: [PHP] asp.net vs. php

2004-06-06 Thread Richard Davey
elopment times, etc. These are, however, just my .02 worth - though I have used the .NET framework (specifically C#) commercially for nearly 4 years (and PHP for considerably longer than that). Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I am no

Re: [PHP] Coding productivity benchmarks?

2004-06-07 Thread Richard Davey
rt of the interview! Never gave them the job of course, just got them to finish the projects. Needless to say, they aren't trading any longer :) Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I am not young enough to know everything." - O

Re[2]: [PHP] Re: ini_get

2004-06-07 Thread Richard Davey
Hello Ben, Monday, June 7, 2004, 6:12:26 PM, you wrote: MK>> I'm pretty sure this is what OP meant. He did not mention php.ini MK>> being modified. BR> Huh? Who's OP? And what is it that you're pretty sure he meant? OP = Original Poster (i.e. not you :)

Re[2]: [PHP] Re: ini_get

2004-06-07 Thread Richard Davey
In your htaccess file. Note this only works if PHP is an Apache module. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I am not young enough to know everything." - Oscar Wilde -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: ini_get

2004-06-07 Thread Richard Davey
l use the LOCAL version of that value (as opposed to the master version). So yes, anything changed via htaccess would be reflected via ini_get. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I am not young enough to know everything." -

Re: [PHP] count number of occurences of character in a string

2004-06-08 Thread Richard Davey
Hello Diana, Tuesday, June 8, 2004, 11:11:27 AM, you wrote: DC> what function can I use to count the number of occurences of a certain DC> character in a string? substr_count or count_chars would work. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Servic

[PHP] junk after document element

2004-06-10 Thread Richard Davey
/receiving the data. Any ideas? I don't know if I can fix the error my end or if it has to be done on the gateway? Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I am not young enough to know everything." - Oscar Wilde -- PHP G

Re: [PHP] Function Date

2004-06-14 Thread Richard Davey
;)); :) Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I am not young enough to know everything." - Oscar Wilde -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Date Diff function

2004-06-28 Thread Richard Davey
Hi all, Does anyone have a date-diff function in PHP that *doesn't* use Unix time stamps? I need to calculate differences between two date values, but the range well exceeds that which "date" supports on our server. Best regards, Richard Davey -- http://www.launchcode.co.uk -

Re: [PHP] Re: clearing font tags

2004-06-28 Thread Richard Davey
Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I am not young enough to know everything." - Oscar Wilde -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Is there a name for this kind of DOS attack?

2004-06-29 Thread Richard Davey
rocessing to do - it wasn't just a plain content page, but part of an application. I was just wondering if there was a specific title for this kind of DOS attack? (you know, like Smurf, Fraggle, Ping of Death, SYN, etc). Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Develop

Re[2]: [PHP] Is there a name for this kind of DOS attack?

2004-06-29 Thread Richard Davey
Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I am not young enough to know everything." - Oscar Wilde -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[4]: [PHP] Is there a name for this kind of DOS attack?

2004-06-29 Thread Richard Davey
Yahoo, etc) but it's not in the glossary. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I am not young enough to know everything." - Oscar Wilde -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP5 contest

2004-07-01 Thread Richard Davey
use PEAR libraries. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I am not young enough to know everything." - Oscar Wilde -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] help me with eregi

2004-07-05 Thread Richard Davey
w> ho do you make a eregi so it looks at the var as a single line If anyone helps you after you posted 15KB of pointless HTML.. twice.. I'll be amazed. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I am not young enough to know everyth

[PHP] File Created Date?

2004-07-06 Thread Richard Davey
. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I am not young enough to know everything." - Oscar Wilde -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] Re: Form Submission

2004-07-06 Thread Richard Davey
hit ENTER to submit a form (rather than click the button) you often don't get sent the button value. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I am not young enough to know everything." - Oscar Wilde -- PHP General Mailing List

[PHP] How to specify compiler options on Win32

2004-07-08 Thread Richard Davey
re in the Project Settings for php4ts_cli? Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I am not young enough to know everything." - Oscar Wilde -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] How to specify compiler options on Win32

2004-07-08 Thread Richard Davey
there, but couldn't see anything relating to it (or how to specify it). But if it doesn't work on Windows anyway then I guess it's not much use! :) Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I am not young enough to know ever

[PHP] Does anyone have PHP compiled with --enable-memory-limit?

2004-07-08 Thread Richard Davey
ay for the trouble if you want. Please contact me off-list. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I am not young enough to know everything." - Oscar Wilde -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: get_browser and $_SERVER info from an IFRAME

2004-07-14 Thread Richard Davey
I.A. Gray wrote: I have a php webstats script that puts info into a MYSQL database. I include it at the top of each page that I have. I recently put a php built forum (PHPBB) on our website and wanted to include the php script at the top of that. Unfortunately as it already uses sessions, I kept

[PHP] Re: $_POST v4.3 to v5.0

2004-07-14 Thread Richard Davey
Michael Purdy wrote: echo '
'; echo '

Input a Test Variable

'; echo '

'; echo '
'; Is there a particular re

[PHP] Re: using Cc: with mail()

2004-07-14 Thread Richard Davey
Amanda Hemmerich wrote: Ok, I am trying to fix a bug on a site I didn't write, and I looked for examples on www.php.net and couldn't find what I needed. Here is the line of code in question: mail($email, "XXX - Conference Registration Confirmation", $message, "From: [EMAIL PROTECTED]" . "Cc:[EMAIL

[PHP] Re: Zend Enc and 0T Q

2004-07-21 Thread Richard Davey
Php Gen wrote: After a lot of seaching (on this list(archives), google, forums etc) I saw a quite a few products like ioncube, zend, codesecure, blender, mmCache encryptor etc etc I think it depends on the scale of your product. If it is something that a company is going to deploy on their own web

Re: [PHP] Opening a file

2007-09-05 Thread Richard Davey
Hi Dan, Wednesday, September 5, 2007, 3:24:43 PM, you wrote: > Opening this file is proving to be a pain. I have a folder that contains a > PHP page and a text file. I am trying to open the contents of the txt file > using file() but it keeps erroring out. Below is the code I'm using to try > and

Re: [PHP] Super bizarre changing variable!!

2007-10-04 Thread Richard Davey
Hi Brian, Thursday, October 4, 2007, 4:50:09 PM, you wrote: > I'm running the following code: > $query3 = "DELETE FROM table1 WHERE referer=$referer ORDER BY > creation LIMIT $numtodelete"; > $result3 = mysql_query($query3); > $string = "$total found, $n kept, $numtodelete extras removed > (

Re[2]: [PHP] Super bizarre changing variable!!

2007-10-05 Thread Richard Davey
Hi Brian, Friday, October 5, 2007, 1:28:35 PM, you wrote: > This is indeed the complete code, I did not cut anything out for > brevity, which is why this appears to be so impossible. > eAccelerator is activated, could something be corrupt? Could a > corrupt index cause this? > In table1, `r

Re[4]: [PHP] Super bizarre changing variable!!

2007-10-05 Thread Richard Davey
Hi Brian, Friday, October 5, 2007, 2:10:32 PM, you wrote: > I definitely misunderstood what you guys are saying about the length. > That's clearly a problem for a lot of my values. > I can switch them both to bigint. One table has 34,000,000 records > and it's OK if this is hung up for a few m

Re: [PHP] Separating words based on capital letter

2007-04-24 Thread Richard Davey
Dotan Cohen wrote: I have some categories named in the database as such: OpenSource HomeNetwork I'd like to add a space before each capital letter, ideally not including the first but I can always trim later if need be. As I'm array_walking the database, I have each value at the moment I need i

Re: [PHP] slow performance

2007-04-25 Thread Richard Davey
Henning Eiben wrote: Running my test for about 5 minutes, I get about 31.000 request for the java application, but only about 3.000 for the php. No offence, but the problem is almost 100% certainly in your PHP code then. I'd look very carefully at what is going on there before trying to 'twe

Re: [PHP] Re: how to detect type of image

2007-04-25 Thread Richard Davey
Tijnema ! wrote: I believe that mime_content_type does this, by reading a .magic file. In a magic file, there are these described i believe. But how would you detect (by a magic number) if a script is HTML or PHP? No way :P mime_content_type is deprecated, use the FileInfo functions instead.

Re: [PHP] Parsing CSV files

2007-04-26 Thread Richard Davey
Todd Cary wrote: Is there a function that can parse a comma delimited file into an array? http://uk.php.net/manual/en/function.str-getcsv.php Cheers, Rich -- Zend Certified Engineer http://www.corephp.co.uk "Never trust a computer you can't throw out of a window" -- PHP General Mailing Lis

Re: [PHP] newbie needs help

2007-04-30 Thread Richard Davey
Ben Clapp wrote: I am new to PHP programming and need some help. I have an image that i have show up each May for the month with $mymonth = date("m", mktime()), but i want to set up a date range for it to show up. Ex. 4-13 to 5-13 each year. How can I do that? Any help would be great. There

Re: [PHP] newbie needs help

2007-04-30 Thread Richard Davey
Ben Clapp wrote: Thank you again for the help, it does work now but with an issue, here is the code that i have for it right now: You should always reply to the php mailing list, so other people can benefit from the answers we give. With this it works, but i am sure that when mymonth == 5 (

Re: [PHP] What does "<<<" mean?

2007-04-30 Thread Richard Davey
Greg Donald wrote: On 4/30/07, Daevid Vincent <[EMAIL PROTECTED]> wrote: > echo << BROWSER: $_SERVER[HTTP_USER_AGENT] > EOF; Isn't that form (sans quote marks) deprecated and frowned upon? I'm not dissing heredoc syntax, it has its uses (now and again) but it's far from "clean", especiall

Re: [PHP] What does "<<<" mean?

2007-05-01 Thread Richard Davey
Greg Donald wrote: On 4/30/07, Richard Davey <[EMAIL PROTECTED]> wrote: I'm not dissing heredoc syntax, it has its uses (now and again) but it's far from "clean", especially when embedded deep in classes Classes? PHP is the absolute worst language to do OO prog

Re: [PHP] [X-POST] Fastest way to dump this huge table

2007-05-02 Thread Richard Davey
Brian Dunning wrote: I have a huge MySQL table, 2.1 million records, 200MB. Once a week I need to dump it in CSV format and zip the file. This is not on my server, and it's in production, so I don't want to risk testing different methods and possibly hanging up their server for a period of t

Re: [PHP] Upload problem - final size is different

2007-05-08 Thread Richard Davey
Eric Trahan wrote: $error = $_FILES['uneimage']['error']; That doesn't seem work in PHP 4.1.2... I try it but $error is empty. It just means there wasn't an error. And the function move_uploaded_file($_FILES['uneimage']['tmp_name'], $target_path) returns TRUE, so the upload work (in a way

Re: [PHP] Re: Upload problem - final size is different

2007-05-09 Thread Richard Davey
Eric Trahan wrote: Is there a way to change the owner or the group of a file in PHP. http://uk2.php.net/chown But remember the chown will fail if the user Apache is running under does not have sufficient rights to perform the task. Cheers, Rich -- Zend Certified Engineer http://www.coreph

Re: [PHP] getting $_ENV variables

2007-05-10 Thread Richard Davey
Daniel Brown wrote: If it's suggesting that it's an array, that's a little baffling, because that means there are multiple entries (at least two), but they appear to either be null or otherwise unable to display. The $_ENV superb-global contains an array of environment settings, so it's no

Re: [PHP] getting $_ENV variables

2007-05-10 Thread Richard Davey
Daniel Brown wrote: I guess I really didn't understand that myself before either. So Richard, even though it's disabling data output, it still exists as an array? The array ($_ENV) exists, it is just the population of it that has been disabled, thus it's empty. Just in the same way that d

Re: [PHP] One class, many methods: PHP4.x: Q's

2007-05-10 Thread Richard Davey
Micky Hulse wrote: I have a class called Randimg. Within that class, I have several methods. Within a few of those methods, I use the below code snippet: $_SERVER['DOCUMENT_ROOT'] What would be the best way to assign the above code to a global variable/constant within the class? Within the

Re: [PHP] getting $_ENV variables

2007-05-10 Thread Richard Davey
C.R.Vegelin wrote: Yes, my PHPinfo shows under configuration: variables_order = GPCS I will test EGPCS setting in php.ini But that also means that code using $_ENV cannot be run with hosts hiding the environment settings ?! Correct. Sucks I know, but some hosts just do this. And I assume

Re: [PHP] One class, many methods: PHP4.x: Q's

2007-05-10 Thread Richard Davey
Micky Hulse wrote: I assume setting basic strings (i.e. "settings") for my error messages would be best done via: class Randimg { var $msg_1 = 'This is a string'; var $msg_2 = 'This is another string'; function rand_img() { echo $this->msg_1; } function foo() { echo $this->msg_2; } } I do

Re: [PHP] scrolling HTML tables

2007-05-10 Thread Richard Davey
C.R.Vegelin wrote: I hope it's not the wrong place to ask, but has anyone experience with scrolling HTML tables ? It's not really a PHP question, and while personally I don't care, you ought to keep on-topic to avoid retribution from the "if it isn't PHP, it shouldn't be talked about" list

Re: [PHP] Re: session cookies enabled?

2007-05-10 Thread Richard Davey
[EMAIL PROTECTED] wrote: That being the case I can never find out (using the built-in sessions) until the second page request and it will always include the session cookie in the URL. Which means the value of the seesion cookie will be exposed, even if I am using SSL. :( Back to the drawing bo

Re: [PHP] Re: session cookies enabled?

2007-05-10 Thread Richard Davey
Edward Vermillion wrote: And the session id is open to being stored in a bookmark or worse, sent to someone else through a cut and paste of the URL. Depending on what information that id controls and how long the sessions are kept around id's in the URL could be a very bad thing indeed. Agr

Re: [PHP] Need a new shared host with php

2007-05-10 Thread Richard Davey
Al wrote: I'm looking for a shared host with an up-to-date php5, and one who at least tries to keep it relatively current. Needs are modest. Just need good ftp access, cgi-bin, shell, etc. I'll throw my plug in here for Pair Networks too. Sure, you can get cheaper, but they run a really ti

Re: [PHP] Need a new shared host with php

2007-05-11 Thread Richard Davey
Larry Garfield wrote: They're about to roll-out PHP 5.2.2 across all of their servers too. And if their 'usual' accounts are too expensive, they've just launched this: Where did you hear that? I'm a Pair customer of many many years myself, and I've been considering jumping ship because of th

Re: [PHP] Processing a table of input fields

2007-05-11 Thread Richard Davey
Todd Cary wrote: I create a table of input fields so the user (secretary at a Rotary meeting) can check mark if the person attended and how much they paid for lunch. Each input field name has the user ID as part of it. What is the best way to process the table when the submit button is press

Re: [PHP] getting $_ENV variables

2007-05-12 Thread Richard Davey
tedd wrote: At 11:54 AM +0100 5/10/07, C.R.Vegelin wrote: All I want is to check the $_ENV['OS'] within PHP scripts. If all you want to do is to find out what the user's OS is, try this: $_SERVER('HTTP_USER_AGENT') Do print_r($_SERVER) to see all it contains. He wanted to tell the OS of

Re: [PHP] php5 include() problem

2007-05-13 Thread Richard Davey
Al wrote: I've got a cgi file in my cgi-bin folder that I'm calling with include(). It worked with php4. My shared host just upgraded to my server to php5.2.0 and the function doesn't work. I can't tell if the problem is a php5 or server configuration [which may have changed during the upgr

Re: [PHP] printing out this nested array

2007-05-14 Thread Richard Davey
Don Don wrote: I am having a bit of a confusion printing the values of an array i have. When i print_r this array it contains the following: Array ( [ValueA] => ValueA [ValueB] => valueB [TestValue] => TestValue [Errors] => Array ( [0] => Array ( [ErrorId] => AD27JH [ErrorMsg] => OK ) ) )

Re: [PHP] printing out this nested array

2007-05-14 Thread Richard Davey
Jim Lucas wrote: suggestion for next time. echo a or tag out before you echo your array next time and you will then see the nesting of the arrays Doing that would have made the answer to this question very obvious You could also benefit from installing this very handy little bit of code

Re: [PHP] RE: Bounty

2007-05-15 Thread Richard Davey
Brad Sumrall wrote: As a person who has come here in the recent past asking free lancer help and received nothing but near-useless references even though I was asking specific php coding related questions. Now I com to the list offering legit funding to my supposed php friends for their expertis

Re: [PHP] problem with string & floats in PHP

2007-05-15 Thread Richard Davey
Hi Pablo, Tuesday, May 15, 2007, 7:44:52 PM, you wrote: > Hello, Im designing a website in which I have to read some data (numbers) > from a txt file and then send this data to a function which prints a graphic > with them. When I read the data I save it in an array and the numbers are in > this

[PHP] A Guide to running Apache 2, PHP 4 & PHP 5 on Windows XP

2007-05-17 Thread Richard Davey
Hi all, I'm very happy to announce that I've just released my comprehensive guide to installing, configuring and running Apache 2, PHP 4.4.7 and PHP 5.2.2 on Windows XP. The guide is broken down into small manageable sections and contains over 50 screen shots of the entire process, so you won't go

<    1   2   3   4   5   6   7   8   9   10   >