@# 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 30



Comments:

<0> Kaitlyn: oh. '/.*' . $variable / '.*/'
<1> _nero_ so i figure if it works and you're shell exec() something, putting a & after it will send it to background
<1> but i haven't had to try it
<2> I'll have to give that a whirl.. thanks.
<3> deadroot: not a $variable, i won't know WHAT it is? its just a part of the string..
<0> Kaitlyn: you have to know _something_ about what you want to match
<0> if you want a string of numbers then you can replace it with \d
<4> Hi All
<0> rtfm
<0> Kaitlyn: http://www.php.net/manual/en/reference.pcre.pattern.syntax
<3> \w* was what i needed..
<3> i missed that part of the page
<2> b1n0ry, looks like that works.. yay! :)
<5> Former Phillies star Darren Daulton says that on Dec. 21, 2012, at 11:11 a.m. Greenwich Mean Time, he and the other "chosen" will vanish from this plane of existence
<6> It was my understanding that lookaheads and lookbehinds were supposed to only return the match, not the lookarounds also in preg_match but it isn't working that way and I can't find any reference to it in the manual.
<6> Hopefully I'm missing something.



<7> b1n0ry saline?
<1> Jymmm: oh, i thought you were talking about breast implants
<1> don't want mold/mildew on those either
<8> hi all, how to turn debug mode off in php code? I don't want php to report errors thanks!
<7> b1n0ry: Nah... something wrong about fake boobs.
<1> Jymmm: dunno, i like the ones my wife has... looks good in a bikini
<7> b1n0ry it's all about the feel
<7> b1n0ry When you can feel the serial number, kinda ruins the whole ting.
<1> nah, the doc did a good job
<7> b1n0ry I'll be the judge of that!
<9> DavidHKMrPowers: Have you looked in your php.ini yet? Search for errors. They are pretty well documented on which settings show what.
<9> DavidHKMrPowers: And I mean search for the word errors, not actual errors. :-P
<10> Hi, all. :-]
<9> Hey codergeek42
<2> other random question.. is there any way to just read the last few lines of a file? kind of like the linux tail command? It is a pretty big file that is constantly growing, and I need to update what the last few lines were..
<2> (in php that is)
<10> Could you use fseek maybe? :|
<2> codergeek42, do you know, when you do fopen, does it load the file into memory? Or just have it ready to be read?
<10> _nero_: It just makes the file ready to get data from, to my knowledge. It's only put into memory once you start actually reading from it.
<2> then that might just work.. I am trying to develop an ajax app that allows 1) a long analysis process to be run via a web browser, 2) updates the status of the process to the browser, all via php.. the log file can be 400mb, and I just want to read the last couple of lines..
<8> Wolftech : how to set it in php code? i can't mosify php.ini :)_
<8> Wolftech : in XXXII. Error Handling and Logging Functions there is a var display_errors, but i don't know how to change it
<9> DavidHKMrPowers: Why not? If you cannot modify the .ini file yourself then there is no way in php code to do it. The only other suggestion is to add an ,htaccess file and put the error setting you want in there.
<11> is there any tool to check what header sent from server and display raw data?
<9> DavidHKMrPowers: Was that XXX..stuff from a manual somewhere?
<7> Wolftech php manual
<10> bungrudi: Firefox has a LiveHTTPHeaders extension that may help. :|
<7> Wolftech but you would have known that had you RTFM =)
<9> Jymmm: Thought so.
<8> Wolftech http://php.net/errorfunc
<11> codergeek42 thanks
<9> DavidHKMrPowers: So why can't you edit the ini file?
<11> btw some configurations canbe modified from ini_set()
<11> or something
<9> Jymmm: You could help instead of bashing me...:-P
<8> Wolftech i use web hosting
<8> Jymmm what is RTFM?
<9> DavidHKMrPowers: Then, if your host allows, you will have to add the .htaccess file as I mentioned.
<11> urm.. are there standalone tools that isnt a plugin of a specific browser?
<9> DavidHKMrPowers: Read The F* Manual
<10> bungrudi: Telnet? cURL? :-/
<11> ok thanks
<8> Wolftech: i have found a code error_reporting(E_ERROR);
<7> !+rtfm
<12> [RTFM] Read The Fscking Manual ya lazy bastard! http://php.net/WhatYouWantToSearchForGoesHere - http://ben.nullcreations.net/rtfm.txt
<13> DavidHKMrPowers: Look in the manual for using .htaccess to change settings at runtime.
<8> help : I found ini_set too!! is can modify php.ini vars
<8> is=it
<14> guys, how could I remove all the empty values from an array, leaving just the filled ones?
<15> Arthur: array_filter()
<13> DavidHKMrPowers: I would be careful because you don't want to do anything that changes your hosting site php settings. They may not like it.
<8> !+rtfm
<14> thank you.
<8> wolftech : thanks~!
<16> DavidHKMrPowers: NP
<14> guys, isn't there anything strange with: mkdir(): No such file or directory in /var/www/localhost/htdocs/autonet/picture_cl***.php on line 32
<14> if I want to create a dir, why should it exist before? Can't I create subdirs directly?
<17> Arthur: If C:\foo doesn't exist, you can't create C:\foo\bar directly.
<17> At least not with the PHP mkdir() function
<14> but if foo\bar exist can I mkdir(/foo/bar/temp)?



