« first day (448 days earlier)      last day (4497 days later) » 

12:06 AM
wow there is hope, see the comment under the answer:
1
A: Including contactform.php into HTML page error: Warning: Cannot modify header information - headers already sent

hakreThe contactform.php has obviously not been created for your usage in index.php: <body> <div id="container"> <div id="header"> ... </div> <?php include ('contactform.php') ?> <div id="content"> ... </div> <...

 
@hakre paying 10 dollars now instead of 5 a month, have shell
 
and are you root?
 
i believe so
you mean, do i have access to things above www/
 
anyway, shell is way better
 
if so, yes i do
 
12:08 AM
okay, cool
welcome to the club
 
lol
 
you wrote you're a windows user?
 
@JMRboosties Can you haz installer?
 
the server is linux, i am windows
@LeviMorrison install what?
 
okay, here is a software you will love: winscp.net/eng/index.php
 
12:09 AM
@hakre btw why are you always <sup>ing your links?
 
@hakre an ssh client?
 
sorry, wrong link, corrected now
 
@JMRboosties Do you have permissions to install software?
 
yes one for file management
install putty as well
both work good with each other
you also need an application to store your (strong!) passwords: keepass.info
take the classic variant
real oldskool website design btw.
 
@LeviMorrison i believe so yes
@hakre i think you sent me the wrong link
 
12:16 AM
which one?
@NikiC If I like to do it nicely, yes.
Wow got two silver badges at the same second in time: stackoverflow.com/badges/19/enlightened?userid=367456
 
@hakre first one, you gave this: stackoverflow.com/a/8755258/367456
 
I edited the chat message
 
hm, it still gives me the answer on SO
 
should be winscp.
You can transfer files with it to your server via SSH/SCP
it also integrates with putty, so you can start a shell with a click of a button
 
nice
 
12:28 AM
But I got to leave now.
I'm way over.
have a nice evening everybody.
 
you too @hakre
 
you too man
@hakre sorry, actual work called lol
 
12:45 AM
@ircmaxell superconductivity is awesome. Would love to try that out, though it doesn't look like one can buy liquid nitrogen just like that :(
 
 
5 hours later…
5:58 AM
0
Q: image path and $_SERVER['SERVER_NAME']

Yasir AdnanI've some images in my wordpress plugin folder.Folder structure is xx->wp-content->plugins->plugname->images->.. So,when i try to call only "/images/myimage.png/"; It didn't work. but when i call xx/wp-contents/plugins/plugname/images/myimage.png' Then it works.Currently I'm trying...

 
6:41 AM
hello everybody
anyone knows YII framework?
 
 
3 hours later…
9:56 AM
bonjour.
 
10:26 AM
Anyone has an idea of managing user's session on a web server for an iPhone app user?
2
Q: Manage user's session on a web server for an iPhone app user

HectoretI'm writing an iPhone app. This app requires users to login on a remote web server which is using php + mysql. How can the server handle this? Using sessions? Cookies? unique IDs? Any link/code/tutorial on how to do this would be great. Thanks!

0
Q: Session Management in iPhone

DilshanI need to manage server sessions in iPhone. As I researched there are many ways. One way is to use the apple native method calls by make use of the NSURLConnection and NSHTTPCookieStorage classes. However using the 3rd party libraries like ASIHttpRequest can also be helpful cos it already has imp...

0
Q: iphone session management

molloyHow can I manage user sessions in an iPhone app? I get a username and password from the user on the first page of my app. The user may log out whenever he wants. How can I store session information in an iPhone app like any other web application? Is there any other technique for that? thank you.

I found these links.
What actual work required for managing session in iphone?
 
morning
@hakre Are you German too?
 
Morning.
 
@Rock Sorry, no idea about iPhone
 
and what about session management?
 
@NikiC I just wanted to create some international flair in the channel ;)
@Rock: What is your specific question? The webserver won't care if it's an iphone or some other HTTP client.
 
10:39 AM
AFAIK, I can store username and password in iPhone using. NSUserDefault
When user is logging into app, I can able to access first view let say walls or news feed or whatever.
but when I am getting into other view webservices respond me you are not valid users as I am not able to maintaining session between web-server and iPhone.
at the server side they are having session management.
getting?
 
@hakre Only asking because yesterday or so you quoted something german
 
So und nun speziel für @NikiC: Guten morgen!
And for everybody else: Good Morning!
 
@hakre so are you german now or not?
 
Good Morning.
 
@NikiC: Yes, my first language.
 
