« first day (724 days earlier)      last day (4214 days later) » 

user50049
12:35 AM
0
A: PHP Errors Reference question

Tim PostI think that we should not lose sight of the fact that we need to adapt as time marches on. The PHP tag is an angry, bloody mess. I think we also need to be happy that the tag has more or less permanent fixtures in the community that help keep it clean, and support them in their efforts. The ques...

 
user50049
I'm rather pissed, TBH. No - the question was probably not the best idea, but I'm getting quite sick of seeing effort continually shot down while the problem goes ignored.
 
but don't you mods talk to each other ?
 
user50049
@tereško Loosely .. at best, it's a game of time zone tag
 
or do they just go: "here are the keys for the castle, deal with it"
 
user50049
@tereško I'm going to raise a conversation regarding it among us. I'm extremely frustrated with the response this received.
 
12:42 AM
=/ that would be a good ( though, i suspect - futile ) step towards some common goal for SO
or the decay that you can see in and streams will start affecting other subjects too .. causing another user migration .. all online communities are nomadic in nature
 
user50049
@tereško Your comment regarding why a C# developer who probably has PHP ignored being so vocal nails it. Unless you've been constantly exposed to the problem you can't understand the level of frustration.
 
user50049
It is impossible for me to be a 'normal user' at work due to the crap my own searches turn up. I had to make a normal account just to use during work hours.
 
the lab rat ?
 
hi @TimPost!
 
btw , the side-note about c++ book collection makes me realized how actually fuked the php community is ... i think we could list ~3 books in total and all three with additional details "reader beware" disclaimers about crap that each of them contain =/
 
user50049
12:52 AM
@hakre 'Allo :)
 
@TimPost thanks for your answer on meta, I'm not that good with arguing when the arguments get so far of from what we practically need to deal with.
I have never said that the form of the reference question nails it, but it's like not being the second day in the lab and you get it crushed.
 
user50049
@hakre I'm having a (rather time delayed) conversation with the other mods about it now.
 
while actually quite some users were motivated looking up canonical references
 
user50049
@hakre Yep, my point. If not that, then what? What are you supposed to do to address this problem? That's the point I'm making with the other mods. Fine, we told them don't do that plenty of times, with no other suggestion to offer.
 
I don't have ready-made solutions either, it's an experiment.
 
12:56 AM
if someone goes with "but there is Related block in the sidebar" argument , then it is a cop-out .. 99.9% of users do not look at it
it's nice for researching a topic, if you are mining SO for information, but general public avoids it
 
Actually, even if you know SO and PHP, try to search, just try to search the error message. Find a good answer. That is freaking hard.
 
i use google for that =/
 
usually one of topics in first 2 pages contains something acceptable
 
What I want to say is that if you're a less experienced user, you're just lost with the amount of data returned. Yes I use google, too.
 
1:01 AM
@tereško you got a huge problem man
you seriously think you're superior to me
and everyone else
I saw your message
 
user50049
We're escalating it to the community coordinators and asking them to join in the discussion. If nothing else a few of us could check your CV backlog and possibly help you flush it out quicker, since at least three of us are professional PHP programmers.
 
.. you saw it because i intentionally pinged you
 
user50049
@mmmshuddup That's enough of that, thanks.
 
@mmmshuddup ...really? You're that pedantic? Welcome to the internet.
 
Yes.
 
1:02 AM
@TimPost Thank you for your help and support, really appreciated.
 
I have a huge problem with that know-it-all attitude
and why am I getting messages deleted? when that @tereško has been rude and offensive to me since last night?
 
@TimPost I'm still really new to the PHP community but it's nice to know that a mod's willing to help, thanks!
 
@tereško let's continue this chat solo
so let's hear it little big man
 
hi @Sommer
 
@mmmshuddup i have no intention to indulge your trollish tendencies
 
1:07 AM
LOL
talk about trolling
 
