« first day (1776 days earlier)      last day (3169 days later) » 

2:00 PM
@Abe @Orangepill @Ocramius here's the SO question that seems to be hitting on the issue (and a guy from ThoughWorks makes a good point in the answer): stackoverflow.com/questions/25953828/…
 
@HassanAlthaf well then the scaling won't help because 2560x1600 at 125% is the same as 2048x1536, sry
 
2560 is at 200% default
250% is too huge.
Oh ok
 
@HassanAlthaf ah ok
 
@tereško I tested: the output of echo $_SERVER['REQUEST_URI']; for this url: www.example.com/test.php is /test.php, right ?
 
posted on August 27, 2015 by kbironneau

/* by Taverne */

 
2:04 PM
@Sajad correct me if I am wrong, but what you need to to is, when accessing http://localhost/lorem/ipsum/sit/dolor/amet you want read in index.php file the "lorem/ipsum/sit/dolor/amet" string. Is that correct?
 
@HassanAlthaf couldn't find any solution other than: get used too it
 
lol @MarcelBurkhard hehe.
I might have to delete windows off.
 
@HassanAlthaf you can obviously adjust the text size in your IDE
 
@tereško yes it is.
 
2:06 PM
@Sajad are you using .htaccess?
 
@Sajad and your problem now is that, when you accesshttp://localhost/lorem/ipsum/sit/dolor/amet, the index.php file is used, but the string is not there. IS that correct?
 
@MarcelBurkhard no
@tereško yes
 
@Sajad then you should look where it gets lost, by examining ALL the fields in $_SERVER array (sorry for edits)
 
Guys how can I select users that are friends with achother, this is my query
INNER JOIN approvers AS a
ON ((a.approved_id = ? AND a.approver_id = u.id) OR (a.approver_id = ? AND a.approved_id = u.id))
Very simple!
 
@Matthcw full query and error message... ?
 
2:10 PM
Umm, no just say
"If this user is friends with that user AND that user is friends with this user, GET HIM"
Currently, it pulls the same user twice because it says, Get the user that is friends with user OR Get the user that I am friends with
So pulls out two of the same row
instead of uniting one row
 
Hey all, I'm trying to come up with good wording for a question. Does, "How to run CakePHP without running bin\cake server?" make sense?
 
@Matthcw good, tell that your database and see what happens, good luck
@Ryan the wording makes sense, the question doesn't :P
 
@MarcelBurkhard why doesn't the question?
 
@Ryan you're looking for a production web server I assume?
@Ryan because it isn't related to CakePHP that much actually
 
@Machavity hadn't seen that, awesome
 
2:15 PM
@MarcelBurkhard not exactly. I'm making a simple database for me and my coworker to use. I want to be able to install WAMP on her computer and bookmark a page localhost/conferences so she can access it. Right now I'd have to always run bin\cake server first in CMD
 
@tereško I can not change my codes, I just should change this file, localhost.conf
 
@Ryan yeah but still, read this: http://book.cakephp.org/3.0/en/installation.html#development-server

and then compare it to this:
http://book.cakephp.org/3.0/en/installation.html#apache

basically bin\cake server is just your development webserver, if she already has wamp you don't need it if you configure everything properly (docroot etc.)
 
I should set it with: $_GET['rt']
 
@MarcelBurkhard Hahah nice joke
 
@Sajad are you telling me that you cannot edit php files to debug a problem?
 
2:19 PM
which file ?
file's mywebsite ?
 
index.php
 
@tereško yes I can not. because my routing system is not standard
 
@Matthcw for us to help you we would need to understand the relevant tables of your schema
 
It just work with it: $_GET['rt']
 
@MarcelBurkhard yeah its that config I don't know. Reading this now, hopefully I can understand it. Thanks
 
2:20 PM
The only relevant table is
ID, APPROVER_USER_ID, APPROVED_USER_ID
ID auto increment
User id is user ID
relational tables
I just want to know how I can group to friends i.e.
 
@Ryan the article isn't really about the basics, I think you'll need this too: tuxninja18.wordpress.com/2012/05/24/…
 
 ID, APPROVER_USER_ID, APPROVED_USER_ID
1              22                        11
2              11                        22
 
