« first day (1446 days earlier)      last day (3488 days later) » 

12:30 AM
@NikiC Just ignore _scanner.c changes
Little you can do about them
 
1:28 AM
Are everyone asleep? :p
 
1:47 AM
hello master php
i have a question
do you have experience sms send msg?
 
yes
 
Hello, anyone here ever tried using SALT?

My generated salt values changes to ??? when storing it to the database, when it should be a group of special characters to add together with the password when creating a hashed version.

Problem is I get that as a result
 
any body use sms to send on mail?
is the service free on php?
sorry i'm excited on how to implement this
do you have a recommendation for this?
 
2:15 AM
@NikiC For what it is worth, I think anyone installing from git should be able to acquire needed dependencies.
re2c is no different
 
 
2 hours later…
zaf
4:25 AM
@boyee inbound sms usually costs on a monthly basis if you go for an online service.
... 2hours later,,,
 
 
1 hour later…
5:43 AM
@ircmaxell
> return 'recki' . mt_rand() . mt_rand() . mt_rand() . mt_rand();
nice
 
6:02 AM
hey all... anyone here?
 
6:22 AM
anyone here?
 
Yes
we are always here
 
:)
I am creating a server for a IM app for my project in PHP
but the clients in C#
 
so my question is TCP/IP or UDP and native built in socket function of php or some libraries?
 
So whts issue
 
6:25 AM
really new to socket programming
 
If you are using apache then port is 80
 
or you can configure any port using apache
 
emm ... 443 ,
 
if you are running PHP with apache
 
6:28 AM
I can't start, haven't slept in 3 days :(
 
that's like being drunk, but with no benefits
 
oops. Please let us know your problem in depth. And lest us close it, And then have sound sleep :-)
 
i already wrote the problem
like which protocol TCP or UDP
should I go with the native PHP functions for sockets for creating server or can I use any libraries
 
Generally we use apache and run php under apache web server. So for the communication you have to go through apache socket
 
I get that
 
6:33 AM
In php there is web CLI I am not sure if it is available
I mean I am not sure if it will work for you
 
I have to make a chat application which should includes sockets(services or daemon) and C# for my school project and I cant afford a real server so I am planning to go with my regular apache with PHP hosting for server and I have to write client in any .net programming language to be able to run on a windows machine
 
posted on October 01, 2014 by kbironneau

/* by Marc Zaku */

 
Ok, SO all you need to do is to just run apache with PHP. And create restfull api for messaging. And consume through your chat app written in whichever language
 
@PeeHaa ping
@NikiC hello , What would happen in this case wiki.php.net/rfc/fix_list_behavior_inconsistency does it mean don't fix wins ?
 
6:51 AM
thanks man @AnkurKumarSingh
 
7:19 AM
good meurning
 
7:41 AM
@Baba we don't know.
 
@Gotalove i used easyrtc for testing stuff.. maybe you would wanna take a look.
anyway, hi guys!
 
@reikyoushin sure, thanks
 
moin
 
7:58 AM
@reikyoushin do I need to have knowledge on socket programming to do webtrtc?
 
@bwoebi i think the vote is wrong it should Fix vs No Fix first (base on 2/3) then type of fix bases on the highest vote
@JoeWatkins good morning
 
hi guys :)
quick question: what is the best practice regarding the declaration of instance variables visibility?
I mean, should I always put the instance variable declaration outside the constructor with its visibility even if I can't set a default value?
 
What does Symfony make everything better then Laravel?
I saw yesterday a live presentation by Fabien Potencier about DI, it was awesome! :-)
 
@fusillicode What do you mean by outside the constructor ?
@fusillicode Or better still give example code so that i don't assume ..
 
8:14 AM
@Baba code is coming ;)
 
@fusillicode cool ... Since you are taking about visibility and best practice i might assume what you need is PSR-2
@fusillicode But your code would tell me better
 
@Baba I already took a look at the PSR-2 but I didn't found nothing about it :(
 
@fusillicode Yeah ... that is why i want to see sample codes .. to understand your question better
 
@Baba I'm trying to remember the markdown to put a little code snippet here XD
 
Is there somewhere a table about the differences in PSR-1 and PSR-0 or PSR-3?
or even 4 :P
 
8:18 AM
@Duikboot php-fig.org on the left panel there is a one line description about the various PSR :)
 
