« first day (425 days earlier)      last day (4514 days later) » 

8:00 PM
Hey php gurus
I am having issues with mysql_real_escape_string
for some reason it has errors on out production box
Warning: mysql_real_escape_string(): [2002] No connection could be made because the target machine actively  (trying to connect via tcp://localhost:3306) in C:\inetpub\Ops-App\classes\AppController.php on line 187

Warning: mysql_real_escape_string(): No connection could be made because the target machine actively refused it.

in C:\inetpub\Ops-App\classes\AppController.php on line 187

Warning: mysql_real_escape_string(): A link to the server could not be established in C:\inetpub\Ops-App\classes\AppController.php on line 187
You get the idea...
what the frack is going on here?
 
The MySQL server is refusing the connection
 
Why?
protected function _mres($q) {
    if(is_array($q)) {
        foreach($q as $k => $v) {
            $q[$k] = $this->_mres($v); //recurse into array
        }
    }
    elseif(is_string($q))   {
        $q = mysql_real_escape_string($q); //LINE 187
    }
    return $q;
}
 
is it even listening on that IP and port?
 
Thats the faulty line.
yes!
this works fine on my dev box
 
I don't care about your dev box
we're talking production box here
and that line has nothing to do with the error
 
8:02 PM
@KevinPeno yes it made a connection. we see it in the mysql admin
 
No connection could be made because the target machine actively
 
and it gets other records...
 
Try using the second argument of that function
[, resource $link_identifier ] )
that needs the output from mysql_connect
 
@KevinPeno im using mysqli
What should i do for that?
 
This why are you using mysql_real_escape?
that's your problem right there
 
8:04 PM
idk why its trying to use localhost
the database is not local
@KevinPeno then how else can i do it?
This is my full thing:
 
mysql_* is !== to mysqli_*
no
please don't paste here
 
This is how i dont get bobby-table posts
 
@Neal you aren't getting a connection because you are using mysql functions vs. mysqli
see my link above, that's what you need
 
8:06 PM
@KevinPeno thanks ^_^
trying it now
MAZEL TOV!
THANK YOU! @KevinPeno :-)
 
np
@NikiC typo custum
 
@KevinPeno thanks
 
np, still reading. I like it so far. Good insight
@NikiC dumb question, perhaps. Does SplFixedArray use "real" arrays internally or PHP ones?
 
@KevinPeno I just added a paragraph on that at the end (ctrl + r)
 
Oh nice
@NikiC Do you think, based on that, it would be advantageous to make a dictionary class using fixedArray internally as well?
 
8:17 PM
@KevinPeno That wouldn't help. You would just emulate PHP's internal structure in userland - and that wouldn't be smaller :(
I think that PHP has some potential of shrinking those structures, but I don't know enough about the whole thing to look into that myself
 
Hmm. So you don't think bypassing the internal array would be that good eh?
@NikiC ah ok
Still 56b vs. 13Mb?
that's a huge case for FixedArray
 
56 vs 144 [per element] ;)
 
ah, I mis-read. Still.
 
i'll clarify that
 
@NikiC great article though. I'm not too savvy on PHP internals, so this is great. And it was written well for an internals laymen I think.
 
8:25 PM
@KevinPeno thanks :)
 
@NikiC Are you on G+?
 
nope :) I'm note one of those early adopters :P
 
Ah G+
The arabian desert of social networking.
 
heh np. I was gonna share, so I figured I could link to.
@Ozbekov Honestly, the only reason I'm on it is because I had a google account already. I hate having to create a new account anywhere and maintain that account.
 
It's an impractical pseudo-copy of Facebook.
It doesn't look like a copy, but they've done it subtly.
 
8:28 PM
And? Competition is good
 
I don't understand why they even need a Google+
There is no competition :)
Facebook is waaaaaaaaaaaaaaaaaaaaaaaay ahead.
 
@Ozbekov they basically already had it with "mygoogle"
 
Though it's full of morons.
 
