« first day (250 days earlier)      last day (4705 days later) » 
00:00 - 18:0018:00 - 00:00

12:08 AM
Hi, guys!
Really need your help...
I need a block diagram
of PHP and MySQL script or algorithm
THANX
 
sup?
 
@ircmaxell cheers ;)
 
How's it going @kamil
 
@ircmaxell quite okay, was playing with ux stuff all the day :)
@ircmaxell and I've just made example of model2 app for local php beginners... codepad.viper-7.com/pLQU5X
 
nice
I came across a new framework today
 
12:20 AM
@ircmaxell not entirely my idea, I've followed "spaghetti" example, but I made it stateful rather than stateless...
 
found 2 new vulnerabilities in it in the first 5 minutes... (one minor, one REALLY major)
 
:-D
@ircmaxell yeah, better do not look at that example, it's not intended as secure one - I've just wanted to get it working in ~= 200 lines.
 
as long as there's not anything fubar wrong with it, I won't care
 
nothing significant that I can see in your code (security wise)
yeah, the model is a db class...
so if you use 3 models, you get 3 db connections :-X
 
12:24 AM
@ircmaxell: do you have any online CV?
 
Not completely updated, but:
 
@ircmaxell actually - I'm upset about those "extends"
 
lol
 
@ircmaxell and glad to hear that... although - security was really the last thing I was thinking about
 
not on careers ;-) Need to get the idea about how it should look like
 
12:26 AM
it looks quite well structured. There are a few things I might change in production, but for an example it looks fine
@zerkms No, nothing public... anymore...
 
any reason for that? or careers is just enough for you?
 
No, my current gig is enough for me :-P
 
i've been mentioned that mine doesn't look enough europe-ish
so need to "redesign" and update it
 
lol
I understand that
 
@ircmaxell: passed 1st interview to one company located in NZ and probably will have another one to netherlands
so perhaps my dream come true soon
 
12:29 AM
Congrats!
 
still feeling lack of verbal experience... thinking about taking some courses
it is not quite cheap here though :-S
 
You'll survive
remember confidence is key
 
discussed with col.schrapnel your slides
 
Oh no
 
he told me that you've gotten some his thoughts from SO discussions
 
12:31 AM
Yes
 
is that true? :-)
just curious
ok
 
That is true. He did open my eyes to the flaw in libmysql
 
he blaimed himself that he did not made the same speech for biggest russian php conf
 
If they want to sponsor me, I'll fly over and give the talk :-P
 
he thought it doesn't worth it. changed opinion after your slides probably
hehe
 
12:33 AM
Well, I found a new vulnerability, so there was more to the slides than the little bit
 
this year it was rethans there. and some other foreigners, don't remember their names
@ircmaxell: haven't you ever regretted about choosing specifically php? not c++, java or .net?
 
]nope
I know C++ and Java
 
@ircmaxell do you know this one? ;)
try{
  return true;
}
finally{
  return false;
}
 
it will return false
 
so you do :-)
 
12:45 AM
in the last interview I had a question about why C++ doesn't have finally
so - why?
 
because it does have destructors?
 
so what?
 
finally != destructors...
 
and it's not necessary anyway - neither of them
 
.net has finalizers and finally
uhm...
 
12:46 AM
@ircmaxell yes, they're not
 
how is it related?
 
@zerkms finalizer != destructor
 
yep, not exactly, but does the same work
anyway
how is destructors existense affects the lack of finally
?
 
dunno why it doesn't have finally
 
it is related at least in case of streams... usually you open stream, do reading, and close it... you can do this in both ways, however there is one much better way... guess which one :-)
 
12:50 AM
perhaps it lacks finally because it might leave the stack in an inconsistent state and hence leak memory. A problem that Java doesn't have...
 
let's suppose we open a lot of files in different methods
in one method we have thrown an exception
thus haven't closed descriptor
so it will be opened until we have deleted an object
but we might need have it to work with for a long time more
so finally would help us, and destructor wouldn't
 
but you can get around that issue without finally
 
uhm, how?
 
by catching and rethrowing
 
hehehe
 
12:53 AM
not saying it's "clean", just that it's possible
 
yep, we can, but that is not a justification of lack of such a handy syntactic sugar
 
@zerkms okay, I can't resist anymore - invokeAround is elegant solution for this. you don't need destructor for closing stream, you don't need finally - you'll catch and rethrow, just like @ircmaxell said...
 
we can do the same in .net and java ;-)
 
yeah, but finally can be seen as just that done at the language level rather than explicitly
 
well, google says there is no finally because of destructors :-S
 
