@# 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 31 32



Comments:

<0> It seems that most interesting jobs these days are compound jobs.
<0> You really can't work in Master Control anymore without knowing at least an intermediate level of networking.
<1> CWhiz: CNC is huge.... just search ebay for 'CNC' and look at teh hit counts on most things... it can be in the thousands and that's on a regular basis too.
<0> What's it stand for, anyway?
<1> CNC == Computerized Numerical Control
<2> i'm trying out Debian's "paranoid" php.ini, and for some reaso when i try to connect to mysql, php ends up connecting as www-data@localhost with no p***word rather than using the credentials i specified. how might i fix this?
<3> ok i hunted down the error
<3> [Fri Mar 31 03:03:34 2006] [alert] [client 24.160.208.146] /home/sellout/public_html/content/blog/.htaccess: php_value not allowed here, referer: http://lanceslife.com/index.php?content=poetry
<3> now, how do i fix it
<3> lol
<0> Timeline: register_globals is probably off, which means $favcolor is empty. Therefore, it doesn't equal Blue and the else block executes.
<4> gimmulf, i don't konw :(
<0> Timeline: Err, $FavColor. (PHP is case-sensitive.)
<5> ok np, thanks for your help :)
<0> Jymmm: ahh
<6> Hey,



<7> CWhiz would adding $FavColor = $_REQUEST['FavColor']; fix that for Timeline?
<8> CWhiz: Cl***es/functions are not case sensitive, AFAIK.
<0> kuja: Okay. Variables are though, right?
<6> What is the best way to transfer an error ( Wrong Username/P***word ) between pages like this: index.php?act=login ( main login form/page ) it then goes to -> index.php?ac=login&op=login ( This checks the user's information ) - if there is an error, go back to index.php?act=login - how can I transfer the error from one page to another?
<0> chisler: Yes, but it's probably a better idea to just use the $_GET directly.
<1> CWhiz: It's kinds funny... Before all this, you would have never hear me say: .010" is WAY TOO BIG
<6> I did use Sessions, but I found the bug of when you go back to the website, the error message will display
<7> ok, thanks
<0> Jymmm: :)
<9> hi all - a noob question - how would i do a replace of " (double quotes) with \" with str_replace to be able to save human input to a database ... will str_replace('"','\"',$myData); work ?! or is there a nice function to make data db-save-able ?!
<0> AlexC_: Well, the simple solution if you do it that way is to clear the appropriate variable in the session when the login is successful.
<0> _ita: If its a MySQL database, http://www.php.net/mysql_real_escape_string
<6> CWhiz, Yeh I was going to do it that way, but - say a user attempts to login and fails, he then closes the browser for some reason. When the user tries to login again, it will display the error message because it's in the Session var
<9> wow ! CWhiz - thank you! exactly what i (real_) need .>
<6> It will display the error message, even before the user has attempted to login - if you see what I mean
<10> Having a little problem with sessions. I have a user log in which all works fine. However, I want to stop any activity after a certain amount of time. Any suggestions? I am using session_cache_expire() but it doesn't seem to do what I want.
<0> _ita: Other databases have similar functions, as do database abstraction/connection layers. Also, consider doing validation of the data before blindly inserting it into the database. For example, AadkfjDI is clearly not a phone number.
<9> sure .. its more the fact that i cant rely on the user entering NO " or ' or other special chars in whatever combination .. data for int fields i normally (int)$var anyways
<0> AlexC_: It's not hard to add the error message to your form when you get an invalid login - you just set some variable that gets output with the form code. That's how most scripts do it, and they don't need to worry about sessions or form fields or anything like that.
<11> CWhiz: It is off, I read that it is now turned off by default for security reasons, is it really a good idea to turn it on?
<0> Timeline: I wouldn't, if you can help it. The main reason it's off is to keep you from inadvertently doing something stupid, but turning it on isn't a security risk in and of itself.
<0> gary_: You could set a timestamp in the session and check whether it's within the valid timeframe.
<12> hello, any one use hostng eapps.com?
<11> CWhiz: *nod* That was the feeling I got from what I read on php.net, but was still unsure.
<11> CWhiz: How can I turn it on?
<13> Hi, Im working on a page system, It includes pages from a folder when you set a var, ex, ?page=page name.. but i want to set the title of the page (<title>) from the page files i create.. Can i make a var like $title in the page file? If so, How would i get the main page to read it?
<0> Timeline: RTFM.
<0> Timeline: You're looking for register_globals.
<13> CWhiz, any insight on my problem?
<10> CWhiz: good idea. Just didn't know if there was a built in function. Thanks again.
<11> hehe, I am in the process of reading some stuff but have yet to find the actual command to do it.
<0> gatoradges: Just import the page file before you output the header.
<0> Timeline: My hope is that once you've figured out how to do it, you'll either a) have changed your mind or b) completely understand how to avoid writing bad code with it on.
<1> !+gv
<14> Global Variables - this will show you everything that php sees: <pre><?php print_r($GLOBALS); ?><hr size=5 noshade><?php var_dump($GLOBALS); ?></pre>
<1> Timeline ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<11> Jymmm, thanks, not sure I understand what all that means tho
<1> Timeline out it in a file, name it gv.php (as in global variables) and run it.
<1> s/out/put/
<11> ok
<11> ok how should this be helping me?
<1> the description was self explanitory
<0> I'm not sure myself. :)
<11> yeah but what is it that php sees that I need to see, there is alot of stuff on that page
<1> Timeline add it and the end fo your script, then look for the $favcolor variable and see wher eit is
<11> ok
<0> Jymmm: I think he knows about superglobals, but doesn't want to use them.
<1> lol
<1> [00:34:54] * MBzle (n=bitar@209.221.239.20) has joined ##php
<1> [00:35:00] * MBzle (n=bitar@209.221.239.20) Quit (K-lined)
<11> [FavColor] => Blue
<11> No, what's a superglobal?
<0> Timeline: $_GET.
<10> hmmm, can you see anything wrong with this?
<0> Timeline: And the other arrays that start with $_.
<10> $later = time() + (0 * 0 * 0 * 30); // + 30 seconds
<0> gary_: Anything times 0 is 0.
<10> $now = date ("G-i-s"): gives, hours, minutes, seconds
<11> Im just doing what the tutorial Im taking said, and that didnt work, but my guess is that it was made before the register_globals was turned off by default.
<15> hi i am new to php, i need to write a small program which takes an input file..uploads it on the server and then runs a shell script over it and creates zip file for the given output and prompts user do download that zip and once downloaded it delets the user uploaded file and output created