all they did was sync the sharing model to the profile
 
@Ozbekov Why does MS need Bing and Yahoo need Yahoo? Google is waaaaay ahead :)
 
8:30 PM
Exactly!
 
lol
 
Well
Let me be more clear here...
 
Competition is good for the consumer
 
@Ozbekov apparently likes monopoly
 
Because it inspires improvement
 
8:31 PM
No, no, I'm going to clarify that.
 
This one is THE BEST, no one else should try
 
anyways, going to watch some movie now, laters
 
Yahoo and Altavista are older search engines. Back in time, they were pretty good.
 
See ya @NikiC
 
But "bing" is one huge disaster.
It's an embarrassment for the company.
Bing for MS and Google+ for Google.
I don't mind them existing.
It just looks embarrassing. You're really good at providing the best search engine out there, then you come up with something like Google+ that no one even cares about, and on top of that, they say "Google+ sucks balls."
Was that a bit more clear? :-D
 
8:33 PM
Just because it is "embarassing" in your opinion doesn't make them nonsense to all their consumers nor does it reduce the positives of competition in the market
Like I said, it works great for me :)
and they met all my needs
how's that "bad"?
 
It's not bad.
But when you move from something like Facebook to Google+
You say "what the fuck is this?!"
 
again, in your opinion. If facebook is better for you (for now) then you'll stay there untill you have a reason to move. :)
I'm not arguing against that
 
Because you expect to see all the functionality in there. And that is what happened for most people: they tried Google+ just for the sake of comparing with Facebook.
That, I agree with.
But "Bing"... That, dear sirs, is one completely different category! :-D
 
I'd disagree again. I've found searching for products and services much better on bing
technical topics and stuff, not so much
again, different targets/groups of people. Lot's of people love bing
so, while YOU can say what you have said, you can't pretend that your opinion, or the opinion of others in your demographic, are the word of all possible users of a product.
 
That's interesting - I find Google product search pretty well. Not only does it provide products, but also a list of stores and prices. Anyway.
Of course not.
 
8:39 PM
If it exists, it must be profitable. So I don't see it as a failure :P
 
All of the above are my opinions and they absolutely don't reflect the majority of what people think.
That be true, though whatever Microsoft does will be profitable :P
 
lol
is that so
 
Has a big fanbase :D
 
I'll let you believe that since it would take far too long to show all of the non-profitable failures from even the past year.
 
user895378
Question: It is my understanding that display_errors = Off means that regardless of your error reporting level (say, error_reporting(0);) error data won't be sent to STDOUT. Is this correct?
 
user895378
8:42 PM
sorry, I mean error_reporting(E_ALL | E_STRICT)
 
that option sets STDERR to redirect to STDOUT, yes
well, not redirect, but also send to
but you could still access it via STDERR
and/or logs (if error_log is enabled)
 
user895378
So with display_errors = Off I should never see error output on the screen in the CLI, for example?
 
user895378
Just verifying :)
 
user895378
And I'm talking strictly about php error output, not exceptions
 
@KevinPeno I'm sure there are, it was a mere generalization. Otherwise if profits < loss, they'd be out of business :P
 
8:49 PM
guys I have an urgent question...its not related..
 
shoot
 
Darkness is caused by absence of light right? Absence of light is caused by a shadow
then is our whole solar system infront of a massive Gaint that is causing a shadow over our solar system?
 
Well, yes.
But no
Second statement, No.
 
light has to reflect
 
You cannot light "vacuum"
Light has to be reflected for you to see it.
 
8:51 PM
if there is nothing to reflect it you cannot see it :)
 
so is the sun the only source of light in the entire universe?
 
nopez we have electricity for a while now
 
why is the whole solar system darkness pretty much...I have a feeling there is a massive giant whose shadow is causing darkness
 
@Nadal light is a particle.. like any particle it travels, has mass, has a speed, and is measurable in space/time
 
is NOT dark at all. Have you ever looked at the sky at night?
 
