« first day (1689 days earlier)      last day (3252 days later) » 

12:17 AM
@FlorianMargaine can't you install ignoring platform packages?
not sure I got the problem right. Anyway going now, gn.
 
Hi there !,
Does anyone know any well designed websites or free html templates I can take inspiration off of. I'm not the type of guy for Web Design, I focus on Web Development with PHP/MySQL/JS.
 
Can we have this:
foreach ($string as $char) {
	// ...
}
Natively do this?
foreach ((function () use ($string) {
	for ($index = 0; isset($string[$index]); $index++) {
		yield $string[$index];
	}
})() $char) {
	// ...
}
 
1:00 AM
@DanLugg yeah, that'll work… but at that point you also can just do the for loop…
Also, I won't oppose… we'd just have to mark strings as generally traversable…
 
 
1 hour later…
Anonymous
2:16 AM
@tereško Will try to build something. The more I think about it, the harder it seems for a first project.. You should've said build accordion or tabs .. those seem easier :/
 
3:37 AM
Did you know about the new C++ tadpole operator?
It allows variable increment/decrement by a single operator without changing the original value, preserving immutability.
 
@MarceloCamargo Well… I read the article nearly a week ago…
 
I was thinking about implement this on PHP or maybe open a RFC for that, but it would conflict with the bitwise negation operator.
@LeviMorrison I'm a few late. I knew about it just now.
 
…you do realize that there is nothing new, right?
 
Yeah, I see that it's just one more abstraction.
Maybe comefrom. ( ͡° ͜ʖ ͡°)
 
$n = 3;
var_dump(~-$n); //int(2)
 
3:44 AM
As expected.
I'll try, by joke, implement comefrom here.
 
 
1 hour later…
4:57 AM
Did you see that? https://github.com/php/php-src/pull/1312
Shouldn't that be solved by a built-in implementation for get_enabled_vars instead of breaking compatibility with the current one?

I wrote it now, for test. I'll compile and see how it behaves.
 
5:07 AM
Hey everyone i got a question
 
5:39 AM
It worked fine here. Tommow I'm gonna make the tests and open a pull request.
 
ram
6:31 AM
hi i got a question??
<script type='text/javascript'>
//AJAX function
function ajaxcall1(type){

var parameters = 'hotel_category='+type;
var argUrl = 'ajax_hotels.php';
$.ajax({
url: argUrl,
type: 'POST',
data: parameters,
success: function (str) {
$(".hc1").html(str);
//alert(parameters);
}

});
}
//Call AJAX:

//Call AJAX:
// $(document).ready(ajaxcall);
</script>
<td id="td12" class="hc1">
<select name="hotelname" id="hotelname">

</select>
</td>
im not getting value in hotel name dropdown box
 
@ram please, paste your codes here
your JS function name is ajaxcall1 but you are using ajaxcall
@ram You should take your question to chat.stackoverflow.com/rooms/17/javascript
 
ram
pastebin.com/E3724Xk0 chck this code guys...anything went wrong in it...
 
6:48 AM
Morning
 
7:21 AM
good monray modning
 
@ram go to javascript room. this is php room :)
 
morning!
 
7:48 AM
Goooood moonday morning :)
 
mhm… Typical Monday morning greeting spam :-)
 
moin
 
8:02 AM
monnin
 
8:22 AM
hello
i want help in composer
i'm using php excel via composer
but cannot initialise the object
$objPHPExcel = new \PHPExcel();
on global namespace even object cannot be found
Fatal error: Class 'PHPExcel' not found in
 
@FaizRasool you're not including the necessary files
 
i'm using composer
 
@FaizRasool there is no class PHPExcel, that's just the namespace name?
 
posted on June 01, 2015 by kbironneau

/* by Synxs */

 
@bwoebi php excel should be on global namespace due to composer
and PHPExcel is class
 
8:31 AM
@FaizRasool no?
 
but i'm using autoloader composer
i got a package from here : packagist.org/packages/phpoffice/phpexcel
 