user50049
@hakre Shog is on vacation (HOW DARE HE?! I KNOW RITE?), Anna is going to spend her tomorrow with it, and the discussion is on going.
 
user50049
George is going to freeze or lock the discussion so it doesn't completely derail until all involved in discussing it (mod / employee level) have had a chance to catch up.
 
I'm not that experienced with these discussions. I have the tendency to ignore it because I see not much constructiveness in it (and also I'm not that well with making arguments sometimes).
 
wow I'm really the idiot here for having entertained your fantastical bigotry in the first place
there now I don't have to anymore :)
 
user50049
@mmmshuddup You're about to become the idiot that's not here. Enough is enough.
 
1:09 AM
@TimPost is that so? I would like to know why.
 
@mmmshuddup 3.5k and you don't know what a mod is?
 
@TimPost ehm not running in full pc mode but quoting ah in public profile I must admit I have a problem with.
 
I know what a moderator is
I know Tim Post is one too
 
Ah, your second highest tag is jQuery. That explains it.
 
user50049
@SomeKittens That's not helping.
 
1:11 AM
@TimPost Understood. I'll stop.
 
@TimPost Look I wasn't trying to start a global argument here
but @tereško had been harassing me since yesterday
where was the "moderator" then?
 
user50049
@mmmshuddup I dunno, when did you flag to involve us?
 
I come on here for one minute to defend myself (mistake - I realize that now). and now I'm being moderated LOL
I flagged about 10 different comments last night
I thought Gordon was a moderator because he seemed to be pretty Switzerland-ish about everything - which was cool
 
:5684165 Yikes, I've reached a new low when tereško thinks it's a low blow.
 
user50049
@mmmshuddup Because it's your snarky jabs that currently fill my screen, I just got here, and said jabs are just injecting noise into an otherwise constructive and (rather important) conversation.
 
user50049
1:14 AM
@tereško stop poking @mmmshuddup
 
True I get that
@TimPost I'm sorry about that. I despise participating in frivolous arguments on the internet. but I can only take so much you knwo?
I am doing as much as I can to refrain from direct remarks or profanity though, for whatever that's worth
 
@SomeKittens i'm just looking out for numero uno , because codeigniter will soon reach my top10 tags
 
user50049
@mmmshuddup I am fully aware of @tereško's talents when it comes to assisting others in practicing patience :)
 
@TimPost lol
thank you for being a voice of reason here!
 
@TimPost i also have a talent in inciting fits of rage .. or so i have observed
 
1:17 AM
what I should have done is just ignored said user's comments in the beginning. I didn't do that because I didn't foresee it persisting into the next day.
 
@tereško My condolences
 
That was my mistake. Anyway. I'll go elsewhere now. Thanks @TimPost for your understanding
 
user50049
@tereško Indeed, odd isn't it? Oh regarding the half joke you made about the C++ book question .. that's actually a valid point. A well curated PHP tag is the best bet most people have.
 
user50049
@mmmshuddup You're always welcome here .. lets just keep it professional ;)
 
Thank you. I will.
 
1:19 AM
it was less of a joke and more of "it's not fair" moment
 
user50049
@tereško Ah, well, still a very valid point that I'm using.
 
7 mins ago, by Tim Post
@mmmshuddup I am fully aware of @tereško's talents when it comes to assisting others in practicing patience :)
Oooh, oooh, what did I miss?
 
@DaveRandom the fallout from "you do not even know what global state is" comments ~30h ago
 
Yey, grudge match!
Right I'm done "hacking" into insanely badly secured sites and leaving gifts for them, I'm going to bed.
P.S. Never use Apache for anything. I will find you and I will leave you a present.
(Not a nasty one, but still a present)
 
such sites usually are unmaintained
your "gifts" will be unwrapped in a month or so
 
1:33 AM
@DaveRandom sorry a bit late here --- but yes, the in-built singleton stuff is a bit off-putting
oh great, was there another fit of rage?
I'm just going to stop reading the chat log
 