8:53 PM
those are the stars and the moon
sun's light beign reflected
 
yup hence it is not dark
 
the only things in the universe that are dark are those things that don't have light bouncing off of them and returning to the observer.
key word there is 'returning to the observer'
otherwise things are not 'dark' they are just not in a visible spectrum for your eyes to see any detail.
 
that is interesting :)
no one has fully explored the universe, there could be a mass thats thousand times bigger than the sun and emitting million times more light
 
on earth light seems to radiate because it is reflected through our atmosphere and off objects around us.
 
could it be a huge being exists out there?
 
8:56 PM
@Nadal are you implying that we see stars because the sun's light is reflected off them?
 
@ircmaxell Not the "suns" light
any light
And stars, no.
 
@Nadal if you could possible float in space with nothing around you sitting between earth and the sun you would feel like everything around you is dark (only because there is nothing observable for light to reflect off)
 
Stars have their own light :p
 
@ircmaxell no but we see the moon because light is reflected of itt, star's are having chemical combustions which releases light n why we see them
 
no I was taking issue off his wording, that made me do a double take
 
8:57 PM
OOOOOOOOOOOOO
 
@Nadal combustion is not what's happening. And it's not necessary for light to be emitted
 
@Nadal You mean like a God?
 
@rlemon that makes sense BUT, what if there was a MASSIVE ball blocking us from the sun, then we see no light from the sun
 
Like a monolith from 2001, only bigger :-P
 
if the ball was larger than the sun yes that would be true
 
8:58 PM
omg im so excited now, there could be soo many things out there
 
light being a particle also bends.
 
the ball only has to be bigger than earth to cast its shadow on us
 
and is effected by gravity (ever so slightly)
 
cloak shield yeah :)
 
8:59 PM
Oh and perfectly aligned with sunlight hitting earth's access to sunlight 100%
 
@Nadal the ball has to be bigger than the source of the light to avoid it's cone from casting onto the earth.
 
ooo
so
I agree with that
 
user895378
Ignore this if you saw me ask a similar question earlier and don't care ...
 
user895378
Even if I have error_reporting(E_ALL | E_STRICT), the display_errors = Off directive should prevent errors from being displayed. Is this correct?
 
einstein had a really good example with a basketball a golf ball and a lamp.
 
9:00 PM
but it also means there could be a HUGE source of lighto ut there like the sun thats being blocked by a massive massive ball and because of that ball we cannot see this other source of light that could exist
 
@Nadal we would see the light as light travels in all directions.
there would be a halo around the 'ball'
 
what really intrigues me is that when you go faster than light you will go back in time. (hypothetically, or is it?). or just how faster you go how 'slower' the time goes
 
@PeeHaa nothing can travel faster than light - as you increase speed time relative to you slows down and your mass increases.
 
oooo I remember seeing that einstein example too, I am going to refresh up on it seems so itneresting, one of those random thoughts you have sitting down out of nowhere
 
@rlemon: nothing can until it does
 
9:02 PM
so relative to you, you are travelling faster than light - but realistically you are not.
 
This conversation exceeds my brainpower.
 
@PeeHaa do the math. you at the speed of light === infinite mass === not possible.
 
Well... what about those neutrinos at LHC?
 
unproven
 
unverified though. and they did screw things up in the past. but hey it would be kewl
 
9:03 PM
neutrinos apparently time travel
 
wildly skeptical of that as well.
 
they are suppose to destroy when they hit earth's atmosphere but somehow they travel through time and hit our cells and destroy some cells
 
you can today travel forwards in time by increasing you speed (time travel at that point is relative to the non-observer)
@Nadal not at all the case
MIT pushed a particle into 'the future' a few seconds by manipulating the space around it with lights and lasers
they were trying to make a light screwdriver to assemble nano components.
 
I wouldn't say impossible. Lot's of things seemed impossible once and now it is every day stuff. It's just impossible till the theory is proven wrong (or it stays impossible and proven right)
 
