Re: [PHP] newbie error message i don't understand....please help

2005-06-08 Thread Richard Davey
ou don't have MySQL support enabled in PHP? What exactly are you installing? This isn't a standard PHP error message, so it must be coming from that application. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear

Re[2]: [PHP] Explanation in Shiflett's PHP Security Briefing

2005-06-08 Thread Richard Davey
stands however your array isn't clean and you really need to start filtering the data first and then putting it into a clean array - hope that makes sense? Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the lack o

Re[2]: [PHP] newbie error message i don't understand....please help

2005-06-08 Thread Richard Davey
files where-ever you've unzipped them (C:\php perhaps?). If you are going to just install PHP once and leave it running, there is no reason why copying the DLLs into the windows directory is a "bad thing" to do, it will work and it's a locked down folder under 2003 Se

Re: [PHP] Installation

2005-06-09 Thread Richard Davey
ars now - infact my scripts will detect if they're running on a .dev domain name and if they are they know to load up require files from my PCs path rather than that of the live web server. Having Apache run in a console window for development can be really useful and you simply don't need

Re: [PHP] _construct() problem

2005-06-09 Thread Richard Davey
Hello Stéphane, Wednesday, June 8, 2005, 10:23:22 PM, you wrote: SB> function _construct($first, $last) { SB> What did I do wrong? It's __construct() Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear

Re: [PHP] Best way how to STORE DATA

2005-06-09 Thread Richard Davey
re is nothing actually wrong in doing this. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the lack of them." - Isaac Asimov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Can't connect to local MySQL server through socket.. ?

2005-06-09 Thread Richard Davey
ySQL connect error. MySQL doesn't care less if you're the PHP script was accessed via HTTP or HTTPS. You ought to call their tech support department to be honest. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I

Re[2]: [PHP] Can't connect to local MySQL server through socket.. ?

2005-06-09 Thread Richard Davey
name of the server that MySQL is really on, or its IP address. But they might have locked MySQL down so that you cannot access it remotely - you need to ask them. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the lack

Re: [PHP] Three queries. One Form.

2005-06-09 Thread Richard Davey
al insert using both of those values. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the lack of them." - Isaac Asimov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Making a page loop with header('Location: ...

2005-06-09 Thread Richard Davey
split the JH> operation up into multiple parts... my other option would be to JH> make a javascript reload Why not just increase the PHP script timeout value to something that works better for your current situation? You can do this from the code itself, not just the php.ini Best

Re: [PHP] Getting checkboxes as array

2005-06-09 Thread Richard Davey
perform query here } Another: foreach ($media_types as $type) { $query = "INSERT INTO media_art (media_art_id,art_id, media_id) VALUES ('','$art_id','$type')"; // perform query here } Best regards, Richard Davey -- http://www.launchcode.

Re[2]: [PHP] Getting checkboxes as array

2005-06-09 Thread Richard Davey
#x27;t appear to be actually performing the query at all here - you're just appending it onto the $query string. You can't do it like this if you need the IDs returned - you have to actually DO the query THEN get the ID, then move onto the next stage. So at this point in your code you n

Re: [PHP] PHP exec function.

2005-06-10 Thread Richard Davey
pache is running under (System, Services) and make sure they've got rights to actually exec the program. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the lack of them." - Isaac Asimov -- PHP General Mail

Re: [PHP] include()

2005-06-13 Thread Richard Davey
ded? (just making sure -- you cannot split up code across servers using include) Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the lack of them." - Isaac Asimov -- PHP General Mailing List (http://www.php.n

Re[2]: [PHP] Image upload form

2005-06-15 Thread Richard Davey
gt; destination). What am I missing? Thanks! This directory needs to be absolute - i.e. the COMPLETE path: /usr/home/jack/images/jpg/test Or similar - whatever it needs to be on your server. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fe

Re: [PHP] How to print variable name and contents

2005-06-15 Thread Richard Davey
ame, $varvalue) { $varvalue = print_r($varvalue, true); echo "TRACE: $varname = \"$varvalue\""; } my_trace("\$my_var", $my_var); Another might be to look at the var_dump and var_export functions. Best regards, Richard Davey -- http://www.launchcode.co

