« first day (1209 days earlier)      last day (3965 days later) » 

user895378
00:00
^ If that doesn't work let me know because it just means I'm overriding it.
user895378
I would consider that behavior a bit too dictatorial now, so I'll change it if that is the case.
k tnx :)
All is well :)
  "headers": {
    "Host": "httpbin.org",
    "Accept-Encoding": "gzip, identity",
    "X-Request-Id": "cda8aec4-ec60-4b0b-b173-804b6402ca59",
    "Connection": "close",
    "User-Agent": "zanzibar"
user895378
cool.
user895378
I should probably add an option on the client so you can set the user agent once and then not have to do it for every request.
Yeah that would make sense
00:36
@HamZa I am now depressive .. I was happy to remember all those exception, just like those weird reason why a computer fuck-up, not mentioned in any documentation, kind of thing your remember because you suffered a lot... what so ever but now I feel destroyed. fml
well it's an article and a good one IMO. We should learn from it. But I already see some progress, for example the "pow" operator has been introduced (not sure if it's merged in 5.6 ?)
Anyways, I hope the inconsistency of function naming would be fixed. That would mean ofc that all (user) code need to be changed.
Which I doubt it would ...
@HamZa frankly I hope it too, the inconsistency is a real pain. All the other args sound like a variation of the inconsistency aka spaghetti problem
we could always fork our own PHP version :P
@HamZa lol
@happy just don't use php then?
00:50
Yeah that's always an option. I might be using nodejs for the next few weeks. So I will maybe haunt the JS room :P
@BenjaminGruenbaum no matter what I love php. I read a lot of stuff and I see a lot of argument on PHP. While I sometime understand the argument against this or that, I feel like the same apply for everything and frankly why would someone spend so much time editing an article about something if he/she didn't like the subject he/she arguing about. People like to tell what is wrong with things they like because they want it to be better. IMO
@happy what other serverside solutions have you tried?
@BenjaminGruenbaum not much. I am an amateur and a rookie one ;) but I love programming, it make me happy because I love it.
@happy so your argument on why you choose PHP over the alternatives is that the only language you know is PHP?
@BenjaminGruenbaum yes. You make me realize it is a poor argument
@Fabien Could you cut this guy out when you have time somewhere this or next week?
@BenjaminGruenbaum which language would you recommend me if I my preference was to learn something I can have a fast return on investment to make money of it?
@happy probably Python, start by making things with a micro framework Bottle and move to Django. It's very basic and the language is a lot more consistent.
@BenjaminGruenbaum thanks for the tip, I appreciate it
01:08
@PeeHaa why would you want to do this ultimately?
Read the first sentence :)
@PeeHaa I read it already, why would you like a chat search ultimately?
A search is useful for finding stuff?
Or I don't get the question :)
@PeeHaa yes. Would it make it crawlable trough Google for example?
No. The current transcript is already crawled by google. It is just for humans to search in because the SO chat search sucks big time
hahahahahha
01:13
@PeeHaa is it? I didn't no. I was under the impression it wasn't! It would a nice addition.. nice picture ;) my cat do it too and it's hilarious
@happy Google knows it all :) google.com/…
@PeeHaa who's that ?
night room
01:31
gn
user652649
02:04
morning
morning
02:22
morning
the things I have to go through to log the request payload in a java web app. I miss you PHP :(
user652649
02:34
sup! like my avatar guys? xD
user652649
user652649
every time i alter a myisam table i wish i could die instantly
user652649
takes hours every time
user652649
Ten hours after I said: “It should be a five-minute change”
user652649
user652649
02:48
going to get binned by cryptic... wait for it...
@Danack Yea, that thing is awesome. I actually have that installed on my personal laptop if I'm not mistaken
@cspray You know, it may actually have a really good side benefit of making people want to write moar unit tests to get more nyan cat.
@Danack This could actually be the case. At my last job I was having some problems getting the other devs to want to unit test
This could have been the answer
I mentioned this in JavaScript chat yesterday. Thought I'd mention it here to see if you have thoughts. I've been thinking of writing a programming language which trans-compiles into JavaScript and runs via Node.JS. It could compile into any other server-side language.
Basically the idea is it prevents XSS and SQL-Injection, and simplifies web-app syntax.
var stuff = param('something')
sql('insert into table set field=$stuff')
03:03
@GeorgeBailey And they told you to ask here?
And the system would automatically encode for SQL.
no
Just chatting. If you want me to stop I will.
K - np.
I thought they might be trolling as usual.
user652649
@GeorgeBailey prepared statements?
What you have there, is a good idea that doesn't work.
The code sample I showed you is sadly insecure, but my idea is to create a language that would make it safe, by automatically encoding.
Another example syntax would be something like
var data = sql('select something')
print <div>$data</div>
This one would encode for HTML.
03:05
Everyone thinks now and then, "hey lets just make a meta language to solve all our problems" and then they have twice as many problems.
I've been thinking about this for a couple years, so thought I'd chat about it.
I mean, surely it is a constant burdon for everyone to constantly have to encode their HTML. Surely that should be automated. Wouldn't you agree?
@GeorgeBailey Yes (though some don't) but I use a templating system to allow me to write HTML without having to escape HTML.
Interesting.
See, I use JSP, and CGI mostly.
So I have lots of lines like print '<div>' + htmlE(something) + '</div>';
What templating system do you use?
Er, my own - but it's really similar to twig.
lol! You use your own templating system, maybe I'll use my own programming syntax.
Sometimes I wish I had 30hours a day.
So how would you write a loop, say you wanted to print a financial report, showing one <tr> for every account.
Does the templating system have loops and if statements, etc
Well, I guess I'll head on. If you want to send me more messages, then just use @George, I'll read them tomorrow if not tonight.
I thought you'd left me.
this is chat - sometimes conversations take days.
Works for me!
tbh - if you're looking for a template system your should look at symfony.com/doc/current/book/templating.html
I prefer mine, but possibly only because I wrote it.
I know the feeling.
I've got a plan for my own webserver as well, which I started, and parts are in use but it doesn't have nearly the feature set I want it to have.
see ya later. :)
03:18
nn
03:36
goog morning. if one has an online product marketing site, how to let the people (in the rural areas) know about the product one is selling aside from advertisements say in the radio,tv, flyers?
I wish I could suicide myself just for the feeling to know I would be relieve from my actual problem. I have been on the same code for more than I would had think it would take me and I seem not to see the end of it.
user652649
lol
user652649
still on prepared statements limit?
@Cecil I would say infiltrate where people meet, cultural events
user652649
1
Q: Using SQL_CALC_FOUND_ROWS in a subquery

arvinsimI find that MySQL returns a Incorrect usage/placement of 'SQL_CALC_FOUND_ROWS' error if I put SQL_CALC_FOUND_ROWS in a subquery SELECT * FROM ( SELECT SQL_CALC_FOUND_ROWS * FROM test_table ) as T1 Is there a workaround for this? or am I just implementing it incorrectly? EDIT: Th...

03:40
@Cecil people are often shocked to realize people real people are behind web service and seeing face help make a contact
user652649
thank you for nothing as usual SQL
user652649
or should i say mysql?
@happy: yeah. i think that's it
Did you know, that sometimes Spock smiles because he is @happy
Sure beats your current avatar, if you ask me
@GeorgeBailey it does actually
03:44
good morning
@Cecil if you plant to reach business you might want to use the same technique as other business use to reach them. Sometime partnership with business group association is a nice way to extend your future client relationship by offering them a price reduction to make them more willing to try your service
@GeorgeBailey shortly my new smiling spock will sync :)
@happy: exactly. (y) thanks. now im happy. :)
user895378
04:43
Announcement: 16 hours later I've finally tickled php-src into making perfect forward secrecy a reality in encrypted PHP socket servers.
7
user895378
That is all. You may now continue going about your business.
06:27
@Jack could you please a) fix ext/tokenizer/tests/bug60097.phpt and b) first squash your commits (on your pow operator PR)
m59
m59
If you have an object that instantiate's other objects and uses reflection to figure out the object's dependencies, isn't it typically considered a problem that it is difficult to pass in other arguments?
06:50
@bwoebi The commits can be squashed during merge, no?
I didn't check ext/tokenizer .. it's disabled in my builds :)
Tokenizer test case fixed and pushed to Github.
07:05
@Jack not sure, but I thought that would overwrite credits...
It shouldn't.
Hmm, to the documentation!
I need to go off now
@bwoebi I'll shoot you an email when I'm done :)
@Jack best you rebase and squash
hi all, I have problem in URL REWRITING, but couldn't able to explain it, and also couln't solve. can anyone help me. stackoverflow.com/questions/21507792/…
m59
m59
07:21
@Muhammad mysql is LONG deprecated. Use mysqli or PDO instead.
Your sql query is dangerous. You should never concatenate user input into your query string.
Instead, use prepared statements with parameters to insert the value.
@m59 can refer any article for this, is this error is related to sql injection?
m59
m59
Yes, just google the things I said. There is plenty of information.
@m59 thanks
m59
m59
Also, use php to parse and route the url. htaccess is a poor choice. @Muhammad
but on the specific issue @Muhammad you are comparing b.id = $business_id. But $business_id is a combination of business_id and business_name
if the value you are comparing is a string, you need to put them into quotes ('). You wouldn't have to do this if you use Prepared Statements which is recommened.
07:27
@andho yes, this is for URL rewriting, else the following work well: <!-- <a href="contents/details.php?b_id=<?php echo $business["id"]; ?>" style="text-decoration:none; color:#000;"><h1 style="text-transform:capitalize; margin-bottom:5px;"><?php echo $business["name"]; ?></h1></a>
Morning
m59
m59
@Muhammad and put all that style is a css file.
@andho $business['id'] is not string this is numeric.
@m59 I have removed the style but same
m59
m59
@Muhammad I wasn't trying to fix your problem =D just offering overall advice
@m59 for mysqli or POD, do I need to rewrite all my code, or I can implement with existing code?
m59
m59
07:32
Yes. If you follow best practices, it should be extremely easy to implement, but from the looks of your current code, I am guessing that you haven't.
@Muhammad in the first one you didn't append the business name into the b_id in the url
m59
m59
I could be wrong, but I believe in making a Database class and using its methods for all of your database work. Then, you could just change out the database implementation within that class and none of your current code will break.
In the second URL you have appended the business name
m59
m59
I use PDO, but I could change my Database class to use mysqli instead and all of my code using the database class would still work. Get what I mean? @Muhammad
@Muhammad you could practically replace mysql_ with mysqli_, then slowly change to Prepared Statements
07:35
Morning
morning @everyone
@andho you are confused by 2 codes, one where I reference only b_id is ok, that works, but the 2nd one, I changed for URL rewriting.
@andho (1) <a href="contents/details.php?b_id=<?php //echo $business["id"]; ?>" "><"><?php echo $business["name"]; ?></a> (2) <a href="contents/details.html?b_id=<?php echo $business['name']; ?>/<?php echo $business["id"]; ?>" "><?php echo $business["name"]; ?></a>
check your error, it says "my own business.html" which you put into b_id
@andho yes, here is my .htaccess rule: RewriteRule ^b_id-([a-zA-Z0-9_-]+)-([0-9]+).html$ contents/details.php?b_id=$2
m59
m59
Man htaccess sucks
08:05
@Muhammad here is your second URL:
contents/details.html?b_id=<?php echo $business["id"]; ?>-<?php echo $business["name"]; ?>.html
as you can see, this have nothing to with the rewrite. This is before the rewrite. This is how you are sending your link to the client. If the value of $business["id"] is "1" and value of $business["name"] is "My Business" then your URL becomes the following:
Morenign iroom
contents/details.html?b_id=1-My Business.html
@andho yes
$b_id = "1-My Business.html"
your sql becomes
@andho this is wrong
08:08
b.id = 1-My Business
@andho this is the problem, how to deal with.
@Muhammad :'(
@andho b.id = 1 is right
is the URL correct?
2 mins ago, by andho
contents/details.html?b_id=1-My Business.html
@andho this is wrong. this should contents/details.html?b_id=1
08:14
@Muhammad then why is your php code like that
8 mins ago, by andho
contents/details.html?b_id=<?php echo $business["id"]; ?>-<?php echo $business["name"]; ?>.html
@andho I need to rewrite it, for user friendly URL.
m59
m59
use php ^
I just cannot understand why htaccess is used for routing
@m59 Me neither
well I leave you to figure this out yourself based on the information I've given. Also, you might consider to Hire a Developer™ @Muhammad
m59
m59
Yay! I was just agreed with by a good dev. ++myEsteem
I'm never right about anything in php lol.
08:20
@m59 you will need some amount of ModRewrite (for apache) if you want to remove the .php from your url
m59
m59
Well, of course, but that's three lines
Well, I use 6, 1 set for my site and the other set for api
make that 4
lol ^
Looked liek some real time counter of your rules ;)
yeah, I don't know what @Muhammad is doing this either. I would suggest he read some articles regarding this but then again, it seems obvious that he doesn't like to read
m59
m59
heh
m59
m59
08:25
why cv?
Because it is duplicate
does CVed questions show up in google?
Yes, if not deleted.
m59
m59
lol, was the link wrong originally?
It's a different post now =D
Yes ;)
08:33
@andho @m59 how to use php for this purpose?
m59
m59
echo $_SERVER['uri'] @Muhammad
See what that is
Use htaccess to route all requests to one php file, then use $_SERVER['uri'] to look at what is requested and route it however you want to.
hi guys!
m59
m59
@Muhammad here's a post you might be interested in. It's a similar topic (routing) stackoverflow.com/questions/21212978/…
@Muhammad sorry man, I can't help with that. htaccess is bad for routing.
@m59 thank, leave it, can you guide me how to convert my axisting php code to mysqli or pod
m59
m59
08:37
I gave you some suggestions earlier =D
If you have any questions about what I said earlier, I would be glad to further my explanation.
can anyone help me out on a small mysql query?
m59
m59
@indago ask your question
People will answer if they can and want to
0
Q: Calculate running balance per product in mysql view