@Sajad could you please explain to me, how putting var_dump($_SERVER); at the top of index.php and later removing that line, will affect your routing system?
.. which, BTW,m should have never been hardcoded to a superglobal
 
@tereško let me explain
my website has 3 page !
home.php
result.php
other.php
here is my routing system:
if (empty($_GET['rt'])) {require_once('home.php');}

else
{
	$url  =  rtrim ($_GET['rt'], '/');
	$url  =  explode('/', $url);
	count($url) >= 3 ? require_once('search.php') : require_once('other.php');
}
 
.. you did not understand my sentence
 
2:23 PM
can you please let $_SERVER go ?
can I do that with $_GET['rt']
?
 
Mornings =] home
 
morgen @RonniSkansing
 
goedemorgen [=
 
@Sajad you would need url rewriting (for example using .htaccess)
 
Enjoying code and the life @PeeHaa
 
2:26 PM
@MarcelBurkhard yes I need, but my web server does not support .htaccess
 
@Sajad then write var_dump($_ENV); and look that is inside that
 
@RonniSkansing Yeah weather is shitty, but life is good :)
 
@tereško array(0) { }
 
yea, same here lol. Hmm I think I am going to build a my very code framework, just to have a php framework in my github account
 
@Sajad your paths will look like example.com/index.php/other ?
 
2:27 PM
@MarcelBurkhard well that one I already know. I just don't know how to have it come up without first running the server.
 
@PeeHaa what you mean shitty? It's summer, rain can't stop us!!! :D
 
@RonniSkansing Gotta have at least one frameowkr in your portfolio :P
 
@MarcelBurkhard my path is like this: www.example.com/?rt=class/function/agr1/arg2
 
@PeeHaa yep =]
 
@Naruto Fucking shitty country :P
 
2:28 PM
@Sajad are you building a website or a backdoor?
3
 
@Sajad why could you give me this, and not the output of var_dump($_SERVER) ?
 
@MarcelBurkhard I just changed my httpd.conf to Document Root "/wamp/www/dev/cakephp3/tradeshows/webroot"which works at Localhost but when I go to localhost/events it gives 404 error, server not found.
 
@PeeHaa you better be talking about my northern neighbours then ^^
 
tereško have you sleept? Yesterday before I got online, you where at it. When I went to sleep, you where at it... and now when I come home from work, you are still at it
 
@tereško this it array(0) { } aslo for var_dump($_SERVER)
 
2:29 PM
@Ryan 404 ? Check the logs of your Cake application then
 
@Sajad bullshit
 
@MarcelBurkhard uh how or where would I do that?
 
@RonniSkansing :D
 
@Ryan I don't know CakePHP sorry, but 404 is just not found, so the server is found but the resource/route/whatever isn't
 
@tereško ow wait, this is for var_dump($_SERVER)
 
2:30 PM
@AnmolRaghuvanshi =]
it's funny, but I wont taunt
 
Sup @MarcelBurkhard
 
@RonniSkansing not much new, working on a symfony2 project at work, trying some redis / centOs at home
 
Lately the talk about centOs in here has made me kinda courious too
 
@RonniSkansing although quite distracted by games and stuff :D
 
2:33 PM
which games?
 
Damn, isn't there any autolayout in C# like Swift?
Have been trying to center
This textbox and
Button
 
@RonniSkansing For the record - I think if you're interested in Centos, try Fedora first. The way that Centos packages are years out of date gets.....annoying. Fedora is basically the up-to-date (and less stable) version of Centos.
 
@RonniSkansing mostly stuff, as in youtube, and some "gaming" ... you know agar.io?
@Danack what about CentOs with EPEL?
 
@Danack thanks for the tip, really appreciated.
@MarcelBurkhard never heard about it. =)
looks.. special.. heh
 
@RonniSkansing yeah, I uninstalled battlefield and stuff to play less and now... I play shitty games
 
2:36 PM
actually.. its quite fun
 
@RonniSkansing it's addictive, stop right now!
 
/me is only waiting for Fallout4
yea, I am gonna close it now
 
@MarcelBurkhard still very meh imo. I haven't actually used Fedora to know that it's actually better, but the epel stuff is still out of date.
 
