« first day (663 days earlier)      last day (4285 days later) » 

10:01 AM
åmerican
 
Is that the format they use in Stargåte?
 
Now I'm confused.
	function class_extends($class,$parent,$cached=true){
		static $cache=array();
		if(!isset($cache[$class]) || !$cached)
			$cache[$class]=get_class_parents($class);
		return ($class==$parent) || in_array($parent,$cache[$class]);
	}
^ Isn't that awful code the same as is_a()?
 
"PHP 5.4 series will be the last versions to support Windows XP and Windows 2003."
does this mean that 5.5 would not work on XP, or just not supported...
 
> Checks if the given object is of this class or has this class as one of its parents.
^ Description of is_a()
 
damn, you really like these "exotic" functions :D
 
10:14 AM
It should work.
@webarto ImaPHPdeveloper not webdesignerdeveloperthingy
 
hey hi all ,Can somebody help me on this.I want to write a htaccess file.I want to create a human friendly url.For e.g if the url is www.example.com/rss.php?pickup=sydney then it should look like this www.example.com/location/sydney
 
@RakeshShetty There's plenty of info on how to do this out there.
I'd go with the wordpress approach:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
 
yes I asked,but
 
@Christian it thought you were joking, and then I see it's Rakesh
 
@Christian i tried this :-
RewriteEngine On
RewriteCond %{QUERY_STRING} ^(.*)location=([^&]*)(.*) [NC]
RewriteCond %{QUERY_STRING} !&e=1 [NC]
RewriteRule ^(.*)$ $1/location/%2?%1%3 [R=301,L,NE]
RewriteRule ^location/(\w+) rss.php?pickup=$1 [L]
 
10:18 AM
QSA,L
 
@RakeshShetty Basically, that htaccess is telling the server that any path/file/link that does not exist should be passed through index.php
@RakeshShetty Don't. do. that.
 
1
Q: Url rewriting mod_rewrite

akashrI have the url such as: page.com/content.php?xname=p&yname=q&zid=1 I want to rewrite this url using apache mod_rewrite into something like: page.com/p/q/ note there should not be 'zid' parameter in renamed url. I know expressions are passed as GET into the original url. Is it poss...

 
@RakeshShetty That's unmaintainable. Think of the poor guy that inherits your code.
 
my code put me into redirect loop
:(
 
@RakeshShetty Do you know how to read? Don't write the rules inside the htaccess
Let PHP do the job.
 
10:21 AM
Ohh
 
The htaccess I gave you doesn't need to change.
You're telling apache "hey, if the file or path doesn't exist, call index.php"
Then inside index.php, use $_SERVER['REQUEST_URI'] to know that the user asked for /location/wahtever
I wrote a good post somewhere about this, let's see if I can find it
 
@Christian yeah please
 
Guys i have some basic doubts in Codeigniter Nusoap webservices. Anybody please look into this thread reply there ... codeigniter.com/forums/viewthread/222302
 
@Christian thanks bro ,Ill definitely try this ,and let u know abt this
 
10:27 AM
@webarto I'm sure they're not going to break it on purpose :P. It is interesting though. The Windows API is pretty good about being compatible for long time, so I wonder what new API they're antsy to use.
 
@Corbin only if they compile using VS2012 etc... I guess...
 
ah true... i guess VC9 is actually a bit aged these days.
 
microsoft.com/en-us/download/details.aspx?id=5555 VC10 works on SP3 though... I don't know if PHP team means XPSP3 or just XP...
 
maybe they want to eventually move to 2012 once it's launched and gets a bit spread.
if you're going to update code, might as well target the newest compiler
 
@webarto Well since XP is no longer supported, that's not really a concern is it ;)
 
10:38 AM
either way, i hope 5.5 is a bit more polished when it comes around... i managed to come across 3 bugs in the core on 5.4. but maybe that was just bad luck.
 
@Corbin I've found a few myself, but they're so edge-case they're basically unimportant
 
yeah, the ones i came across were pretty damn edge case, but not enough so that they should've survived until 5.4.4
then again, i suppose if i was the first to file a bug, i was in the first few to come across them
 
@Christian u thr >?
 
hey...... ther is a problem..... for displaying an avatar. i have randomly selected the body parts of some existing avatrs andd superimposed them with gd_library. but whenever i try to display it at <img src="avatar.php"/> in my profile page. it neither displays the image nor the other content in the profile
 
10:54 AM
 
halp meeeee
 
@PeeHaa He's asking "is this a bad feature". Don't answer, just close. It's an "extended discussion" question
 
@Leigh It is a valid question. And I did state it is bad practice. Only later I found out it is a dupe and cv
 
Hi there!
 
ola
 
10:59 AM
This question has occupied my mind.
 
just a guess at the downvote (not mine): i can't stand when people answer a question with an acknowledgement that it's a dupe
 
So I wanted to violate the guideline don't start discussions.
 
i never downvote for it though :)
 
@Leigh just saiyan :)
 