@DaveRandom my lovely apache :/
 
Apache is technically capable of being secure...sometimes
 
yes my sysadmin tells me you need to harden it.
 
user50049
@Lusitanian I have internal data that says sites deployed on Wednesdays (with Apache) tend to be compromised the least. No kidding.
 
@TimPost lmao, I was actually going to make a sarcastic comment saying "sometimes...like on Wednesdays"
that's really ironic. how many site launches is that based upon?
 
1:40 AM
hello
remember me
 
user50049
@Lusitanian Most hosting my company offers is fully managed. Give us your code, we set up what you need and deploy it for you after auditing (if requested). And we are constantly dealing with 'how the hell did that get in the webroot' issues, so I went digging. Sure enough, sites deployed on Wednesdays were the least likely to be compromised, language agnostic.
 
o_O
 
user50049
I can't explain it either.
 
Could it be explained by random chance or is it a really significant margin?
 
user50049
@Lusitanian It was quite significant. First I looked to see if anyone had Wednesday off, nope.
 
1:43 AM
Anyways. I just wanted to ask if anyone knows of any PHP mail wrapper class with the ability to add attachments. The script must be able to detect the mime type of the file being attached. I searched on the net and the only one I found that does this is too huge to be added on my site. I just can't take it.
 
emm .. deploying on wednesdays seems just the most sensible thign to do
 
user50049
@chx101 The only one I know of that works reliably is most likely that huge thing you don't want to use due to its hugeness.
 
you cannot deploy on fridays, because you can end up with issues which nobody fixes on throughout the weekend
 
It's like 100 files.
 
Swiftmailer is probably what you should use
 
1:45 AM
lol
That's what I'm taking about
 
And you don't want to use it because it has a lot of files? -_-
 
you cannot do it on monday , because half a day is wasted .. you cannot deploy in thursdays because issues cannot be fixed on friday alone . Basically , you end up with tuesdays or wednesdays , and tuesdays are reserved for upgrades
 
user50049
There is PHPMailer, but it's .. obese
 
@tereško not Tuesday?
 
@TimPost Let me look at that
 
