« first day (1530 days earlier)      last day (3421 days later) » 

5:09 PM
posted on December 24, 2014 by kbironneau

/* by toretto460 */

 
Hey! There's a service that'll take your ElePHPant on a tour of Tokyo! nowiknow.us1.list-manage1.com/track/…
 
@Amez I had a quick look, i get no fault, I get a deadlock (expected) ...
 
@JoeWatkins using the same code ?
 
yeah
 
5:24 PM
but we should have the same behavior no ?
 
we should but hard to debug if I can't reproduce ...
 
maybe not the same compilation params, as i can see you are excluding almost all other extensions
maybe ?
 
try that, try running with -n
?
 
same
using dmesg | tail i got this
[18993.920546] php[6559]: segfault at 10 ip 0000000000893627 sp 00007f2ae7d399b0 error 4 in php[400000+95d000]
[20311.420235] php[6609]: segfault at 10 ip 0000000000893627 sp 00007fee5197b9b0 error 4 in php[400000+95d000]
[20641.543098] php[6615]: segfault at 10 ip 0000000000893627 sp 00007fbd118dc9b0 error 4 in php[400000+95d000]
 
is not much use to me ...
know how to get a trace from gdb ?
also, got valgrind ?
 
5:28 PM
need to compile php in debug mode no ?
 
yeah ...
wtf, I can't build any branches of php anymore ...
 
ok i'll recompile in debug mode and see
 
@JoeWatkins what's the issue?
 
In file included from /usr/src/php-src/ext/standard/basic_functions.c:48:0:
/usr/src/php-src/Zend/zend_language_parser.h:336:5: error: conflicting types for ‘zendparse’
in 5.5 and 5.6
stupid bison crap ...
 
5:36 PM
@Amez sorry man, might be able to have a look later on tonight, but looks like it might be day after tomorrow ..
 
We should write our own parser, with blackjack and hookers.
 
forget the parser, let's just have blackjack and hookers ...
5
 
@JoeWatkins thank you, i will continue checking on my side, hope i can figure out how to fix it. i will try to give max information so you can debug
@JoeWatkins i have a trace now, if you are still have time
 
sure, show me
go faster ...
 
Program terminated with signal 11, Segmentation fault.
#0 zval_delref_p (pz=<optimized out>) at /opt/php-5.5.8/Zend/zend.h:409
409 return --pz->refcount__gc;
(gdb) bt
#0 zval_delref_p (pz=<optimized out>) at /opt/php-5.5.8/Zend/zend.h:409
#1 i_zval_ptr_dtor (zval_ptr=0x0) at /opt/php-5.5.8/Zend/zend_execute.h:76
#2 zend_vm_stack_clear_multiple (tsrm_ls=0x3101fa0, nested=1) at /opt/php-5.5.8/Zend/zend_execute.h:298
#3 zend_do_fcall_common_helper_SPEC (execute_data=<optimized out>, tsrm_ls=0x3101fa0) at /opt/php-5.5.8/Zend/zend_vm_execute.h:642
sorry for the delay
 
5:52 PM
frame 4
print execute_data->op_array.filename
print execute_data->op_array.lineno
 
?
 
enter all of that and gimme response from print commands
filename should be whatever you saved the file as, I want lineno ...
 
in gdb prompt ? sorry i am not a debug guy
 
oh yeah, sorry in gdb
(after you had that same fault/in same window as fault occured)
 
No symbol "execute_data" in current context.
 
5:55 PM
lies
 
lol maybe i am doing it wrong
 
nah, gdb is full of shit ...
you did frame 4 first ?
 
no
#4 0x00000000008512db in execute_ex (execute_data=0x7f2175a211d8, tsrm_ls=0x3101fa0) at /opt/php-5.5.8/Zend/zend_vm_execute.h:363
363 if ((ret = OPLINE->handler(execute_data TSRMLS_CC)) > 0) {
 
now do print commands
just second one really ...
(first just to make sure nothing funny is going on, should be whatever your test script is named)
 
got the file name but not the line
There is no member named lineno.
 
5:58 PM
sorry, line_start
and line_end
no no no, wait ...
 
line start 16
line end 44
 
execute_data->opline.lineno
 
43
 
Hi everyone, I'm curious what's the best way to embed a PHP script in another PHP file...the 'include ()' function? I have a code I want to input in another php file but I want to reference it instead of the code actually being there
 
well that's pretty strange
 
6:01 PM
@ChrisWeigen "reference" how?
 
gist.github.com/amezghal/56a23f8fc951b58d8682 line 43 cannot be an opcode ... and isn't in a function call either ... but trace says in a function call, was expecting a line in one of the synchronized blocks ...
 
so say I have 456 in another php file.....and I want to fit in into the original php file which is 123 789
 
wait i am using a modified version sorry
 
how can I reference the 456 php file? I tried include '456.php'; but it didnt work
 
line 43 in my current code is :: }, $this);
 