10:45 AM
@hakre Gut :D Noch mehr Deutsche hier :)
 
user47322
oh wtf hi nikic
 
user47322
i just sent you an email
 
@Rock Sort of: The application session in the iphone application is not the server session - that's normal.
 
I need logic how to manage it between server and my side,I'll code myself.
 
You try to connect a server session with the iphone app session?
To tight both together?
 
10:47 AM
@CharlieSomerville hi
@CharlieSomerville just saw it
 
ihr sollt nicht deutsch sprechen hier drin. pfui.
 
@Gordon Please add "pfui"
 
@hakre yes, as there is web app also and iPhone app also.
 
Okay, you have a first suggestion how to approach that?
 
@CharlieSomerville The parser works on 5.2 ;) If you only want to parse 5.2 you can use the normal PHPParser_Lexer. If you want to parse also 5.3 and 5.4 on 5.2 you'll need to use the PHPParser_Lexer_Emulative (that's not documented yet)
 
10:49 AM
They are maintaining session at web app.
 
app.session.id --> pass to webservice --> webservice -> webservice.session.id -> app
 
user47322
@NikiC sounds good, I can probably figure out how the emulative lexer works
 
for all following requests to webservice, both need to be passed.
 
@Gordon pff. wir sollten hier eigentlich nur deutsch sprechen. wir haben hier immerhin mehr deutsche als amis ^^
 
..../projectSessionJSON/1
I am having session url for maintaining session.
{"msg":"Project Session Created"}
in response I got this.
How do I use it?
 
10:51 AM
@CharlieSomerville Probably not. The emulative lexer is a really dirty hack to overcome the limitations of token_get_all()
 
and there is no app.session.id and webservice.session.id.
 
@Rock I have no clue because I don't know the specification of the webservice.
 
@NikiC no, it's VERBOTEN! Nein! Nein! Nein!
 
@Rock These were just names to describe a process.
 
nvm, thanks for replying.I was wondering for logic only.
 
10:53 AM
@Gordon pff unterdrückung!!!
 
@Rock That's why I used them. You stick them together like global.sessionid := (app.session.id, webservice.session.id)
 
I need to create app.session.id at my side? and webservice.session.id will be provided?
 
yay! I got bronze xpath badge. about time. stackoverflow.com/badges/558/xpath?userid=208809
 
@Gordon lol
 
11:20 AM
Damn JS implementations are just so much more awesome than PHP's :(
There are so many crazy techniques for storing values
E.g. one can store store type information in the pointer
or make a hybrid structure that is either a pointer or a 31 / 63 bit integer
Or one can use the NaN space of doubles to store a pointer (that doesn't make sense for PHP though)
 
That's probably why many are hopping over to node.js.
 
@hakre The performance is impressive, yes
 
@hakre done
 
@NikiC And there is this library gg: phpjs.org
 
user47322
12:16 PM
do you need a reason to hop away from php?
 
stackoverflow.com/questions/8769615/… , too. But please add the duplicate, I was spending my close vote too quickly.
:)
 
12:31 PM
done
 
@NikiC hi, where have you read about that? can I beg for a link? :-)
 
1:10 PM
cv? is it too simple? too localized? duplicate? stackoverflow.com/questions/8769822/… im torn between closing and answering.
 
@Gordon I think Jenny wants to learn, see here: stackoverflow.com/questions/8769251/…
Looking into HATEOS btw.
 
1:26 PM
@hakre check martinfowler.com/articles/richardsonMaturityModel.html for a primer. Then buy Rest In Practise or get Richardson's thesis.
 
1:38 PM
Can I have a "Because OP is whining" close reason?
 
@Gordon I only have 30 votes for :(
 
@salathe because you suck
j/k :)
they rarely tag those questions correctly
 
@Gordon haha
It's probably because someone goes around removing xpath tags... that happened a while back, it might still be being done.
 
yeah dimitiri
 
yup that's him :)
 
1:43 PM
and i guess its to keep stackoverflow.com/badges/981/xpath?userid=36305 the way it is
 
heh
 
@CharlieSomerville Yes :)
@KamilTomšík What is this referring to?
@KamilTomšík You mean the tagging and boxing stuff?
@KamilTomšík If so, here: wingolog.org/archives/2011/05/18/… (and the links following from it, they explain the tagging and nan-boxing in more detail)
 
@NikiC yep, thx, interesting reading
 
@KamilTomšík I think some of it can be applied to PHP, but I'm not sure that it's worth the effort
 
umm, what's the easiest way to turn all the newlines in a file to the system specific newlines?
 