http://www.php-fig.org/psr/psr-0/
http://www.php-fig.org/psr/psr-1/
http://www.php-fig.org/psr/psr-2/
http://www.php-fig.org/psr/psr-3/
http://www.php-fig.org/psr/psr-4/
:D
Is there a 'best use this coding standard in this case' guide? Or how do you choose that?
I guess psr-4 is the most recent one, "A more modern take on autoloading reflecting advances in the ecosystem.".
 
@Duikboot I think I don't understand. I mean, the PSR's are actually referred to different aspects of code writing
 
@Duikboot Yes, ignore PSR-0, it has been effectively replaced by PSR-4
But also, take all of those documents with a pinch of salt
 
@fusillicode add your code in gist it does not have to be here
@DaveRandom Hello .. long time how is your baby ?
 
They are "standards" that a group of framework authors have signed up to. They are not a standard for the way that everyone should write PHP code.
@Baba Well... he's 3, so not really a baby any more
 
Hi :-)
I'm about to leave for work but I will be back on here in 1/2hr or so
 
@DaveRandom has he started PHP :)
 
@Baba btw I remember I used to be able to put code snippets right here!
shame on me and on my memory...
 
@fusillicode where did you get $this->c from
 
8:32 AM
@JoeWatkins lol ... Is there a way to monitor feedback and status code for each request ?
 
I dunno, I haven't looked at the api, within the first 4 lines of the readme on git there is an obvious sign the writer doesn't actually understand the words they are using ...
it's all over the documentation ... and in nearly everything he says in public ...
 
$client = new GuzzleHttp\Client();

$requests = [
    $client->createRequest('GET', 'http://httpbin.org/get'),
    $client->createRequest('HEAD', 'http://httpbin.org/get'),
    $client->createRequest('PUT', 'http://httpbin.org/put'),
];

$results = GuzzleHttp\batch($client, $requests);

// Results is an SplObjectStorage object where each request is a key
foreach ($requests as $request) {
    echo $request->getUrl() . "\n";
    // Get the result (either a ResponseInterface or RequestException)
    $result = $results[$request];
@JoeWatkins poor ... GET might require some parsing , PUT may require saving the UID etc ... How do you know which is which ?
 
baba swahili?
 
@Baba from the parent class :)
 
echo $result->getStatusCode(); or echo $result->getMessage(); is not enough in production scenarios
 
8:35 AM
You have... classes, interfaces wich are contracts, and traits.
 
@Gotalove Nope ...
 
But I don't get it what traits are.
Traits are a mechanism for code reuse in single inheritance languages such as PHP. ..
So a database connection is/can be a trait?
 
arabic then?
 
posted on October 01, 2014 by kbironneau

/* by Narayan */

 
@Duikboot is $this->a modified in A if not $this->a = $this->c; does not even make sense in the first place
@Gotalove Nope :)
 
8:37 AM
@Baba anyway I was wondering if it is better to always declare the instance variables on top even if I can't set the default value (because for example it is dynamic) or if is better to declare them in the constructor...
 
what language is baba?other than the 2
 
@fusillicode depends on the use case ... a custom setter or getter method might be most appropriate ...
@Gotalove so many languages use baba as father mostly
 
fair enough
:)
 
@Gotalove Other have some crazy meanings .. translation.babylon.com/english/baba
 
@Baba ok got it :)
thnx buddy ;)
 
8:43 AM
@fusillicode echo "You are welcome" , PHP_EOL ;
 
@NikiC how is this possible [foreach ($list as $x) yield $x * $x]
@NikiC does it mean i can have $v = [foreach ($list as $x) yield $x * $x]; ? or you are talking about the normal foreach ($list as $x) yield $x * $x (Without bracket)
 
Morning
 
ThW
Morning
 
8:59 AM
mornings
 
good day
 
E_UGT
 
moin, again ...
 
@reikyoushin lots of code there I think I even saw nodejs.Not sure.Anyway sorry to bother you but if I were to reuse your code for videochat which files would I need.
 
9:04 AM
Hello guys, i want to know which functions are executing when page is loading. I have lot of functions in my page.
 
I use SALT to complicate hashing, the system works fine in my localhost but using this in a different host causes problems. I can't seem to use it in a different host. I tried almost everything.

this is a login system, i can register just fine but there seems to be an encoding problem trying to compare the password typed to the one in the database in this server.
I am spending almost 8 hours trying to fish this issue. And i'm drained. :(
I think it's my PHP files, or my host.
I am trying to make it work in an IIS server.
Special characters is kind of messed up in this server, which makes it not to work.
 
9:26 AM
DO NOT manually specify a salt
 
I see
so i should use this instead?
I followed a tutorial and it includes creating a salt
functionality
Thanks
 
