@# 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> babo: and search for "UUID"
<1> I've got a program that's been running for 10 days, only using 2% memory
<1> Granted it doesn't do much
<2> Right
<3> the error occurs on a pdo request (st->execute())
<2> You wouldn't want to write an IRC server, or a HTTPd or anything in PHP.
<1> Heh
<1> That's probably more of a speed issue
<2> It would be too much of a pain to keep track of variables, might as well use a language that automatically takes care of it for you.
<1> I dunno about garbage collection. I'd have to experiment with it
<2> I just let Python or Ruby just collect unreferenced objects :)
<1> Should be easy enough to test
<4> maver: thanks, I've read it ... now what's the best way to go about using it do you reckon ?
<1> Write a function that creates a few KB of strings, call it in a loop, then check the memory usage
<5> ahh. So. I started a new job last monday, and have gone to battle already with the "Senior Programmer"... My job is to take 5 years of php ****e-code and rebuild new web site (hundreds of scripts),
<2> Dragnslcr: Give it a shot, I'm off for a smoke break ;)



<1> Heh, I'm off to work
<5> i say, "i'd like to consider smarty." but because he doesn't know wht it is, i get, "No. write your framework from ground up."
<1> I'll let ya know if I get chance to play with it
<2> Alrighty
<5> {sigh}, this is going to get ugly.
<2> m4lu6: I agree with not using Smarty in the first place.
<2> Now, off for the break.
<5> consider != use
<5> All options are on the table, imho.
<6> i have this switch statement http://pastebin.com/630650 .... but is going thru the last 3 cases even when $crowddiff does not meet those conditions ..why?
<6> anyone?
<4> Hi guys, I want to use a uuid to index my records ... how would I go about doing that ... something like $sql = "INSERT INTO TABLE (name, index) VALUES ('$name',UUID())" ... perhaps ???
<7> babo: ill put something on pastebin for you give me a sec
<4> illegalc0de: thanks
<4> zond3d: you can't use the same variable for your switch and for your cases ...
<2> zon3d: That's not how you use a switch in the first place.
<2> Why are you adding conditional expressions into a switch?
<2> You have conditional statements like if/elseif for that kind of stuff.
<6> yeah i've changed it into a lot of if elseif statements ... still doesn't work tho
<6> it still runs thru the last 3 even when not true
<2> Pastebin the new code.
<6> ok
<6> http://pastebin.com/630667
<4> zon3d: you're doing a if ($crowdiff = $crowdiff + 5) kinda thing ... you're comparing a variable against itself
<8> Oh boy
<0> babo: INSERT INTO [mytab (myfields)] VALUES (UUID(), ...)
<8> that's it, I'm hiring eastern europe freelancers..
<2> zon3d: Now, explain.
<8> babo: $crowdiff = -5
<2> s/= -/-=/
<6> so i should set variables for each ($crowddiff-5) ($crowddiff-50) etc
<2> zon3d: What isn't working, what is it doing instead?
<7> babo: http://pastebin.com/630671
<0> zon3d: I think not
<6> doing the last 3 elseif things even when not true
<4> zon3d: why would you want to compare a variable against itself ? $crowdiff is never going to be equal to $crowdiff +5
<6> LOL ... whooops
<7> babo: that would obviousley be from a html form
<6> i see, thanks for ur help
<0> $crowdiff is always >= than $crowdiff - 5 :-)
<7> using GET
<6> i used wrong variable
<4> illegalc0de: I'm wondering as to how I should generate uuid as opposed to how to use it ... but thanks anyway :-) ... I think I have it now
<7> ok
<7> babo: $rand maybe and use a check to see if the number is in the db befor entering it
<4> illegalc0de: thanks ...
<0> illegalc0de: UUID() is supposed to generate a random value each time it's called
<7> i use that one in one of mine but i need to create a loop untill it finds one that is not in the db
<7> maver: ok
<0> illegalc0de: np. however you could use an autoincrement field to avoid that loop
<7> yea i could frorgot about it when i started that lol
<9> Hi, do anyone know how to do an transparant triangle using gd2?
<7> but another thing i need to know is how would i change say "www.mysite.com/index.php?id=654321" to "www.mysite.com/654321"
<9> illegalc0de: mod_rewrite
<7> ok thanks
<7> searching google now
<7> :)
<7> omina: id have to install mod_rewrite on the server?
<6> if u have apache, it should already be enabled
<7> ok
<7> ``The great thing about mod_rewrite is it gives you all the configurability and flexibility of Sendmail. The downside to mod_rewrite is that it gives you all the configurability and flexibility of Sendmail.'' -- Brian Behlendorf - Apache Group