@PeeHaa is the earth flat?
some things we can observe and know to be true.
 
9:06 PM
@rlemon time travel? they are already doing it with certain particles from the periodic table, they jsut cant arrange them in order for human or animal teleportation to be possible due to the large amount of cells
 
If we know it's true why are will still trying to disprove it? Are we also still trying to disprove the earth isn't flat?
 
@Nadal the point is that it is not actually time travel. you are just bending space/time around you (the particle) so it's time relative to you is moving much slower. (1 second to it is 10 seconds to you)
 
Wait wait...we are told the earth is flat an we are provided images and videos, we havent seen it outself..
 
@PeeHaa that was not a proof they were trying to make, it was an observation that has not been proven. Now they are trying to prove what they think they observed.
that would be like me seeing god in my alphabets and trying to prove it was him - would you say it's "questionable" or would you want me to provide proof to my claim before you even considered it.
see it
round
 
that could be a lie
made from 3d graphics
 
9:09 PM
@Nadal I could be a horse who learned to type.
 
LOL
 
wild speculations will be ignored from here on in
 
im jus kidding but I know what ur saying. What if there was a HUGE mass out there million times bigger than the sun, the sun's gravitaional field couldnt even move it
 
anywho - xmas party tonight and the boss just gave the green light to go home.
 
luckyyyy
 
9:11 PM
gravitational fields are proportional to the mass of the object.
 
I think you just gave me my green light to go home :P
 
lol
seriously - read Ray Kurzweil - The Age of Spiritual Machines and his book after that The Singularity is Near. Ideas and Opinions by Albert einstein and The world as I see it also by einstein
your mind will be blown.
 
yeah like you said "gravitational fields are proportional to the mass of the object" what if this HUGE mass is what the sun is revolving around but we are revolving around the sun just how juptier's moons are revolving around it, but in reality the sun and us are revolving around that mass but at super slow speed
I would be so happy if we made some kind of scientific discovery sitting at our workplaces talking in SO chat
 
@Nadal we are expanding from a universal center (still expanding faster) and each galaxie (like our own milky way) has a super massive black hole in it's center
we don't yet know which was the chicken and which was the egg. did the super massive black hole form as a result of the galaxie, or the other way around.
anyways, thats some food for thought for you.
i'm out.
bbt
 
wait wwait
i forgot what was that called, universe is expanding.
there was a name for it
 
9:23 PM
Guys, I'm a novice here on PHP/amazon and facebook logins. Can I get some help ?
 
@UmashankarDas If you haven't used Google, then probably not.
 
@LeviMorrison Thx for the advise. Appreciate u took the time to type such an illuminating reply. Have a great day
 
@UmashankarDas Oh, I'm fine with helping people.
But usually I just google what they want, read a few articles, and tell them what it said.
 
99% of the answers I provide are just me regurgitating the hits from Google.
 
@CharlesSprayberry Exactly.
 
9:28 PM
@LeviMorrison I just chalk it up to having better search engine skillz.
 
thx guys..really honoured..Tells me a lot..See you around
 
Hey man, if you want somebody to take time out of their day to help you...
 
@UmashankarDas What is the problem that you're having? Just ask. If somebody can/will help you they will.
 
Guys I have a question (actually two questions). I want to setup a versioning system for my code.
First: Is it 'normal' to add a versioning system on the live server or do you only use it on the development server?
Second: do you have any experience of a versioning system that works both on linux (CentOS) and Windows? Where linux is the 'server'.
As a bonus it should be easy to setup and low on footprint :P
 
@PeeHaa It will likely boil down to Mercurial or git. I like git, can't say much for Windows support but Linux support will be ideal.
491
Q: What is the Difference Between Mercurial and Git?

SpoikeI've been using git for some time now on Windows (with msysGit) and I like the idea of distributed source control. Just recently I've been looking at Mercurial (hg) and it looks interesting. However, I can't wrap my head around the differences between hg and git. Has anyone made a side-by-side c...

 
9:40 PM
k great I will look into it. And about the first question. Is it 'normal' to use versionsystem on the live server or only development?
 