user50049
1:48 AM
@chx101 I had a similar gripe when looking for a relatively stable Redis library. Predis is awesome, but contains way more than I actually need (though it does have a nice, convenient autoloader and clear namespace separation, so it's easy to 'prune')
 
Why not PHPRedis? It's a light C extension
 
user50049
Predis
 
user50049
@Lusitanian Yeah, I use that, in this case it had to be a library (no ability to add extensions)
 
sounds somewhat dirty
 
@TimPost ahh
 
user50049
1:50 AM
@Lusitanian Actually, PHPHiredis is also very nice, especially if you work frequently with the hiredis C library. Coupled with Phalcon it makes a very lean and mean REST machine (note, Phalcon is far from stable)
 
Phalcon.......really
 
user50049
@Lusitanian Have you really looked at it?
 
Admittedly, after I saw its traditionally twisted design patterns and claim of "omg fast performance cuz its c omg" I kind of walked away
What's so special about it? You have ten minutes to sell me, if you're interested in doing so [I'll get bored after that point]
 
user50049
@Lusitanian It's a very cool building block for making extremely task specific things if you're comfortable with C.
 
See, that's different than how they market it (yet another PHP framework except this time the core is written in C so it'll blow away Symfony and codeigniter and yii and ....)
 
user50049
1:53 AM
@Lusitanian Well, in their defense, they aren't marketing it to C programmers ;P
 
Right, I know that --- but you're not using it in the traditional usecase, then.
 
user50049
@Lusitanian Yes and no. Sometimes there are things I would just much rather not do in PHP, but I have to, because it's a requirement.
 
user50049
So I can twist it around, make sure it will actually meet the load that was specified and then say "Here you go, and here's your PHP too."
 
ah
pause for lessons in method chaining:
$resume = new \ResumeBuilder\Model\Resume();
$mapper = new \ResumeBuilder\Persistence\FileMapper('resume.txt');

$resume->setObjective('To further my career as a horse rider.')
    ->setSkills( [ 'Horse-riding', 'Reading', 'Writing'] )
    ->setWorkExperiences( [ ( new \ResumeBuilder\Model\WorkExperience() )->setCompanyName('Horse Riding, Inc')->setDescription('Rode horses')->setStartDate( new \DateTime('12/30/1999'))->setEndDate('5/06/2012') ] )
    ->setContactInformation( ( new \ResumeBuilder\Model\ContactInformation())->setFirstName('Horse')->setMiddleInitial('Y')->setLastName('Rider')-
okay, anyway, that's fair --- but that means that you are getting hit with silly requirements (or so it appears)
 
user50049
@Lusitanian The lyrics to chained melody! how quaint.
 
1:56 AM
lol i started programming a miniature resume building webapp earlier
i got bored, added return $this; to every set function and that was the result
 
user50049
@Lusitanian It's not me that gets silly with it, it's our clients. If you've ever done work for a municipality .. they just get jiggy wid it when it comes to everyone involved being able to put their mark of insanity on a scope.
 
user50049
And some of it is founded. If you're going to tell people that all of a sudden they can do something that once required a visit to city hall online, it's going to get a beating, at least initially.
 
I've not done much professional programming, but I did do one project for which one of the requirements was initially listed as using Google Web Toolkit because the creator of the project "really liked Google".
 
user50049
@Lusitanian I just turned down a side job where bootstrap was a 'must' for a five page site.
 
-________________________-
Bootstrap is great for prototyping but there's now an obsession with using it for live sites
 
user50049
2:00 AM
uninformed start up CEO + hacker news + reddit = mud
 
It's useful for people like me who have all of the design sense of a Peruvian Hairless Dog
Yeah, makes sense
Though a lot of the people at news.ycombinator have been against bootstrap of late
 
user50049
@Lusitanian I'll make use of a framework, whatever it might be if its there. That goes for JS, grid systems, MVC frameworks, etc. But, if given the choice, I won't use one unless there's a compelling design or maintainability factor to consider.
 
user50049
Just like 15 years ago when I said "No, you don't have to organize your code the way autotools says you should. Do you do everything that a perl script tells you to do?"
 
Yes! I also do everything jquery.com says to do :)
Fifteen years ago I was two years old...and you were programming. That's scary.
 
user50049
I think I just helped someone shoot themselves in the foot, speaking of jQuery. The question was borderline, I only answered it because the OP got piled on in comments and I felt it was the least I could do.
 
2:06 AM
The question I just cast the deciding vote upon to close?
asyncSessionMolester
 
user50049
I'm quite fond of that method name.
 
That's someone who heard "AJAX" and "jQuery" and decided it was necessary.
Wow, I haven't touched my Oauth library in nearly two months
It needs more work. @PeeHaa quit drinking and write code
I really don't know how you tolerate CodeIgniter --- I'm guessing you don't actually use it every day?
 
user50049
@Lusitanian I do. One of my larger projects is based on it. Once you get used to the caveats it's not that bad. I had to fight just to use MVC, the people where I work were used to just writing a bunch of functions and tying them all together, not good when you have to normalize data from a bunch of third party APIs
 
If you can call CodeIgniter MVC..............but I see, it beats haphazard globs of code tossed around like pillows at a slumber party (I use really weird analogies after about 9 at night)
 
user50049
@Lusitanian If you could call CVS version control ... but trading tarballs via e-mail sucks even more.
 
user50049
2:12 AM
@Lusitanian It is. Ellis didn't take input from the community until recently. Now that they have, it's getting better.
 
You use CVS? Ick. I worked at a place that used it several years ago (my first actual programming job) and couldn't wait to get away from it. [CVS, not the job which I enjoyed fully]
 
user50049
@Lusitanian That was an analogy. I use Git or HG, subversion if I absolutely must)
 