Is it a good idea to do like 10k mysqli_query($sql) or just use $sql .= "my query;" and then mysqli_query($connection, $sql) 1 time? Or I guess that's not even possible..
 
0
Q: Github STAR button on repository page

Kamran AhmedIs there any way to add a star button to the promotional page of the repository just like there are facebook like and Google Plus' +1 button, where you just add a snippet and the button works?

@Naruto that 1 time won't work.
 
Ye, I just tested it.. >< , my problem is that I run a cron job with alot of sql queries.. but I want it to be faster
 
@Naruto Actually there is a feature of MySQLi called (iirc) multi_query that will let you do that, but it sounds like what you have is a case from reusing a prepared statement
I imagine the queries being executed are basically the same query with different values?
Multi-query approaches should generally be avoided, the only real use case they have is passing a SQL file directly to the server without processing the SQL in any way (so, generally only useful for schema imports etc)
 
9:41 AM
@DaveRandom It's either insert or update, and normally I write an update on duplicate key, but not possible here.. update on duplicate key normally saves me half of the sql, and time..
 
@Naruto Can you show the code that generates the queries ATM? (or show some example queries)
 
Just a simple UPDATE table SET xxx = $xxx where id = $id and then I just mysqli_query($connection, $sql); And I do this for x-amount of rows that I receive trough a csv, which can be alot..
 
@Naruto Why can't you ON DUPLICATE KEY UPDATE then?
Also, even if you can't you can still have more than one reusable prepared statement on the go at once
 
@DaveRandom Because the creator of the DB did a shitty job of normalising
 
@Naruto How do you determine whether you need to update or insert?
 
9:52 AM
Hello
Is it normal that I can't upload multiple files on PHP v 4.4?
 
I wrote a query to check if it exists on different parameters now..
 
It's not configured by me btw it's someone else with this setup
 
You awesome Coders, you!
 
Does anyone know that?
 
@DaveRandom I think the server where this application was build on, isn't really setup for doing large data handling like this ><
 
9:58 AM
@DavidH The only right answer here is: update it right now
 
I know I will but I need to know for certain
 
misses "are you sure you don't want to get on a train?"
me "no, terrorists use them"
dealt with ...
 
@Naruto If you prepare the 3 queries (SELECT to figure out if it already exists, INSERT and UPDATE) and reuse them, you'll probably see a noticeable perf improvement with that volume of data
@JoeWatkins They also use cars, you know...
They probably also walk places sometimes
 
nope, just trains ....
(I now have my fingers in my ears and am singing at the top of my voice)
 
@DavidH I don't think there are any limitations in PHP4 in that respect
You should still upgrade like 10 years ago though...
 
10:02 AM
wat is php4 ?
 
Hm alright thanks but for sure I should tell them
I only found out about 10 minutes ago when certain functions didn't work
 
@JoeWatkins The equivalent of Latin? :D
 
are you a time traveller ?
 
For example max_file_uploads
Haha no I just have an old fashioned customer
 
@DaveRandom You mean, prepared statements, set the queries and just swap the parameters all the time?
 
10:03 AM
are they a time traveler ?
 
@Naruto yes
 
@JoeWatkins They're an old dentist :P
 
okay, but do they time travel ?
 
That I do not know, I think their host does
The hosts headquarters must be a delorean
 
good, then they can do as suggested and upgrade 10 years ago ...
 
10:05 AM
Though having php 4.4 is quite ironic
 
lol what a conversation :P
 
I'm not even sure how long this has been there..
What kind of host does that
Christ...Build Date Jun 30 2007 20:54:06
 
@DaveRandom 1 question then, since i'm not that experienced with that yet, do you need to clean the params? Or just rebind them? (brb lunch)
 
The view from my desk in the new office isn't too bad.
 
@Naruto I guess his talking about, cleaning up your data, like : mysql_real_escape_string
 
10:09 AM
@Naruto Can you switch to PDO? The interface is a lot cleaner...
 
@Fabien ... your in the UK?
 
Yeah, Southampton
 
@DavidH Confirmed it works on 4.3.10 so it will work on 4.4
<html>
<head>
  <title>Upload Test</title>
</head>
<body>
<?php if (isset($_GET['dump'])) { ?>
  <pre>
<?php var_dump($_FILES); ?>
  </pre>
<?php } ?>
  <form method="post" action="?dump=1" enctype="multipart/form-data">
    <input type="file" name="file1"><br>
    <input type="file" name="file2"><br>
    <input type="submit" value="Go">
  </form>
