logs archiveIRC Archive / Freenode / #php / 2006 / June / 7 / 14
zircu
litage: not for you
litage
ah
is session.cache_expire the timeout value for sessions?
zircu
it is how long the cookie will last on the client, iirc
it will get updated on each request
richardlynch
When PHP sends out a session cookie, it sends out some headers about cache-ing data to the browser and intermediary caching servers. One of those headers is affected by cache_expire. zircu is thinking of cookie_lifetime.
litage
zircu: isn't how long the cookie lasts on the client session.cookie_lifetime though?
ah
i should read before posting =P
zircu
it can get confusing sometimes
Creed2PE
I'm trying to query a date that's stored in mysql like (2006-05-31 15:32:43) with a variable that prints dates like (112003). That's January 1, 2003. How can I make the formats comparable?
richardlynch
This is merely my interpretation of the docs, mind you... Play around with it and LiveHeaders in Firefox to see what happens.
litage
richardlynch: which setting specifies the session timeout?
Creed2PE: convert one format to the other
         

AfroTurf
in php 5 can i still do $_GET['something'] and have $something without actually setting it
EDIJUS
tell me best php editor
richardlynch
cookie_lifetime, I think.
kuja
EDIJUS: There is no "best"
zircu
gc_* stuff as well as lifetime andcache_expire
litage
Creed2PE: i believe date() will swap formats nicely
EDIJUS
kuja, yell good :)
tell*
richardlynch
Creed2PE: Converting 112003 to 1/1/2003 is gonna be a pain...
kuja
!tell EDIJUS about editors
philip
AfroTurf: you are asking if php 5 has register_globals directive still? yes it does. php 6 however does not.
EDIJUS
kuja, thanks :)
richardlynch
Creed2PE: Is 1212003 12/1/2003 or is it 1/21/2003?
Fooker
This is a bad night for me. Anyone happen to know the command to output the last X lines of a file and then watch for new lines to be added?
AfroTurf
philip: ah thanks
richardlynch
Fooker: tail -n 5 -f file
Creed2PE
1-1-2003
richardlynch
Creed2PE: pay attention. Is 1212003 1/21/2003 or is it 12/1/2003?
Fooker
richardlynch: Your a life saver
kainnation
hi... i made a php script that uses simplexml to make an xpath query and then use in_array to check if the variable $username is in the array or not... it works on my loacalhost server but not my hosting company... tried changing my code over to use the DOM to do the same thing... i can get the usernames in the xml file with a DOM XPATH query but need to put them in an array to use in_array but i'm having problems with that... i'm willign to post the code o
Fooker
I really think I need more sleep when I forget that
         