Re: [PHP] If I have 2 arrays...

2005-06-16 Thread Richard Davey
Hello Jay, Thursday, June 16, 2005, 5:54:40 PM, you wrote: JB> ...shouldn't array_intersect($arr1, $arr2) return an array? Works perfectly for me (code below) PHP 4.3.11 Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear comp

Re: [PHP] So many returned mail notices!

2005-06-20 Thread Richard Davey
Hello Chris, Monday, June 20, 2005, 6:33:24 PM, you wrote: CWP> Anyway this kind of thing always makes me a bit nervous because I CWP> start to think something is wrong with my end. It's not just you, we all get them. Bloody annoying. Best regards, Richard Dave

Re: [PHP] phpInfo() executed on Yahoo!

2005-06-20 Thread Richard Davey
h (at least I'd hope not) Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the lack of them." - Isaac Asimov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] resetting arrays

2005-06-21 Thread Richard Davey
27;, 3 => 'd', 4 => 'e'); print_r($array); unset($array[3]); print_r($array); sort($array); print_r($array); ?> Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear t

Re: [PHP] GD library images not displaying

2005-06-21 Thread Richard Davey
y installation of GD? Create a file with phpinfo(); in it - view it. Does it have the GD extension listed? Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the lack of them." - Isaac Asimov -- PHP General Mailing

Re: [PHP] Amy's Site question

2005-06-22 Thread Richard Davey
Hello Jack, Wednesday, June 22, 2005, 2:17:48 PM, you wrote: JJ> How can I limit the result of that math to one decimal place, ie, JJ> 9.5 cm, not 9.523 cm? number_format() is your friend. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I

Re: [PHP] removing chars from string

2005-06-27 Thread Richard Davey
Hello Paul, Monday, June 27, 2005, 4:33:35 PM, you wrote: PN> If a have a string thats 11 characters long how can I strip off PN> the last two characters? $newstring = substr($string, 0, -2); Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services &qu

Re[2]: [PHP] removing chars from string

2005-06-27 Thread Richard Davey
ne short : 0,8) Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the lack of them." - Isaac Asimov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] removing chars from string

2005-06-27 Thread Richard Davey
ameter to substr is asking for the number of characters to return, not the actual character location in the string to stop at - if it did, then it would have been 8 (0 being the 1st character, etc), but in this case it's 9. It's an easy one to slip-up on imho. Best regards, Rich

Re: [PHP] looking for a pure startup opportunity..

2005-06-27 Thread Richard Davey
wishful thinking back. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the lack of them." - Isaac Asimov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] looking for a pure startup opportunity..

2005-06-28 Thread Richard Davey
aged to get nothing off the ground and/or had very few decent responses - after-all, if it only takes 3-4 guys surely you'd be well on your way to your first $13 million by now. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear compu

Re: [PHP] Finding what links on a page have been clicked

2005-06-29 Thread Richard Davey
est regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the lack of them." - Isaac Asimov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] Finding what links on a page have been clicked

2005-06-29 Thread Richard Davey
n't get a very busy site, as this is quite nasty overhead to be performing for every single page request :-\ There are many ways to achieve what you wish, those are just a few. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear comp

Re: [PHP] constant() - php5

2005-06-29 Thread Richard Davey
;t defined, rather than coming from the constant() function itself? Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the lack of them." - Isaac Asimov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Conceptional question

2005-06-29 Thread Richard Davey
lots of files, you hit a certain level* beyond which system performance suffers increasingly. Personally I'd create sub-dirs per user. * Don't ask me what, but it's not a very high number IIRC. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services

Re[2]: [PHP] Conceptional question

2005-06-29 Thread Richard Davey
ours. ReiserFS / XFS are good alternative filesystems, but again refer to my original disclaimer - there may be better options these days. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the lack of them." -

Re[2]: [PHP] PHP vs. ColdFusion