<7> lol
<10> hi
<10> I want to know if I set PHPRC variable with SetEnv in apache config why does php-fcgi does not search in this dir
<7> i cant start to learn about that yet ill keep the way it is at the moment ill try it later but thanks ill remember that
<6> me again - http://pastebin.com/630709 fixed up, but still running it when it's not really it..
<11> hmm what does this mean: $modified_since = $cache->created <= $timestamp;
<11> syntax wise I mean
<2> alienbrain: $modified_since = $cache->created; $modified_since <= $timestamp;
<11> kuja: here < is the less than operator ?
<2> ***ign $cache->created to $modified_since. "$modified_since is less than or equal to $timestamp"
<11> kuja: so $modified_since is gonna end up with a true or false ?
<2> No.
<11> grr :D
<11> lemme read this again
<2> It's a rouque expression.
<2> It's lying there doing nothing.
<11> kuja: does it equal to: $modified_since = $cache->created; $modified_since = $modified_since < $timestamp; ?
<2> $modified_since <= $timestamp will return a boolean. Because that's what <= does, it converts both sides to numeric values, compares, and returns a boolean.
<2> alienbrain: No.
<2> $modified_since <= $timestamp is doing nothing.
<2> It's just sitting there.
<11> kuja: omg sorry man, got you.
<12> Oh man, I have a serious beef with PHP now.
<2> Where is it though?
<2> Is it just lying there on a line doing nothing? Or is it in a conditional somewhere?
<13> hello people, is there a tool helping me restoring my database
<12> Any developers around, I need to have the reasoning behind something explained to me.
<11> kuja: not conditional, and it can be found in Drupal code actually
<12> When session_start(); is called it unserializes any object stored in the session. And if the object stored is of a cl*** type that has yet to be defined, it's flagged as unknown
<12> So why, oh why, can a facility not be created to cast the object once it "has" been defined?
<12> Like: session_start(); require_once "MyCl***.php"; $myCl*** = $_SESSION["MyCl***
<12> Like: session_start(); require_once "MyCl***.php"; (MyCl***)$myCl*** = $_SESSION["MyCl***"];
<12> Would it not make sense to be able to redefine the cl***?
<2> Why don't you include the cl*** before the session_start(), and be happy?
<12> kuja: Because in a configuration script used by both back and front end scripts, I don't need to define one of the cl***es in question.
<12> The front end doesn't have knowledge of User
<12> The backend does.
<2> So?
<12> Both of them are configured by one script.
<12> So I don't need to require_once "User.php" in the configuration file.
<12> The front end won't use it.
<2> __autoload()
<12> But the config script has to call session_start();
<12> Yeah, __autoload(), but casting would be a more elegant solution.
<11> kuja: $modified_since should end up with 1 or 0 :p
<12> The logic of it escapes me. Why not allow type casting?
<2> Etriaph: You would get a better answer on news.php.net
<2> alienbrain: Not that code, no.
<2> Unless $cache->created is either 1 or 0.
<14> hello
<11> kuja: wouldn't that be the same as: $modified_since = ($cache->created <= $timestamp);
<14> mysql_connect isnt working well under php5 and mysql4.1?
<14> http://pastebin.ca/47600
<14> I get only: Connected successfully
<2> alienbrain: That does something different than the above code you had. That will ***ign a boolean, not 1 or 0. It will be true or false.
<15> when I use session_start(), some of my headers don't appear to function properly
<15> specifically, I'm trying to use Content-type and Content-disposition
<14> In MySQL4.1 and later, the default p***word hashing format has changed making it incompatible with 3.x clients.
<14> I found out mysql_connect() works on server versions >= 4.1 when your MySQL user p***word is blank because p***word authentication isn't done in that case, otherwise you need to use another connection method (e.g. mysqli).
<14> true?
<15> if I comment out the call to session_start(), things go smoothly and the file is downloaded. if I uncomment it, the content-type is ignored and there's no filename in the popup box asking me to download the file
<16> Hey, is it possible to set upload_max_filesize inside a script?
<1> joey[]- the basic idea is that PHP needs to be compiled against the same (or close to it) MySQL version as the server
<16> Cause I need to change the setting for a certain script.
<13> hhhhhhhhhhhhhhhhello anyone help me please,i need restore my database
<14> Dragnslcr, so you're saying that its true? I'll use mysqli then
<11> kuja: I know, but for the PHP intepreter, won't the two of them give the same results ?
<1> joey[]- well, specifically, MySQL changed the way it does authentication between 4.0.x and 4.1
<14> I see
<2> alienbrain: <?php $foo = 1; $foo <= 2; ?> This code does nothing really.
<1> So if the server is 4.1+, you need to use client library version 4.1+
<14> ok, i'll try now mysqli
<2> $foo will always be 1


Name:

Comments:

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






Return to #php
or
Go to some related logs:

postmans sort
Empornium takeover
gentoo MK_QTDIR
#gcc
binary downloader debian
ldcpp gcc4
udevstart init looping
remove ndiswrapper-1.1
k31th debian
installing lamp ubuntu Addtype



Home  |  disclaimer  |  contact  |  submit quotes