| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Comments:
<0> is there a way to tell what the upload speed of a foreign host is? <1> devide the time it took to upload <1> by the size of the file? <0> that's ***uming that the site isn't lagged in the first place <1> i guess <1> you might be able to cheat <1> and, on the upload page <1> put a 100KB of data on it <1> do a start microtime before <1> and a get at the end <1> then load that into a hidden box <1> then send that with the file <1> the smaller the file, the less accurate, but it's simple <2> goddamnit <2> when I was a freelancer and was desperate, I couldn't find work <2> now i HAVE work for a freelancer and I can't find ****
<1> i'm a freelancer <3> you're a freebaser <1> but would you really entrust your work to someone who ****s as much as me <4> god, i'm getting really tired of being someone's linux tech support guy <4> here's how i fix stuff: play around with **** until it works <4> i'm not good at knowing exactly how to fix something because once i fix it, i stop breaking it <3> un-irregardless: i'm like that with almost all win32 applications. someone asks "how do i do this?"... well, i dont know offhand, but i'm sure it'd take me 30 seconds to find it/figure it out, but 30 minutes to walk you through the same <4> heh yeah <4> this guy has been bugging me at home, at work, constantly <4> i turned my cellphone off because of him <5> when running a php thru phpcli, why does it seem like it cannot keep an $link = mysql_connect.. thru the whole file? since i cant use the $link var in the mysql_query's <6> ... <6> that makes no sense dude <5> i dont realy know <7> bbl: Zz. <5> its so wierd. <5> the connection is successfully initialzed, but later on in the file i cannot use it. <6> did you delete it? <6> did it disconnect? <6> how long are you trying to hold it for? <6> put yer code on teh pastebin <5> no the code is for 500 lines, its a code that scanns tru some textfiles <5> Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in <= in every query <4> are you sure it's just not connecting? <5> http://rafb.net/paste/results/nZiUzv41.html <5> well i use that code to verify that its connecting <8> Hi guys, is there a way of displaying the number of current connections to an SQL database in php. I keep getting a too many connections error but my limit is already 1000, I would like to be able to monitor how many connections there are via php. Any ideas? <5> and it works to select the db, but in a query. so wierd <5> not in a query* <6> Tmp`: "to the SQL database" doesn't tell us which SQL database. But generally no, that's an internal thing that probably isn't tracked by PHP. <6> the best you could do is ask the SQL database server and try and figure out which ones are coming from PHP <9> Tmp`: if your limit is 1000, and you're reaching it, then you probably have another problem anyways... <6> Tmp`: it looks like you're not dropping connections properly. <8> ok, it's the MySQL DB that the main site uses, I've got it to display the number of threads on the MySQL server, does this realte to connections in anyway? <8> I know, but I didn't code the whole site and it is m***ive. plus we do get 200 concurrent users at times <9> show status; i think will tell you the connections <6> tomas`: so when you run this does it hit the die() part? <8> so I'm trying to find where the connections are not being closed <6> @mysql_select_db <10> (PHP 3, PHP 4, PHP 5) <10> bool mysql_select_db ( string database_name [, resource link_identifier] ) <10> Select a MySQL database <10> http://www.php.net/mysql-select-db <4> http://www.timesonline.co.uk/article/0,,2-2072201,00.html <4> crazy. <6> Tmp`: learn to use mysql_pconnect() <4> it's not even useful to have a connection that fast <8> Zen: do I really want a permanet connection though? <6> Tmp`: its not permanent, its persistant, thus reused. pconnect reduces the overall number of connections used by pooling them <8> Zen: ah, that makes a lot more sence for a busy site. <6> yup <8> I'll look into it, but either way it requires sifting through pages of code and it's not exactly well laid out or even commented :S <4> all you have to do is replace mysql_connect with mysql_pconnect <4> not that difficult :P <8> fair enough - lol <6> a simple sed+awk script will take care of it. <5> Zenethian: no never, thats whats wierd. <6> Too bad I don't know sed+awk. <6> tomas`: so then what error do you get? <5> Zenethian: The error comes when im trying to do a mysql_query("",$link); ... but not when im trying to choose db then its ok - Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in <6> oh
<3> seems pretty straight forward <6> @mysql_query <10> (PHP 3, PHP 4, PHP 5) <10> resource mysql_query ( string query [, resource link_identifier] ) <10> Send a MySQL query <10> http://www.php.net/mysql-query <6> why are you specifying the link anyway? <6> its optional.. <6> and a lot of times buggy from what I've seen. <5> ok i'v never had problem before <8> so no-one have any ideas on how I can track the number of active database connections? I have a shell acocunt on the MySQL server but it is a shared server? <3> tomas`: $selected = mysql_select_db('xx', $link); <6> it isn't easy no. <4> show status; probably shows it <3> that's not a mysql_query <3> and how are youusing $selected if at all? <8> no, I've tried that only the number of threads <6> Two-Bits: but he's saying later on when he does the query it breaks <8> but do threads equate to connections? <3> Zenethian: yes, and i want to see the entirity of the code to find out what happens to $link <6> Tmp`: SHOW PROCESSLIST might help <6> Two-Bits: hehe, good point <3> according to that code, it should die on anything but a link resources <5> ok sure i can paste it, but i will priv the link to your private since i dont want the code to leak <8> Zen: tryed that too :) seems to go up as traffice increases, but there seems to be 3 theads generated per page view then they just go into the sleep state for 1000 secs then vanish. Would this indicate 3 connections left open? <6> Tmp`: yes, and further it would show that you're inefficiently using connections. :P <3> tomas`: /notice would be preferred <8> Zen: so does 1 thread = 1 database connection? <5> Two-Bits: sure. <5> Two-Bits: works when i removed all the $links, an pointers. it worked, wierd. <3> tomas`: are you going to pastebin or otherwise make accessible the code or not? <3> if your code performs the link check you had before, yet claims it's not a valid resource later, then either you're doing something to $link, or perhaps the link is being closed or something. either way, i could probably spot it right quick if i saw the code <5> well it works now, but still strange, but as long as it works im glad <11> grraaagghg <11> some of the best code i've ever written just "works" <11> and i don't know why <11> like my poker hand checker <11> excellence through ignorance is a beautiful thing <3> dont let your prospective employers hear you say that <11> nah, that's one i keep for me, down inside <12> heck you s hould know why especially if you wrote it <11> then again, if i ever apply for a software job that requires clearance, they'll hit one of you up for logs <6> Some of the best work I've done has been out of sheer stupidity! huhuhu <11> it's true <11> i get plastered and write some nifty code <6> that means You ****<tm> <11> i look at it the next day and go "hey, that's rad" <6> haha <6> actually I did that once <6> only it was painkillers after surgery <11> or "who the heck wrote this? what was this guy thinking?" <6> except I kept thinking I was coding for penguins <11> those evil penguins <6> while I was doing it I kept thinking "WTF ARE THESE PENGUINS DOING IN IT" <6> it was hilarious. <11> i want some of that <6> when I looked at the code later <11> hook a brotha up <6> (it was C code) <6> it turns out I had a pointer called pEngine <11> rofl <6> and it was all over the code <11> i was expecting /* the penguins made me do it! */ <6> and I kept reading it as penguine <6> hehe <6> I was like "DOH" <6> it was ****ing funny <6> my friend at the time was cracking up <6> cuz I called him before I looked over the code <6> but after I had my little trip <11> i was watching american idol one time and without realizing it
Return to
#php or Go to some related
logs:
#photoshop #kl #kl #india #india #worldchat #allnitecafe #chat-world #photoshop #chat-world
|
|