IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1982.48 MB
Powered by
Channel Info
Network: freenodeChannel: #php |
Search in www.irclog.org
Log from #php at freenode 2006-07-24
Pages: < Prev
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
30
31
Next >
[03:17]<wn2loch>sorry in my php file it says xslt <
[03:17]<jumn>Augur: You've forgotten to close some brackets or braces. Check for ifs that don't have the right number of braces...
[03:17]<jumn>Or check to see if you've forgotten to have a semi-colon.
[03:17]<auzuz>k
[03:17]<wn2loch>Nomikos: sorry in my php file it says xslt <
[03:18]<njdycjs>WebLOCH: yeah, don't readily know then.. have you checked for user comments with the same problem?
[03:18]<wn2loch>not yet, i guess thats next haha
[03:20]<wn2loch>Nomikos: quick check... I was using libxslt, is it actually supproted yet ?
[03:21]<njdycjs>WebLOCH: dude, it's not as if i actually know anything about XSL, sorry ;-)
[03:21]<auzuz>jude.. im not seeing any ; or brackets missing
[03:21]<wn2loch>haha okay
[03:21]<njdycjs>or XSLT for that matter
[03:21]<wn2loch>cheers for the help nayway
[03:21]<vjcnyyvj>labanaktis (good night)
[03:22]<jumn>Augur: It'll be before line 70...
[03:26]<auzuz>woohoo-- atleast im getting my page now..
[03:26]<auzuz>thanks jude
[03:26]<rsjlvfrl>phhhhhhht.
[03:28]<rugnsq>what function do I need to look at in order to change 2006-09-05 18:11:07 ( the mysql datetime) into something like: 09-05-2006?
[03:28]<rugnsq>without doing a bunch of string manipulation
[03:28]<rugnsq>is there some way to do that with the date function or something similar?
[03:29]<njdycjs>aunes2: yeah, together with strtotime()
[03:30]<njdycjs>aunes2: something like date('m-d-Y', strtotime($date));
[03:34]<lpzavjz>Hey all, i need to access some python functions from php, anyone done something similar? is there a binding generator ala swig? Or will i have to exec the python code and pass environment vars?
[03:35]<rdvxzrwff> the later
[03:42]<maasaz>can someone else me with a function i have put together to calculate someones age?
[03:42]<maasaz>http://pastebin.ca/97717
[03:42]<maasaz>if no birthday is entered, it gives the age variable 36 for some reason
[03:43]<maasaz>i have tried putting in some logic to check if the bday is empty, but its not working for some reason
[03:44]<txzzzzdjdzvzzzzz>MACscr: Do you happen to have their birthdate stored in a MySQL db?
[03:44]<maasaz>yes, 3 different fieldds
[03:44]<maasaz>fields
[03:44]<maasaz>1 for day, 1 for month, and 1 for year
[03:44]<txzzzzdjdzvzzzzz>MACscr: What's wrong with the DATE field?
[03:45]<yvzn2rf>or a timestamp?
[03:45]<yvzn2rf>mktime ?
[03:45]<txzzzzdjdzvzzzzz>itrebal: Timestamp is too precise for birthdates
[03:45]<maasaz>im just using text fields with drop downs
[03:45]<yvzn2rf>TheRandomAvenger: meh :)
[03:45]<njdycjs>itrebal: besides it gets updated when the record changes, if it's the first timestamp ;)
[03:46]<txzzzzdjdzvzzzzz>MACscr: Me too, but I'm using a DATE field.
[03:46]<yvzn2rf>Nomikos: i know none of the inner-workigns of mysql, i don't use it :)
[03:46]<njdycjs>itrebal: oh it's really nice and convenient if you're not too picky :-)
[03:46]<njdycjs>itrebal: what db do you use?
[03:46]<yvzn2rf>PgSQL
[03:47]<njdycjs>one day i will switch...
[03:47]<yvzn2rf>hehe
[03:47]<yvzn2rf>i havn't used mysql since before the 'mysqli' extension..
[03:47]<txzzzzdjdzvzzzzz>I'm attempting to locate my easy-MySQL-age-calculation dealy
[03:48]<maasaz>um, so my solution is to make each mysql field for the bdays to DATE?
[03:48]<njdycjs>i've used postgres for a while when i needed utf8 and mysql only had it in alpha, but .. yeah. powerful, but slightly more complicated :) liked how you could store geometrical shapes, though
[03:49]<yvzn2rf>hehe
[03:49]<njdycjs>and the views were a nice feature, unavailable in mysql at the time
[03:49]<njdycjs>pity you had to re-create them every time one of the tables was altered
[03:49]<txzzzzdjdzvzzzzz>MACscr: ((DATEDIFF(CURDATE(), birthdate) + 1) / 365.242199) AS age
[03:50]<yvzn2rf>yea that pisses me off
[03:50]<yvzn2rf>are views available in mysql now?
[03:50]<njdycjs>no idea :-)
[03:50]<txzzzzdjdzvzzzzz>itrebal: Yes
[03:50]<yvzn2rf>neat
[03:51]<njdycjs>TheRandomAvenger: ah, 4.1?
[03:51]<txzzzzdjdzvzzzzz>Nomikos: I don't know about 4.1, I know 5 has it
[03:51]<njdycjs>hmkay. have yet to switch to that..
[03:51]<txzzzzdjdzvzzzzz>Nomikos: It's very stable
[03:52]<maasaz>TheRandomAVenger: not sure I understand code
[03:52]<njdycjs>TheRandomAvenger: yeah, but i'd need to update a fair amount of code for things that have changed.. using 4.1 now, with the old passwords and such
[03:52]<njdycjs>and that's just for dev
[03:53]<txzzzzdjdzvzzzzz>MACscr: SELECT username, blah, blah, ((DATEDIFF(CURDATE(), birthdate) + 1) / 365.242199) AS age, blah FROM users
[03:53]<njdycjs>not sure i'll use many of the newer features anyway, i prefer the logic of stuff in PHP, don't want to spread it out over the components of the system. if you have to swap one out there's no knowing how easy it'll be
[03:53]<maasaz>im not lookign for a mysql solution, im looking for a php solution. The birthday is stored in 3 mysql fields already. so i cant just grab it from one field
[03:56]<maasaz>sry, hope i didnt sound ungrateful
[03:58]<txzzzzdjdzvzzzzz>$calc_age = floor((time() - strtotime(sprintf('%s-%s-%s', $_POST['yyyy'], $_POST['mm'], $_POST['dd']))) / 31556926);
[03:59]<njdycjs>TheRandomAvenger: was looking at that too, but strtotime might not work for people over 36
[04:03]<mzzdf->Guys, comments please..
[04:03]<mzzdf->http://infusion-media.co.uk/cms/db.class.inc.phps
[04:07]<nnzsynz>does php or apache have a way to execute a script on any directory or file the user goes to regardless of it exists or not?
[04:07]<maasaz>yep, that didnt work for people over the age of 36
[04:07]<nnzsynz>kind of how ruby or python sometimes work
[04:07]<maasaz>poo, that we had it
[04:10]<mzzdf->zeasier: there's exec()
[04:11]<wn2loch>after googling around and looking on forums for my distro im still at a loss, i have libxslt and sablotron installed, but i tsill get 'undefined function call to xslt_create()' can anyone help?
[04:12]<mzzdf->MACscr: sup?
[04:12]<maasaz>http://pastebin.ca/97741
[04:13]<maasaz>darly: my age function doesnt work if the person is over 36
[04:13]<nnzsynz>ah i was trying to remember mod rewrite
[04:13]<maasaz>plus i need it to check if the variables are empty, so i dont get an age returned
[04:14]<srzrrr`>does the comparsion operator(==) work when comparing 2 assoc. arrays?
[04:15]<srzrrr`>nm
[04:15]<mzzdf->MACscr: why convert to a unix timestamp?
[04:15]<maasaz>oops, thats leftover code
[04:15]<maasaz>http://pastebin.ca/97717
[04:16]<maasaz>thats what i had before
[04:16]<maasaz>but it woudl spit out age 36 if no age was entered
[04:17]<mzzdf->hrm
[04:17]<mzzdf->did it work for ages older than 36?
[04:17]<bnzvj>Hi - are there any good premade examples for setting up a user id and password login system (with passwords stored in MySQL)? I need somewhere to start so that I don't miss anything important
[04:18]<maasaz>crap, lol, guess not
[04:18]<mzzdf->MACscr: the age = 36 thing is due to there being no birthday
[04:19]<mzzdf->so the calculation = now - 9
[04:19]<mzzdf->now - 0*