1:52 PM
@Gordon preg_replace on (?:\r\n|\n|\r) or (*BSR_ANYCRLF)\R with PHP_EOL ?
 
@NikiC only on \r?
 
does anything still use \r ? I thought that was only old macs?
 
@PeeHaa no, not really
 
@NikiC with all respect to php, I don't think it's going to have bright future. :-/
 
@KamilTomšík Why so?
You switched to Java?
 
1:55 PM
@NikiC hmmm k I thought win == \r\n *nix / MAC10+ \n and \r MAC9 what else uses \r?
 
@NikiC well I do java, but that really doesnt mean anything, Java is going to stay and it does not have anything to do with language-quality. Java sucks, really. It's about money.
 
@PeeHaa Misunderstanding. I meant to say: Yes, nobody uses \r anymore :)
 
@NikiC :P k
 
IMHO, php will continue to suffer from its "there-is-function-for-everything"
 
@KamilTomšík Why is that a problem?
You mean in the sense of bad image?
 
1:57 PM
nothing works perfectly :-)
 
^^
 
you know what I mean, dont you?
 
@NikiC thanks. didnt know BSR_ANYCRLF. got you an UV on stackoverflow.com/questions/7836632/…
 
not really admittedly ;)
@Gordon I also got a summary on the various newline options of PCRE: nikic.github.com/2011/12/10/PCRE-and-newlines.html Not nice for reading, but good as a reference ;)
 
@NikiC what's goal of php? it tries to do everything, which is imho impossible (to do right)
 
1:59 PM
@NikiC thanks. will check it out later
@KamilTomšík isnt that the purpose of a general purpose language?
or do you mean in regards to paradigms?
 
@Gordon yep, but every language fits somewhere better than other, php fits everywhere but nowhere better than others
 
@KamilTomšík well, PHP is Borg
it assimilates everything
with the results being not that pretty, but effective nonetheless
 
@KamilTomšík PHP fits best for web dev, you aren't going to deny that do you?
PHP really doesn't fit for desktop development, but it definitely fits the web
 
I'm not trying to raise flame, I don't regret learning php, I've experienced a lot of fun and I still ocassionally do, but If I were considering learning new language I'd prefer something else
 
2:04 PM
@NikiC gtk.php.net :P
@KamilTomšík i didnt understand it as a flame at all
 
@Gordon I know that. But it doesn't change my statement at all ;)
@KamilTomšík We know you, so it isn't flaming ;)
 
and there are also practical reasons - less money for php devels, harder finding "good" (in the sense of professional teammates) job
 
@KamilTomšík What would you prefer?
 
@NikiC true :)
 
@KamilTomšík Well, if I may ask: What is your salary as a Java developer?
 
2:06 PM
today? javascript (since it already rocks mobiles and we're all going mobile) and there is also node.js for server-side
 
@KamilTomšík hmm, less money but plenty of work right now. actually that's a business value pro PHP. work force is cheaper than Java folks.
 
@NikiC two times my php salary
 
@KamilTomšík Would be good to have a number so I can compare ;)
 
@NikiC no, really, even if I'd want I can't :-)
 
user47322
@NikiC your awesome parser helped me go from zero to hero: gist.github.com/1574821
 
2:07 PM
psst :-P
 
@KamilTomšík JS is nice, agreed. I'm not sure though about node.js. I don't believe that one can use it for "serious" projects (yet)
 
damn. i missed @Kamil's salary now
 
@KamilTomšík Can you off the record?
@Gordon no you didn't ;)
 
oh ok
 
Good Morning
 
2:08 PM
@NikiC nope, sorry.
but there is something else I want to talk about
 