sure. that means that it is namespaced.
Usually everything you fetch from composer will be namespaced.
 
$objPHPExcel = new \PHPExcel();
 
I think you need to read the examples from here github.com/PHPOffice/PHPExcel/tree/1.9/Examples
 
Fatal error: Class 'PHPExcel' not found in /home/enterprisetem/public_html/modules/invoicing/controllers/Step9Controller.ph‌​p on line 161
 
8:34 AM
> $objPHPExcel = new \PHPExcel\Spreadsheet();
 
^ good point @HamZa :-)
 
let me try
i think i have issue with ftp sync
may be
let me double check
 
@FaizRasool haha
 
might be the file are not uploaded to server
may be
 
@bwoebi btw, any tips/articles to make it hard to reverse engineer an executable (linux)?
I'm working in C/C++ and could even go down to assembly
 
8:37 AM
same shit problem
Fatal error: Class 'PHPExcel' not found in
 
@FaizRasool You are doing it wrong
Read the documentation / examples / @HamZa's post
 
@HamZa calculate your function call offsets at runtime, dynamically, with the functions only beginning at non-aligned adresses (like adding garbage as first few bytes or so)
 
@PeeHaa this is bit different problem i'm facing
 
@bwoebi I see, thanks
 
@HamZa and weirder tricks; but that's the gist. You even could unpack dynamically at runtime some parts of program you only calculate at runtime etc.
 
8:39 AM
because all of the other library works like a charm
 
@FaizRasool No it is not
 
@bwoebi at the moment I'm obfuscating the "important" part. I'm also using strip -s elffile .
 
the trick is to make reverse engineering software useless. … but you only can do that with dynamic code generation. As long as things are static, it's easy for it.
@HamZa what do you mean with obfuscating exactly?
 
for example, instead of printing:
printf("AB")
I do:
int c = 2;
c = c << 5;
c++;
printf("%c", (int) c);
++c;
printf("%c", (int) c);
ok not really difficult but it was the only thing I could think of what is easy to do
 
@HamZa such things tend to be optimized away by compiler btw...
that's just making your code unreadable, but won't really help.
 
8:46 AM
@bwoebi I don't use the -O parameter, so it shouldn't. I verified using objdump -S
 
but you should do -O, else your program might be not that fast…
 
@bwoebi Meh, it's for a CTF security game :-)
that's why I want to make it hard to RE. Otherwise I won't bother :P
 
hah :-D
okay
 
@FaizRasool The error message you provided doe smatch @HamZa's post
 
wordpress: I have a wordpress site, and on any page I can enter a path that precedes the actual path and get a comment section, though I've never set up such a thing.
for example: mysite.com/askjfkjnsff/mypage will get you to a comment section for mysite.com/mypage
 
8:50 AM
@PeeHaa i tried but it does not work
 
@HamZa just btw. I even suggest using -O3 parameter, as this usually abuses complicated x86 instructions which makes the asm hard to read.
 
@Mosho it's not a bug, it's a feature!
 
I suspected it could be something like that
how can I remove this "feature" :P
 
@bwoebi I might try that... The thing is, RE-ing with gdb is quite hard. Dedicated RE tools like IDA Pro seems awesome. The problem? It costs like 500$ for a license...
which means I can't get my hands on it...
It seems that IDA pro can generate "pseudocode" from a compiled executable. Which already gives away a lot of information
 
@HamZa you won't be using IDA Pro in case you use dynamic offsets… like hashing the flag and using some modulo of the hash to get the offset.
IDA can mainly statically analyze and evaluate a bit. But if the hash itself isn't present in code at run-time ;-D
 
8:55 AM
@bwoebi I need to google how to do that as I have no idea right now
 
@HamZa yeah, you need pure asm for that
 
oh, I'm screwed lol
 
I mean the critical functions need to be defined in asm
(not the calling code, but the called func itself)
@HamZa why?
 
@bwoebi I was hoping to be able to do it in pure C. The challenges I made now are "good enough", so I won't spend more time on it. I was just thinking for future reference
 