2005-06-29 Thread Richard Davey
x27;ve listed - if they wished to assign this functionality to a "single tag" in their template, well.. that's their choice I guess. Not everyone works around that paradigm though. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do

Re[2]: [PHP] turn off the www

2005-06-29 Thread Richard Davey
goes for anyone else who links to their site) Otherwise it could cause a slight problem, with unfortunate effects if your domain is something like e-sparse.com :) Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the

Re[2]: [PHP] Re: PHP vs. ColdFusion

2005-06-30 Thread Richard Davey
attract the same level of developers as Microsoft do). Personally for me CF has the *perception* of being a very "1990s" technology (regardless if it is or not) Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fea

Re[2]: [PHP] PHP vs. ColdFusion

2005-06-30 Thread Richard Davey
s, your work is safe. Anyway, time to get back to my project for BMW - just one of those "small scall websites" (sic) things I guess? Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the lack of them." - Isaac Asimov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] getting a filename [with no extension] out of a url

2005-06-30 Thread Richard Davey
t give you /filename.php And if you need to remove the slash at the start, pick any of the following: substr, str_replace, preg_replace, strpos, etc. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the lack of them.

Re: [PHP] PHP Magazine

2005-07-01 Thread Richard Davey
will migrate towards something more coherent in structure as time goes on (and their circulations increase), rather than feeling like a grab-bag of non-specific PHP goodies as they do today. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fea

Re: [PHP] MySQL error

2005-07-01 Thread Richard Davey
racter is actually being turned into a line-feed character, because you've quoted the $sql variable with " " - hence it's gone and turned \t into a tab, \n into a line-feed, etc. I may be wrong, but I don't think MySQL likes this, and given the error you are receiving

Re[2]: [PHP] PHP vs. ColdFusion

2005-07-01 Thread Richard Davey
-to address that wasn't ever there. Thankfully most people on this list understand that when an email arrives from an address, "reply" will reply to it. Having said that, it does catch a lot of noobs out. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Developmen

Re[2]: [PHP] PHP vs. ColdFusion

2005-07-01 Thread Richard Davey
t members. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the lack of them." - Isaac Asimov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Help a Norwegian student!

2005-07-03 Thread Richard Davey
and see what happens. If you're on a flavour of Unix, wait for someone else to reply to your message ;) Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the lack of them." - Isaac Asimov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] Report

2005-07-04 Thread Richard Davey
s highly annoying though. I now my mail client set to delete messages matching that content, and I fear you'll have to do the same if you want to restore some sanity to your inbox. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear co

Re: [PHP] IBM's Learning PHP Part 1 tutorial.

2005-07-06 Thread Richard Davey
CT COUNT(*) AS hits FROM users WHERE username = 'x'" and then check the value of the returned "hits" (which will always return something, even if zero). Alternatively instead of doing if (!$result) you could do: if (mysql_num_rows($result) > 0) ... that way you know that the

Re[2]: [PHP] IBM's Learning PHP Part 1 tutorial.

2005-07-06 Thread Richard Davey
ely nothing in this case - which (providing username was indexed) would make count() a far quicker and less expensive query than selecting and bring back data and then doing absolutely nothing with it (somewhat pointless imho) Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Develop

Re[2]: [PHP] IBM's Learning PHP Part 1 tutorial.

2005-07-06 Thread Richard Davey
Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the lack of them." - Isaac Asimov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[4]: [PHP] IBM's Learning PHP Part 1 tutorial.

2005-07-06 Thread Richard Davey
ers ID number, I want to know how many users exist matching that username (i.e. I want a count of them), so that's what I've directly asked MySQL for. A "one cat, 1 billion skinning combinations" scenario again I feel. Best regards, Richard Davey -- http://www.launchcode.

Re: [PHP] trouble with file upload page using PHP

2005-07-06 Thread Richard Davey
etc) doesn't have permissions to put files into your "inspired-evolution.com" directory. Check the permissions setting on that folder as a first course of action. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear comp

Re[6]: [PHP] IBM's Learning PHP Part 1 tutorial.