12:57 AM
@zerkms because they work differently in c++
 
Well, actually it does make sense
as long as all of your resources are allocated at the object level
 
1:09 AM
user image
2
 
no!! )
 
 
2 hours later…
3:36 AM
guys a small help on REQUEST_URI
 
ask
 
3:59 AM
@all hi
0
Q: not connecting to the database

Nareshbasically i am an android developer..i am newbi to php..to connect mssql from my android application ,i wrote the follwoing script . <?php $myServer= "*****"; $myUser="*****"; $myPass="***"; $db="*****"; echo "hi"; $dbhandle = mssql_connect($myServer, $myUser, $myPass); echo $d...

@jcolebrand hi
 
should I say <? echo "hi"; ?>
 
4:15 AM
@Krish ha..ha..ha
 
4:36 AM
No, you have to get my attention when I'm not doing something else.
It helps to refresh the page every so often and find out who's lurking and who's new to the room
@Naresh are you still there?
 
@jcolebrand yes
 
@Naresh Did you understand the answers on your Q?
Additionally, you should really consider building this as a WebService instead of just a single webpage
 
@jcolebrand yes ..they are saying that ..enable mssql in the PHP configuration
 
@Naresh Yes, do you understand why?
 
@jcolebrand couldn't usnder stand yar
could u tell me
 
4:48 AM
Have you installed the program for MySQL on the computer?
(yes or no questions here)
So you either say "yes I did, MySQL is installed" or you say "no, I did not, MySQL is not installed"
 
@jcolebrand directly hosting this script into server..
not in lcal host
 
Do you understand me?
Where Apache is installed, is MySQL installed?
@Naresh can we do questions where the answer is yes or no?
 
@jcolebrand yes...
 
Is MySQL installed on the same computer where Apache is installed?
 
@jcolebrand i have not istalled any thing in my systemm...
 
4:54 AM
@Naresh Is Apache installed on your system?
Then why the hell are you worried about your system?
I specifically indicated the computer I intended you to answer about
I can see that you need a more remedial approach.
I suggest not answering questions until you read them
 
@jcolebrand pls listen to me..i am hosting this php script in server..why do i need to install apache in my system?
@jcolebrand are u there?
@jcolebrand pls answer me..
 
sorry, I am doing other things you know
you are not listening to me
so I don't feel compelled to listen to you
I asked you if "the server that has apache" also "has mysql installed"
 
ys
 
this is as simple a question as has ever been asked on Stack Overflow and when you can't answer it and worry about your own development computer, I wonder if I can help you at all.
so I'm not sure that I want to help you with this problem that you're having, since you can't read the question and answer it, and you try and worry about 30 different things that aren't related
if you're going to listen to me and respond to the questions that I ask then I will try and help you as far as Iam able
 
yes that server has MSsql..
 
5:04 AM
hello
 
does it have php?
 
how to get Video id from iframe of youtube in php or cakephp
 
@jcolebrand yes
 
@chetanspeed511987 what the hell does that even mean?
@Naresh did you configure php to use mysql?
 
@jcolebrand yes configured
 
5:06 AM
how to grab Video id from iframe of youtube in php ????????????
 
@jcolebrand but not mysq.l..MSSql
 
by regular expression
 
@Naresh well pick one
either you have or you have not configured php to use mysql
@chetanspeed511987 how does the iframe have the url and you don't?
 
yes configured mysql
 
i have this iframe <iframe width="425" height="349" src="http://www.youtube.com/embed/YRUG-Pu7RzE" frameborder="0" allowfullscreen></iframe>
i want to grab video id from it by regular expression.
 
5:09 AM
@Naresh so the problem you're seeing says that you have not configured php and mysql together
@chetanspeed511987 ok, if you use that URL by itself, what does it do?
 
@jcolebrand how to configure?
 
@Naresh did you see any links on your question that suggested that?
 
@jcolebrand yes
 
did you read those links?
 
no
k let me read
@jcolebrand how do i know whether mssql is configured to php or not..?
 
5:16 AM
@Naresh well, the easiest way is to write a php script and see if it does what you want
as you did
and when it doesn't work, you have to check the php logs and see why it doesn't work
 
@jcolebrand i wrote a script with..echo "hi"..which is showing in browser..
 
@Naresh that is NOT what happened
you wrote a php script that is supposed to talk to the database and it errored out and only showed you PART of what you typed in
so therefore it ERRORED
 
@jcolebrand okesy
@jcolebrand but its not showing any error message..
 
@Naresh where are you looking for an error message?
 
@jcolebrand in browser itself
 
