@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29



Comments:

<0> it makes sense, but the reason why it makes sense is the lack of handling by php. when using multi-d arrays, it should check to see if its handling 2 increments, and thus increment only the second one
<1> Im having some trouble with file date comarison, I need to know if a file is older than x days ago and if it is delete it, but it isnt working correclty, I did a pastebin at http://pastebin.com/537082 could someone please check me out and help me find out what is wrong. I wrote this last year, and it worked fine then, but this year my date comparison system doesnt seem to be returning the values I expect and my comparison is now working.
<2> Mordof: I disagree. I think it's doing the most logical thing
<1> sorry, NOT working
<0> ||cw, so your saying that people only using 1d arrays are fine to do their own incrementing, but if you want more than one-d arrays.. your screwed? thats a little unfair..
<2> no, i'm saying that [] always increments the aray in the order to ask it to
<0> true.. i think it should be changed though to check for multi-d arrays
<3> rance: Have you tried actually outputting what $filemtime and $keepdate are?
<4> rance: That is a hell of a lot of work!
<1> yea
<1> hang on and Ill tell you what I got
<0> is there a spot on the website where i would submit to the php development team a modification they could make?
<5> Mordof: you could possibly submit a feature request on the bug tracker, but I'll bet you'll get shot down for that
<6> Mordof: http://bugs.php.net supports feature requests.
<4> if($filetime("thefile") < mktime()-($days_to_keep * (3600 * 24))){ // delete it. }



<4> Would that not achive the same result?
<3> rance: It looks like lines 24-25 aren't even necessary.
<3> Gargoyle: No... doesn't account for daylight savings.
<0> k, thanks
<4> You really need it accurate to the hour?
<3> Gargoyle: It makes a difference when the script runs, because one hour off can mean the difference being one date and another.
<1> its keeping a sort of log of what it does, so the date formats were a way to put a readable date in the log
<7> hello all
<7> well I installed wamp last night woke up this morning and apache wouldn't start
<7> im going to try and install it again now
<3> rance: I'd say have debug output $keepdate as well as $filemtime and compare them.
<1> Ill paste recent results of a test run on a file, in full debug mode so you can see what it showed
<1> it looks like the keepdate is greater than the current date for some reason, should be less, but I dont see how
<4> Elazar: My script is accurate to an hour regardless if it falls across a dateline
<3> Gargoyle: I've had cases where I did what you're suggesting and had issues with daylight savings time.
<7> wow i just installed wamp again and can't get apache to start
<7> why is this happeneing
<3> rance: Hm... can't help you there.
<1> ok, I just pasted my results from running the script in debug mode
<1> becuase the unlink command is commented out, no files are actually being deleted
<4> Elazar: I can see where it might skew 1 hour or not depending on dst...
<1> Im not worried about the hour and dst, will be run via a cron job prior to my nightly backup at 11:00 pm
<3> rance: Regardless, I'd keep the use of date-related functions the way you have them now.
<4> rance, so deleteing anything older than 45 days is your target (give or take a few hours?)
<3> rance: If the dates on the files are later than you expect, obviously something else is writing to them.
<1> my debug output shows that the dates of the files are correct, and that the files havent been modified, is that that when I do a strtotime of my date format I get numbers that should be less than what I get for today
<4> rance: Seriously, you are making a very simple task quite difficult!
<4> filemtime returns an integer representing a date in seconds.
<4> mktime returns an integer of (the current) date in seconds.
<4> th only thing not in seconds, is your 45 days. Which is ((3600 * 24) * 45)!
<8> ummmm mktime creates a time out of provided minutes, seconds, hours, days, months, and years
<8> time() returns current date in seconds
<4> ds, leave them all blank and you get current time!
<8> why not just use time() less processing time
<8> heh
<8> rawr
<4> OK. use time.
<4> still a ****load less than what rance is trying to do now.
<0> there, feature request submitted..
<1> The stuff I got came from the php manual, so thats why its like it is, but Ill take your suggestions and try again
<3> Mordof: What did you request?
<0> that $array[][] be supported for correct incrementation
<0> right now it ignores the 2nd array and only increments the first... which is pointless if you want more than 1 value in the 2nd array
<3> Mordof: Ah... yeah, I think it was originally conforming to C++ behavior. I don't know why it couldn't work, either... made it a pain in the wrong place to populate multidimensional arrays.
<0> yeah. right now im just using a foreach and populating a couple arrays.. but now i have to actually manage my looping as to ***ign keys
<9> hi. im trying to upload file via Curl within PHP
<0> its a pain
<9> but the server seems to be smart. its not letting me to upload file.
<9> i have headers for manual file upload and the codes im trying to use for file uploading.
<9> can you please look into the two and tell me where im making mistake please?
<9> i can upload files to other server easily
<4> I think the whole world should just use a single timezone!
<8> gmt
<0> yes, then a bunch of people would eat lunch at midnight, or even at 2am!
<3> Would be easier if we all agreed on a system of measurement, too. :P
<0> and then we would have wars about who is special enough to be on the right timezone!!
<3> True.
<4> It's not like it would make any difference, so what of your office hours are 22:00 to 05:00, its just a number!
<10> guys, if you're registering people on your site, what would be the criteria to know that a person is trying to register again? A thought about the name, but there are people with same name.
<4> your boss will still bust your ***!
<0> Gargoyle, yes.. but its the matter of whos good enough to get the base timezone.. there would be wars about it, gaurenteed



<3> Gargoyle: Also true. But Mordof's right... even though it's just a number, people would still have a cow.
<0> thats how things work
<4> UTC
<4> It's already defined
<4> it's what all computers use internally, etc. etc.
<3> ArthurMaciel: Either an e-mail address or a username, generally.
<4> I believe it's what most military use too!
<0> Gargoyle, then there is already no problem to what your talking about, and there is no need to switch timezones as well :P if people want to use one set time, they can
<10> oh, I believe the e-mail will be the best choice. Thank you, Elazar.
<0> the reason they have time zones is because there are lots of people who cant think around different timezones, and calculate the differences
<0> my sister included, she cant tell time worth crap.. even on our own time zone
<4> exactly.
<4> there would be no timezones.... eventually you would just get used to sunrise being 22:00
<4> :)
<3> ArthurMaciel: The only bad thing about the e-mail address is that it's subject to change, so you'd have to check for a record with the same e-mail address and a different primary key value if you give the user the option to change it.
<0> yeah my last statement wasnt leading to where i wanted it to go, lol
<4> lol
<0> Gargoyle, that would also confuse people at different places in the world. right now, universally, lunch is at around noon. that woyuld change, people would then have to figure out what time their lunch is at.. and see how far away the person is
<0> it would be worse than time zones
<0> time zones you actually have a set increment to deal with to figure things out
<4> Mordof: Lunch would be when you get hungry.
<0> nevermind :P
<4> lol
<1> thanks guys, I think I got it, looks like the problem was the way I subtracted the 45 days
<4> rance: did you end up with my 1 liner, or you just fix your code?
<1> well, I just fixed the headers where the time variables were calculated with part of your one liner code
<4> time for a wander... blow the cobwebs away... byeee
<3> Mordorf: Lunch is generally right in the middle of the work day... not that hard to figure out if you know your hours.
<0> granted, but then if you wanted to know how far away someone is.. you have 22:00, and 8:00.. some people arent that good at math to figure out the difference :P
<0> its just harder that way, lol
<0> it seems simple enough to us.. but i know of people who would not be able to do it very well
<3> They're going to have to figure out the difference regardless. If we're all using the same way of telling time, at least we're that much closer to being on the same page when it comes to time.
<0> not true... because we would still have to shift someone elses time to match ours
<0> one person goes to work at 6 am, another at 5pm..
<0> yet its the same time
<0> where as with time zones, they would both go to work at 6 am..
<3> No, Gargoyle would saying that one time would be used everywhere.
<10> Elazar, and how is the general idea of confirming a registration receiving an e-mail from the server? Should I send and e-mail containing a session id?
<0> i realize that elazar.. which is why everything would be screwed up
<0> 6 am and 5 pm could be at the same time of day
<0> at different points of the world
<11> "Warning: set_error_handler() expects argument 1, 'ErrorHandler', to be a valid callback "
<3> ArthurMaciel: Generally, generate some sort of hash, calculate it or store it in the database, include it in a link back to the site within an e-mail, and have that script check the hash against what's calculated or stored to confirm that they really did receive the e-mail.
<11> i read the doc but i dont understand this error
<0> that would also confuse people because then they wouldnt know if that person was far away or just had a whacky job...
<0> its better with time zones
<11> if (!stristr(__DEBUG__,'OFF')) set_error_handler('ErrorHandler');
<3> Mordof: If we have one clock in the world, everyone will know what time it is and will know what time you mean when you give them one.
<11> is the line that gives the error
<12> kristalino: is ErrorHandler a function which returns an appropriate value?
<3> Mordof: Yes, the difference is that the time would have nothing to do with the orientation of the planet anymore. If we went to using a single time, it would have to be that way.
<0> ... it doesnt make sense though. what time is it where you are
<3> Mordof: Well, beyond that a "day" would still be considered the time it takes for the planet to make half a rotation.
<3> Mordof: Going by the standard I use for time, 10:52 AM CDT.
<0> ok, so we are 1 hour apart..
<12> kristalino: your check of the value of __DEBUG__ seems a bit odd, there, as does its name.
<3> Mordof: If this new system of telling time was adopted, you wouldn't have to ask me what time it was where I am.
<0> no i know.. but then we would both be at the same time
<0> but your 1 hour behind
<0> how would i know when you eat lunch?
<3> Mordof: You're still thinking in terms of the way it works now.
<3> Mordof: Why the hell would you care when I eat lunch? I may not eat at the same time every day.
<0> gah! people arent going to sleep during different times!!!
<0> people would still sleep at night and work during the day, yet the time would be shifted..
<0> it would be stupid to have one time
<0> which is why we have time zones
<10> I'll think about that, Elazar. I have to elaborate that implementation on my mind.
<3> Mordof: We would both know what time it was at any given instant without having to ask and then calculate a difference. If I say I'm going to bed at a particular time, you can look at your clock and know exactly how much time that is.
<13> people sleep when it gets dark
<13> the clock doesn't matter
<12> InterSVR: some people sleep when it gets light.
<3> InterSVR: Except people with night jobs, of which there are many.
<14> is it possible to get the mac-adress from a networkcarf with php? :)


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #php
or
Go to some related logs:

unable to enter compaq armada 1700 bios
ubuntu install guided partition
xgl freezes ubundu
#fluxbox
koatic
#perl
upgrade-manager ubuntu
CMYK-colorspace +gd
sensors frontend suse 10.2
#css



Home  |  disclaimer  |  contact  |  submit quotes