@TimPost The lead developer, Phil Sturgeon, absolutely drives me nuts with his arrogant blog postings
He is absolutely convinced that everything he does is right and that he knows everything there is to know about programming and his framework-centric mindset (CodeIgniter to FuelPHP to Laravel) is annoying.
 
user50049
@Lusitanian He's .. quite full of himself at times. But he's not unlike others that I know who have never used anything but PHP. I end 'my code is bigger than your code' arguments with 'have you ever written a device driver or file system? I have. My hair is a bird, your argument is invalid.'
 
Meh, I can't use the device driver argument but I like asking "what's a VMT?" and getting a weird response
 
2:16 AM
emm .. only word on V that i can think of is "vomit" ... not sure what it says about me =/
 
Messing around with Windows internals and C++ taught me much
@tereško I'm referring to virtual method tables lol
 
my version also had table , but it was for management of vomit
 
user50049
Looking at a framework first is a sign that you haven't been doing it long enough to have your own base of solid, proven reusable code.
 
@tereško lol
damn I'm getting distracted from my homework
 
you are acting like you did not get the memo about framework being the awesome juice which you add to the project and it just makes it better
 
user50049
2:18 AM
@tereško A vomit management table .. in other words, a desk?
 
@tereško that's also mongodb, cassandra and node
 
@TimPost more like toilet covering ( i dont know the exact word )
 
user50049
@Lusitanian I'm in my 'oh neat, it blinks when I push it' phase with node. More interesting in seeing if I can cannibalize the rather cool non blocking async event stuff they have going than actually doing anything with it at this point.
 
user50049
But I do have to implement support chat soon, so I'll probably give it a whirl. The only 'new' technology that actually excited me this year was Redis (not quite 'new' this year, just new to me)
 