<15> i need to know to start over it
<10> $then = date ("G-i-s", $later);
<10> it should say: then is the time but plus 30 seconds
<15> how to i execute the binaries on my server..do i need to put them in cgi-bin ?
<13> CWhiz: Im using a portal on phpBB, and the includes/page_header.php file there is ('PAGE_TITLE' => $page_title,), I need to define this somewhere else, but if include page_header after all the other parts of the page, it messes the page up.
<16> wie sage ich gcc das er die fehlenden header in verz. bla suchen soll?
<16> oh sorry
<10> thanks CWhiz
<0> ServerCrash: Nope. Just use the functions at http://php.net/manual/en/ref.exec.php
<11> ok, well FavColor is under both HTTP_GET_VARS and _GET
<15> is shel_exec good one
<1> HTTP_BLAH_VARS is depreciated
<15> CWhiz, let me look
<0> Timeline: The "correct" way is $_GET.
<11> so do I use $_GET in the if statement then?
<0> Timeline: Correct.
<1> !+xss
<14> [XSS - Cross site scripting] NEVER accept user input without some type of filtering . See: http://en.wikipedia.org/wiki/XSS and http://www.technicalinfo.net/papers/CSS.html
<17> is it actually depreciated, or deprecated?
<17> I always thought it was deprecated but I've been seeing depreciated a lot lately
<11> webmonkey needs to update their tuts
<15> CWhiz, i have a cpanel based normal hosting ...witll shell_exec will run my binary program there
<0> choongii: Deprecated. Depreciated is a financial term.
<18> choongii: deprecate
<17> alright, thanks
<0> ServerCrash: It depends on how your host is set up.
<17> *yay my brain still functions
<11> Is there a tutorial out there that covers all the new stuff after RG was turned off?
<17> $_GET/$HTTP_GET_VARS hasnt anything to do with register_globals really
<13> CHwiz: Any ideas?
<15> CWhiz, its regular setup..i think generally hosts dont allow executions of binary scripts in normal folders
<15> it needs to be cgi-bin
<0> Timeline: It's really not that hard. Basically, you just change $foo to $_GET['foo'], $_POST['foo'], $_COOKIE['foo'], and so forth, based on where the data comes from.
<11> is this correct? if ($_GET ['FavColor'] == "Blue")
<19> Timeline: $_GET['favColor'] === 'Blue'
<5> Any regex guru alive?
<0> Timeline: http://www.php.net/variables.predefined covers the basics.
<19> Timeline: no space, ===, and single quotes
<11> K I think I'm done using webmonkey,com :P
<20> gimmulf, just ask your q
<0> gatoradges: Unless you want to get fancy and read the file as source to get the title, your best bet would be to re-arrange the code so you can include the page contents before the header.
<21> is there a simple way to add a specific amout of spaces to a string or do i have to loop through? simple as for exmpample in perl 'print " " x 10'
<19> strpad
<0> Timeline: Webmonkey's an okay overview, but it is a little outdated.
<21> thanks aidan! its str_pad
<0> kon: Or str_repeat, depending on what you want.
<5> NET||abuse: im using this at the moment: preg_match("/^[[] {0,9}$key {0,9}]$/", $hand) but it doesnt work, i want to find $key when it has an [ less than 10 blankspaces to the left and a ] less than 10 blankspaces to the right
<11> Yeah webmonkey never said anything about super vars
<21> CWhiz: even better/simpler :)
<0> Timeline: They didn't exist at the time it was written :)
<11> I think my script is working now, thanls
<19> gimmulf: escape your []
<11> thanks
<0> Timeline: No problem.
<20> /^\[ {0,9}$key {0,9}]$/
<20> something like this?
<19> (?: ){0,9} atleast
<11> BTW, what happens if I use == insted of ===?
<19> Timeline: you're not comparing them as strings properly
<5> NET||abuse: hmm no errors but doesnt seem like it finds any results but i know it should
<0> Timeline: === requires that both sides of the === be the same type. == means that they only have to be equivalent
<22> Timeine: === means that it should also be equal in type
<20> /^\[{0,9}$key/
<22> CWhiz: You type faster.. Hmmz.
<19> NET||abuse: preg_escape the $key too
<0> Timeline: So (1 == true) is true, but (1 === true) is false, because 1 is not a boolean.
<0> berry__: I do?
<20> gimmulf, wait,, you see if there are other bits of text around it that won't work
<20> /\[ {0,9}$key {0,9}]/
<19> I don't think {0,9} is valid
<19> you need either [] or () before it
<0> Wouldn't it just match the single preceding character if you don't have those?
<5> hmmm it found some but not all, NET||abuse there also can be other characters between [ & ] not just blankspaces :)


Name:

Comments:

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






Return to #php
or
Go to some related logs:

tvtime requires hardware YUY2 overlay support from your video card *** driver.
gentoo glxinfo libgl verbose
#redhat
acmera 21
#linux
ubuntu access concentrator did not respond
sql into outfile collapse
gentoo how to apply a patch to portage
irssi ubuntu iso 8859
mdadm broken-drive



Home  |  disclaimer  |  contact  |  submit quotes