#php
16 October 2007
Total 45 pages. You are browsing page 1/45.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
--- Log opened Tue Oct 16 00:00:21 2007
00:00 <****> garotosopa: I need the client to save the data across sessions... basically what I would need is something like Google Gears... but I dont want to count on that...
00:01 <****> skiv03, you'd just have to save sessions somewhere else and extend its life.
00:01 <****> skiv03: what do you mean save data across sessions? You can probably just extend the session life
00:01 * AlReece45 feels like he's just repeating now
00:01 <****> AlReece45, must pay attention on moving it to another folder / or to a database
00:01 <****> AlReece45: I need those "sessions" to persist for ever.... and not disappear when browser closes
00:02 <****> AlReece45: sessions are meant for short periods...
00:02 <****> http://www.pastebin.ca/737975
00:03 <****> skiv03, you can implement it anyway it pleases you
00:03 <****> skiv03: where did you read that?
00:03 <****> AlReece45: read what?
00:03 * lig sneezes
00:03 <****> skiv03: 'sessions are meant for short periods'
00:03 <****> skiv03, or you can easily handle it yourself, saving it in a database and using an ID to identify it. no need to play with session-things
00:04 <****> http://php.net/manual/en/features.sessions.php: "Session support in PHP consists of a way to preserve certain data across subsequent accesses. "
00:04 <****> AlReece45: well.... I wouldn't want to save all my users sessions for ever...
00:04 <****> garbage collection++
00:05 <****> how do i check whether the httpd is running as nobody?
00:05 <****> ps aux | grep httpd
00:06 <****> skiv03: I'm not sure why you're counting on the client to hold on to the data... anyways, you could probably gzip the content when setting the cookie...
00:06 <****> NiLon, from a php script
00:06 <****> skiv03: or use whatever compression. Then when the script loads again, the server decompresses the cookie
00:06 <****> mmiikkee12, get_current_user()
00:07 <****> sorry nvm
00:07 <****> mmiikkee: yeah, get_current_user() gets who owns the script
00:07 <****> mmiikkee12, it might be something regarding posix_getuid()
00:08 <****> garotosopa, what's wrong with get_current_user?
00:08 <****> garotosopa: but as you can guess. that requires posix... its not available on windows platforms
00:08 <****> mmiikkee12, it just has nothing to do with what you want :D
00:08 <****> AlReece45, this code won't be running on windows
00:08 <****> mmiikkee12: it only returns the owner of the script... not who's running it
00:08 <****> garotosopa, ah, i see. the owner of the .php file
00:08 <****> mmiikkee12, posix_getuid() + posix_getpwuid() is my bet
00:09 <****> or just getuid if you can hardcode nobody's uid
00:09 <****> mmiikkee12: then that'll work fine. POSIX functions are enabled by default.
00:09 <****> garotosopa: getmyuid is like get_current_user
00:10 <****> hi all... having an issue with php run by console. when i run ./test.php, i don't get any errors anywhere. http://rafb.net/p/LEDYe077.html is there any way i can see the fatal error from the syntax error in test2.php?
00:10 <****> garotosopa: unless you meant posix_getuid ;P
00:10 <****> AlReece45, just for portability's sake, can i make sure i'm on a posix system before i call those functions somehow?
00:10 <****> AlReece45, yeah I meant posix_getuid :)
00:11 <****> mmiikkee12: you could probably use function_exists to make sure its there ;P
00:11 <****> yeah, that. forgot the name of it :)
00:11 <****> ceptorial: try adding error_reporting(E_ALL) above/below ini_set
00:12 <****> hi all
00:12 * AlReece45 sends his greetings
00:12 <****> im trying to do a substr for my news section on the homepage. its only supposed to be a taste of the news page
00:12 <****> AlReece45, do you think PHP_OS == 'Linux' would be reasonable?
00:12 <****> can i show u the code and see what u think
00:14 <****> garotosopa: it should work on any non windows system... NetBSD, FreeBSD, Solaris, GNU (if they ever finish their kernel), Mimix, OpenSolaris... plus more
00:14 <****> AlReece45, so this should work on all systems? (not going to sit here and test it on every os known to man and/or cats) http://pastebin.ca/737989
00:14 <****> ohh ok
00:14 <****> St3althy: I suppose you could...
00:14 <****> can someone take a look at http://www.pastebin.ca/737975 line 22, I am trying to check if the array is empty and if so do not do the foreach but something else. if empty(array) doesnt seem to work.
00:15 <****> mm i think i got it
00:15 <****> mmiikkee12: you might want to check to see if its windows in the else ;P
00:15 <****> hmm. true, windows has no /usr/bin :)
00:15 <****> oh well, will fix it later if it breaks
00:16 <****> Beardbar, where is your if empty(array) there?
00:16 <****>0
00:16 <****> Beardbar: line 22 is a comment
00:16 <****> (it's still microsoft's fault, even if it breaks on a mac server :P
00:16 <****> jk
00:16 <****> http://dinounix.ath.cx/delta/?module=svn << yay, it works :D
00:16 <****> thanks
00:16 <****> mmiikkee12: well... I guess it won't give a fatal error ;P
00:17 <****> $_SESSION['failed_login']++1;
00:17 <****> Is there anything wrong with that?
00:17 <****> mmiikkee12: np
00:17 <****> _Scout: yep
00:17 <****> _Scout: the ++1; part - remove the 1
00:17 <****> _Scout, you should use ++;
00:17 <****> Hey there. Can I call a function as a variable, or construct a function from a variable?
00:17 <****> Thanks.
00:17 <****> _Scout: either the one shouldn't be there, or you have one too many ++'s
00:17 <****> Gecko, $functionname();
00:17 <****> garotosopa: cool. Thanks!
00:18 <****> lig: ooh that might work thanks, to others: sorry wrong pastebin :( i failed at pastebin
00:18 <****> the times I needed it I was doing something wrong heheh
00:18 <****> _Scout: it looks like its more efficent to use ++$_SESSION['failed_login'] there.
00:18 <****> Gecko: create_function
00:18 <****> Okay
00:18 <****> gecko - be careful though - variable function names will make debugging a royal pain
00:19 <****> lig: yes, I assumed as much... However I hope to save some by checking with function_exists()
00:19 <****> _Scout, just remember the differenece between pre and post incrememnting
00:19 <****> gecko: in addition to variable function names, you can use call_user_func and call_user_func_array
00:19 <****> What's the difference?
00:20 <****> _Scout, hold on and let me find the man page for it
00:20 * AlReece45 searches too
00:20 <****> Alright thanks!
00:20 <****> I can't compile with libpng and libjpeg support...
00:21 <****> do the bundled gd library has support for those?
00:21 <****> lig: can I do it with an object as well?
00:21 <****> gecko - unsure
00:21 <****> tias
00:21 <****> Kronuz, yes, what compile options are you using?
00:22 <****> lig, php.net/language.operators.increment ;)
00:22 * lig kisses ekneuss - thanks darlin
00:22 <****> _Scout, you got that? http://www.php.net/manual/en/language.operators.increment.php
00:22 <****> cythrawll, --with-gd --with-zlib --with-apxs2 --with-config-file-path=/etc
Total 45 pages. You are browsing page 1/45.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