5:27 AM
@Naresh that's not where PHP puts all its errors
you have to look in the php logs as well
and if php isn't logging those errors, you need to turn that on in php
 
@jcolebrand k
 
5:46 AM
@jcolebrand hi
<?php
phpinfo();
?>
@jcolebrand i tested this one
@jcolebrand there is no mssql ..
 
then you must configure it
 
@jcolebrand okey thank u very much..i will get back to u with status
 
 
2 hours later…
7:18 AM
Hi everyone i'm noob.. awesome chat
 
7:36 AM
@claudiomalorgio hi\
 
 
2 hours later…
9:10 AM
Good morning folks
 
9:33 AM
<?php ThisIsAStaticClassToPissPeopleOff::sayHello(); ?>
 
Hello :)
What's Sportsmanship badge all about? I don't really understand it's explanation
 
Hey Guys, simple question. I have multiple domains hosted on the same server, these domains access an API, when i do an API request on both servers the requested IP address of rht erequest is the same, regardless of the vhost ip.
The server i'm on has multiple IP address ( apparently ) what i'd like to do is have all requests from DomainX to use one IP address abnd all requests form DomainY to use a different one
is that even possible when using PHP? Or is that to late in the stack?
 
10:06 AM
1
A: Display PHP object depending on day of the week

GordonIn your if/else you dont need the else at all. Have a look at the manual for date. The only way date will return false is when you pass in a non-numeric timestamp for the second argument. You are not doing that, so date will return one of the days anyways. But, instead of using if/else or switch...

look at the other answers.. so ridiculous.
 
10:25 AM
@Gordon Yeah, these ifs/switch are unnecessary ( +1 )
 
Groan .....
that's appalling
 
10:58 AM
Hi @teresko How are you? :P
 
dying
 
Oh.
At least you can write :D
 
1 message moved to bin
 
Hello @ircmaxell
 
morning
 
11:11 AM
hi there
 
Hello @Greg
 
morning
 
Hi @afarazit
 
@ircmaxell your talk wasn't posted online?
 
11:28 AM
my inet connection is f*ed up today
I'm new to web programming and in programming in general. I've started reading php/mysql about a year ago, bought some books (Core PHP programming, Proffesional PHP5, Programming PHP Objects Patterns and Practice, PHP in Action Objects, Design, Agility) and i learned a lot.
I've reached to a point where i don't know what to read next, what to code next. Everything "seems" too small or too big. Does anyone else been there before? What are your suggestions to overcome this problem? (It seems as a problem to me.)
 
@afarazit Try writing some CMS :P
 
How will that help me?
Also, can someone suggest me any book on software designing and what are the steps of of the designing process?
 
I can't say how it will help you, beacuse I don't really know your programming knowledge. Just try write it and you will see what you can, or what you can't do. Just pratice, pratice and pratice.
 
@Greg: no, just the slides. I am going to personally record the next presentations. I may do a webcast of that sqli one if there is demand for it...
 
@ircmaxell cool well I'd be interested in seeing them
 
11:39 AM
@afar: don't read php books. Read general books. Anything by Robert martin. Anything by martin Fowler. And more...
@Greg: I will put it on my list then...
 
HELLO!
 
HI @Jasiufila
 
Quick question, How to check if last element of a string is comma :D?
I've tried with substr but it shows all last elemnents except this comma
 
Get the string length, get the last character of string and compare it to comma
 
Substr($str, -1) == ','
 
11:44 AM
yes i've tried this
but It seems to not work
 
Maybe there is no comma...
 
It does work. You must not be defining your problem correctly...
 
@ircmaxell solution worksm here is second solution:
 $string = 'Hi,';

 $length = strlen($string);
 if( $string[$length -1] == ',' )
	echo 'OMG THERZ COMMA ON END';
 else
	echo 'Nope, no comma on end';
 
yes there is, i have an array and i want to check if comma is on last postition, i have values with and without comma
 
So it is array or string?
 
11:47 AM
An array is not a string. Define your problem correctly...
 
I guess you have array liek this:
array(3) {
  [0]=>
  string(2) "a,"
  [1]=>
  string(1) "b"
  [2]=>
  string(2) "c,"
}
 
Yess
 
And you want to check each element for comma existence on eand of the string
 
True
Im trying your method now
 
Use @ircmaxell 's solution in loop
 
11:50 AM
Nope, no comma on end
 
Show the code
 
$last = end($array);
Return substr($last, -1) == ',';
 
@Jasiufila by the way, You want to check for comma on end on last element of array or on each element?
 