2005-07-06 Thread Richard Davey
e forced to use IBM PC Jrs with RL> 16K RAM and a 60 Meg hard drive (or whatever) just so they learn RL> to code... :-) I dunno.. I've seen shit code on every single system I've ever come across :) Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Serv

Re: [PHP] TimeStamp BEFORE 1970

2005-07-07 Thread Richard Davey
/Date Even if you don't like the thought of using it - you can always pour over the source code to look at their methods and see how they handle it. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the lack of the

Re[2]: [PHP] Re: Security, Late Nights and Overall Paranoia

2005-07-09 Thread Richard Davey
low <&> for direct use you do open, imho, a whole can of worms that you'd better be absolutely sure you have faultlessly checked and double-checked, because as you know there's no room for error these days. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Developm

Re[4]: [PHP] Re: Security, Late Nights and Overall Paranoia

2005-07-09 Thread Richard Davey
have to be out of your mind to allow it. May as well just give them your server reboot button while you're at it and ask not to touch. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the lack of them."

Re[5]: [PHP] Re: Security, Late Nights and Overall Paranoia

2005-07-09 Thread Richard Davey
with embedded CSS?! Even if you do allow you're then parsing for color="" and nothing else, with potential variable width colours. After a short while you'll find yourself having to write an HTML validator tool (and I'm sorry but I have *never* seen one that worked flawle

Re[2]: [PHP] Re: Security, Late Nights and Overall Paranoia

2005-07-11 Thread Richard Davey
bility reasons, that I've yet to see anyone provide a coherent reason not to use. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the lack of them." - Isaac Asimov -- PHP General Mailing List (http://www.ph

Re[4]: [PHP] Re: Security, Late Nights and Overall Paranoia

2005-07-11 Thread Richard Davey
Hello Greg, Monday, July 11, 2005, 3:46:24 PM, you wrote: GD> On 7/11/05, Richard Davey <[EMAIL PROTECTED]> wrote: >> I gave several valid good usability reasons, that I've yet to see >> anyone provide a coherent reason not to use. GD> Misuse of CPU cycles. So if

Re[6]: [PHP] Re: Security, Late Nights and Overall Paranoia

2005-07-11 Thread Richard Davey
c set of safe html tags and I provide a preview GD> function. Even after that, if the user goofs up I allow a specific GD> time span in which to edit the post to correct the goof. Ditto. I just don't force them to use HTML. Best regards, Richard Davey -- http://www.launchcode.co.uk -

Re: [PHP] 404 error - why???!!

2005-07-13 Thread Richard Davey
Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the lack of them." - Isaac Asimov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] searching multiple fields

2005-07-14 Thread Richard Davey
%' OR blahblah LIKE '$search%' etc If you want to add extra conditions you can do so like this: SELECT * FROM blah WHERE (name LIKE '$search%' AND id > 10) OR area LIKE '$search%' Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Se

Re: [PHP] $PHP_SELF or echo $PHP_SELF

2005-07-14 Thread Richard Davey
ther would work. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the lack of them." - Isaac Asimov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] cannot connect to MySQL server and not sure why

2005-07-14 Thread Richard Davey
a user called bruceg_webmaster with all of BG> the editing privileges. Of course 'password' is changes with the BG> password used to connect in the actual script. and I double BG> checked that to be correct as well. Any suggestions? Sure.. where is $success set? I don't see it be

Re: [PHP] Win2000 easier than Win2003 ??

2005-07-14 Thread Richard Davey
und errors. Just don't use IIS - use Apache instead. It's an extremely easy install process, one I documented fully on this mailing list no more than a few weeks ago. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear co

Re: [PHP] array help

2005-07-14 Thread Richard Davey
ding that (1) $table hasn't been set elsewhere in your script as a string, or (2) $table has been set as an array ($table = array()) prior to being used. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the lack of

Re: [PHP] Trimming Text

2005-07-15 Thread Richard Davey
last occurrence of a '>' and the last occurance of '<' - if the first is LESS than the second value, then you're in the middle of a tag. This of course doesn't handle nested tags. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development

Re: [PHP] Copy Remote File to Local Server

2005-07-15 Thread Richard Davey
artial file? Does anyone have any MP> suggestions for this problem? Providing you feel it's safe / user friendly to do so, just increase the time-out: set_time_limit() Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I f

Re[2]: [PHP] Copy Remote File to Local Server

2005-07-15 Thread Richard Davey
I gave you doesn't involve the php.ini file at all - try looking in the PHP manual for the function given. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the lack of them." - Isaac Asimov -- PHP General Mailin

Re: [PHP] skewed up images

2005-07-15 Thread Richard Davey
120 cropped piece, then you can do whatever it is you wanted to do with it. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the lack of them." - Isaac Asimov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] running number

2005-07-25 Thread Richard Davey
r is/are there better ways? Do you HAVE to have a "starting off" number of 12345? If there is no real reason to do this, then use an auto-increment column in MySQL and let that do all the hard work for you! Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development S

Re: [PHP] Object Inheritance, get_class() and a static function call

2005-07-26 Thread Richard Davey
in the code posted) Wouldn't get_parent_class() work in this situation? Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services Zend Certified Engineer "I do not fear computers. I fear the lack of them." - Isaac Asimov -- PHP General Mail

