« first day (2170 days earlier)      last day (2783 days later) » 

9:00 AM
E_TOO_MANY_SAGARS
 
Thanks @SagarNaliyapara
@SagarNaliyapara, i have installed the net-gearman
but i don't know how to use this in my process
@SagarNaliyapara, Can you please explain, how to work on net-gearman
actually gearman works on linux servers
and net-gearman works on php-pear
 
4
A: How to use Net_Gearman in a PHP application?

Malcolm JonesCouple things to get you on your way (I used some notes from https://github.com/lenn0x/net_gearman and my own knowledge of how Gearman works) First of all you need to make sure you have gearmand installed/running correctly on your linux machine. Ubuntu - http://www.lornajane.net/posts/2011/in...

 
I've not actually used gearman. I'm just aware that I probably should be using it =D
I currently have a system that uses a 'naive' process manager - a cron that runs every minute or so, checks the number of queue items, checks the number of running processes and then adjusts the number of running processes accordingly (starts more or sets a flag on existing processes to tell them to kill themselves when they've finished their current task)
 
but if a process is long
?
if process is long, then it takes time for one user
if a user upload a file of lakhs of emails
 
Side note: When using long-running PHP processes, one thing you do have to watch out for is "memory leaks" - processes will consume more and more memory over time if the code does not clean up after itself properly (leaves resources such as file handles or DB result sets open, uses globals / singletons / doesn't use functions/methods to compartmentalize code, allowing the garbage collector to do its job) - make sure you have resource monitoring in place (memory, cpu usage)
 
9:12 AM
and at the same time another user uploads lakhs of emails
then the process of first user is in process
then the process for second user will not execute
 
That's why you have the "process manager" (whose job is no more than managing the number of worker processes) which is a separate script from the "worker processes" (which actually do the work).
 
@SagarJain if 2 processes of the long running task is running, it will process 2 jobs (users?) at once.
 
@SagarJain some has posted question of it.. stackoverflow.com/q/39672905/4670278
 
9:19 AM
Does using @artax avoid PHP's awesome memory usage issue? For example, if apache forks 300 processes for my php api, and each api call consumes 2 MB, then I'm assuming 300 concurrent users will use up 1.5 GB of memory.
 
@AllenJB stackoverflow.com/q/2512355/4670278 this one is already i don't who have posted recently..
 
If such an API is running in artax, can I assume that concurrent requests will be accessing the same memory space, so previously loaded objects are reused?
 
@andho As I read the github page, artax is an HTTP client, not an HTTP server. It makes requests - it doesn't serve them. As such it's not a replacement for Apache.
 
@AllenJB haha XD you're right.
what's the server that is being worked on?
ah, aerys
 
While replacing Apache with a long-running PHP-based HTTP server may give you some resource gains, you exchange that for the fun of managing long running PHP processes - memory managent, what happens when they have a fatal error killing the server, etc
(or even worse, the process hangs for some reason, so it's not dead, but it's also not responding)
IMO you'd be better off sticking with a tried and tested HTTP server, tuning it properly and looking at other measures to improve code performance.
 
9:32 AM
i am using set_time_limit
so process is working continuously
 
If you're using mod_php, you may want to look at switching to PHP-FPM too (especially if the requests served aren't all PHP requests)
 
can i add simple code here ?
<?php
set_time_limit(0);
include_once("conn-web/cw.php");
include_once("function.inc.php");


set_include_path(get_include_path() . PATH_SEPARATOR . 'Classes/');
include 'PHPExcel/IOFactory.php';

$schedulesql = "SELECT * FROM [$dbname].[emailpanel].[list_details] WHERE
cast (added_date as date) = cast (GETDATE() as date) ";
$params = array();
$options = array("Scrollable" => SQLSRV_CURSOR_KEYSET);
$schedulestmt = sqlsrv_query($conn, $schedulesql, $params, $options);
if ($schedulestmt === false) {
 
@SagarJain use multiple processes for concurrent processing of multiple jobs. You can even spread the processing across multiple servers.
 
this is the file
which is running for cron process
 
@AllenJB using php-fpm. It's a website running on symfony. Hence the memory footprint. 5MB on HTML pages.
 
9:37 AM
@AllenJB, please check the code
@SagarNaliyapara, please check the code
 
@SagarJain Please use a pastebin (eg. gist.github.com) for code that's more than a couple of lines.
Also, please explain what you want me to look at (what's your problem with the code)
 
@kelunik So it's a bug in PHP then?
 
@AllenJB; please look at this code
this code is working for cron process
this code executes for multiple users
 
Wes
told you we don't do wordpress here
 
9:47 AM
@SagarJain That link doesn't appear to be valid (404)
 
I'm reading a book on the history of glue I just can't seem to put it down
 
@SebastianBergmann You mean it only hangs with xdebug? In that case no idea
I tried that code yesterday against an old (non-namespaced) phpunit version and it didn't hang for me
 
10:10 AM
@AllenJB; Please login with you account
your*
and then open this link
 
@SebastianBergmann Dunno, seems like?
@NikiC @SebastianBergmann I'm testing with phpunit/phpunit@5.5.4 and PHP 7.1.0RC1.
 
10:26 AM
@kelunik without xdebug?
 
@NikiC Yes.
 
ok, lemme check
 
Can't repro
 
I added the PHPUnit config as well.
 
10:30 AM
still can't repro :/
 
@NikiC Have Docker installed? I'll quickly put an image together
 
@kelunik nope
I'm using phpunit 5.5.5, your config and the test file from the report
tried both with and without opcache
Ah, got it
The bane of my existence, the stupid error_reporting default value
 
Aftermorns
 
github.com/kelunik/php-bug-2016-09-24 < Made a repository that include the repro case.
 
Isolated repro:
<?php
error_reporting(E_ALL);

function doSomething(string $value = UNDEFINED_XYZ) {
}

set_error_handler(function() {
    throw new Exception;
});

doSomething();
 
10:41 AM
morning
 
@bwoebi morning
@bwoebi nice message ID
 
Fatal error: Uncaught Exception in -:9
Stack trace:
#0 -(5): {closure}(8, 'Use of undefine...', '-', 5, Array)
#1 -(12): doSomething()
#2 {main}
  thrown in - on line 9
 
Does anyone have the link to the 'nice' internals email viewer?
 
@NikiC ^ what's the bug here?
 
@NikiC Yes, any time it's an unqualified, undefined constant.
@Danack externals.io
 
10:43 AM
ty.
what a coincidence btw - a domain name ending in .io, and I can't remember it
 
@bwoebi 33060000 what luck must it take to get that number?
 
@bwoebi It hangs.
 
@kelunik not for me
 
@bwoebi Which version?
 
@kelunik master and PHP 7.0
 
10:51 AM
Just built a new master, same there, it hangs.
 
@kelunik probably because qualified constants don't generate a notice, they directly throw
 
Anyone think of a reason not to put wiki.php.net/rfc/get_class_disallow_null_parameter to a vote?
 
@Danack go ahead
@kelunik weird, must be undefined behavior invoked or such that we see different results
 
@bwoebi Build options?
 
@kelunik @bwoebi The problem is that in this case update_constant doesn't generate a FAILURE, so we don't call HANDLE_EXCEPTION
maybe you're on clang or something and don't use global regs
 
10:56 AM
@NikiC correct
 
@bwoebi What about these failing tests? travis-ci.org/amphp/process/builds/162387420
And can we please change that stdClass to a real class in the next release?
 
@kelunik … it is a real class?
@kelunik it's just phpdbg crashing, for some reason… the tests are fine
 
@bwoebi In that case fix phpdbg.
 
@kelunik yeah?
 
Real class == no dynamic properties and autocomplete support.
 
11:02 AM
 
Maybe also methods, so we can throw if stderr is accessed, but not buffered.
 
anyone familiar with the problem of SSL connection error in Ubuntu LTS chrome?
Unable to make a secure connection to the server. This may be a problem with the server, or it may be requiring a client authentication certificate that you don't have.
 
you can use tls
ok, you want to set up ssl
@SagarNaliyapara
 
@PeeHaa about?
 
Wes
@kelunik how it is not a real class?
 
11:17 AM
 
Wes
!!rfcs
 
ah - yeah, I should move it....
 
:-P
 
!!rfcs
 
:/
 
!!rfcs
 
\o/
 
Y U DO THIS @Jeeves?
 
11:20 AM
@Saitama I had forgotten to move it on the index page.
 
May be a cache somewhere and maybe you just did it too early
 
@Wes It can't be documented in a way a normal class can be documented.
 
ah, dat ^
 
Wes
@kelunik uhm?
 
@Wes There's just no reason to use a stdClass.
 
Wes
11:25 AM
aaaaah. now i get what you were saying. yeah anon objects suck hard
 
^ @bwoebi
 
Wes
even js is moving away from them. which is incredible :P
 
@Danack I'd vote often, the interface only allows me a single vote though…
 
11:46 AM
@DaveRandom yo
 
@PeeHaa hey hey. I've actually realised that the question I was going to ask is redundant anyway :-P
 
\o/
Well in that case I am going to do some shopping :)
 
@PeeHaa Don't forget the crack. And 200 Camel Blue.
which, btw, are rarely in blue boxes these days
 
@Danack are we forced to have 10 years for a 8.0?
 
11:50 AM
Yeah. Most likely you get a box with 90% cancer pictures
 
or can we just ask the RMs to push for a version bump instead? :P
 
Do you guys do that too over there by now?
 
Raj
hey guys i have install media wiki and cteated pages can any one suggest me how i can access any article in my media wiki pages
 
Yeh pretty much
ALthough I think they are making it like 100% cancer picture soon
 
Raj
from wikipedia
 
11:52 AM
lol. So instead of askign for a pack of luckies you now have to ask for a pack either "woman coughing blood" or "guy lying in bed thinking about fertiliy"
 
@Wes wat
 
@PeeHaa I prefer Blackened Lung Next To Healthy Lung myself, they have a smoother flavour
 
:P
 
Dead Guy With Towel Over Face are also OK
 
hehehehe
 
Wes
11:55 AM
@littlepootis yeah just read about it, they want to discourage the use of raw objects as maps/structs/containers/collections
 
@Ocramius if you wanted to, you could start the official discussion about when we're targetting an 8.
 
@Danack I'm just wondering about bringing in proper semver, instead of waiting 10 years for a version bump
Just wondering (personal poll, not binding), but should #php:
 
It's a definite trade-off. We don't have enough people contributing to actively maintain more than a couple of versions, and having a major version be released and then go to unsupported within a couple of years, is a good way to stop people using a language.
 
basically, bumping when bumping is needed, not when the date/time decides to
> is a good way to stop people using a language
 
@Ocramius I think we will either don't get anything done or be on v42 next year
 
11:57 AM
@Wes Now that JS has them, it's a good practice to use them.
 
hmm, not sure about that, see jabbascript
 
But I don't see anon objects being used less.
 
oh well, it's just an idea that I threw out without particular reasoning over it
if it's stupid, feel free to bash it
 
Not having proper versioning is annoying at times though
 
RT @Ocramius: Just wondering (personal poll, not binding), but should #php:
 
11:59 AM
@Ocramius what does "maintain release timeline" mean?
 
Yeah, it's very limiting. This doesn't mean that bumping often is needed, but what @Danack proposed is technically a BC break
 
@Ocramius there's not so many security things in javascript that need patching to avoid boxes being owned (I think, can't give stats) - so easier to maintain. Also - there seem to be fewer BC breaks in javascript, so easier to upgrade.
 
and having proper semver would be amazing
 
I prefer to view it as a bug fix.
 
@NikiC 8.0 is scheduled for when I will (maybe) have kids or something
 
Wes
12:00 PM
@littlepootis are you sure. i literally never used anon objects in js, except for namespacing stuff
 
and 9.0 will be my first testicle cancer or something
ok, I had too many beers
 
@Ocramius As I understand it, the rough plan is something like one major every five years
 
yeah
OT: living/working in the UK for 9 months made me an extremely rude person
wouldn't recommend
 
Wes
why? lol
 
@Ocramius but but aren't the british supposed to be polite?
 
12:03 PM
@NikiC quite the opposite, mate
 
No, just good at disguising rudeness.
btw @Ocramius I don't think I ever asked, how was the Brazil conference?
 
0
Q: Submit a form in MVC url , which url to it will direct

beginnerIn MVC (model view controller) i have localhost/controller/action using.htaccess file, I open a page localhost/user/register . and i have a form their . we know we are always in index.php(localhost) , but the views changes for different controllers(different GET values). . so MVC url localh...

can someone help
?
 
Wes
@littlepootis why would one do var Polygon = class Polygon { ... }; ?
 
12:22 PM
@Danack PHPEste? Quite cool. Technical level was terrible, but I've never seen so many excited and happy people. Probably cultural, still amazing though :-)
 
@Ocramius Do you mean we shall switch to a X.Y versioning scheme?
@Ocramius You became rude? nah…
 
@bwoebi I'm fairly usre that there is a trend. I probably exchanged place with Phil
he became polite or something
 
@Ocramius He's not "polite", just a bit less… childish? dunno?
 
@beginner your question makes no sense
 
He's never been childish, IMO
 
12:34 PM
@Ocramius Well, maybe choosing the wrong word…
With childish I mean participating in easily avoidable toxicity.
I.e. where reasonable adults would chose to deescalate the situation instead of continuing.
 
Yeh, I'm kinda in the category that doesn't de-escalate. You noticed :P
 
@Ocramius True, but just a mild form of it. I've seen … much worse.
 
Wes
littlepootis nvm, found out myself :B
@tereško could you even read it? :P
 
@Ocramius I try to go by the motto of "These idiots aren't worth my time". Don't always manage to stick to it
 
Meh, I actually need some heated discussions now and then
better than having them with my GF at home, for sure :P
 
12:46 PM
heh, smart ^^
 
12:56 PM
@bwoebi I'll tag a new release for amphp/process, fine?
 
@kelunik well… fine. It'll be anyway redundant through amphp/concurrent with v2 I think
@Ocramius If they're worth debating, sure. But no reason for calling names though ;o)
 
@bwoebi Why did you create 0.1.2 as tag? I just tagged v0.1.3, wrong tag format and wrong version.
I deleted your tag.
 
@kelunik By accident probably?
 
1:14 PM
posted on September 24, 2016 by kelunik

* `Process::__construct` accepts an array of arguments now to build the command

 
1:42 PM
@Danack When you write it like this, it reminds me of TCP…
> cheers
Dan
Ack
 
1:53 PM
gm
 
2:06 PM
@bwoebi @rdlowrey Maybe it should just error? But I guess it's fine. github.com/amphp/aerys/commit/…
@bwoebi @rdlowrey github.com/amphp/aerys/commit/… boooo!
@bwoebi Should I just merge those commits up or will you do?
 
@kelunik feel free
 
I have a value in a database field and if it is blank i want it to return true if its not return false pastebin.com/e7buq7j9
 
2:26 PM
@bwoebi that's exactly why I write it like that.
 
@Danack hehehe
 
I probably ought to start replying with ack to people who call me dan.....IT'D BE HIGH-LARIOUS.
/in a pretty darn nerdy way.
 
2:40 PM
Hey Dan \o
 
evening room
 
\o
 
o/
 
\o
o/
\o
o/
\o
o/
\o
o/
\o
o/
\o
o/
\o
o/
 
2:58 PM
\o
o/
\o
o/
\o
o/
\o
o/
 
@Saitama chill
 
:B
but still...., ain't gonna forget that you BROKE it...
 
Wes
@Saitama we don't do wordpress here
6
please stop starring that :B
 
anyways, why was 'we do.......' being starred ... since yesterday, again?
 
Wes
nobody knows
 
3:07 PM
Can anyone here help me with .htaccess RewriteEngine?
 
13 hours ago, by Paul Crovella
@CallumCarmicheal have you already read http://stackoverflow.com/questions/20563772/reference-mod-rewrite-url-rewriting-‌​and-pretty-links-explained ?
 
^ dat
 
yeah
Its a problem i cant even find if i search on the internet.
 
Wes
it's because one does not simply learn apache conf syntax.
 
That is true...
 
Wes
3:10 PM
for most people (including me) apache configuration is cargo cult at its maximum
 
RewriteRule ^(.*)$ pagehandler.php?virtual_path=$1 [NC,L,QSA]

When using that i can access Dir/ and Dir/Home it will load PageHandler
But when i access Dir/Home/SubPage it will not load because pagehandler is not in
the directory (which is virtual) is there a way to tell rule to get pagehandler
from the same directory as the .htaccess?
 
Wes
i just copy paste stuff from the internet and pray that everything works. i occasionally even light a candle
 
^ ditto
 
3:13 PM
I would but cant find what i need T-T
 
Wes
for instance i have no idea what NC and QSA mean. i do remember L though
 
No Case (Case insensitive), Query string appended in the $1 variable
*Query String Appended (QSA)
I need the pagehandler to be static to the .htaccess dir not relative to the requested directory.
Any idea?
 
@Saitama actually one does
I think you meant s/learn/guess
 
Wes
help him then :B
 
The thing is i could use "/" to indicate the folder but this project requires to be moved around alot. So i would like to keep it on relative paths.
 
3:19 PM
I dont want to
 
how can I make laravel run in background permanently.Currently I am executing php artisan serve command everytime when start my laptop OR atleast one time when PC starts in local machine
 
@Danack what is that?
 
It's a link to a website. The website describes a piece of software.
 
3:43 PM
@Exception I heard that if you pour lighter fluid directly onto your motherboard and then throw in a match, your Laravel state will be much better
2
Am I correct in asserting that members of this current location do not partake in something referred to as wordpress?
 
@Jimbo WOW!! you are greatest.. what an assumption ;)
@Danack does that related to laravel?
 
we do not do ҉Word͘Pr̷e͡s̴s here killing room 11 d͠evoùr y͜òu̷r̸ ma҉g͟e͏n̢͞t̢͠o̧͟ ĻAR̕͠A͟V̕͏E̴̢͢Ĺ ̸I̧͞S̛͞ T̸̨O̶̴N͏̢Y҉ ̷́͠Ţ̷́H͜E͢͡ P̴̸̛OŅ̴҉Y̵̧͠,͞͏ ̷͟͜HE҉͡ ̶̧̛CO̶͝M̸̧E̛S
18
 
@PaulCrovella That's not suited for SO chat rooms. You need to post this in a historical SO answer.
 

« first day (2170 days earlier)      last day (2783 days later) »