Think about what exactly you want to do, then express that. Try not to be vague...
 
I have an array with values that are simple for example [0] => value and values with more words: [0] => value1,value2,value3,
and i want to check if last character of value is comma, when yes remove it,
 
11:55 AM
But value of last element (of array), or each?
 
each
last element of each value :)
last character
 
use trim($str,',')
 
Just loop. Then do rtrim($str, ',');
 
array_walk($a, function(&$e) { $e = rtrim($e, ','); } );
I didn't see the part about removal :P
 
0
A: Display PHP object depending on day of the week

ircmaxellI would suggest getting away from using strings at all. Date returns localized strings depensing upon locale settings. So you wind up with a magic string that isn't so magic. Instead, use the numeric day of week: of_get_option(date('w')); You will of course need to change the function to ...

OK. Off to ride the train in peace...
 
12:12 PM
@Robik, finally with $string=eregi_replace(',$', '', $string); works
thank you for help
 
Dont use ereg_* functions
 
Why?
 
@ircmaxell which books shall i read first from Martin and Fowler?
 
They are Deprecated
what's wrong with trim($array, ',')?
 
posted on June 23, 2011

Here's what was popular in the PHP community one year ago today:Fawad Hassan's Blog: CRUD using jQuery and Codeigniter - I Fabien Potencier's Blog: Iterator or IteratorAggregate? Arun Gandhi's Blog: 15 methods to speed up PHP based website's performance Chris Hartjes' Blog: Fun with custom Zend_Views Pingdom.com: Exploring the software behind Facebook, the world's largest site Marco Tabini's Bl

 
12:32 PM
@Jasiufila use preg_replace('/,$/', '', $array)
 
Just use rtrim. There is no need for a regex. And there is no need for checking the start of the string.
OK. About to change trains. Later
 
@ircmaxell Martin Fowler have written loads of books, which ones do you suggest for a beginner?
 
12:50 PM
@Robik you have right, they are deprecated
 
@ircmaxell you can't rtrim() an array
 
I think he was thinking of something like foreach($array as $k=>$v) { $array[$k] = rtrim($v, ','); }
"ircmaxell: Just loop. Then do rtrim($str, ',');"
 
I guess @Jasiufila should use rtrim instead of Regex. Both have to be used in loop so..
 
@Robik why?
 
Why not?
 
Anonymous
1:02 PM
hello fellow web ninjas
 
Anonymous
:)
 
Anonymous
do a filter
 
Anonymous
array_filter
 
Simple = better
array_walk + rtrim
 
Anonymous
array_filter() whatever
 
Anonymous
1:03 PM
@Robik why walk when you can... erm.. run? php.net/manual/en/function.array-filter.php
 
Anonymous
or is it more than a simple rtrim callback?
 
Anonymous
while im here.. anyone recommend any SF2 blog platforms?
 
@Robik preg_replace() is far simpler than array_walk + rtrim
huh?
 
Oh. My bad :P
 
1:22 PM
posted on June 23, 2011

As Derick Rethans notes in his latest post, the Xdebug project is now on github and can be found under his account. I've just opened my Xdebug repository on github. Importing my old SVN repository was a bit of a task. With the help of Ole Marius Smestad I managed to cook up a bash script to import and fix-up the repository. In the meanwhile I've learned more about git than I ever wanted to

 
1:34 PM
1
Q: mkdir and recursive copy in php