I've not had any first-hand experiences with it yet but it seems like something I'd like to stay away from as a matter of personal preference among other reasons (the craziness of the code samples I've seen, etc).
Yeah, Redis is awesome
 
user50049
2:38 AM
Is there any way to turn off magic method overloading globally ?
 
user50049
I just got bit by $class->fatFingeredMethod() which had a default catch all __call() method in place. I'd like to see where else other stuff relies on that by watching it break when I run tests.
 
you can extend the original classes and override the __call()
but that's about it , AFAIK
if the class which contains __call() is some superclass, then you can replace the whole class using aliasing
 
2:53 AM
really. PHPMailer still uses functions like ereg
 
What does the (2) mean on this error? Unknown MySQL server host 'localhot' (2)
 
localhot
*localhost
 
viperpad.com/NFFZ1b omg now php is cooler!!
 
3:08 AM
I know how to fix the error. I'm just wondering what (2) means in it?
 
user50049
@tereško Yeah, that's what I thought. I have a few dozen libraries that I have to run through then. Meh. Crap. Crapity crap crap crap.
 
user50049
crap ... ALL THE THINGS!
 
now with support for $this !
@TimPost every single thing?
 
user50049
@Lusitanian Yep, better get started. I do my best work in that room anyway.
 
enjoy.
I hate __call abuse
 
user50049
3:16 AM
Oh no .. figures I'd start crapping all the things starting with a singleton. This could take some time.
 
Singletons and PHP go together like soy sauce and oatmeal.
 
user50049
@Lusitanian You mean congee? :P
 
Isn't that a rice dish?
 
user50049
@Lusitanian Usually, but it can be made out of something a lot like 'grits'
 
In that case, Singletons and PHP go together like maple syrup, broccoli and tomato.
 
Why is that funny...
 
LOL= Lots Of Love
I don't see anything funny there either
 
Ah gotcha
It's typically used as "laughing out loud" ;)
 
user50049
I have absolutely no idea how I'm going to handle these new international domains. I don't forsee having one in the near future either.
 
With non-ASCII characters in them, you mean?
 
user50049
3:26 AM
ascii / utf8 lookup table? Yeah. The actual TLD you send to register is actually ascii, kind of garbled.
 
user50049
It's .. oh how did I know ican't would make this as retarded as humanly possible?
 
Well, that's what happen when you have an organization that was the child of the US government running DNS
FWIW, the domain largepen.is is available if you have a company that sells big pens in Iceland and want the domain for prime e-commerce
 
3:53 AM
Anybody got an idea?
What does the (2) mean on this error? Unknown MySQL server host 'localhot' (2)... I know how to fix it, I just want to know what (2) means.
 
Maybe the error happened twice as in in multiple calls. But then again, the compiler breaks on the first error. Which leaves me to think that, that is a weird error since MySQL error codes have 4 digits.

Let's call it an irrelevant error.
Unless of course its a user defined error code.
*it's
 
user895378
@W3Geek Unless we're talking about @Lusitanian's mother, 'localhot' probably doesn't mean anything.
 
4:08 AM
@rd
 
user895378
I'm pretty sure you just need to change "localhot" ---> "localhost"
 
@rdlowrey He says that's not the issue.
I pointed it out earlier
 
user895378
> Unknown MySQL server host 'localhot'
 
4:43 AM
@TimPost PHPMailer is causing 500's and I don't want to mess around with it. Do you know any other?
 
@chx101 wrap swiftmailer into a phar and use it
@rdlowrey I...I see what you did there
 
user895378
@Lusitanian hehe
 
wow i like mockery waay better than phpunit's mock api
i wish i had actually looked at this a while ago
 
user895378
5:03 AM
@Lusitanian This: github.com/padraic/mockery ?
 
user895378
Honestly, at this point I already know the phpunit mocking API, so I have little incentive to change. It works well for me, even if it's not the greatest API ever created ...
 
user50049
@chx101 Not off the top of my head, let me check what I have starred at github, I know I came across a few
 
Hi everyone
what will this do in postgres Query %~confused%' eg
transaction_memo NOT ILIKE '%~suspendarama%
 
5:54 AM
5
(no thumbnail because the video is too new)
 
6:19 AM
@ircmaxell The thumbnail has appeared now :-)
 
:-D
I'm out. Heading around Milan. Tty tonight
 
user50049
6:45 AM
Man I miss "hardcore forking action" .. Oh github, you're all grown up now.
 
nir
anyone there ?
having gud knowledge of curl ?
 
7:00 AM
@Lusitanian True that. I have a problem :|
morning all
@ircmaxell Thanks
 
Sem
Morning @PeeHaa
 
@Gordon can you please look into this quesion stackoverflow.com/questions/12787549/…
 
Why is my function logToLog still executed when I tell the header location to change?
 
posted on October 09, 2012 by Web Development Blog » PHP Scripts

In my previous article I wrote about how to build dynamic sidebars using widgets. We used also custom taxonomies to create some filter criteria for single posts or pages. This article is about how to use custom post types to build an FAQ or testimonial section. What are custom post types? The custom post type [...]

 
7:13 AM
<?php
require_once("inc/php/functions.inc.php");

if (isset($_POST["signin"])) {
checkUser($_POST["email"], $_POST["password"]);
}