indagoI have a view (vwbalance) in mysql that i use to check the current inventory balance of our product in the store,It has been working very fine with one product. Here is the view CREATE VIEW vwbalance AS SELECT a.`id` AS `Trans No`, a.`tdate` AS Siku, a.`section` AS `Section`, `g`.`p...

m59
m59
LOL
Smallest sql question ever ^
the question is small its just i needed to explain in detail
m59
m59
08:40
Oh oops, what's the etiquette on starring messages in this room?
In the js room, it's pretty chill...not sure here
i have the full query, am just missing on the grouping...
@Jack merged.
@m59 check the link in the description
m59
m59
08:56
@andho oops! If a room owner could unpin that, that would be nice. My apologies.
i have a php page which receives POST data, i'd like to forward that post data to another PHP page, how do i do that??
m59
m59
@NokImchen include 'otherpage.php'; ?
mopaningni @salathe
@m59 its something like this : user submits data in default.php , the data is send to same default.php where the data is validated, if invalids were detected then the user is shown errors, however if there are no errors then the user is forwared to confirm.php
@m59 so, i think i cant use include i want the user to be taken to anothe page i.e. confirm.php
m59
m59
09:02
@NokImchen In that case, do your users a favor and use ajax.
use conditions and on the confirmation, u may add header('Location something.php'). suggestion only ^^
@m59 i'm trying to use minimum javascript, ajax, cookies, etc. Trying to make maximum use of PHP
m59
m59
Heh, do what you wish, but I have a personal conviction about not helping people write things I would hate to use.
@Cecil yes, currently i'm using header("Location: confirm.php?mobileNumber=$mobileNumber&operator=$operator&circle=$circle"); but i'm not satisfied because its a GET method which makes the url look a bit nasty
okay.
09:06
@m59 actually m making a mobile recharge website. Some users might not have ajaz supported browsers in their cell. So, i'm trying to making it serve sided as much as possible so that browsers with minimum facilities can use my site..
m59
m59
Like what device?
@RouvenWeßling Yeah, sure
@bwoebi Awesome, thanks! :)
@m59 like default browser of nokai 3230 ?
Mornings
09:16
@NokImchen why would you want to forward the POST data?
m59
m59
Yeah, screw that phone.
When I use an abacus, I don't expect the internet to work.
@m59 hmmm
m59
m59
Sprint gave me and my wife each an iPhone 4s for free. (nothing special, anyone could get that deal)
@andho i want to forward: mobile number, area code, operator code
@NokImchen question is why? Haven't you done everything you need with this data already?
m59
m59
09:20
If it's needed again, it sounds like session data.
I definitely don't know why you wouldn't want to use session data.
@m59 yup, session data is what i need. But just trying to find an alternative :)
m59
m59
Why?
let's get nasty and use etag based sessions >D
hmm.....i'll google a bit more
09:26
@NokImchen your alternative shouldn't burden the client
@andho yes, i dont want that at all. I'm making my site very very user friendly
m59
m59
Perhaps this view is less common among php room people - my view is that page's should never reload.
Are you trying to avoid resubmitting the data on refresh or back button? @NokImchen
m59
m59
Very user friendly = don't make them reload pages.
@m59 only a sith deals in absolutes
m59
m59
09:28
Sign me up =D
but Yoda is a sith "Do or do not, there is not try"
m59
m59
I am kidding about the absolute part, but close.
AJAX ALL THE THINGS! (at least most of them)
@andho nope, m trying to avoid manipulation of data by the users (hackers, crackers). If i use GET method, its very easy to manipulate the data.
@NokImchen and why don't you want to use session?
@NokImchen POST can also be manipulated by user
09:37
@andho if a user open the same page in same browser in 2 different tabs, will my session data be saved differently for both the tabs?
@NokImchen you can use a token for each tab
morning
@NokImchen something similar to CSRF
my session data is not getting updated :(
session_start();
// store session data
$_SESSION['mobileNumber']="$mobileNumber";
@andho please guide me how to have different session variable for every tab
09:52
guys, any ideas how to find out what autoloader was used to load a particular class?
@zerkms without touching any existing autoloader?
yep
a HUGE app
near impossible, I think
with a lot of legacy and ZF1
hello guys!
09:55
hi, @reikyoushin
@NokImchen your session works right?
@andho yes
okay. so
1. on the page that loads your form, put a random string into a hidden field. call it `token` if you will. Also save the `token` into the SESSION.
2. on the page that handles the form POST, check if the token sent from POST is same as the one in the SESSION. Save the POST data into the SESSION with the `token` as the key.
3. Redirect the user to the next page, put the `token` into the URL.
4. In that page, retrieve the POST data from SESSION using `token`.
5. (optionally) remove the token and it's related data from session
I do the same for websocket stuff ^ except mine is stored in the DB
@andho is it safe? if 1000 users are in same page, 1000 different token shall be generated, if one of the used do a bit of manipulation and "predicts" a token of another user, the hacker shall be able to get the victim's info, right?
10:05
@NokImchen That's why your token is truly randomly generated so it can't be predicted
@Jimbo not 100% safe
@NokImchen nop, he has to guess the PHP session token (and any other stuff that identifies a users session), and you random token you generated
@NokImchen Nothing is 100% safe
i still want something atleast theoretically safe
Lol. A random, cryptographically secure token.
openssl_random_pseudo_bytes ( int $length [, bool &$crypto_strong ] )
> Generates a string of pseudo-random bytes, with the number of bytes determined by the length parameter. It also indicates if a cryptographically strong algorithm was used to produce the pseudo-random bytes, and does this via the optional crypto_strong parameter. It's rare for this to be FALSE, but some systems may be broken or old.
I'm not just talking any token ^ the above (I thought) was pretty obvious
10:08
@Jimbo hehe
But there's always the possibility that I can go on a website, type in a random user id, hit a load of random keys and strike lucky lottery-style and guess someone's stuff - you just can't get around that. You can make the odds insanely high but nothing is 100%
You can limit the number of false ones though - I log any false matches and the offending IP
if PHP is able to pass post data from one page to another then all the probs would b solved :(
@NokImchen if only it was possible to distinguish between "one page" and "another page"
please wait huh, i'll make a flow chart'
@NokImchen well, as you can see, PHP sucks. You should remember that. It's sad, but it's true. It even can't pass data between pages. It's very common problem in PHP .. :(
10:17
i'm validating the data in every page, because some "kids" might try editing the data , so to avoid any error i want to validate the data using PHP (not JS) in every page
@NokImchen that's not a PHP problem, that's a HTTP feature.
tsss
@NokImchen Do your validation with both PHP & JS :-)
@Jimbo just do all thing on js :p
10:22
@AlmaDo Lol. jQuery All the tings
and md5() the rest
yeah
yup, but i cant rely on JS, it can be easily manipulated in browsers. I want something which CAN NOT be manipulated by the user
then hide your code from user
@NokImchen Yeah. I mean, you should have both - JS for normal users so that catches most of the stuff and their browser does the work. But if they send incorrect data, it's validated server-side too. Simple things in JS like "this field shouldnt' be empty". Your backup is your php
@Jimbo you can easily hide your js code from user so he won't be able to change it
10:24
@AlmaDo You can obfuscate it but that's something else...
@Jimbo just insert 80 line breaks at page's start :p
@AlmaDo line breaks? means new lines?
yeah. so user will open a page and see nothing in source code
Jes
Jes
hi
how to make a ajax call with the signup form data in cakephp
@AlmaDo hmm.... too safe to rely on that trick :P
10:30
a shame :(
is cakephp still alive?
as you can see..
I think it's not alive, but it's corpse is still smelling
@AlmaDo just kidding, we all understand jokes :)
@NokImchen nah.. nevermind. I'm just a trololo-man :p
lol
10:34
@AlmaDo trololo? troll?
@NokImchen Honestly think you're over-thinking this. The completely random token generation of 32 chars + user Id will be enough
yes, u r right. But still i'm not using it. Cos i'm a perfectionist :P
i've found another error-free work around
Go on...
I've found another work-free work around
@AlmaDo nice one
10:38
@Jimbo THIS!
@AlmaDo Lol. I achieved listening to that for 5 hours once playing Battlefield a few years back with some friends - never again.
hehehe

« first day (1209 days earlier)      last day (3965 days later) »