@Corbin I edited it later in when I found out.
 
11:00 AM
I was willing to accept downvotes
But I have been surprised that I got rained at by downvotes so fast
 
Well in all honesty "Is this a PHP misfeature or not?" may be pretty subjective
 
eh, going to lay off the sleepy-still a little drunkness and drop it... :)
 
@AlexLunix AcceptFilter http none
 
I am not a fan of chats
 
@nalply I'm of the opinion that discussing whether longstanding language features (implemented when the language was young, and maintained for a century+), are "bad features" is not a real question for SO
 
11:01 AM
Can someone tell me where I can discuss it but not in a chat form
 
@PeeHaa From the recent discussions, I think one will soon ask "Is PHP a misfeature or not?".
 
@nalply Internals mailing list? If you like playing with fire ;)
 
lol Whisperi
 
@Whisperity :)
 
"willing to accept the downvotes" doesnt mean the community is willing to accept it as constructive, to have a blunt moment
 
11:02 AM
has been truncated in my view
I think StackOverflow is missing an outlet for needs like mine
 
@nalply If you have questions about Stack Overflow, you go to meta... about PHP, you might try the mailing list but... be aware.
 
@Leigh the internals mailing list actually handles "should php really do X" very well
 
Where can I discuss subjective themes?
I am looking for something like a StackOverflow forum
 
it's going to come down to two things: "It makes a shortcut syntax even shorter, so why not?" and "But semi colons are awesome! And the short syntaxes are an abomination anyway! short_tags!"
:D
 
@Corbin I read/write there. I don't think a "should it really do this" about an ancient feature will receive heated debate.
 
11:04 AM
Seeing your question, that isn't really fitting into the meta range either.
 
@Corbin It's a remnant from when PHP was purely a templating language
 
@Corbin Yeah and before you know it goto is implemented
;)
 
@Leigh I've browsed through the internals list a bit when searching about various internals i was trying to figure out, and they always handle trolling extremely well... it's kind of impressive haha
@PeeHaa x.x
 
I am experimenting with PHP as a template language. Therefore brevity and readability are paramount. One of the rules of PHP as a template language would be: never do more than a statement in a tag. Therefore the semicolon would be superfluous, wouldnt' be?
 
@nalply Stackoveflow is not a forum
 
11:06 AM
(a copy of a comment of mine)
of course I am not stupid
I am looking for a forum
 
@Corbin The people who have been hacking it for years just descend and lay down the law. In a "If you don't like it, unlucky." kind of way. And you can't argue with it, they're the people who made and make PHP.
 
I like the feature to omit the semicolon
It's made me happy
No need for a separate template language. Use PHP.
 
@Leigh yeah, there's definitely a sense of "don't like PHP? eh... oh well" :P
 
@nalply You can still get the PHP 1 source from the museum.
 
I am not trolling you. This is my sincere opinoin.
Okay I have to return to work. Bye!
 
11:07 AM
it's about 50/50 with agreeing with you, @nalpy
 
@nalply mustache.github.com/#demo ... I wouldn't suggest PHP itself if you want readability...
 
I already said, no need for a separate template language :-)
I developed my own templating language
 
@webarto Way to go, a demo that generates invalid HTML
 
looks like LaTeX
just as a hobby
<table>
\receivers{<td>\it.name}</td><td>\it.email</td>}
</table>
 
@Leigh it doesn't wrap them automatically in <ul> or <ol> that is true
 
11:10 AM
so you know I really prefer PHP as a template language
Good bye a 2nd time!
 
1995 called, bye :)
 
1970 more like it
 
@nalply I like the feature to make the semocolon mandatory
 
cope with reality, peehaa
°°°°
 
@PeeHaa I upvoted because downvote along with the question don't make sense...
 
11:12 AM
It's ok. :) Thanks anyway though
@nalply What prevents you from writing your own parser so you don't need the semicolons in the first place?
 
@PeeHaa and your answer will prevent this idiocy hopefully...
 
sourceforge.net/projects/…
any one knows hoe to use this pdf to html convertor
 
@PeeHaa actually I spent 3 hours yesterday "debugging" models etc, when it turned out that <? was disabled and because it was in templates, I couldn't figure where it broke... I haven't thought of that because I don't use <?
@DextOr full link would be nice
 
must've been a frustrating 3 hours x.x
 
sry
 
11:15 AM
"why is it like PHP isn't even running at all?!" :D
 
hi , it is possible that play video before upload
 
doesn't work!
 
@YogeshSaroya probably with HTML5
 
I need pdf to html not html to pdf @webarto
 
11:16 AM
...
 
@webarto you have any good link
 
@YogeshSaroya nope
 
@webarto thanks
 
@DextOr I don't know how it works, first time I heard of it, but I don't think you can rely on that entirely...
@YogeshSaroya check out minus.com
View Source, etc
 
@webarto thx I will try that.....
 
11:20 AM
hey guys ,do u hav any idea abt htaccess ?
 