Creed2PE
I'm using a calendar select form to capture the date.
richardlynch
Go use it and get both 1/21/2003 and 12/1/2003 and see if they are different.
litage
Fooker: -F (capital) will making the tailing continue if the file is overwritten, removed and recreated, etc
Creed2PE
and then doing a concatenation to bring the date together.
kainnation
can an admin please pm me real qick about the chat?
richardlynch
!tell kainnation about pastebin
kainnation
thanks richard i know about pastebin
Creed2PE
hmmm...now that I've said that, I'm thinking I may be able to format the date in the concatenation.
kainnation
i can put my code on my pastebin if someone is willing to help?
richardlynch
Creed2PE: You NEED a separator or 1212003 is indeterminate.
kainnation
i've been working on this all day without results
Sergonium
your line got cut off server site at i'm willign to post the code o...
cythrawll
wow is dreamweaver really on the top for php editors on php-editors.com? thats terrible
Sergonium
server side*
richardlynch
If you don't pastebin it, we certainly can't help...
cythrawll
that's like knowing ie is the most used browser
zircu
it all depends on the audience
how many emacs or vim users actually go there and vote?
richardlynch
cythrawll: Errrr. I'm seeing a lot of Google ads for editor, and then a list for editor with DW not at the top, and ...
litage
richardlynch: i've been playing with cookie_lifetime and have found that it sets an absolute lifetime for the cookie. IE: i give it a value of 60 (seconds), and after 60 seconds, the cookie is valid. after that, it dies, even if the i keep using the session (which i thought would reset the session timer)
zircu
richardlynch: the site is very confusing
litage
s/after 60 seconds/before 60 seconds/
zircu
click the 'white' search box that is almost hidden
cythrawll
i guess it says recommended editors
which someone should email them and make them take dreamweaver off
and have them add eclipse
richardlynch
litage: You have to call session_start on every page...
kuja
vim and emacs are overrated.
cythrawll
i agree kuja
richardlynch
PHP Edit is at the top...
kuja
Though, they're the most powerful editors I've seen.
cythrawll
never heard of it
Zakabog
I've re-written so much code on this page, it's so clean now and the code is way easier to read and way more efficient
Except now I have to go visit some of the old code again and re-write it, someone hold me?
kuja
vimscript sucks, elisp makes sense. woohoo for emacs :P
litage
(Action) looks up session_start
cythrawll
dreamweaver used to corrupt my code on save
richardlynch
They did manage to fix that bug... :-)
kuja
cythrawll: Me too, but it was an encoding issue.
I haven't used Dreamweaver in years.
And... I'm proud to say that.
cythrawll
yeah but i switched to phpeclipse, and it's much better
kuja
Kate is by far the best general purpose editor I've used.
cythrawll
and i wana check out zend eclipse plugin that's coming out too
Zakabog
I use dreamweaver to create a table in like 2 seconds and it's still a pain in the ass
cythrawll
Kate is awesome
Zakabog
I just do everything in emacs now
richardlynch
DW always crashed when I tried to drag the table edges over "too far"...
kuja
Zakabog: Dreamweaver's WYSIWYG is the devil.
richardlynch
For the 5 minutes I used it.
zircu
eww.. tables :)
Zakabog
haha kuja
kainnation
here is my pastebin all
cythrawll
I haven't used WYSIWYG in years
Zakabog
I just use it to create rows, merge them and set colspans and rowspans
zircu
try doing divs in DW
Zakabog
Sizing I don't mess with
kainnation
here is my pastebin all: http://pxc.pastebin.com/764425
thanks for the help
zircu
what is the fatal error?
cythrawll
kainnation, the server that it doesn't work on? what version is it?
richardlynch
cythrawll: kainnation has already given up on simpleXML -- Read the second chunk of source using DOM instead.
zircu
and check a diff of the phpinfo() of each of the servers
cythrawll
ok
richardlynch
kainnation: I don't know diddly about xpath, but the "//username" looks kinda suspicious to this naive reader...
Fooker
Something seems up - exec('/path/to/script $variable $variable2'); executes the script, but variable and variable2 don't get passed on to the script. Any ideas?
zircu
i guess it would have helped to just pastbin what the problem is instead of confusing us
Fooker: is $variable and $variable2 defined? and how are you confirming it isn't getting passed?
richardlynch
Fooker: Use 2 more args to exec() to get error output and OS error code.
The problem (for kainnation) remains that his $username array doesn't have the usernames he expects in it.
cythrawll
Fooker you also cannot include variables like that in ' quotes iirc
Fooker
If I put them outside the quotes, it errors
If I leave out the ''s, it errors
zircu
Fooker: read: php.net/function.exec
richardlynch
Use " not ' Fooker. And then you need '$variable1' for the SHELL to have each arg separate.
litage
richardlynch: i call session_start() on every page and have made sure that it's the first thing that happens. however, my sessions are still timing out after the first 60 seconds rather than having the timer reset on every page load any suggestions as to what might be going wrong?
zircu
cythrawll: that sort of proves that the to/script isn't parsing args properly, that would ensure two args
tobmoox
does php have any built in methods/classes i could use to do something like a doubly linked list?
Fooker
richardlynch: Thanks... again :)
richardlynch
kainnation: Instead of echo $username_sxe, use var_dump($username_sxe) and what do you get?
litage: I dunno... Does PHP send the headers for the Cookie each time? Use Firefox + LiveHeaders to find out.
zircu
tobmoox: there might be something on pear.php.net/ i havn't dont much linked lists with php
tobmoox
zircu: what about javascript?
litage
richardlynch: thanks, i'll try out LiveHeaders
tobmoox
since thats a lot like java and all
richardlynch
tobmoox: SPL (in PEAR or PECL) probably has a doubly-linked list class.
tobmoox
kk
zircu
i dont thinkg spl has that
tobmoox
oh yeah i was looking at that
except i dont want to install anything onto my server
im looking for something like already built in
dunno if thats what you meant
(im not too good at the php world)
cythrawll
afiak nothing in the core does that
kainnation
it doesn't work on powweb.com
version 5
richardlynch
tobmoox: There is nothing in core for it. Roll your own.
kainnation
Fatal error: Call to a member function xpath() on a non-object in /www/k/kainnationco/htdocs/pxc/ext/users/admin/parsers/add_user.parser.php on line 191
zircu
tobmoox: even if you could use javascript, i'm not sure how that solve your problem in php
kainnation
Fatal error: Call to a member function xpath() on a non-object in /www/k/kainnationco/htdocs/pxc/ext/users/admin/parsers/add_user.parser.php on line 191
zircu
kainnation: oh my
tobmoox
zircu: i could probably do the same thing in javascript as in php for this. its just an image gallery thing
kainnation
Fatal error: Call to a member function Xpath() on a non object (on the lines where the simplexml query is)
tobmoox
zircu: unless you know of any good image gallery software already available that i could use that would work on my template and blend into everything
kainnation
it basically means all the username nodes in the xml doc
zircu
tobmoox: well, iirc javascript has nothing as well, you have to write your own or find some code that already does it
richardlynch
kainnation: That means that something in front of -> is NOT an object -- var_dump() whatever is in front of -> and back-track where it came from and figure out why it ain't what it should be.
zircu
kainnation: it really means you shouldn't paste things like that here
tobmoox
i can definately write my own if either language has linkedlist code available
flaccid
what is the local and master values in phpinfo?
zircu
tobmoox: i dont know of any that will solve your issue
tobmoox
darn k
Shadow_mil
the second agrument in the socket_select is for sockets that block writing, would this return the socket if it was disconnected?
zircu
flaccid: master is what is set in php.ini (or the default setting if no php.ini) the local is what is set via an apache directive or a ini_set() call
richardlynch
flaccid: master == php.ini and local == .htaccess (or changed in script, maybe)
« 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 32 33 34 35 36 37 38 next »