6:03 PM
@ChrisWeigen wat
 
i will use the same code, 1min sorry
 
@Amez that's okay, show me the few lines before it ...
 
Is there a way to include the code from another php file, in a php file without the whole code showing up?
 
(that's return from one of the synchronized blocks, which is what I was expecting ...)
 
@ChrisWeigen Define "showing up"
 
6:04 PM
I have a hunch what it might be ... but I'm literally dressed up to go out, and tomorrow will be too busy to sit at computer most likely ... if I ping you day after tomorrow will you be around ?
 
as if the code was typed out in the original file
 
the code i am using now, there is some file_put_contents you need to avoid
 
@ChrisWeigen What is you are trying to do, because your description doesn't make much sense (at least to me). Obligatory: meta.stackexchange.com/questions/66377/what-is-the-xy-problem
 
@JoeWatkins Yes or you can just update the issue on github ?
 
back and forth might be useful ...
 
6:06 PM
i already created an issue in github
 
What does the include tag do?
 
I saw it yeah, but chat is faster than going through github ...
 
Ok yeah sure, and thanks again
 
@ChrisWeigen It includes a file
Have you the XY problem post I linked?
 
And does that include the entire contents of the file?
I read it but no
 
6:07 PM
yes it does
 
Okay then, so but putting include '456.php'; would infact work?
 
Considering I still have no clue whatsoever what you are trying to do I am going to say: yes
 
@Danack hmm, should be 5.5.
maybe 5.4, can't tell
didn't try 5.4
but the generator functionality in Amp is 5.5 anyway…
 
6:53 PM
Hello
 
7:10 PM
yo
 
7:34 PM
AAAAARGH
Can we get rid of constants pretending to be barewords for PHP 7?
It's a pain when debugging
If you really need that, you could just write a constant autoloader.
 
you could write a constant autoloader to turn that into an error
 
That's also true, of course, but I think erroring should be the default behaviour.
I'll put this on my TODO list
The question then would be whether to give you a NULL and show a notice, or to throw an exception or recoverable error
The former would be consistent with variables
 
recoverable error. undefined constants typically indicate a more significant problem.
 
@PaulCrovella Honestly, we should probably do that for variables too
 
@NikiC can you see why this would delete the wrong element? github.com/ircmaxell/php-src/compare/…
 
7:48 PM
For indexes, returning NULL makes some sense
For variables? Nah. Maybe in the register_global days. Not in the year 2014.
 
@AndreaFaulds yeah, but good luck with that bc break
 
JavaScript has a strict mode that makes non-existant variables an error, I'd like that.
 
ahh, I see why
the move tail to head screws up the indexes
#define HT_MOVE_TAIL_TO_HEAD(ht)                            \
    do {                                                        \
        Bucket tmp = (ht)->arData[(ht)->nNumUsed-1];                \
        memmove((ht)->arData + 1, (ht)->arData,                 \
            sizeof(Bucket) * ((ht)->nNumUsed - 1));             \
        (ht)->arData[0] = tmp;                                  \
        if (!((ht)->u.flags & HASH_FLAG_PACKED)) {              \
            zend_hash_rehash(ht);                               \
actually, that should likely be rolled into zend_hash_rehash. @NikiC thoughts?
 
@ircmaxell You still working at Google?
 
yup
 
8:00 PM
How's it going?
 
so far so awesome
 
I bet, it's like a dream job!
What's your role? Software engineer?
 
Nice!
I really want to work somewhere like that, I want a design job though.
I just webdev as a hobby.
 
Hey @ircmaxell, does App Engine for PHP suck or no?
 
8:05 PM
@AndreaFaulds no
 
I liked App Engine for Python, maybe because it's the first and only ORM I've touched
 
orm...?
 
The whole Model thing
Though I think that comes from Django (?)
 
nothing to do with AppEngine
 
It's the only way to interact with BigTable
Which is the only DB App Engine gives you, unless Google have changed something in the 5 years since I last used it
 
8:13 PM
@AndreaFaulds no it's not
not by a long shot
Im off
 
Gosh, things have changed...
Though it has been half a decade :p
application: clubduckling
version: 1
runtime: python
api_version: 1

handlers:
- url: /.*
  script: main.py

- url: /static
  static_dir: static
App Engine 5 years ago.
I don't think they supported any other frameworks except whatever the one they gave you was
 
 
1 hour later…
9:22 PM
@ircmaxell You work at the New York HQ?
 
@LeviMorrison Yea, he does.
 
@LeviMorrison I wouldn't call it a "HQ", but it's an office, yeah
 
It's a full city block. I'd call that an HQ
^^
 
lol
it's the 2nd biggest building in Manhattan
 
Yea, that place is massive.
 
9:29 PM
111 Eighth Avenue is a full-block Art Deco multi-use building located between Eighth and Ninth Avenues, and 15th and 16th Streets in the Chelsea neighborhood of the Manhattan borough of New York City. At 2,900,000 square feet (270,000 m2) it is currently the city's third largest building in terms of square footage. It was the largest building until 1963 when the Met Life Building 3,140,000 square feet (292,000 m2) opened. The World Trade Center (which opened in 1970-71) and 55 Water Street 3,500,000 square feet (330,000 m2), which opened in 1972, were also larger but the World Trade Center was...
 
But I typically refer to HQ as the corporate office though :)
 
yeah
 
We have HQ in NYC, you guys are in Mountain View :p
 
exactly why it was weird
 
Hey, I didn't know spotify was there too. Interesting.
 
9:35 PM
yup
and Barnes & Noble
and Google has about 1/2 the floors
 
Oh, I assumed that Google === Mountain View
Interesting
Why the New York office? Extra space? Some company they acquired?
 
Google has offices all over the world, you know.
They're kinda big.
 
@KevlinHenney P = NP => either P = 0 or N = 1. That was easy.
 
Yes, I realise that
 
why NY? NYC has a lot of tech talent
 
9:40 PM
Yeah, I figure it's probably easier to hire people if you don't need them to move to the other side of the country ^^
 
How can I open .in files on a mac? :)
 
@Duikboot right click > open with > other program
 
I am not sure what I see is correct.
I am opening it with Atom.
But I am not sure I have the right output?
This is the output I receive: i.imgur.com/ZqH0HIP.png
 
@ircmaxell you mean make a reindex part of rehash? I don't think so, rehash is primarily an internal operation after resize/compact, reindex is used in other places
 
9:50 PM
fair enough
worth asking at least
 
10:09 PM
nice
 
HAHAHAHAHAHHAHAHAHAHA Ermargahd people can see my twitter DMs durrrrrrrrrr
 
T-M
Hi Room
Any One can Help me for this problem > stackoverflow.com/questions/27642586/…
 
@T-M use echo to output
?
that's what you asked
 
@PeeHaa Search marketing consultant.. i.e. full of shit
Well, if you give an application access to your account when it SAYS what it can have access too, via API
facepalm-is-not-enough
 
T-M
@zerkms: what's your mean use echo to output !!
 
10:22 PM
@T-M you use echo to generate output in php
 
The clickbait title even says vulnerability :|
What an idiot
 
T-M
@zerkms: i need to any idea for multiple query.
 
@T-M you haven't asked about a query
you asked how to produce the given output
and if you need to ask about a query - then it's a question about mysql, not php
 
T-M
@zerkms: sure. But my Q is Very Clear
 
it's not
"how do can i print this result using php ?!"

you print it using `print` or `echo`
is it useful?
does it mean that php7 will be compiled only by c++11 compatible compiler and rewritten in c++?
Releasing a new major version of php in 2014/2015 written in an ancient programming language is irresponsible!
 
T-M
10:30 PM
@zerkms: i edit my Q : how do can i create this result using php and mysql queries for print in html ?!
 
What kind of answer do you expect for this question?
Do you think someone will write complete code for you?
 
@zerkms C doesn't have known and unpatched security vulnerabilities ;)
(at least not for the usual definition of the word)
 
T-M
no only i dont have any idea for create this queries! just this.
 
@T-M so? you want someone to write them for you?
 
T-M
Yes!
 
10:34 PM
@T-M this will not happen
@NikiC that's a valid point, but it's still irresponsible
by using ancient programming languages opensource slows down the progress
 
T-M
@zerkms: thanks for put in hold :)
 