</body>
</html>
Test script ^
 
Pretty sure if my camera was good enough you could probably see @JoeWatkins over on the IoW in about that direction :D
 
@DaveRandom Thanks a lot for testing! By the way I ment doing: <input type="file" name="file[]" multiple>. Notice the name
 
10:12 AM
I was thinking already.. those cars are driving in the opposite lane.
 
That is what has been malfunctioning for me
 
@DavidH One sec. You may be suffering from the fucking stupid format of the $_FILES array
 
@DaveRandom Alright, thanks. I tried var dumping it but got 0's in return.. Not sure what to do about the empty arrays
 
yup, that works as well
 
Oh wow, could you look at my code and tell me what i'm doing wrong in a sec?
 
10:15 AM
sorry, code dump, I'll pastebin it
 
As will I if you could look?
 
@DavidH Yeh go fo it
I have a routine that changes the $_FILES array into a sane format somewhere, one sec
 
@Baba That is referring to list comprehensions
@Baba no idea ^^
 
@DaveRandom Jesus this computer is dieying down on me, work pc's.. pastebin.com/RtTVVeeP
 
best tool for creating social networking site
?
 
10:21 AM
Tool? Do you mean CMS?
 
Hey every one
 
Hello
 
is there is anyone who can help me with amazon api?
 
Sadly not me, sorry
 
not particularly CMS, any framework
or modules
of any framework that can be used to create social network
 
10:24 AM
@DavidH Yeh so your problem is twofold: firstly the name of your input is files and not files[], and secondly you are not processing the array correctly for multiple files. Rename the input, then var_dump($_FILES) should help you correct the processing code
 
@DaveRandom I was about to tell you about the name as that was a ctrl+z back to single upload, my bad. But yea I couldn't really get any further when var dumping $_FILES which i've tried before
 
moment, let me dig something out and retardify it to PHP4
 
@DaveRandom You're to nice, thank you!
I'm still a student, sorry for my lack of knowledge
 
Ugh, PHP4 + vi == headdesk
 
@DaveRandom why?
I mean, apart from the obvious
 
10:31 AM
@DaveRandom Alright so I now gained access to another server on which there's 5.3.3 and It's still not working
So i'm going to guess my code is faulty somewhere but what I'm doing wrong I really do not know
 
@NikiC Because apparently vi treats a CRLF as if it was just a CR
 
I can for certain say(looking at it) that on the 5.3 the max file uploads is on 20 and well uploading 2 at the same time isn't working
 
Also I seem to be a sadist
@DavidH If's just because your processing of the array is wrong
But what this code I'm just editing for PHP4 does normalises the array to something approaching sane
 
Hm I see
 
@DaveRandom so?
 
10:35 AM
Well I need to go afk now, I'll be back in half an hour or so could you still send it to me?
@DaveRandom Thank you so much for the help so far by the way, really appreciate it!
 
@NikiC So when I pasted some stuff into it over SSH it pasted a line, interpollated the CR (reset the cursor to the start of the line but didn't move to the next) and then overwrote the line with the next line of input. Result: file with a single line of garbage
 
oh
that does sounds slightly weird
 
ancient vi version as well (unsurprising on system where the available PHP is 4.3.10)
 
Hey guys, how does the following programming style sound to you: A function which checks what method calls it and does different things based on that, especially if a different class has a method that calls it :D
 
@DaveRandom heh
 
10:49 AM
@ziGi <jeopardy>What is a cause for justifiable homicide Alex?</jeopardy>
 
Next session : 'New Wave PHP' Lorna Jane Mitchell :: Starting in {8 minuts}
 
@ziGi what the shit
 
o hai
had some busy days
new job
 
11:13 AM
Hi all, by default magento does not allow the product which has 'not visibility' mode. When user hit the previously loaded url, it redirects to 404 since it is not visibility in front end mode. I am in situation to load this product in its detail page (catalog_product_view).

I have extending Mage_Catalog_Block_Product_View to check. I am stuck on how to get url and view page for non visibility product. kindly advice
 
@FlorianMargaine Was it you that had to deal with huge numbers of git repos? And was that a factor in you changing job?
 
neither
 
@Duikboot That stuff is getting done before I create my query
@DaveRandom Nope, the project is already to far in..
@DaveRandom By cleaner you mean the first example on php.net/manual/en/pdo.prepared-statements.php ?
 
I mostly mean not having to deal with the stupid references
 
11:17 AM
 
@Naruto if you give me a couple of hrs I'll knock up a basic example, can't atm, working
 
Currently hearing a talk about the new integrations sincen php5.3
it's not about: php -S dev.project.local:8080
-t /var/ww/myproject/web
-c phpini.development
routing.php
And now Short array notation 5.4
 
@DaveRandom Since it'sa cron job created by me in another project, it doesn't matter how I write it, not so nice to start using PDO now, but i it does the trick, so I'm gonna play with it for a while.. I'll share what I made with you later, and you can correct me, better this way for you and me :)
 