logToLog($_POST["email"], $_POST["password"], "uc_module", $_SERVER["REMOTE_ADDR"]);
?>
when the user signs in it executes the checkUser function.
function checkUser($email, $password) {
if ($email == "" || $password == "") {
return;
}

# To protect against MySQL injection.
$email = stripslashes($email);
$password = stripslashes($password);
$email = mysql_real_escape_string($email);
$password = mysql_real_escape_string($password);

$sql = "SELECT * FROM users WHERE email='" . $email . "' and password='" . $password . "'";
$result = mysql_query($sql);
$count = mysql_num_rows($result);

# Close the MySQL connection.
mysql_close($con);

if ($count == 1) {
the checkUser function is what changes the location and does a redirect if the user credentials are correct.
... but somehow after this function is executed, logToLog is still ran and I can't quite figure it out.
I think I may've solved it, I put...
 
@W3Geek on Stackoverflow i learnt to avoid mysql_ extension,instead use pdo or mysqli_
 
<?php
require_once("inc/php/functions.inc.php");

if (isset($_POST["signin"])) {
checkUser($_POST["email"], $_POST["password"]);
exit;
}

logToLog($_POST["email"], $_POST["password"], "uc_module", $_SERVER["REMOTE_ADDR"]);
?>
@Tarun, I do avoid using regular on production projects...
but when I'm experimenting I just find it easier to use.
 
Hi , any one could please give answer for my question. stackoverflow.com/questions/12775384/…
 
Would it be in best interest to avoid exit?
 
@W3Geek cool :),exit is must after redirection else script will keep executing
 
7:21 AM
or anyone have another suggestion or alternative for the code above? (About logToLog function running when the header redirects).
 
Is there any one to give solution for my question here . stackoverflow.com/questions/12775384/…
 
Oh @Tarun =) Thank you. That is what I was thinking but didn't know. So that is why logToLog runs. I always use mysqli_ on project that are going to the web.
 
I am using FB connect in my website. when the user logged into my site i am getting the user email address and storing the DB like this. like
'
UID | Name | Email
1. 100********901 R**y rockydj23@***.com
2. 1000*********08 A**hek 9178xxxxx109 '
but today morning i found instead of email address there was a mobile number. How this is happen , how to get only the email address.
 
@W3Geek you are most welcome :)
 
user1125394
7:57 AM
r some people under (x|l|k)*ubuntu 12.04 here?
 
user1125394
I'm but it's still php 5.3.10
 
mornings
 
Sup
 
@DaveRandom just some boneheads following processes and tools over individuals and interactions
what I find incredibly funny is that Jack cv'ed the OP reference. Repwhores closing dupe killers so they can repwhore more?
 
@Gordon my vote was already gone :/
 
8:42 AM
@hakre yeah, mine too
 
@Gordon I getting more and more stinky. Those concrete-heads start to suck big time.
They are not related to the PHP tag whats-o-ever but think they know better.
 
@hakre germans getting stinky about people following rules. it's somewhat ironic but I totally share that feeling right now ;)
 
@hakre Don't worry, if you do get an Apache-based present from me it'll just be a text file outside the Doc Root explaining exactly how I managed to get it there, and how I (time and depth of security hole permitting) how I fixed it for you. There's nothing inherently insecure about Apache (that I'm aware of) but there are so many people using it - especially in conjunction with mod_php - who have no idea what they are doing, and I guess (hope) you are not one of them.
 
@DaveRandom I'm not using mod_php, fcgi fanboi
But anyway, sounds nice ;)
 
@Gordon You got a vote from me. I thought questions with that much rep would take more than 5 votes to close...?
 
8:47 AM
looks like it's always 5 (now).
 
@TimPost Does this look related to the stream blocksize issues you were encountering? marc.info/?l=php-internals&m=134977165209772&w=2
 
@DaveRandom it always takes five, which is kinda ridiculous given that it got so many upvotes and favorites
but the rationale likely is that if it has so many supporters it should be easy to reopen either
anyway, im writing a post on meta right now
 
@Gordon My php6 cleanup is going well. Single close vote puts them on review, close spamming reviewers did all the work for me ;)
 
@Leigh nice :)
 
@hakre Just don't forget to copy the pixel data out of any images that you accept as uploads, don't use the user supplied filename, and make sure you have a <filesmatch> to stop Apache from serving .php.jpg (or whatever) via PHP and you will be fairly safe, there are a couple of other fcgi routes in that I have come across in the past, but you'd have to be a real idiot to be a victim of those because the default Apache config prevents them.
Oh and for the love of god people, at the very least create a dedicated user for you web server to run as. Seriously.
 
