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



Comments:

<0> bit stupid of me
<1> ah **** it, I really need to try and get some sleep now, it's 3:24am
<1> sorry dude
<2> :( thanks anyway
<3> is there a really easy package that will make it easy to parse flickr/del.icio.us rss feeds for an aggregator website?
<4> I'm no serious PHP developer (actually I'm a sysadmin). But somebody sent me some code with a mysql_connect() in a function. Wouldn't it be a better practice to use mysql_pconnect? And, perhaps better, would PHP recycle an existing mysql_connect() if it was outside of the function?
<4> It just seems kind of wasteful to open up a new db handle each time the function is called.
<5> jules: well, it is an argument that has existed since php3
<4> zircu: Hey, I didn't write the code ;)
<5> jules: if you have mysql_connect, then set your mysql server to spool thread connections.. you will never know the differnce
<4> zircu: Ok, great. That's a php.ini thingie?
<6> jules: it would not be terribly efficient to call a function that opens/closes database connections repeatedly in the same session instance. Opening once per session instance is not that bad...local connections to mysql have quite low overhead for connecting
<5> jules: it is a mysql config thing
<4> JAJMaster: It's pretty low usage. But I'm always willing to learn and keen to do the right thing.
<4> zircu: Thanks, I'll look into this.



<2> how do i prevent php commands from appearing as just part of the text on a html page?
<7> michal_: you read a tutorial on php.
<7> michal_: http://ca.php.net/manual/en/tutorial.php
<2> if only i had the time. i just want an error that will hint at what option is wrong on the server :/
<2> all error reporting seems to be turned on
<7> michal_: its probably you doing something stupid.
<7> a. you forgot to name it a file.php
<2> i'm not doing anything
<2> i didn't write the php
<7> michal_: then php probably isn't turned on
<7> and / or installed
<2> all the other php stuff is working
<2> just this file upload script with the problem
<2> and only on this system
<5> michal_: how do you mean you want to prevent php command from appearing...
<2> just something Holygoat was tryin to get me to do. but i think he ws of the mark and didn't understand the problem i was having
<2> so it's probably no relevant
<2> this is the actually script being called
<5> michal_: what OS?
<2> http://pastebin.com/725827
<2> and it's just that the file doesn't get uploaded. no errors
<2> linux
<5> michal_: make a phpinfo() page in the same directory that the upload script is in
<8> hi i'm using setcookie() with the "domain" value, what do i set it as. I set it to "bob.com" (eg), but then when users visit via www.bob.com the cookie doesn't work ... do i need to add a cookie for every subdomain
<9> tried setting it to ".bob.com" ?
<5> michal_: oh btw.. fire the person writing code on your server
<8> will that work for http://bob.com though ?
<2> not our server. i just have to fix the problem :/
<5> fire the person that wrote the code
<2> how?
<7> dimitri1: you have to put ".bob.com" instead of just "bob.com"
<2> he's not my employee
<9> dimitri1 - try it and see
<6> gotta love 8 character indents :(
<9> ew
<5> michal_: then refuse to make it work till he fixes the script so it is properly secure
<5> JAJMaster: whats wrong with ts=8?
<2> zircu: i don't have the luxury of making anyone do anything. and as such i am looking for another job.. but for now i have to **** it up
<5> i just make my window 160 chars width
<6> zircu: horrible waste of real estate : <---- my opinion of course
<5> michal_: well, then i need more description on.. it doesn't work
<5> michal_: if it isn't your code i'm not even going to consider walking through it to see where the problem is
<8> also another question i have a md5'd string in a cookie, and i want to match it against a non md5 value from SQL so i need something like SELECT * FROM `table` WHERE md5(sidval)=$_COOKIE['sidval']
<8> is that possible?
<5> michal_: for how to get error reporting.. it depends on your level of access to the server.. other wise at minimal.. put a ini_set('error_reporting', -1); at the top of the script and view source of the request
<5> dimitri1: did you try it?
<2> zircu: i have root access
<5> dimitri1: you will want to make sure $_COOKIE['sidval'] is valid of course
<5> $sidval = $_COOKIE['sidval'];
<5> and make sure you dont have sql injections
<5> = " . mysql_real_escape_string($sidval);
<5> michal_: did you create a phpinfo() page?
<2> zircu: yes. and i messaged you the url
<5> of course you'll want to quote the mysql escaped string with 's
<5> michal_: i dont get msgs
<4> Which of the MVC projects is everybody hot about?
<2> zircu: http://www.hydrobiology.biz/new/phpinfo.php
<5> michal_: the first thing i notice.. upload_tmp_dir setting.. iirc it defaults to /tmp in php
<2> well i couldn't message it :P



<5> michal_: second check the /var/log/message for any errors
<6> michal_: also, you would be limited to 2meg uploads (don't know if that's a problem)
<10> Bah, I can't stand MVC, closest I'm coming to that is Smarty
<2> if only i didn't have to wade through billions of martian source messages :/
<5> michal_: if these quick things dont result with anything... ask the person that says its works on there system for there phpinfo() result and look for values that are different
<5> michal_: tail -F /var/log/message | grep php
<2> zircu: that's a good idea. thanks
<5> michal_: i'm glad you understood that, i missed a few words in there.. my mind was thinking faster than i could type
<2> hmm.. nothing logged in messages
<2> zircu: http://www.hydrobiology.biz/new/upload_private.php is the daft script
<11> does php on linux build with unixODBC as a default now?
<5> gandhijee: probably not
<6> gandhijee: yeah, I'm guessing not
<5> considering that odbc has several methods to connect with
<12> I am using ereg() and I've been having problems with it thinking that I want to match the character $ rather than the end of the line. Is there any way to fix this?
<5> richjkl: i think its been about 4 years since I've touched ereg() since preg became availble with php
<5> ^ by default
<13> what's wrong with this: $rs_check_user_available = $con->query("select us_id, us_username from user where us_username=$add_ag_username");
<14> http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&Item=4461991978&Category=15825
<13> i do echo $add_ag_username and the result is john
<13> but didn't show result :(
<13> if i change the code into this: $rs_check_user_available = $con->query("select us_id, us_username from user where us_username=john");
<13> then the result is show out
<15> ^ anyone wnat to buy a gas station?
<13> what is the problem?
<5> itrebal: only if i get all the profits
<16> CyberMad: the first obvious thing that comes to name is your var names are obscenely long for what they are
<5> CyberMad: consider this... 'select a from table where b = c';
<5> CyberMad: i have no clue what your ->query() does
<13> ok, let me paste it to pastebin
<15> Kog: at least they arn't ****ed up names like $sfldlkjsfdlkj = ...
<16> itrebal: obfuscation? isn't that supposed to save jobs?
<5> i'd sort of agree with itrebal's comment
<15> and i've seen people get fired for names like that
<17> yeah - i never bitch about long descriptive variable names. they're so much better than erring in the other direction
<17> being able to skimread the code later is priceless
<18> haha
<15> tetsu? since when!
<18> i was just in here to look for my peeps
<15> hehe
<18> liat's gone but at least you're here
<15> whats up?
<5> peeps? i havn't heard that term in a loooong while.
<13> i try make the readable :)
<13> i try make the codes is readable :)
<18> zircu, I get it from my 50 year old friend on kdx
<13> ok this is the pastebin: http://pastebin.com/725872
<5> tetsu: ironic that is
<15> lol
<13> please check my codes... what's wrong with it
<12> preg_match("/\/talk$/", $formatted_article) <-- This isn't working. :(
<5> richjkl: how isn't it working?
<12> Well, I want to to match "/talk" at the end of a line, but it isn't.
<5> CyberMad: indentation?
<13> zircu yes.. i think it already indent? sorry if i don't understand what you mean..
<5> richjkl: what is the content of $formatted_aricle? does it have line endings as well? you might want to add the /s modifier to the expression
<5> CyberMad: well beside that line 6 is all screwed up on indention.. after you post your pastebin code, give a description of your problem instead of asking what is wrong with it
<5> CyberMad: and something people can focus on, your success rate for help will increase
<19> hey all, I have a page redirect that works fine with FF, but not with IE, can someone help me with it. Its really late and I have a deadline in the am. (I need sleep)
<13> ok, i will fix it.. :)
<12> zircu: At the moment, I have $formatted_article set to richjkl/talk
<5> age6racer: most likely you have a #web issue or a #html issue
<19> http://rafb.net/paste/results/Gthipp97.html
<20> how can I break the connection, but keep the script running?
<15> :/ i'm not even comenting on that
<15> Shadow_mil: you mean have it keep executing if you close the window?
<5> richjkl: so you preg_match('#/talk$#', 'richjkl/talk'); results with FALSE?
<5> your*
<20> itrebal: no, I want disconnect, have the server close the window and keep running in a sence
<15> http://us3.php.net/ignore_user_abort try that
<13> does using long variable name is not good?
<5> CyberMad: we just need what sort of problem you seem to have with the code you have
<13> bcause you'll be surprise i have like this:


Name:

Comments:

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






Return to #php
or
Go to some related logs:

xgl tvtime wiki
ubuntu startx cannot stat
#centos
ultima 7 serpent isle ubuntu
how do i update myh fedora
#perl
hoobop
sequ3l
latitude d620 debian etch
zorzside



Home  |  disclaimer  |  contact  |  submit quotes