I have to write a shit framework
 
^^
@RonniSkansing you mant me to come up with a name?
 
2:37 PM
Sure
 
@RonniSkansing how about SuperHITframework? ;D ;D
 
Call it Larpal
 
sry got the upper/lowercase wrong
 
@RonniSkansing We don't need another one, just keep writing uninstallers. :P
 
2:38 PM
@kelunik =] heh
We def' do not really need another
 
@Sajad , this is what var_dump($_SERVER) looks like: codepad.viper-7.com/EkbtdO/5.6.10?test=/lorem/ipsum
that not what you showed
 
But if I only write uninstallers, I will be called a lamer forever..
 
@RonniSkansing you could call it AAA Framework (Triple A)
here's why: http://pastie.org/10379600
 
Though if you ever want to create your own packages on Centos - feel free to ask me about that as I package most of the things that I need.
 
SOMEONE CODE FOR ME
<?php
//Display Chats
if(!isset($GLOBALS['$on_page'])){
include '../../php/mysqliconnect.php';
include '../../php/functions/friendlydate.php';
session_start();

/*THIS QUERY REQUESTS MORE DATA THAN NEEDED, EDUCATE YOURSELF
AND DONT REPEAT THIS INEFFICIENT METHOD*/
$sql_get_users = "
SELECT u.id AS uid, pr.profile_pic AS pic, u.username AS username, m.msg_date AS date, m.msg_content AS msg, m.msg_seen AS seen, m.to_id AS sent_to
FROM users AS u
INNER JOIN profiles AS pr
ON pr.user_id=u.id
INNER JOIN msgs AS m
MAKE ME A SOCIAL NETWORK NOW
PROGRAMMING IS TOO HARD FOR ME
 
2:40 PM
nice
 
DO IT NOW
 
Though I've just given up on using Cloud-init for EC2 as I've come to the conclusion that it's not worth the effort getting it running.
That's an example of a package that is way out of date on Centos, and its dependencies clash with stuff I want to install....which makes life annoying.
 
@RonniSkansing I still miss a Laravel uninstaller. ;-)
 
(wink)
@kelunik the taint of Laravel can never be removed =P
It will be with you forever now
 
2:44 PM
@RonniSkansing Composer scripts ftw. ;-P
 
@tereško sorry, I disconnected, I can not send the output, it is too long ...
 
Hmm..
@kelunik I wasnt aware of the hooks/script thing in composer
 
OK @Ronni i need your help with MySQL
very briefly
 
It's pretty useful to uninstall things. :P
 
2:45 PM
BRB
 
@tereško ok, I show you as <pre> ?
 
@Matthcw If I can help you, I will. Shoot
 