Re[2]: [PHP] Multipage form redux

2005-07-27 Thread Richard Davey
, they can always come back and finish the job off - whenever they want, avoiding cookie and session time-out issues. This won't work for all forms of course, it depends what the nature of the process is, but it's certainly an option. Best regards, Richard Davey -- http://www.launchcode.c

Re[2]: [PHP] Error Suppression with '@'

2005-08-02 Thread Richard Davey
is why in most cases it's a bad thing to use. When it comes to the mysql/i functions however I will suppress the error and use my own error checking to avoid blank pages / unsightly warnings. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services Zend Certified

Re: [PHP] Write from form to DB

2005-08-03 Thread Richard Davey
27;t forget to validate your user input before slamming it directly into your database. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services Zend Certified Engineer "I do not fear computers. I fear the lack of them." - Isaac Asimov -- PHP General Mailing

Re[2]: [PHP] Write from form to DB

2005-08-03 Thread Richard Davey
a "Really Bad Thing", probably just a personal coding preference. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services Zend Certified Engineer "I do not fear computers. I fear the lack of them." - Isaac Asimov -- PHP General Mail

Re: [PHP] parallel execution of php code?

2005-08-08 Thread Richard Davey
wed by INSERT you could use an INSERT IGNORE which won't duplicate data if it already exists. Or possibly REPLACE INTO - depends how you need this to work (i.e. retain the oldest copy of the data, or keep the newest). Look in the MySQL manual for those two functions for more info. Bes

Re: [PHP] Possible to read JavaScript results into a string?

2005-08-08 Thread Richard Davey
led BD> to open stream: HTTP request failed! HTTP/1.1 400 Bad Request in c: BD> \Inetpub\wwwroot\test.php on line 2 Your code will work providing that PHP is not running in Safe Mode and allow_url_fopen is enabled in your php.ini file. Best regards, Richard Davey -- http://www.launchcod

Re: [PHP] Logging fatal errors and timeout

2005-08-08 Thread Richard Davey
produces a RG> fatal error and fatal error is not being logged. Fix the above :) Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services Zend Certified Engineer "I do not fear computers. I fear the lack of them." - Isaac Asimov -- PHP General Maili

Re: [PHP] set variables based on HTTP_HOST

2005-08-08 Thread Richard Davey
able with a variable! So why not do that? Perhaps a switch block would serve your needs better? switch ($_SERVER['HTTP_HOST']) { case 'name1.host.com': $header = .. break; } etc - then you can combine multiple hosts into one section and have a

Re: [PHP] lack of understanding of sessions

2005-08-08 Thread Richard Davey
sing that function. If you want to check for the existence of a variable, use isset(). Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services Zend Certified Engineer "I do not fear computers. I fear the lack of them." - Isaac Asimov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Logging fatal errors and timeout