@HamZa yeah, then people are going to use IDA Pro I assume.
 
9:01 AM
I have one challenge that's easy that could be solved using "strings elf", the other one is a bit obfuscated and one essentially could solve it using gdb > look for functions > break point main > jump to function that prints the flag
I have a third challenge where it asks for input, the goal is to write a python (or any other script) to bruteforce this. Now ofc you could RE it, but writing a bruteforce script should be faster
a hardcore friend of mine did RE the last challenge to inspect the mechanism and bruteforced certain hashes in PHP lol
 
now new error
Fatal error: Class 'PHPExcel_Worksheet_Dimension' not found
 
@HamZa yeah, that's definitely something for beginner ^^ Even I could do that easily I suppose^^ … I had no idea what degree of difficulty you needed :-P
Anyway, I'm off for now :-)
 
@bwoebi cyaa and thanks
 
morn
 
9:24 AM
@DaveRandom is the travis support for pecl/pq your work, or is there some upstream?
 
ThW
Morning
 
moin
 
\o @kelunik
 
ThW
@PeeHaa which keyboard layout do you get in nl?
 
9:46 AM
@ThW qwerty
 
o/
 
ThW
@PeeHaa us or uk?
 
us
 
Today is the first day of my new/old job :-)
 
@Jimbo um?
new project on old job? :)
 
9:59 AM
@SergeyTelshevsky (I went back to previous company)
 
moin
 
@Jimbo oh :) I hope terms got better?
@DaveRandom mornin
 
@DaveRandom yo
 
@SergeyTelshevsky Yep, massive changes - and I'll be in charge of the whole stack re-write :P
@DaveRandom Mornin' luv
 
@Jimbo will you go perl? :)
 
ThW
10:06 AM
@PeeHaa Getting an us layout in Germany is a nightmare, seems like I need to visit Venlo ...
 
@ThW Venlo... I'm sorry for you :P
 
10:24 AM
@m6w6 I don't quite understand the question? The words make sense bu I can't figure out what your getting at... although brain doesn't really work on Mondays
 
@m6w6 Oh I see. I wrote that but IIRC I had a bit of hand-holding from @JoeWatkins (it was ages ago though, could be wrong). It's quite possible that it's a crappy way to do it and I have no issues with people who know better than I do changing it entirely if necessary.
 
Anonymous
10:48 AM
Can anyone think of anyway that i can use file_append in order to add to inline CSS? Atm it just adds to the bottom of the html file.
 
mornings
 
Why are you using file_append fo dat?
@tereško Monni
 
good morning
 
Anonymous
@PeeHaa It's a HTML doc builder - So i need the user to be able to submit a form which modifies the inline CSS of the saved HTML doc - does that make sense?
 
It does, but I fail to see how file_append is related
What is your code?
 
Anonymous
10:56 AM
the html doc is saved as a .txt file in the directory. The user fills in a form to add to the bottom of that file (It's a list of special offers for our website), so currently file_append in used to add another offer to the bottom of the file.

But now, they have asked if they can edit previous special offers instead of just adding - (Add expired banner to the images) And i'm trying to find a way of allowing them to do that via html form using file_append in order to add to the CSS to include expired banner.
 
database
You have reached the point where a database is better suited for the job
 
Anonymous
Shit.
 
Why?
 
Anonymous
Just shit with db, time to get learning i guess.
 
Yes now would be a good time :)
 
Anonymous
11:01 AM
@PeeHaa Thanks for your help
 
np
 
i want to connect 3 server having 3 database in cakephp how can i do this
 
my condolences
6
.. also, you will have to elaborate
what do you mean by "connect" ?
 
11:28 AM
Maybe you need a plumber :/
 
@PeeHaa Did you ever figure that thing out?
 