@Sajad I need just the content. The `<pre> tag was for html to format the output in a readable form
 
yes
ok
 
:-)
 
Back!
OK:
So the problem is that I am trying to select friends that are friends with eachother
 
So select the individual friend that I am friends with if I am friends with them AND they are friends with me
My query says:
INNER JOIN approvers AS a
ON ((a.approved_id = ? AND a.approver_id = u.id) OR (a.approver_id = ? AND a.approved_id = u.id))
(approvers are just the name of friends on this site)
This query selects the friend twice
since it says OR
 
@tereško can you open the link ?
 
ye, I am readong
 
2:50 PM
ah ok
 
So it grabs You, since I am friends with you, and it grabs you again because You are frieds with me
I want it to ONLY grab you ONCE, if you are friends with me AND if I am friends with you
 
@Sajad did you simply open http://localhost when generating it? Because I do not see any other parts
 
can I be friends with you, but you not with me?
 
Yes
Like twitter
A better example would be twitte followers
Approvers = Followers
 
@tereško I can open my website
 
2:52 PM
nothing like http://localhost/test/something
 
do you know what is the problem ?
 
So if you approve me, you go into the databse and look like this
ID        APPROVER_ID          APPROVED_ID
1                1                                2
 
you didn't open any useful link
 
problem is: http://localhost/login does not go to login page
 
@Naruto lol it's not like there is a big difference (weather wise) :P
 
2:53 PM
@Sajad is that output from opening http://localhost/login ?
 
Then if I approve dyou it will look like this
ID        APPROVER_ID          APPROVED_ID
1                1                         2
1                2                         1
 
could you try a LEFT JOIN ?
 
@tereško it is index.php
all are index.php
 
or SELECT DISTINCT
 
Nope, left and right joins seem to make no difference to database
 
2:54 PM
you have no idea what I am asking you to do
don't you ?
 
ok, try SELECT DISTINCT
 
It's an inner join how do I do that?
Subquery?
 
@tereško honestly no, do you want to I give you screenshot ?
 
I want you top open http://localhost/lorem/ipsum and send me the output of var_dump($_SERVER);
 
@Matthcw yea, but maybe you could instead do a group by
 
2:55 PM
@tereško ah ok !
 
AH sure, ill try
 
Tried it, even with the group by, nothing worked
 
@Sajad and what do you get, when you open same link, but with var_dump($_GET) ?
 
Hold on I have to go a again BRB
 
2:58 PM
Is it possible to use PHP for frontend/backend. If I want to send data (json) from PHP Application to Node.JS I will use http server built in the node.js.. The browser will receive events from websocket via node js?
 
@tereško array(0) { }
 
ok could you put the full query in a pastie.org @Matthcw
and was the group by with a distinct?
@I'll-Be-Back I do not see why not
 
I see
 
@tereško me ?
 
Back
Sure
 
3:00 PM
the index.php?rt=$request_uri; part is not working as I expected it to
 
yes !
localhost.conf has problem
is it good : I use of that site and convert my htaccess code to nginx ?
 
@PeeHaa summer they say.. I was tought in school that summer is a nice period of time with lots of sun! :P What is dis madness?
 
Its a big query, but the rest works, Only this last small bit is causing trouble
Basically the whole query is meant to select the latest messages from your friends or approvers list and order it by date and only show people who are mutually approving you
I highlighted the relevant part
 
what happens when you open index.php?rt=something ?
 
my website does not load and array(1) { ["rt"]=> string(9) "something" }
 
3:05 PM
@RonniSkansing Just wondering. I think PHP is not suitable with Web Socket implementation. So I will use HTTP API for sending and receiving. Websocket on the browser via node.js for other thing.
 
@Sajad hmm
 
do you know what is my localhost.conf ?
it is exactly what is in your githhub
 
@Naruto I always learned in school we have shitty summers and weak winters :P
 
I changed it again
 
if (!-e $request_filename)
{
    rewrite ^/(.*)$ /index.php?rt=$1 last;
    break;
}
 
3:09 PM
I put it where ?
 
put this between root /var/www and try_files lines
in localhost.conf
 
ok
 
@Matthcw did you try grouping by a specific table.id ?
 
@tereško and one time again, do you know what is my current localhost.conf ?
 
instead of just id
 
3:10 PM
Ah, no I just grouped by id
 
@Sajad look inside `/usr/local/etc/nginx/
 
I know where is that
I opened it via ee
 
It's just meant to be joined to the users table
to hide users who you are not mutual with
 
server {
    listen   80;
    server_name localhost;

    root /var/www;

    try_files /index.html $uri @php;

    location ~ .php$ {
        include fastcgi_params;
        fastcgi_pass unix:/var/run/php-fpm.socket;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
    location @php {
        include        fastcgi_params;
        fastcgi_pass   unix:/var/run/php-fpm.socket;
        fastcgi_param SCRIPT_FILENAME $document_root/index.php;
    }
}
here is my current localhost.conf
 
BRB, let me eat something usually after eating I get a significant increase in brain power which helps solving problems
 
3:12 PM
:) it's just opposite with me
 
@Sajad well, I told you between which lines to put it
 
I did
I'm restarting (nginx and php-fpm)
 
@Matthcw if nothing works and noone else in here gives you the answer, feel free to create a http://sqlfiddle.com/ with a the tables, some mock data and the query.
It will make it much easier to just give a go
 
@tereško It get better !
now, all url is not index.php
but I have a error from autoloader
I'm trying to solve it
 
@kelunik those composer scripts are awesome
thx, I guess I should revisit the docs more often
 
3:18 PM
@RonniSkansing Yeah, it's the one thing I learned from the internal presentation of composer at work. :P
 