9:01 AM
@DaveRandom You have to do that manually? Have you heard of linux?
 
@DaveRandom Well with a quite old application I actually had a problem with malicious input because of register globals some time ago. I not only have a user for apache but also for each php application.
And with that old application I also did tighten the file uploads, however that is offered to a limited userbase. But I will again look into that now as you say it :)
 
@Leigh Well you would think wouldn't you. But I can point you to a back door in one particular machine that I found probably 6 months ago now (which still has not been fixed, despite that fact that I emailed the domain owner) where httpd runs as root, of all things. rm -Rf / anyone?
 
got to go, see you laters
 
@hakre Just don't accept the user supplied MIME type, don't accept the user supplied file name and you should be fine. But you also really really should put the config that hands .php files of to your module of choice inside <FilesMatch "\.php$"> because Apache handles file extensions in a frankly bizarre way, in that it looks at all dot-separated portions and not just the last one.
@hakre laters
 
@DaveRandom yes, you have to keep content negotiation in mind with apache.
And the filenames are not accepted or better said normalized in a very strict way. Also I do file-types by extension and whiltelist the needed ones. Double extensions are not accepted. Files can only be downloaded as they are, not CGI/FCGI action handler on that dir.
stackoverflow.com/questions/12790240/… - I had problems to find inside the php source the _DIR_ constant (I found it via google + lxr), however I do not see any "real" code because this is all macro. Just out of interest it would be nice to know how that works in the PHP source.
 
9:11 AM
@hakre Yeh you see you do know what you are doing, so you're probably not going to have a problem.
 
And in the light of that question, where realpath gets applied. I'm sure it gets applied but can not find any "proof".
 
I should point out, by the way, that I don't go looking for these things, and I don't go around maliciously breaking in to peoples servers, they just seem to sort of find me and when they do I can't resist trying to fix peoples problems for them.
 
@DaveRandom Well sometimes you oversee something.
@DaveRandom Well it can happen that with SQL injection and a simple "select all from table" you could bring down hole sites because the database jumps out of it's rails. Seen that. Big site down for days, they switched the system quite fast then.
 
@hakre Whenever I see a username/password prompt anywhere I can't resist trying ' OR '1' = '1 as the password, and you'd be amazed how often it works
...and how often that gets you into the admin account because it's the first entry in the users table
 
@DaveRandom jup, many apps have this, even fixed ID PK value for the admin account. But need to run now ;) Nice talking to you and laters.
 
9:17 AM
Enjoy... :-)
 
2
Q: Android with php: Saving utf-8 string to MySQL

RynardtI know I am asking a question that has been asked many times before, but I feel I need clarification on my problem. I have an Android app that sends a JSON encoded string to a PHP script. The following code then saves the data as a complete JSON string. (There are also other functions to properl...

 
Sem
@DaveRandom , you're loved in this room aren't you? Damn brits and their british accents.
 
user50049
@Leigh Yep, and have been experiencing.
 
Anu
9:32 AM
Hello
What svn command would list all the file path modified within a date range
 
@TimPost There's now a patch attached to the thread, might be worth seeing if that fixes your socket stream issues?
 
Anu
I want the updated file name full path
Any one help me?
Hello
 
Another shrunken head for the collection
 
posted on October 09, 2012 by Derick Rethans

Presentations London, UK Tuesday, October 9th 2012, 09:43 BST In the past 10 years I have given plenty of presentations. Since I started, I've always used the same presentation format. Because I am getting more and more questions about this, here is some information on what I use. The presentation tool that I use is called "p

 
9:56 AM
@TimPost I just found a simple 60 line function and it does suffice.
 
@Sem I'm just a lovable guy :-P
 
hey anu wht is ur experiment i mean Linux distribution
sorry environment*
 

« first day (724 days earlier)      last day (4214 days later) »