You're welcome
 
@zerkms The age of a language really has very little to do with the progress of an opensource project.
C++ is not much younger than C.
 
@Sherif then in Go!
go is young and modern
 
Right, but has not gained any critical mass yet.
So I don't see how that argument holds up for the progress of the project.
 
10:40 PM
you haven't read that ircmaxell post probably then
 
@zerkms What does that have to do with the progress of developing PHP?
 
ohhhh
are you serious now?
Sorry, I'm not ready and not going to discuss it
 
What makes you think I'm not being serious? AFAICT, that article is talking about open source frameworks written in PHP.
 
^ ^ ^
 
I'm not quite sure how that supports the argument of C is slowing down the progress of the PHP language development.
 
10:43 PM
Please read the "Communities Are Pushing Forward" section
And the following one
"C is slowing down the progress of the PHP language development." --- I did not say that
 
You did actually. You said "Releasing a new major version of php in 2014/2015 written in an ancient programming language is irresponsible!" and followed it up with "by using ancient programming languages opensource slows down the progress".
Feel free to clarify any misunderstanding though.
 
@T-M Please look up the documentation on ① using echo to output strings like "<html>", and ② querying MySQL; then write some code that does the basics. Then, come back when you have questions regarding details. Nobody here is going to do your homework for you, but we'll help out if you're stuck. Ping us after editing your question if you need a reopen.
 