<17> Arthur: Sure. As a correction, my previous statement applied to PHP 4. In PHP 5, there's a recursive parameter so you can create them all at once.
<14> that's strange. It is now working here.
<14> do I have to add a last slash on the string like /foo/bar/temp/ ?
<18> how do i evaluate a variable i.e: if ($slot_default_num && <$slot_default_num> != NULL)
<18> <$slot_default_num> i want that to evaulate the number that's inside of it
<18> i.e $slot1 $slot2 $slot3
<19> why would I need three === for this:
<10> dimitri1: I don't understand your question well. Do you want to evaluate the variable that the contents of $slot_N name?
<19> if($login == "err") { echo "<h2>Authentication failed</h2>"; }
<18> $slot_default_num = 1, 2,3 or 4
<19> with two == it always returns true, and echo's that error
<18> i want to get $slot<$slot_default_num>
<19> but with three ===
<19> it works as expected
<19> this seems odd
<10> ${"slot${slot_default_num}"} should do it I think
<10> http://www.php.net/manual/en/language.variables.variable.php may help :)
<18> ${"slot".$slot_default_num}
<10> callipygous: Three =s also checks that the types are equal too. Maybe that has something to do with it?
<19> well
<19> $login will store a 0 - 9 or "err"
<19> so I don't see why it returns true
<19> if its a number
<14> Charbal, when I try to simply run mkdir("test"); it happens: Warning: mkdir(test): Permission denied in /var/www/localhost/htdocs/autonet/pictest.php on line 4 . Could this be the problem? How could I fix it?
<10> I think what may be happening is that PHP evaluates both sides to boolean TRUEs, since they are not comparable or of the same type.
<10> perhaps? :|
<19> perhaps
<19> i don't know all php's quirks
<19> once I've determined a user has a userlever
<19> level
<19> is it safe to store that in a cooke, or session variable?
<19> I guess a cookie could be tampered with on the users end?
<10> I'd store it in a session var (server side)
<19> how long do session var's last?
<10> Cookies should always be seen as invalid and untrustworthy until otherwise strictly validated
<20> callipygous, you never want to trust data in cookies
<19> thought so
<10> callipygous: until the user closes their browser instance or you destroy the session data manually, normally
<20> especially not when it relates to any kind of credentials
<19> so keeping a user logged in, by keeping his say, username and userlevel in a session var is acceptable?
<10> generally yes, but I'd validate the stuff on each page just to be safe :)
<19> don't know if that is really necessary
<19> its an intranet
<19> afterall
<10> then that shouldn't be much of a problem, methinks :P
<19> cool
<14> guys, how could I change the writing permission on my server?
<19> this alright? $_SESSION[usr] = $usr;
<19> $_SESSION[lvl] = $login;
<19> there was on older way
<14> $_SESSION[ 'usr'] = $user;
<10> $_SESSION['name']
<19> session_register, but thats dead
<10> it needs to be a string index
<14> $_SESSION['lvl']
<19> you don't need the ''
<10> Arthur: ack beat me to it :P
<10> callipygous: no you do
<19> i read you don't, it slows things down
<21> callipygous: yes you do
<19> and ive had things work fine without it
<10> callipygous: that's only if the index is the result of an evaluated expression or variable
<19> wish I had that url, I wasn't sure if it were right
<19> what does that mean?
<10> PHP *should* spew runtime warnings about that, though things will work as expected mostly
<10> callipygous: if you're doing something like $_SESSION[$variable_name] or something similar
<10> then you don't need the quotes because it automagically evaluates that to a string as needed :)
<19> what about $var = $_POST[blah];
<7> hey liggy!
<22> how can i cut a string down to only the first 2 or last 2 chars
<21> hey Jymmm!
<10> callipygous: same thing. any static index into an array needs to be a string (so quote it)
<21> how ya doing darlin?


Name:

Comments:

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






Return to #php
or
Go to some related logs:

#fluxbox
kubuntu to ubuntu upgrade
#css
#debian
shoewall
#css
Multiple available KDE sessions
smtproutes tls gentoo
removing nvidia tls links
etch sata_promise



Home  |  disclaimer  |  contact  |  submit quotes