@PeeHaa You would want somebody with more professional experience to answer that question. My gut instinct is: "If it is source code it is under version control"
Where it exists is all just a human abstraction anyway. The program doesn't know that it is on the dev server or the live server
Its just a server
 
k. tnx
 
Personally . . . I consider anyone using Windows for web-stuff to be a complete moron.

If they're doing ASP.net, I *might* make an exception.
 
@LeviMorrison hmmm why would that be. What's wrong with typing code in windows. The webserver itself is linux. I really don't care what OS I'm doing my coding. Or am I doing it wrong???
as long a I have a decent text-editor
 
I would definitely want my production server and my development server to be running the same configuration
Same OS, same PHP version, same extensions installed
 
9:48 PM
I'm talking about development machine (machines on which I type code). Not the machine the code runs on
 
@PeeHaa They should be the same.
 
@PeeHaa Don't listen to him, plenty of people develop their PHP in windows, plenty of cutting edges companies do too.
 
@LeviMorrison The webservers (both development as production) are the same. I'm talking about the machines I type code. Like I open files on my windows machine from the linux server. The code itself runs on the linux server
 
@PeeHaa If you are opening their files on your machine, I recommend that they never touch your hard-drive. File permissions, content encodings, and other things can go wrong.
@Anfurny Can you provide proof of that claim?
 
@LeviMorrison Can you provide proof of your claim?
 
9:53 PM
@Anfurny Gladly, which claim?
 
Nopez all files are kept (and opened from) the server.
 
"@PeeHaa They should be the same."
 
@Nadal you mean like a super black hole at the center of the galaxy?
 
@Anfurny I think he was talking about the server setup
 
Oh, nvm that was already said :P
 
9:55 PM
right?
 
All I'm saying is the development machines can be, and often are windows, and then the servers are linux.
 
@LeviMorrison I actually run a few IIS7 + PHP via FastCGI setups
and they work very good :P
 
@KevinPeno If you are running php on Windows, I'd suggest developing on windows. I've seen issues when people develop in different environments. File permissions and content encodings can get messed up.
 
@LeviMorrison of course. You should always try to develop as close to the production environment as you can.
 
content encodings sound like a whack text editor
 
9:58 PM
Well I've done it for several months, and never had any problems, except for one occasion when an idiot made multiple copies of his file with the same name and different cases.
 
As far as encodings getting screwed up. I think that comes more from people editing in notepad or something else equally appaling as far as encoding goes
@PeeHaa exactly
 
@KevinPeno Exactly. But additionally, I think anyone who codes PHP should be using Linux. There have been so many more Windows-specific bugs in PHP than Linux.
 
@LeviMorrison that's PHP's problem. Only additional windows support (both internally and externally) will resolve that
 
@LeviMorrison Do you mean PHP bugs?
 
that's like saying everyone should use browser X because of the same reasons
 
9:59 PM
@PeeHaa Yes, I edited the statement, actually.
@KevinPeno I don't understand that statement.
 
You're too fast :)
 
@LeviMorrison which? That it's PHP's problem?
 
@KevinPeno Then one I responded to. 'that's like saying everyone should use browser X because of the same reasons'
 
@LeviMorrison: what's your favorite editor in linux?
 
@LeviMorrison it was a conjunction with your claim that everyone should use PHP on Linux only and my comment that it's PHP's problem
 
10:01 PM
@PeeHaa If you want a full-blown IDE, I'd recommend that you use Netbeans. But a lot of the times I just need to edit a file really quick, so I just use vim.
 
Yeah i like vim. Seems to be the tool everyone uses
 
@KevinPeno Just because it's PHP's problem doesn't make it any less real, does it?
 
full blown IDE yuck! ;)
 
@PeeHaa Well, hey, I didn't know what you were looking for :)
 