11:08 PM
"Ping us".....er, actually maybe mirabilos likes being pinged out of the blue, but it's generally frowned upon.
 
@Danack oh ok sorry, I meant 'generally ask around'
 
with PHP 7 I sometimes get Undefined variable: $_SERVER if a keep-alive connection is used…
 
11:38 PM
@bwoebi How are you running PHP? Are you using the built-in server, mod_php, php-fpm?
 
@Sherif mod_php
 
@bwoebi Can you provide me with a simple reproducible script?
 
All the jit variables aren't reproduced
@Sherif well, I'm failing to see where it fails, else I'd be able to debug myself easily ;-)
 
@bwoebi You mean it's not consistent?
 
@Sherif not really. I get it one of 4 times or like that
 
11:41 PM
Interesting. Have you tried building it with debug mode on? Might reveal some bug.
 
I have debug mode on ;-)
 
ahh ok
It's not a threaded MPM is it?
 
it is.
 
Ahh, that might be a hint right there :p
I've never actually tried running PHP 7 in a threaded MPM yet.
 
btw. cannot reproduce anymore with auto_globals_jit set to Off
 
11:45 PM
hmmm
Wonder if it matters whether you're threaded or not.
bleah, I gotta recompile. I forgot the PHP 7 on this machine is running a bunch of nasty stuff :/
 
hehe
@Sherif I'm having a hard time to get the right apache process to hook in :-(
 
@bwoebi What you mean like attach it to gdb?
 
@Sherif attach to a process where apache is running with gdb and do requests until current gdb session is hit
because I cannot always reproduce it… :x
 
You can run apache in single process mode, but with a threaded worker I have no idea how to ensure you get the right thread other than setting the maxclient to 1
 
11:50 PM
well, it's not a threaded worker, but just a tsrm build, sorry.
 
ahhh
Try loading mod_dumpio maybe? And make sure you log the pid as well?
It's still trial and error, but at least you have the logs.
 
dumpio is for requests/responses?
not any help for debugging?
 
@PeeHaa True, you'd have to track commits...
 
Right, but you can keep track of which requests went to which pid (assuming you're testing in the browser where additional requests may be triggered by js/etc...)
 
@zerkms ^^ I understand this was said somewhat tongue-in-cheek, but hopefully you do realize the profound difference between ANSI C and PHP 5.2.
To be honest, I think C++ as a language provides many things that would be useful to implementing a dynamic language and could be quite helpful to write a PHP engine.
 
11:56 PM
@Sherif not sure how that helps getting a request in the right time. I need to have enough luck to cath a situation where the keep-alive connection is used…
 
@bwoebi Why not explicitly initiate the request yourself then? telnet?
 
As a somewhat proof-of-concept, HHVM is written in C++.
 
@LeviMorrison C++ also provides a lot of rope, guns, bullets, and grenades ;-)
 
So does C. What's your point?
 
... and WOMD :p
 
11:59 PM
nah, C only provides rope
 
It's much harder to write really bad C code than it is to write really bad C++ code.
 
lots of it, sure, but it's easier to learn to handle lots of rope ;)
 
In fact, I use void * far, far more often in C than in C++.
 

« first day (1530 days earlier)      last day (3421 days later) »