I am utterly clueless what is wrong :(
@Jimbo Can you draft a github release just to rule that out?
 
@PeeHaa There are multiple mini releases, this says it's the latest?
 
It would be stupid if packagist looks at github releases instead of git tags, but it is worth the shot
 
@PeeHaa okay created a draft
 
11:43 AM
@Jimbo Cannot see it. The linked thing 404s on me :)
Why does it say "untagged" in the url?
 
@PeeHaa Drafts aren't properly tagged yet
 
ah
 
Can you also force packagist again?
 
I just did, nothing changed there though
 
11:46 AM
Goddamnit. YUSOHARD
> As a result, anyone can now require 1.0.* and it will happily install dev-master.
But it doesn't do that
Why do you have that alias in there?
 
Because some dick made me add it
(I can't find the issue / PR)
 
posted on June 01, 2015 by J7mbo

J7mbo/twitter-api-php 1.0.3

 
Danack suggested
@Danack knows about the alias change, perhaps he can help here? :-)
 
@DANACK HALPS US!
It's officialer people. @salathe is the new docs overlord! github.com/salathe/php-web-master/commit/…
@Danack do you have any idea why packagist still thinks @Jimbo's repo is on 1.0.0?
 
@PeeHaa Not really - either packagist is just being slow, or the notification thingy is borked.
 
11:58 AM
@PeeHaa wtf is that hardcoded?
 
@Gordon Yes. Yes it is :)
@Danack :(
 
@Jimbo what happens when you do force update in the packagist page for the project?
 
I am tempted to troll github.com/salathe/php-web-master/blob/… with a comment that it's deprecated and they need to shift to mysqli
 
@Jimbo bug saldaek on twitter about it :P
 
But do the force update first...
 
11:59 AM
@Gordon how dare you
don't you see that it is a repo of The Web Master?
 
@tereško by law of php the right way
 
18 hours ago, by PeeHaa
450   if ((int)$user) {
 451     $query .= " WHERE users.userid=$user";
 452   }
 
@PeeHaa wtf. they better change that entire code to laravel
 
:P
 
12:02 PM
@Danack I did a force update
@kelunik Packagist and Travis CI have nice little green ticks next to them
(in services)
It's gotta be something to do with that branch-alias now
 
@Jimbo Ticks are small arachnids in the order Parasitiformes
 
@Gordon But they're GREEN parasites... happy ones!
 
the green ones are the most dangerous
if you think they are happy, you might already been infected to think so
 
lmao
"You shall use PHP... bzzzzzzz"
 
@Jimbo Have you done something fucky with the repository? Doing git clone https://github.com/J7mbo/twitter-api-php/ fails, and trying to clone it through sourcetree says that it's an svn repo...
 
12:19 PM
lolwut :P
 
hello
I want to ask - is it testable to call parent::__construct() id I call in constructor?
I am noob at unit testing
but want to write as much testable code as I know
 
@Danack try git svn checkout then :)
@Darius.V yes, the static is death to testability rule does not apply in this case
 
@Gordon - thanks.
 
0
Q: Chat feature request on Stack exchange Android app

IP AddressI love the design and layout for the new stack exchange app on android. Its easy to navigate around the app and post questions and answers on stackoverflow. Its also got notifications on the home of the app. However, there is no way to navigate to the stackoverflow chat feature which is availabl...

 
12:30 PM
@Danack Nope
 
Hi all
Somebody please help me
-1
Q: How to install and use php-pushwoosh on Ubuntu 12.04 LTS linux OS with/without using composer?

PHPLoverI'm a PHP developer by profession. I want to install and use php-pushwoosh on my system running on Ubuntu 12.04 LTS linux OS. For it I went to the link php-pushwoosh website There I come to know about I can install php-pushwoosh by using composer. "The easiest way to install the library is to u...

 
@Darius.V i thought "wow this guy must have a massive **** if he's so proud of his vauxhall vectra to use it as avatar"
 
@Gordon to be honest, i've never been concerned about what happens with communications between myself and facebook while it's in transit, only what happens when it has arrived at their servers.
 
@JoeriSebrechts hehe, true
 
Anonymous
so I'm finally done with this crap github.com/samayo/bulletproof
 