@CharlieSomerville óÒ What's that?
@KamilTomšík :( I would love to know :(
 
@ircmaxell morning
 
user47322
@NikiC php obfuscating
 
user47322
@NikiC compiling php to php
 
How's it going?
 
2:10 PM
@ircmaxell morning
@CharlieSomerville Looks fun, though not obfuscated enough yet :D could you share the script for this?
 
@CharlieSomerville That''s not that difficult to follow
 
user47322
@NikiC yeah i'm planning on some other fun little bits like global string interning
 
user47322
@ircmaxell it's not a very long or complex input script
 
quite true, but you can do better, I'm sure :-P
 
user47322
my ruby->php compiler does essentially the same thing as this and its output is unintelligible!
 
2:12 PM
Good afternoon
 
java as a language sucks, let's face it, but java devel is much easier. you can focus on more interesting things - you already have working data-binding, mature orm, di containers, so you have more time for other things. this is something I like. the think I hate is that you sometime have to show more "system" skills than you would for php - db scripts, deploy scripts, integration, etc. that really sucks
@CharlieSomerville yep, another great thing, since there is so much money there, you don't care about obfuscation, it's already law-protected.
 
user47322
people seem to like obfuscators, and it's a cool little project
 
@CharlieSomerville Could you show the script that obfuscates it?
 
@NikiC sorry, really can't tell you - wont risk losing this job, I was little sceptic about my staying there but now I'd love - even my colleagues are comparative to me, it's pleasure to work with smart guys.
 
user47322
@NikiC this is the interesting: gist.github.com/de1af2d48a0524967eee
 
user47322
2:17 PM
woops
 
user47322
there you go anyway
 
@KamilTomšík ^^ I don't know what you are risking with this, but anyways, nobody is going to force you :P
@KamilTomšík Doesn't PHP have all that stuff too? Doctrine, Symfony's DI ... ?
 
@NikiC um, databinding is at least very complicated thing to do in php, since it lacks server scopes (page state living in session)
 
@CharlieSomerville by the way, you can extend the existing PrettyPrinter_Zend so you have default methods for the various nodes ;)
@KamilTomšík What do you mean by data binding?
 
user47322
@NikiC not as fun :p
 
2:20 PM
@CharlieSomerville right :D
 
@NikiC that means you don't "echo" model values in your templates, you rather build component-tree for each request and each component knows what to do - so setting value to blog post is done automagically - including all defined validations on that domain model.
 
@KamilTomšík I don't quite get that admittedly ^^
 
user47322
asp.net is all about data binding
 
user47322
and it's not very fun
 
@NikiC http://www.nofluffjuststuff.com/blog/max_katz/2009/02/how_to_delete_a_row_in_jsf

The interesting part there is commandButton pointing to delete method - you don't mess with ids in request anymore, it's all already done
 
user47322
2:27 PM
@KamilTomšík wow that's a lot of bullshit
 
@KamilTomšík My guess would be that PHP frameworks provide similar features. Never used one though, so no idea ;)
 
user47322
@KamilTomšík most frameworks let you not mess with ids anyway
 
user47322
@KamilTomšík <%= link_to "blah", @something %>
 
Well, this month so far is my best of all time for my blog (in 7 days I passed my previous best in August. I guess I will have to make a few more posts :-P
 
@ircmaxell how many views is the #1 at now?
 
2:29 PM
what's bullshitty on:
<c:forEach items="#{blog.post}" var="post">
#{post.title} <h:commandButton value="delete" action="#{blog.removePost(post)}"><br/>
</c:forEach>
?
@NikiC unfortunately, they don't - I'm only aware of prado which just sucks
 
user47322
feels too coldfusiony
 
@KamilTomšík should be <c:blogposts/>
 
@Gordon could be (<blog:posts />)
 
@KamilTomšík btw, how's yourlang?
 
oKamil
 
2:31 PM
oKamil right
 
@CharlieSomerville the point is you don't have to write controller and method there just for calling existing method, so if you'd rather do it, go for it :-)
oKamil is still in progress, wait for it :-)
 
@KamilTomšík you promised a preview for the end of the year :P
 
user47322
@KamilTomšík right, but at the end of the day a controller action for deleting something is like 3 or 4 lines
 
@NikiC whoops :-)
 
@KamilTomšík ...
 
2:33 PM
@NikiC 10340
 
user47322
@KamilTomšík and i'm of the school of thought that you should a little more control over your markup than relying on control rendering magic
 
@ircmaxell :P
 
@CharlieSomerville that still means you need to write it and most importantly mantain it
 
user47322
@KamilTomšík i've played with asp.net which does the same thing and i wasn't a fun
 
user47322
@KamilTomšík i'm also not too sure how much i like having code like 'blog.removePost(post)' in a view
 
2:34 PM
@ircmaxell ->map() should return a new instance, not change the existing?
 
git partial committing is rad
 
@CharlieSomerville I'm not forcing you, I just prefer it over writing useless classes.
 
@Gordon Yep. Git interactive mode is realy nice ;)
 
user47322
@KamilTomšík since when do you have to write a class to implement a delete action
 
user47322
@KamilTomšík you already have your post controller i'm assuming
 
2:37 PM
@CharlieSomerville nope, you don't need controller at all
you already have one - front controller (jsf one)
 
user47322
@KamilTomšík so where do you load your data?
 