@LeviMorrison exactly why more support must be given, both internally and externally to resolve those problems. If not, PHP should drop support for windows completely.
Besides, in most cases the problems for windows are edge cases. Which is why the problems don't get fixed
 
10:04 PM
@KevinPeno One of the reasons Windows is behind is because the tools to build PHP were created with Linux in mind. The tools need to be improved for even better support.
 
@LeviMorrison that was the purpose behind windows.php.net
get MS people to make it better
and they did initially, but now they are falling behind again
Zend has done a better job at it that the MS guys via Zend Server stack. So lately I've been using that more
 
@KevinPeno lol. . . I find it funny that the UI for windows.php.net is more stylized than the one for www.php.net
 
I know right?
 
hilarious
 
Sad part is they launched with that. like 4 years ago
and PHP's "alpha" design started about a year after that
seriously, how long does it take? lol
 
10:07 PM
@KevinPeno Meh, if they ever update php.net's UI, I'd prefer small updates. I like the layout for the most part. It's practical.
 
@LeviMorrison they could have done small updates over the past 3 years. They instead took the OMFG NEW HOTNESS VAPERWARE approach
 
@KevinPeno lol
 
hehehe
 
Let's get back to talking about black holes. That's a more interesting topic lol
 
@KevinPeno Can't you just give me the tl;dr? :P
 
10:10 PM
errr. there's one at the bottom, but it is worth the full read
 
alright saved under favs
now lets talk black holes
:)
 
my understanding is that everything gets sucked into black holes, but the universe is expanding so going further away from the black hole?
 
Pretty cool news.
That would assume that black holes are free floating
or that everything is for that matter
 
@KevinPeno . . . how is this PHP related?
 
10:14 PM
lol @PeeHaa said it :P
I just happened to stumble on that today
the other topic option I gave was @NikiC's article
 
what can be the reason for PHP's switching function params? e.g. array_key_exists vs property_exists. Is it just a mindfuck?
 
yes
 
@LeviMorrison what is it?
 
@PeeHaa It's PHP's new experimental design.
 
10:18 PM
yeah, I set it to default awhile back
 
You don't say. Well I might be getting old, but dumpert.nl/mediabase/1803101/855be479/…
:)
 
haha
 
10:33 PM
I wonder how @NikiC's findings would apply to objects
specifically "stdObject" considering the new {} syntax coming
*headwall*
 
10:48 PM
wtf man. I just ran the same test as @NikiC using stdClass and it uses 9244736 bytes (~70Mb) O_O
 
I say bloatware! :)
 
yeah, something's wrong here. I'm getting totally different results compared to @NikiC
 
back
 
lol
 
@KevinPeno Are you measuring arrays or objects now?
 
10:55 PM
Both
sec, I'll gist what I did
from that I get far less per element in arrays.
0.00176 bytes per element
92.44744 bytes per element
36.00552 bytes per element
Those are my results
 
that may well be. If it is far less you are probably on 32 bit ;)
 
no, 64bit
but I'll double check
 
btw your first functoin call should be range, not rand ;)
rand will only generate one number :)
 
blah...nice catch.
 
:)
 
10:59 PM
There we go...much better
85.24592 bytes per element
92.44752 bytes per element
36.00576 bytes per element
 
yep, that looks better
I got those ~85 per element on my windows build too
 
whew...thanks for double checking my work
 
it doesn't look better. It's just accurate ;)
 
I think this is because the windows binaries that PHP provides are compiled for 32 bit, so even if you are using a 64 bit OS the binary will still be 32 bit :) But the server (which pretty much always has a 64 bit Unix) will have the big sizes
 
yeah, I must be running x86 on here now. I swear they offered x64 downloads for win in the past though
can't find them now
 
11:02 PM
@NikiC yup it is
 
11:15 PM
Evenin' y'all
 
11:25 PM
:(
 
11:48 PM
hello friends!
 
I am not your friend.
 

« first day (425 days earlier)      last day (4514 days later) »