sadmicrowaveMy function is having problems creating and copying the contents to the new directory (also I'm not sure if this is the best way to do this, so alternate suggestions are welcome). I have 2 network drives mounted via /etc/fstab like this: //128.251.108.xxx/Data/Agilent_Data /home/lv_admin/uslons...

 
i want to create a video file using images and various effect using images..
any solution for this
i have tried ffmpeg and image magick and they are not creating clean effects
any other solution which create a Good effects in video
Paid solution is also welcome
 
Anonymous
not sure.. sorry
 
2:01 PM
posted on June 23, 2011 by blog.phpdeveloper.org » PHP

In case you missed it, this post is a continuation of another post looking a some of the things I’ve learned in the time I’ve spent as an open source project organizer for Joind.in. In this second post I’m going to keep looking at communication and the role it plays in the project. The focus will be a little bit different, though – this time it’s more about internal communication. Keeping all

 
2:30 PM
Hi all, is there a way to invoke a function on $_SESSION variable timeout?
 
2:52 PM
what do you think about this?
http://jsfiddle.net/pNa8V/embedded/result/
 
@KamilTomšík Nice images :P
 
@Robik not mine - it's just dummy content from flickr
 
posted on June 23, 2011

In an effort to get some real feedback from the community about the state of PHP and what they think it needs, Sean Coates asked on Twitter for people to respond with their suggestions as to what could help make PHP better and what the project itself needs. PHP's intentional stagnation is eating away at me. I'm working on a list of things I think #PHP needs. What's on your list? Tag it #php

 
"intentional stagnation" -- balls.
 
3:21 PM
Magento question: Can someone advise which core module controls the catalog price rules? I'm looking to mod it so I can create sales by hour, rather than just days.
 
4:08 PM
posted on June 23, 2011

As was mentioned by Zend late yesterday, the registration for this year's Zend/PHP Conference have officially opened! The 7th Annual Zend PHP Conference (ZendCon) will take place October 17-20, 2011, In Santa Clara, California. ZendCon is the largest gathering of the PHP Community and brings together PHP developers and IT managers from around the world to discuss PHP best practices and expl

 
4:23 PM
Hey Guys, is anyone good at Doctrine 2.0 here? Especially creating a new Type. Basically i want to extend DateTimeType and change the PHP display from DateTime to Zend_Date and i'm quite confused as to what to do
Am here ATM: doctrine-project.org/docs/orm/2.0/en/reference/… and i'm a little lost. The example doesnt work
 
Grrrrrr, can someone please tell me how to run the function trough URL!?!?! I'm freaking confused! function do_curl($start_index,$stop_index){
I'm trying to access it like curltest.php?start_inex=0&stop_index=2 and it doesnt work!
 
posted on June 23, 2011

The Voices of the ElePHPant podcast has posted its latest episode today - an interview with Keith Casey, a part of the web2project team and the php|architect folks that brought you php|tek. This podcast was recorded at the SQL Server Jump In! Camp. They talk about the web2project project's desire to be a "drop in" solution even when they have SQL Server as their database. They talk about th

 
4:49 PM
Why on earth might i be getting: Parse error: syntax error, unexpected T_USE in
I'm trying to follow: phphints.wordpress.com/2011/02/09/… and i cant get anywhere :(
 
is there a php function that iterates through elements and then takes the returned total and during the next iteration adds the resut to that total and so forth and then returns a new array. Something like: array(1,2,3) to return array(1,3,6,)
 
not that i know of
seems quite specific
 
something like array_reduce I think
$a = array(1, 2, 3, 4, 5);
 
alright boys and girls; database design question
 
$b = array_reduce($a, "rsum");
function rsum($v, $w)
{
$v += $w;
return $v;
}
 
5:04 PM
I know, #mysql is the other way, but since it's going to be used directly within the PHP app, I figured asking here would be better ;)
I'm going to be building a system that allows for display and comparison of several data points for products. there will likely be many thousands of products, and 50-100 data points per product.
should my table that stores data points be something like product_id, data_point_1, data_point_2, data_point_3 (etc) with one row per product
or, product_id, data_point_id, data_point_value with multiple rows per product
 
Stack Overflow is currently offline for maintenance
 
5:22 PM
Can I have threads in PHP?
 
yes , but php sucks at threading
why would you even want something like that ?
 
posted on June 23, 2011

On DevShed today there's a new tutorial showing you how to integrate Facebook commenting with your PHP application via the Facebook Connect API. Facebook comments are a great way to optimize your site for social media and add a level of user-engagement to you site. Quality website comments can increase your website's credibility, as well as its traffic. This tutorial will teach you how to u

 
Thanks. My boss says I should use Haskell instead. I'll take his advice.
 
he's right , but it's a pretty bad sign when your boss is better at development, then you are
 
Unless your boss, at a software development company, is a software developer himself... Which more and more are these days
Personally, I'd say it's a good sign in such cases, that the people leading your company actually know what they're doing.
For instance, if my boss asked me to develop whatever this threaded application is in Lisp, I would jump ship immediately.
 
5:49 PM
hey guys, I'm using the shell_exec() command to perform a recursive copy like so:

shell_exec("cp -r $orig_dir $new_dir");

but when apache executes this I get an error thrown stating: "Module 'odbc' already loaded" any ideas?
 
haskell? eih... :-P
 
1
Q: mkdir and recursive copy in php

sadmicrowaveMy function is having problems creating and copying the contents to the new directory (also I'm not sure if this is the best way to do this, so alternate suggestions are welcome). I have 2 network drives mounted via /etc/fstab like this: //128.251.108.xxx/Data/Agilent_Data /home/lv_admin/uslons...

 
00:00 - 18:0018:00 - 00:00

« first day (250 days earlier)      last day (4705 days later) »