@CharlieSomerville they're available in context (declarative configuration), DIC
 
user47322
interesting
 
@CharlieSomerville yep, that's something I was missing when I left J2EE few years ago, that time all this stuff was implemented by seam framework, now most of it is already in JSF2 (so you usually don't need any extra frameworks)
 
hm...
One should make that available for PHP too ^^
 
2:47 PM
@NikiC I've already tried, no success :-/
it's easier to either write shitty mvc or change language
 
user47322
@KamilTomšík go with the hacky viewstate solution
 
@NikiC but if you have a lot of free time :-) I'd love to see that too
 
user47322
@KamilTomšík there's your state!
 
@KamilTomšík I have, but I don't know the concept so I can't do it ^^
 
@CharlieSomerville hm? I think you've mistaken viewstate with asp.net, jsf is server-based
 
user47322
2:49 PM
@KamilTomšík but you could implement some data binding, server event shit with it
 
user47322
@KamilTomšík store a bunch of serialized stuff in there, maybe code to eval, then base64 it and sign it
 
@NikiC concept is quite simple - every single page lives in session, every form submit then continues the lifecycle, other ones do not (usually)
@CharlieSomerville why would I do that?
 
user47322
@KamilTomšík you could get something quite similar going on
 
@KamilTomšík ugh. That sounds ugly
 
user47322
@NikiC it is
 
2:56 PM
hi yall
 
@NikiC seaside (smalltalk) does it that way too, it's about point of view, I like that, @ircmaxell would definitely hate it, I guess :-)
 
@KamilTomšík :D
 
@NikiC it is less performant than mvc approach, yes, but performance is always relative. and apart from that I don't see any other disadvantage
especially when you can go even that far to generate even templates from domain models (using "theme")
 
What is the correct term for http /https / ftp etc?
Is it scheme or is it protocol?
 
user47322
scheme
 
user47322
3:06 PM
well it depends what context
 
k tnx
o :P
 
user47322
there's the HTTP protocol
 
and the SSL
 
user47322
but the http part of a url is the url scheme
 
and not https
it the http part of the uri yup
@CharlieSomerville tnx
 
user47322
3:07 PM
i love php
 
user47322
[Sun Jan 08 02:06:57 2012] [notice] child pid 15562 exit signal Segmentation fault (11)
[Sun Jan 08 02:06:57 2012] [notice] child pid 15560 exit signal Segmentation fault (11)
 
yay! seg faults
 
@CharlieSomerville gdb => fix => happy
 
user47322
hmm it's something to do with my Expr_New generator
 
user47322
commenting it stops the segfault
 
user47322
3:08 PM
i could just gdb apache right
 
user47322
but it does say child process...
 
user47322
oh fuck me
 
user47322
i was infinitely recursing
 
user47322
WTF php segfaults because of that
 
user47322
wow
 
3:23 PM
@CharlieSomerville It shouldn't, you should get a memory limit error instead. Which version of PHP are you using?
 
user47322
5.3.6
 
user47322
i'll gdb it if you like
 
user47322
yeah it's definitely segfaulting
 
user47322
i'll try to get a short little example
 
strange, but no need to gdb ;)
 
user47322
3:24 PM
oh?
 
well we know where the segfault comes from so no need to gdb
 
user47322
oh
 
it's only strange that you don't get the memory limit error, normally it should be there
 
user47322
yeah i tried reproducing it with another script
 
user47322
memory error
 
user47322
3:26 PM
but in this particular case, boom
 
user47322
har har i repro'd it
 
user47322
~/crap ruby-1.9.3-p0 % php lol.php
Segmentation fault
 
user47322
nikic, you're core team right?
 
re
 
@NikiC correct
 
3:38 PM
hi @ircmaxell, hi @LeviMorrison, hi @LondonBoy, hi @PeeHaa, ...
 
@hakre Welcome @hakre
 
@hakre Hello.
 
user47322
 
hmm, why memory error?
wouldn't there be a stackoverflow first?
 
user47322
regular stack overflows cause a memory error
 
user47322
but because php is php
 
@hakre that is a memory error basically ;)
 
user47322
some function calls are more equal than others
 
user47322
3:57 PM
it'd be nice if php raised a specific stack overflow error rather than a vague memory error
 
user47322
so you know what you're looking for
 
@NikiC yes, call stack memory limit :P
@CharlieSomerville Fatal error: Maximum function nesting level of '100' reached, aborting! (xdebug)
 
user47322
handy
 

« first day (448 days earlier)      last day (4497 days later) »