2005-08-08 Thread Richard Davey
etter than displaying the error across the middle of your site) Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services Zend Certified Engineer "I do not fear computers. I fear the lack of them." - Isaac Asimov -- PHP General Mailing List (http://www.php

Re: [PHP] Generating a 404 status message with header()

2005-08-08 Thread Richard Davey
parently, this does not trigger the 404 EG> directive. The header 404 is correct - check to see if your script contains any extra white-space somewhere that is causing the header to fail? (i.e. a carriage return after the closing php tag). Best regards, Richard Davey -- http://www.launchcod

Re[2]: [PHP] set variables based on HTTP_HOST

2005-08-08 Thread Richard Davey
k and pre-set values even if they had managed that, you'd still only ever include a valid header. You have to draw the line somewhere with security - nothing will ever be 100% safe because there are so many chains in the loop (firewall, network, server, apache, php, etc). I would sa

Re: [PHP] Re: Logging fatal errors and timeout

2005-08-08 Thread Richard Davey
for more details (it's in the install section somewhere) Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services Zend Certified Engineer "I do not fear computers. I fear the lack of them." - Isaac Asimov -- PHP General Mailing List (http://www

Re: [PHP] Server-Client connection via TCP port with PHP

2005-08-09 Thread Richard Davey
the quite considerable chapter on "Socket Functions". Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services Zend Certified Engineer "I do not fear computers. I fear the lack of them." - Isaac Asimov -- PHP General Mailing List (http://www.ph

Re: [PHP] Restarting windows from php

2005-08-10 Thread Richard Davey
user has the correct permissions to do so. The warning most likely comes from IIS, or your php.ini settings - I just tested "shutdown -i" on Apache (in WinXP) and it ran without any problems. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services Zend Ce

Re[2]: [PHP] Restarting windows from php

2005-08-10 Thread Richard Davey
#x27;. -r = Shutdown with restart -t = Set the timeout for shutdown (xx seconds) 01 = The timeout value Open a command prompt, type in it. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services Zend Certified Engineer "I do not fear computers. I fear

Re[4]: [PHP] Restarting windows from php

2005-08-10 Thread Richard Davey
h had no shutdown command. RL> Win 98 SE, I believe. RL> I've got XP on my laptop, and if I cared enough about Windows, I RL> guess I could test that too... ... and it would work. Yes of course it's version specific (NT range up, 2K, NT, XP, etc) Best regards, Richard Davey --

Re: [PHP] specifying a font in PHP-generated email

2005-09-20 Thread Richard Davey
Hello Kenn, Tuesday, September 20, 2005, 9:32:47 PM, you wrote: > I'm attempting to create an HTML email via PHP and cannot get the > email to render in the correct font. I've made several stabs at it, > the most recent one below. The same code that works just fine on a > web page won't work for

Re: [PHP] new ways to add an html body?

2005-09-25 Thread Richard Davey
('path/to/your/html/email.html'); Will save embedding all that HTML into your PHP scripts. You could then do simply variable replacement on $mail_body to customise the messages if you so wish. -- Best regards, Richard Davey Zend Certified Engineer -- PHP General Mailing List (http:/

Re: [PHP] Detect file size BEFORE upload it

2005-10-06 Thread Richard Davey
Hi Ruben, Thursday, October 6, 2005, 7:38:35 AM, you wrote: > The problem is that I was able to detect file size after complete > file is transfered. > I need to detect file size before all file is transfered, in order > to cancel it and preserve server resources. > Any ideas? The only way to

Re: [PHP] date comparisions...

2005-10-07 Thread Richard Davey
Hi aaronjw, Friday, October 7, 2005, 7:34:11 PM, you wrote: > if ($discountResult["dateexpired"] > date("U")) > { > //dosomething > } > else > { > //do something else > } > Anyway... it's supposed to read: IF the expired date is past the current > date... disallow "dosomething" otherwise

Re[2]: [PHP] date comparisions...

2005-10-07 Thread Richard Davey
Hi, Friday, October 7, 2005, 7:55:45 PM, you wrote: > dateexpired is: 1128052800 which translates into: 2005-09-30 00:00:00 > Basically, I'm just trying to figure out when the dateexpired is. IF > it is past the current date then I am erroring out and if it's under > the current date... I'm allo

Re: [PHP] storing passwords in $_SESSION

2005-10-10 Thread Richard Davey
Hi Dan, Monday, October 10, 2005, 7:43:31 PM, you wrote: > How secure is it to save a password in $_SESSION. > i.e. $_SESSION['password'] > is it safe and is it practical? No, and no (well, not if you want to be safe) More to the point - why would you ever want to? If you've found yourself i

Re[2]: [PHP] storing passwords in $_SESSION

2005-10-10 Thread Richard Davey
Hi Jay, Monday, October 10, 2005, 7:36:12 PM, you wrote: > I would think it neither safe nor practical. Once a user has logged > in having the password in SESSION would be useless. Agreed totally, I am curious as to why this question seems to get asked a LOT though. I wonder what it is that caus

Re: [PHP] Obsession with BC

2005-10-11 Thread Richard Davey
Hi, Tuesday, October 11, 2005, 5:41:53 PM, you wrote: > Recently, I asked my hosting provider when they are going to switch > to PHP5. They replied that it will not happen any time soon, since > they will install PHP5 only on new servers. Their reasoning was > simple: PHP5 will inevitably break s

Re[2]: [PHP] Obsession with BC

2005-10-11 Thread Richard Davey
Hi, Tuesday, October 11, 2005, 7:14:05 PM, you wrote: > Issue: I think BC slows down the evolution of the language. I know > for sure it makes some people less willing to upgrade. And there are > ways of avoding unnecessary BC maintenance altogether. Beyond not staying stuck in the past? Not rea

Re: [PHP] Check if an url is a jpg image

2005-10-12 Thread Richard Davey
Hi Tommy, Wednesday, October 12, 2005, 10:48:55 AM, you wrote: > Is it possible to check if an url is a jpg image from php? #1 Quick and unreliable: Check if there is a .jpg or .jpeg as the final characters of the URL string. #2 Bit more complex, very expensive: fopen() the URL, download the co

Re: [PHP] Trouble figuring out a Walk through an Array

2005-10-13 Thread Richard Davey
Hi Phillip, Thursday, October 13, 2005, 4:56:30 PM, you wrote: > Having trouble figureing out a certain walk through an array. > And I am not finding the help I need in the manual or anything. > I have an associative arr ($arr) With about 20 elements in it. > Ten of which are required. So I have

Re[2]: [PHP] Obsession with BC, take 2

2005-10-13 Thread Richard Davey
Hi, Friday, October 14, 2005, 1:07:04 AM, you wrote: > Let me get it straight. There are two ways of running PHP four and > five on one server. First one is by using five's compatibility mode, > and it breaks some of the old scripts. The second one is by using > two different apache modules. It *

Re: [PHP] OPTIMIZING - The fastest way to open and show a file

2005-10-14 Thread Richard Davey
Hi Ruben, Friday, October 14, 2005, 12:29:09 PM, you wrote: > What can I do to make faster opening files? > ** > Source code: >if(file_exists($filename)){ > $modified_date=filemtime($filename); > if(time()<($modifi

Re: [PHP] Question about including files and server load

2005-10-14 Thread Richard Davey
Hi Jay, Friday, October 14, 2005, 2:21:57 PM, you wrote: > I was wondering isn't this putting a bigger load on a server by > including so many files for each function? Also, I was wondering > what everyone's opinion was on this approach in terms of > maintenance. Do you think it's better practice

Re: [PHP] Invoking a DLL with PHP

2005-10-17 Thread Richard Davey
Hi Jay, Monday, October 17, 2005, 3:20:58 PM, you wrote: > Does anyone have any insight to this type of process? Would I have > to build a PHP extension and compile the DLL as part of PHP's > configuration? Ideally the DLL would be a black box that could be > accessed utilizing functions that I b

<    5   6   7   8   9   10   11   >