Great share. I guess it's possible to really make a uninstall with that. If you try to install X, it will throw up, already got X? It will remove it =]
 
@tereško please take a look at these two photo (can you give me a correct path ?)
 
@RonniSkansing I'm pretty sure you will be able to get root access to a lot of servers with it, as most people cache sudo passwords...
 
cache sudo password?! =/
 
Type it once and you don't have to type it the next X minutes. And this affects sub-scripts, too, unfortunately.
 
3:25 PM
yea okay, took me a while to understand it.
Awesome @kelunik
this calls for awesome work trolling
 
One composer update at the right time and everything will be deleted using rm -rf /, including mounted network drives. :P
 
@tereško huraaa ! done !!!
@tereško are you there ? I told all things are fine !!!
 
I see
 
you can be more happy a bit, because this is the result of your try for almost 3 days
 
3:40 PM
Hello guys
I need some help with a html form and php
 
Has anyone tried using PHP Session into Node.JS ? Any cumbersome?
 
@tereško now every thing is fine, but for more confident I want to say, do you know there is this line in the my localhost.conf ?
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
 
@RizwanAhmed shoot
 
@Sajad yes , and?
 
@I'll-Be-Back why not just get a unique token from nodejs and pass that to the session?
 
3:42 PM
@tereško because you told me last night use it:
fastcgi_param SCRIPT_FILENAME $document_root/index.php?rt=$request_uri;
 
@Sajad but that didnt work
because passing this pay parameters to php-fpm was not possible
 
and after that you told this:
fastcgi_param SCRIPT_FILENAME $document_root/index.php?rt={$request_uri};
 
which didn't work either
 
@RonniSkansing That might work too. Good idea. Is there example tutorial about that?
 
@tereško yes, ok well, I just wanted to know you notice that or not :)
 
3:44 PM
@I'll-Be-Back What are you trying to do?
 
@tereško oh one thing, can I get a backup of my server ?
 
@I'll-Be-Back really dunno =]
 
@Sajad you can use vbox to clone a server
 
ok
tnx
 
@RizwanAhmed ask the question may i can help??
 
3:48 PM
@AnmolRaghuvanshi : I have a html form and I want to send those details to a mail ID and after sending that it showed show a thnak you message on the same page is it possible ?
 
yes just set the header like header('contact.html?result=success'); @RizwanAhmed
 
Is there any example ?
any reference ?>
 
@kelunik On PHP, After user logged in, in order to use websocket on the browser via node.js it has to check if user has logged in or not in nodejs?
 
Hey @marcio you still want to do RFC part of the callable thing?
I finished it some time ago, just need to port all tests to phpt format
 
@RizwanAhmed look at this may it help stackoverflow.com/questions/15130493/…
 
3:54 PM
Thank u i will look into it
 
and one more thing @RizwanAhmed The best way to stay on the same page is to post to same page.
<form method="post" action="<?=$_SERVER['PHP_SELF'];?>
 
@nikita2206 Can you share which branch that is on, and do you mean writing the words for the RFC?
 
@I'll-Be-Back Yeah, guessed that. You either need to store your sessions somewhere and in format so you can read them in Javascript or you need to use a special token that's associated with the user. However, you will need some other form of communication to close websocket connections when the use logs out.
 
Thank u anmol
 
@Danack github.com/nikita2206/php-src/tree/callable-typehint yeah, I could do that too, probably, but I have quite a bit of work at my job so I don't know when I'll be able to do that
 
3:58 PM
It's actually exactly the problem I'm currently working on.
 
is there a PHP library for spelling things in the NATO phonetic alphabet yet
 
@AnmolRaghuvanshi : I also heard that it can be done using AJAX
is it possible ?
 
@nikita2206 oh that is a different thing entirely, and one I'm not on top of to write an RFC for. Thought you were talking about the $fn = callable($foo, 'privateMethod') one for making callable be sane to pass around.
 
@Danack oh that one I'd love to see as well
 
@prograhammer eh?
 
3:59 PM
And I actually wanted to do that unless someone does until 7.1's freeze
 

« first day (1776 days earlier)      last day (3169 days later) »