@Naruto MySQLi can do it, it's just a shitload more complicated
 
Now they are talking about: Session Upload Progress.
it's about: ini_get('session.upload_progress.name");
 
11:24 AM
@Duikboot "this feature doesn't work, when your webserver is running PHP via FastCGI."
And PHP should be running via FastCGI
Having a PHP script active during the whole time a file is being uploaded is not clever.
 
So im hearing wrong things :D (they are telling me wrong things)
 
@DaveRandom I was just refactoring a code of a former colleague who left the company a year ago and I saw that he does a debug_backtrace and checks the caller method and does something completely different if that is the case.
 
Now its about password hashing
$pass = "secretpass"
$hashsed = password_hash($pass, passworld_default);
echo $hashed
is on tha slides ( php 5.5 )
yiha
@ircmaxell You are mentioned!!!!
in your password_compat project link
 
@Duikboot you should never use hashing for passwords
use bcrypt
and I can tell you why
 
true
Next topic: Built-in OpCache (5.5) replaces APC beware this is disbaled by default. turn on opcache.enable and opcache.enable_cli
 
11:33 AM
tefault?
 
Default ;)
 
:P
 
Im just sharing the slides.
 
Link?
 
It's live, im at the conference
 
11:35 AM
Sorry, I am a bit out of the loop, what conference? PHP 5.6?
 
Im at Drupalcon ( I know you don't like that here :D ) but it's now a presentation from 2012 till now, what is changed..
 
are you in Amsterdam?
 
I am.
 
I guessed, cause Duik is the Duch word for dive
 
Indeed ;)
But im not from the Netherlands im from Belgium.
 
11:36 AM
en duikboot is a submarine
 
yes!
 
I didn't even know Drupal is still alive, to be honest :D
 
This week Drupal 8 will be released.
 
Who uses Drupal? People that can't use WordPress?
 
lol
I met a "PHP Developer" over in the states
Tried to talk to him about some code stuff, turns out he only uses drupal, and doesn't touch the php behind it
 
11:41 AM
So only the UI? No custom module development?
 
haha, well that's why he's a developer not a programmer
Developers are expert at finding ways around problems and plugging components together to fulfill a set of requirements. In their personal time they are either trying to build the next Facebook, or engage in activities that have nothing to do with programming, developing, or computer science.
 
Nice roundup :D
 
@DaveRandom Yes mr dave?
@Baba yes mr baba? :)
 
@PeeHaa Can you mail me (or just tell me) the flight numbers etc for Friday? Trying to figure out exactly what's going on when
 
@DaveRandom That's why I'm trying to create it in PDO now, and I can always tell our employee why I did it, not that clean to use 2 different types, but if it does the trick np :)
 
11:48 AM
@DaveRandom Sure let me finish up showering and waking up and I will open my mail :)
 
Writing a (good) PDO->mysqli bridge lib has been on my list of things to do since forever
@PeeHaa You take your computer in the shower?
3
I demand photographic proof!
 
hahaha
 
@PeeHaa, since I know you are in Rotterdam, just to notify you, there is a Meetup in The Hague the upcoming Friday which has the topic Refactoring using Codeception -> meetup.com/SweetlakePHP/events/207672352
 
@DaveRandom hehehe. Nope just booted my pc before taking a shower
@ziGi I'm at phpnw friday
 
Yeh, give it a good kicking from me too
 
11:52 AM
:P
 
PHPNW?
ah yes
but that is in the UK
 
@Naruto then hi sorry for the late reply!
and good morning!
 
Hey guys
anyone using PHPstorm?
 
Yes!
how can I help you @MarcRasmussen
 
i have the following error when starting the program from my linux machine
0
Q: PHPstorm ERROR 3877

Marc Rasmussenafter a restart of my computer i am trying to start up PHPStorm. i havent installed nor deleted anything on my computer but suddenly im getting the following error: Failed to clear URL cache Failed to clear URL cache [ 3877] ERROR - llij.ide.plugins.PluginManager - com.intellij.openapi.wm...

 

« first day (1446 days earlier)      last day (3488 days later) »