12:42 PM
@Worf lol
 
HI
on PHP site I am facing this issue sometimes What can I do resolve the issue
"already has more than "max_user_connections'active connections"
 
Anonymous
any feedbacks would be nice
 
Anonymous
4
Q: How to get rid of "maximum user connections" error ?

ahmedI am using MySQLi for my webapp but whenever I want to visit some particular page, I get mysqli_connect() [function.mysqli-connect]: (42000/1203): User ***_user already has more than 'max_user_connections' active connections. I tried already to close all connections but this does not improve th...

 
Anonymous
@varinder ^^
 
@samaYo feedback... README.md if($image["ikea"]) <--- missing {
 
Anonymous
12:47 PM
@JaakKütt thanks, you mean at the last example right?
 
Why are you using file_exists?
nvm... nix
 
@samaYo github.com/samayo/bulletproof#usage in "And simply require the class to upload" block
 
Should be file_exists($dir) without the ! I assume
 
@Jimbo What you're seeing is probably worth reporting as a bug - I suspect it's going to be caused by the composer.json having the version in it until recently, and in particular it had that there until after the tags.
You could just move one of the existing tags, or re-tag a new version now that that's been removed.
 
Anonymous
`@PeeHaa @JaakKütt yeah that ... thanks
 
12:51 PM
Why are you serializing data btw?
What if I just want an array instead? Do I have to parse the json first?
 
Anonymous
@PeeHaa to get a json value
 
Why would I want json?
What is the use case?
 
Anonymous
because that is a proper format to store, or use as api
 
Anonymous
say you want to keep imagw info in db
 
@DaveRandom I don't remember stuff too good ... it looks like something I done at some point ...
 
12:53 PM
If you want to add it to the db json is not the way to store it
 
Anonymous
it is better to store the json value, instead of an array
 
since found out how to use travis properly ...
 
@samaYo You should have separate fields instead of a json blob
 
Anonymous
@PeeHaa really? I thought it was more convenient to store in json. But, still I should leave the json part as is right? It might be useful ...
 
12:55 PM
Also you might want to use the STFU operator here and check whether the file indeed has been deleted. github.com/samayo/bulletproof/blob/master/src/… Or setup your own error handler
@samaYo Imo it doesn't add much
If I want to use XML instead I have to first decode the json and after that I can convert to xml
If I indeed need json I am more than happy to do json_encode myself
 
@PeeHaa or you use jsonX
 
Also you might want to move the validation stuff to a dedicated class
@Gordon Oh god. I hope that isn't what I think it is
 
or base64 //joking
 
WTF ibm
 
@PeeHaa it's beautiful :D
 
1:00 PM
@HamZa a client has an API where it gets JSON encoded in base64...
 
@Gordon I had some project a while back that needed that crap. It's Horribad(tm)
 
you can use all the x technologies on it :)
 
hehehe
 
hehehe
 
dupe!
@Machavity Whahahahahahhaha (sorry)
 
Anonymous
1:01 PM
@PeeHaa thanks, but I wanted to make the library a one-class thing only for easy use, I'll do another version with SOLID. I agree the class is meaningless but I blame phil sturgeon for that :)
 
@Machavity I like it because it makes so much sense if you think in terms of xml technologies. you just XMLify all the things in order to use your toolchains
 
@samaYo Fair enough
 
it's kind of crazy though
 
Anonymous
I started the damn project to learn OOP and git but then this happend followed by 30+ stars. Now to conceal the guilt of having a repo unworthy of 100+ stars, I was bound to change the big crap into a smaller crap.
 
@Danack Hmm, not sure about re-tagging a new version. Today I created a new tag for 1.03.. isn't that what you mean? :)
 
Anonymous
1:06 PM
/ fml
 
@Jimbo You tagged the same commit as 1.0.2, which is older in the history than the point where composer.json had the version removed from it.
 
Sad thing is I didn't make that
 
Anonymous
 
@samaYo I hope not. I have enough fun parsing XML as it is
 
Anonymous
1:09 PM
that's what I thought :)
 
Anonymous
/ json or nothing.
 
I had to fix my coworker's shipping calculations (API returns XML) and while he uses SimpleXML he forgot to cast the value to a string so when I went to serialize his array of data it blew up hard
 
@samaYo What if the attacker hid something else in the image? I would re-encode (process & save) it but that would be too much for a single class. Also you could lose some attributes
security is hard
I'm btw impressed of the fact you're building a profile on github. Look at mine, it's empty :/
 
Good morning
 
Anonymous
@HamZa it won't work, first the image probably won't return valid data so getimagesize would throw an error, or exif_imagetype .. but I agree against the one class idea.
 
1:15 PM
Errybody quit hatin' on XML.
 
Anonymous
@HamZa so you want me to give you some of my repo :p
 
Also:
BaseX is a native and light-weight XML database management system and XQuery processor, developed as a community project on GitHub. It is specialized in storing, querying, and visualizing large XML documents and collections. BaseX is platform-independent and distributed under a permissive free software license. In contrast to other document-oriented databases, XML databases provide support for standardized query languages such as XPath and XQuery. BaseX is highly conformant to World Wide Web Consortium (W3C) specifications and the official Update and Full Text extensions. The included GUI enables...
 
Anonymous
they will destroy your reputation
 
@DanLugg I would probably feel better about it if it weren't for SOAP shudders
 
Anyone with (very good) experience for designing building indexes for multi-languaged DB-s?
 
1:16 PM
@Machavity Just because people stab each other with pitchforks doesn't make them inherently bad.
The pitchforks... not the people; the people stabbing each other with pitchforks are probably best left doing what they're doing.
 
@Danack So at risk of sounding retarded, what do I do to fix it :P
 
@samaYo You can append a zip file at the end of a gif file for example and it will still work
I don't have any rep to begin with on github lol
Anyways, you're on the right track I guess
 
@DanLugg I'm so glad you clarified that ;)
 
:-P
@Machavity SOAP was good intentions that resulted in herpes.
 
Anonymous
@HamZa I think you should it first. There is zero chance of that happening
 
Anonymous
1:20 PM
@HamZa And I have told you a couple of time to start working on something together
 
Anonymous
If you don't have the time though, it's ok.
 
@samaYo I'm working on projects but I'm not allowed to disclose them
(school)
 
Anonymous
I meant open source. I'm only interested in learning more. I can't contribute or learn from the ones made by the php gurus here, because it's too advanced.
 
Anonymous
No one is willing to start easy :/
 
Gotta go. I got some ideas but no time atm.
 
1:24 PM
@Jimbo sacrifice a chicken and try tagging a version on a commit after the one that removed the version from the composer.json.
 
1:39 PM
@Danack E_LACIST
 
Hi can I ask help of this error Fatal error: Uncaught exception 'Services_Twilio_TinyHttpException' with message 'SSL certificate problem: self signed certificate in certificate chain'
Services_Twilio_TinyHttpException: SSL certificate problem: self signed certificate in certificate chain in
 
1:57 PM
Is there a more generalized term for AJAX that doesn't involve "XML"?
I've seen "AJAJ" but I'm looking for a more format-agnostic term
 
AJAY
 
GO TO HELL WITH YOUR YAML NONSENSE
10
 
:D
++context
 
Hi all
 
@DanLugg I think these days you're supposed to say "REST" ;)
 
1:59 PM
Somebody help me please
-4
Q: Where and how to write a PHP code for implementing pushwoosh using php-pushwoosh?

PHPLoverI'm a PHP developer by profession. I'm using Ubuntu 12.04 LTS system on my machine. I've installed php-pushwoosh using composer at following location on mhy machine : /var/www/gomoob-php-pushwoosh Now I want to write a program to implement push notifications for iPhone. But I'm not understan...

 
My mail() function returns false, I'd like to know the error details, where can I get it?
 

« first day (1689 days earlier)      last day (3252 days later) »