With the outlook of ReactOS I think we should really keep Windows NT compatiblity with PHP.
 
any other guess people
 
@RakeshShetty do you have about English?
 
@RakeshShetty All I know about .htaccess has been written down here: httpd.apache.org/docs
 
@hakre I think all of them are NT (2000*)
fuck
can't hit + in 2 tries, won't try it third time
2
@hakre I'm just curious what does "offering binaries for XP means"
 
11:25 AM
ok fyn now atleast somethings comming. but why does the function build_avatar() which has two parameters the users email and the size of image (its work is to generate the image corresponding to the email)... does show anything if the first parameter is something like $row['email'] (the email is fetched from database using select from mysql statement
 
@hakre morning :)
 
@blackbee don't be afraid to var_dump the crap out of stuff
you likely have a variable with a value you don't think it is
 
Stop flagging posts for no reason
 
hm
try the national flags instead courtsey )@PeeHaa
 
11:29 AM
@hakre ReactOS looks nasty, but on the other hand, I'd be able to write kernel-mode hacks for games quite easily with it...
 
@Corbin what do i dump.. i think u got that i have generate a php file that takes in the body parts of an avatar to create the full avatar. only thar it doesnot work when i try to pass the users email....... into the function that does the task of creating the avatar......
is there any way to pass the value using $_REQUEST ?
ow sorry. where do i dump
i did echo var_dump($live_id) where live_id is equal to session user id
but it doesnot say anything
 
@PeeHaa yeah except that i meant the raw req/response but that's ok
 
@Lusitanian morning
:)
 
mornin
 
PeeHaa fighting with global evil stackoverflow.com/questions/11882327/…
 
11:42 AM
please somebody say something..........
 
@hookman the second response to that question makes me sad
 
@Leigh I like the idea actually. imagine to preserve old software that just does the job in a free software environment.
@PeeHaa morning :) was late but great yesterday ;).
 
@PeeHaa i gotta go but i'll be back in a bit. i had absolutely no issue with artax + soundcloud though
 
@webarto To still have PHP support for Windows XP.
 
ok tell me one thing does the session name change if the same user logs out and then again logs in
 
11:50 AM
@blackbee no idea what your script looks like. just try to be aware of how data is being passed around though. assuming you mean it's taking in text, then you should be using either $_POST or $_GET. just pulls the data out of that, and pass it as appropriate.
depends on how you log them out
 
@Lusitanian Only thing I can think of is a ssl certificate issue somehow. What OS are you running?
 
if you do a $_SESSION['user_id'] = null type thing (which i would avoid), then yes
if you destroy the session (which i would do) then no
 
@blackbee and most (all really) browsers clear session cookies, so if the user closes their browser it will definitely be different (well, like a 1/9^9^9^9 chance it will be the same)
 
wait
i passed the parameter as session name it works now. i am posting the script. see if u can suggest if i cud do it with the email of the user.......
@Corbin
 
11:53 AM
@PeeHaa awesome graphic lol
 
<?php



$username=session_name();

build_monster($username,"220");

function build_monster($seed='',$size=''){

// init random seed
if($seed) {srand( hexdec(substr(sha1($seed),0,7)) );}
// throw the dice for body parts
$parts = array(
'legs' => rand(1,8),
'head'=>rand(1,6),
'body' => rand(1,6),
'hands' => rand(1,5),
'eyes' => rand(1,14),
'mouths'=> rand(1,10),
'hairs'=>rand(1,5),
'caps' => rand(1,8)


);

// restore random seed
if($seed) srand();

// create backgound
$monster = @imagecreatetruecolor(220, 220)
 
not sure how good of idea using session_name() as an identifier of a user is
 
i dont want to use it either
 
nothing jumps out at me as strictly wrong though in that script
i wouldnt suppress errors though on the gd functions
 
@Lusitanian
Programming in:

C, C++, Python, Bash, (X)HTML(5), CSS(2.1,3), JavaScript, Ajax (jQuery), PHP, SQL, LaTeX

Experience in:

C#, ASP.NET, AutoIt

Working with Ubuntu Linux
 
11:54 AM
those should show up in your logs if those functions ever fail
 
@Corbin thank @hakre for all the hard work on that
 
as soon as i put the quer as SELECT*FROM member bla bla bla;
the image vanishes
@Corbin
 
@PeeHaa the part is how many [php] problems it applies to
@blackbee whenever you run into a problem like this, debug
enable display_errors
turn error reporting all teh way up
remove the Content-Type: image/jpeg (or whatever) header so the error text will show
 
ok
 
it could be a failed query, a typo'd variable....
 
11:59 AM
@PeeHaa Hi. Remember Dependency Injection discussion? I'm still developing that app in procedural style, and it's pretty annoying to add that much parameters to each function even if they are related. In OOP you just pass something to constructor and assign to a class property = it's easilly accessible through $this to all class functions. P.S. My projects are not that big to use framework for them, but handling DI this way is no good :( Any advice?
 

« first day (663 days earlier)      last day (4285 days later) »