« first day (1027 days earlier)      last day (3937 days later) » 

6:00 PM
my guess is it is not in a Vm, those programs normally are only installed on daily use boxes
 
@aDroidman you must be new here .. still filled with boundless faith in humanity
 
@tereško hahahahaha
 
yes I am new to coding and stackoverflow lol
 
apache will have the most tutorials available and, most likely, it will also work "out of box"
 
haha, conversation in here the other day about banning rasmus from writing php because of size_for_humans ... I wrote that :D
 
6:02 PM
later you can try something that require more work
 
ok thx
 
also, you probably will need some *SQL installed
remember that in NIX platforms the client and server packages will be separate
 
yeah of course. Need to think about it... Is there something I should use instead of MySQL ?
 
@tereško would you happen to know my coding issue?
mySQL is the most popular and easiest to cross platform
 
you could try postgresql , but there might be "some assembly required"
@aDroidman no, most of people use mysql because other people use mysql
 
6:05 PM
ok, will look at it
As always thanks
 
@tereško exactly....most popular lol
 
posted on August 08, 2013

Web & PHP Magazine invites you to its first ever conference. This 3 day conference, taking place in San Jose, CA this September, will immerse you in a world of continuously evolving web technologies. Sticking with our ethos of open knowledge sharing and community support, all conference sessions, keynote presentations, hacks and Ex

 
@aDroidman What about you try filemtime($name) ?
 
stat failed
I think im going to call it quites and just not have that displayed lol
 
well .. back to playing SC2
 
6:10 PM
@aDroidman well there is a lot of improvements in that code ...
Have you written it by yourself ?
 
no, I got it off a website
im all ears for learning what I should do though
 
@aDroidman hmmm. Note that there are several websites which provides crappy code and teaches bad practice
 
@aDroidman What's the goal of the script ;?
 
to display a directory of folders and files
 
6:12 PM
Is anyone here going to go and watch the new Steve Jobs movie that's coming out?
 
@TheGuyWhoCouldn'tTalkToTheGirl possibly
 
@TheGuyWhoCouldn'tTalkToTheGirl never heard about it lol
 
Android FTW
 
@TheGuyWhoCouldn'tTalkToTheGirl Ain't nobody got time for that. I need to setup my first php environment :p
@TheGuyWhoCouldn'tTalkToTheGirl It's a bit "sad" that they make it look like that Steve was the main reason for Apple's succes
<--
 
6:19 PM
@HamZa hello i am back. How are you?
How to write this type of name attribute name="quiz_file_<?php echo $question_id; ?>" in $FILES['how_to_write_here']['type'];
 
why do I get an undefined variable when my php code is actually working?
 
O...sorry $_FILES**
@aDroidman it is just a notice error which does not affect the working of script but sometime it does.
@aDroidman You can hide that with display_error(0) in top of script.
 
thanks
 
@aDroidman You'r welcome!
 
Can you tell me why when I click on a file that it does not link me to that file? pastebin.com/3bjNXTLp
 
6:27 PM
@aDroidman Let me see. Can you solve my doubt asked above....
 
I know the very basics of php, you know more then by even typing that out :/
 
@aDroidman yes. but sometime experts gets confused. But i am not expert.
 
not sure what you are wanting to do but could you do $FILES[print($name) where $name is your quiz file?
 
I think it is not allowed within $_FILES.
 
gotcha
 
@aDroidman what are you trying to do in your script.
 
I want to display a folder which will have sub folders and files. I keep trying different scripts and they all seem to have issues
 
@aDroidman You can use && operator not for more than two condition on line 7.
and line 5 also seems wrong.
 
Ok, ill look into it
 
@HamZa You ought to have said it as, "You just took the wrong tags at the wrong moment, Pilgrim"
 
6:36 PM
@Danack Hey can you solve my doubt..?
 
nope.
 
@vinaysingh Uh?
 
How to write this type of name attribute name="quiz_file_<?php echo $question_id; ?>" in $FILES['how_to_write_here']['type'];
@cheesemacfly check below.
I mean now above.
 
You could write if (true && true && true) with no problem, right?
2
 
@cheesemacfly How to write this type of name attribute name="quiz_file_<?php echo $question_id; ?>" in $_FILES['how_to_write_here']['type']; This is a upload script issue.
 
6:40 PM
I am stuck with a loop optimization problem..
Hi all...
2
Q: php multidimensional array loop optimization

Prashant balanI have an multidimensional array. $count = count($main_array); // 6000+ Each element inside the main array has about 25 keys $count_sub_array = count($main_array[0]); // 25 I have about 3000 unique value for one of the key. i.e. for($i=0; $i< $count; $i++){ if($main_array[$i][$match]){...

could anyone let me know, how can I fix it?
anyone there?
 
any one, edited php5.ini file in Godaddy linux server..
 
@Rafee not tried so far.
@Rafee you can ask to godaddy support.
 
@Rafee? what would you want to do?
Is godaddy server setup different from a normal Linux server?
 
i want to increase
max upload file size and post size
 
Does anyone have a clue about optimizing my loop..
 
6:49 PM
i just checked that..
its CentOs 5.5
 
@raf
OK
Did they provide you with SSH password?
 
I working on it using SSH with PuTTY
 
OK good
 
I loggedin using normal ftp username and password
Its says that..
you can use with ftp username andpassword
 
try sudo, if permission problems
sudo vi php5.ini
 
6:51 PM
let me try that..
 
not working.
command not found.
 
OK
so.. you need to find an editor for CentOS
 
I justed used vi..
for normal user.
 
6:53 PM
@Rafee try using centos editor nano
 
okay.
sudo nano php5.ini
 
not working.
command not found
 
just nano php5.ini
it may be because, sudo is not available on CentOS
 
i think nano is present
 
6:54 PM
Good
Good luck!
Anyone there to help me move forward.. ah?
Here's my question for those who have just joined...
4
Q: php multidimensional array loop optimization

Prashant balanI have an multidimensional array. $count = count($main_array); // 6000+ Each element inside the main array has about 25 keys $count_sub_array = count($main_array[0]); // 25 I have about 3000 unique value for one of the key. i.e. for($i=0; $i< $count; $i++){ if($main_array[$i][$match]){...

 
@Rafee sudo is not present on your server so try without it
 
@Rafee yum install sudo
 
okay.
@Prashantbalan nano is not present.. i misstyped not
 
You should use sudoedit instead of sudo nano too
For security reasons
Set nano as editor, then use sudoedit
 
@LightningDust nano is not present.
only vi editor
 
7:01 PM
@Rafee Its centos, install with yum
 
even thats not working.
command not found
 
you have vi editor.. so.. what you want to do next?
 
Let me tell, its not VPS.. It is a normal web hosting from GoDaddy
@Prashantbalan i did that.. but problem with permissions.
 
jo room
 
@Rafee: you wanna change two settings.. did you try set_ini?
 
7:03 PM
@Prashantbalan can you make your question available over codepad
yes i did that.. but thats not working.. in php file.
so i need to it from php5.ini file
 
@Rafee OK.. could you come again, what are the settings you need to change?
@Rafee I am afraid if its a shared hosting then you may not be able to change it.. if its private server.. then you need to ask for the root user password
 
hold on dont worry.. I am trying something.. with small arrays
you want all the values to in single array right.
and values are unique.
 
@Rafee with small arrays, I am able to get the result.. with that big an array, I need to optimize the code so that data can be made into the desired format
when I run for just 50 iterations.. start1: name, 0.77689100 1375969811
end1: name, 0.97769900 1375969816
these are the microtime() i found
 
use microtime(true)
 
okay..
 
7:09 PM
@ircmaxell OK..
Another thought I had was to shorten the original array when looping inside the unique array... by recursively searching for the match.. and use returned array instead
 
but that does not make any difference
 
@PeeHaa There are a lot on the Related sidebar that could also use a few CVs.
 
@Charles Meh. We could cv them, but they are 2 years old
 
who is the owner of stackoverflow? is it owned by an individual or a group?
 
7:18 PM
@Prashantbalan $unique_array[] = $main_array[$i][$match];
@NokImchen I believe group.
do you know Jeff Atwood
 
@Rafee what about it?
 
@vinaysingh fine and you ?
 
@HamZa same here.
Were you busy?
 
@PeeHaa This one was even answer by a stack employee: stackoverflow.com/questions/2330806/…
 
@Rafee nope! no idea
 
7:21 PM
@vinaysingh Preparing diner and eat :p
 
@Rafee he looks so young! must be brainy
 
@HamZa You make your own dinner.
 
@Danack heh, you're right
 
omg "As a teenager, Atwood got into trouble with the law when he hacked into a bulletin board system."
 
@Prashantbalan just what will be its performance.
 
7:22 PM
@vinaysingh Well it was almost ready, just had to warm the soup and take care of the potatoes
 
@Rafee I am not sure if you understood my question. do you want me to explain?
 
sure go ahead
 
@HamZa I can smell here......nice!
 
I have a multidimensional array of 6000 elements
of which 3000 elements are unique
 
@Rafee "Atwood's Law" ... "It states that any application that can be written in JavaScript will eventually be written in JavaScript" :|
 
7:23 PM
each element has certain keys
 
@HamZa Are you from asia?
 
@NokImchen what do you think.
 
Jul 29 at 10:51, by HamZa
@Mr.Alien @dragon112 I've got arabic blood, dutch and indonesian. I'm the mixed human being :D
 
@Prashantbalan yes i got that from question too.
 
@vinaysingh He's what one would call a bastard ;)
2
<3 @HamZa :D
 
7:25 PM
@HamZa Eid-ul-Fitr Mubarak.
 
@Rafee Happy eid to every religion.
 
@Rafee i just cant understant it :| but i kinda disagree :| cos earlier i used to write in javascript but now i use php only cos i wanna hide my code and also make the site light weight :|
 
@PeeHaa hahahahaha
 
@vinaysingh u from india? today is eid? now? can i wish my friend eid?
 
@Rafee I am gonna send you a piece of code.. wait..
 
7:27 PM
@Rafee Eid mubarak :)
 
@LeviMorrison no worries, I'm fine ;-)
 
@PeeHaa Eh I've just encountered a bunch of "but someone else asked a similar question (four years ago)" stuff lately
 
@NokImchen yes I am from India.it will celebrate here tomorrow.
 
@NokImchen Do you know what is PHP and JavaScript
 
@Charles Feel free to dump the offending questions. I'm more than happy to cv them. Just too lazy to grab them :D
 
7:28 PM
@Prashantbalan okay.
 
@HamZa :-)
 
Starred it :p
 
eid is in the same day whole over the world cos of moon na? see, its night in asia but day in the other face of earth. So , eid is there in that other side ? or they have to wait till they see moon?
 
:p
 
@NokImchen yes just because of moon.
 
7:29 PM
@vinaysingh @Prashantbalan Eid will be celebrated in India today ( 9 August 2013 )
I am from Hyderabad, India.
 
@vinaysingh i'm also from Mumbai. I have a frnd , i want to wish her but i want to wish in the right time. So, i was asking u cos i dont want to be a "fool" by wish in the wring time :(
 
@Rafee It is 9 august started.
 
@Rafee Happy Eid to all
 
@vinaysingh oops typo
 
@NokImchen :)
 
7:30 PM
@Rafee yes, many things can be done by javascript which is not possible using PHP :)
 
Happy EID to all guys.
 
thanks man
 
@Rafee @vinaysingh I am from New Delhi
 
@NokImchen both are different stuff...
 
@Prashantbalan Hey, can anybody be friend with me on fb so that i can contact him.
 
7:31 PM
javascript is used at client side i.e. worked on browser side.. where as php will be worked on server side.
 
^ javascript can be on server side too
 
@Rafee Hmmm....amazing info....:)
@DaveChen You are right...node.js
 
@Rafee oh, i know not much about JScipt , i used it ostly in mozilla firefox addon development and modification of greasemonkey (my modified greasemonkey can save files and read files, very unsafe if ppl come to knw!!)
 
@DaveChen not talkikng about node.js
 
@DaveChen Don't make it complicate, it is already :p
 
7:33 PM
and I'll bet you anything, anything you can do with JavaScript, PHP can do... :)
 
@DaveChen though u r not on my side, u r always there against my opponent in any debate :P
 
@DaveChen Wow...battle is on!
 
@DaveChen make a pop up in a browser
 
btw PHP can be made to make applications
 
@DaveChen i'm on ur side :P but i'm a donkey compared to u ppl cos m not a programmer :|
 
7:34 PM
like .exe, gtk+, etc, so you could build a PHP application that hooks onto your browser, and then popup a message from your browser
 
OMG! i 'll google that and will make my compression program :P
Anyways, thank for the info. I never knew that!
 
@NokImchen donkey cant type and you need not be a programmer
 
we can stop js in browser but can not to PHP.
 
@Rafee huh! i was just kidding :| ofcourse, donkey are animals :|
 
@Prashantbalan any updates on your question
 
7:36 PM
@NokImchen So are programmers
 
i'm out of the debate :| cos i think m creating useless noise :|
 
@vinaysingh PHP can be made to make applications. With that, you can hook onto your browser, and stop javascript :D
 
@DaveRandom have you used fasthosts.co.uk before ?
 
@DaveChen yes i agree.
@DaveChen Have you used wordpress?
 
7:38 PM
@Rafee How can I send you a csv file?
 
@vinaysingh yeah, but not currently
 
@PeeHaa you need say OK glass
to command everyting..
 
I would like to give you an idea of the format I get from mysql
 
@DaveChen I am implementing a plugin with upload function.
 
do you have a mail id?
 
7:39 PM
@Rafee Read my sentence again
 
@Baba hello how are you? so long time.
 
@Rafee do you have a mail id?
 
@Rafee Hello How are you doing ?
 
@PeeHaa funny video..
 
@PeeHaa is there any english translation? :|
 
7:41 PM
1 message moved to bin
 
:11148113 for each is not restricted to arrays
 
user895378
in PHP Internals, 1 min ago, by rdlowrey
Okay, I've pushed the first usable release for my asynchronous job server and multiprocessing lib. I'd appreciate any usage or feedback anyone has. The examples should demonstrate how to use things. Remember that any arguments and return values must be serializable because they're transferred over TCP and/or interprocess pipes.
 
@Rafee
just sent you the mail
 
user895378
If anyone wants to do some asynchronous parallel processing in PHP with no extensions needed they should take a look and give me feedback ^^
 
let me check that.
got that.
 
7:43 PM
@Rafee okay
 
@rdlowrey i'm AMPed ;]
 
user895378
@CarrieKendall I see what you did there ...
 
those are close to 6000+ records
 
@rdlowrey aw php 5.4+, guess I need to upgrade my server's PHP version xD
 
@DaveChen besides arrays what else it can be used with?.
 
7:44 PM
@Prashantbalan wow fulltoo huge data.
 
@NokImchen objects, I think :S
 
user895378
@DaveChen Correct. Legacy software support is not in my lexicon.
 
now.. I have a function.. which gives me.. unique names.. $sub_array[] = $main_array[$i]['name'];
 
@hakre thanks..
 
7:46 PM
then used array_unique
 
@rdlowrey I'm confused, is this thing client/server or all in a single process?
 
@Prashantbalan okay.. i am gonna import to database
 
@Rafee This year was the first year with a PHP room in Brussels. I hope next year there is it again, don't know who was kicking that of actually... .
 
@Rafee now.. thats when I need to get the cost, profit, revenue and numOrders as per that format.. basically want to make a group according to cost.. profit.. numOrders and revenue with time
 
user895378
@Charles It has a lot of capabilities. There's a simple server binary that you execute to turn on a server to listen for jobs in bin/amp.php ... And there's a client to connect to and distribute calls to any number of job servers. And you can also use it to dispatch calls asynchronously to a pool of worker processes without any server middleman.
 
7:48 PM
and type assumes the unique match
 
@DaveChen i have searched on net about the maxium value a float can support, but its rather confusing. If i use like floatval("3534534534534435345345") i get the scientific notation. However, if i use function like fmod,bcpow, etc i get vales of very long digits with no scientific notation. However, both floatval or bcmod/fmod are float. What is the actual maximum length of a float?
 
user895378
So basically, yes: it does all of those things.
 
@hakre even i just this notification from my friend, but could not attend that..
@Prashantbalan send me in sql file.
export it to sql file.. rather than csv..
 
@NokImchen the length depends of the number of bytes that are used to store it.
 
user895378
@Charles The server makes sense if you're using it in a web SAPI environment where spawning a process pool on each request makes no sense. The API is the same from the client end of things regardless of whether you're connecting to job servers to dispatch calls or you're connecting to a pool of worker processes.
 
7:50 PM
Also the length is more the precision than the max/min value
 
@Rafee Here's a function I am using codepad.org/M4sfEWOV
to achieve that format
@Rafee OK
 
@hakre oh, so can i ask, what is the number of bytes allotted for bcmod,bcdiv,bcpow, etc function by default? i have tired huge numbers like above 3000 digits and it returned just fine, but when i tried like numbers of 10000 digits, i got server error, i did it just to know the maximum value as i didnt find any info on maximum value of bc_functions
 
@Rafee sending now... check
 
@hakre precision , i beleive, is used for decimals only. And bc_mode has much higher precision than fmod (but in php documents they have mentioned the oppposite, i may be wrong)
 
@Prashantbalan okay. thanks
 
7:55 PM
@NokImchen for bcmath I guess it's a compile option. It's bundles with PHP, but it's not a PHP project. Here is another source tree: svn.osgeo.org/mapguide/branches/2.0.x/MgDev/Oem/php/ext/bcmath/…
 
@rdlowrey glad to see you split the event loop into a separate lib
 
user895378
@igorw Yeah I had been meaning to do so for a while ... major upheaval just takes so much time :/
 
@hakre hmmmm.. FAQ says nothing much. Anyways, bcmaths satisfies the needs of most ppl. Thanks for the link
 
@rdlowrey will you document the protocol?
 
user895378
I suspect only a handful of people will understand how powerful that library it is because it seems like only a handful of php devs understand event-driven programming ...
 
user895378
 
@rdlowrey thumbs up!
 
user895378
The actual protocol is still a work in progress, but it's usable.
 
user895378
All communications are wrapped in frames. Then you can wrap anything you like inside those frames.
 
@rdlowrey Okay, I think I got it. Kinda. I think your example code might need some clarification. Maybe pair together the server and the client in subdirectories or something.
 
user895378
@Charles Yeah, I mean the documentation is sparse at this point :)
 
user895378
8:01 PM
But I try to avoid going heavy on docs until things are stable. I'm more at a "hey check this out and give me feedback" stage right now.
 
user895378
@igorw You should be able to hook any of that stuff up to your own event loop by finagling the appropriate tick/run calls between the two.
 
So in my application, I've created most of my needed domain objects like User, UserCollection, Game, GameCollection, UserGame, etc... I've also got data mappers to map data from the database to instances of those classes. I'm ready to move on. My question is: what's this next phase? To my understanding, it's the part with the bulk of my domain logic (i.e., this part will use the domain objects, validate requests, etc...). If I'm correct, what is this part called?
 
@Rafee Sent SQL.. for the code I am using... codepad.org/bPZYGo0r
 
yeah..
 
user895378
@igorw Also, dispatching tasks to job servers is the simplest part of the code. That's something that could probably very easily translate to a react-based client to connect to job servers and dispatch calls.
 
user895378
8:05 PM
And starting a job server to listen for tasks is as simple as:
 
user895378
$ php bin/amp --listen=127.0.0.1:1337 --include="/path/to/my/functions.php"
 
user895378
The next iteration will allow multiple job servers to talk to one another and proxy calls to other job servers who aren't as busy and whatnot.
 
@Jeremy Have you considered calling it the domain logic layer? It's hard to go wrong with the obvious.
 
@Charles you mean... what? it's that simple?
 
@Jeremy It can be. I mean, it kind of depends on how abstract you want to get here.
You could go all out and do a service layer that just deals with the domain logic bits, and then build a controller/view thing that pokes at the service.
 
user895378
@ircmaxell funny you should say that:
 
user895378
4 hours ago, by rdlowrey
This BREACH attack has gotten way too much coverage for what it actually is IMO ...
 
yes, that was partially what spawned my reply. And I agree with it
 
rotfl
 
8:21 PM
@ircmaxell The more you look at it, the funnier it gets :D
 
I know. I'm kinda freaking out here
 
@ircmaxell If you have a girlfriend, send it to her :D
2
 
user895378
Oh, my.
 
8:41 PM
@ircmaxell Typo in The real attack is a lot more complicated (and sophisticated . (presumably missing closing bracket?) and also presumably <input type="text" should be <input type="hidden"? Anal-retentiveness aside, good post
Evening @all
 
@DaveRandom Howdy
 
@Baba Yes I have and no you shouldn't.
@cspray 'sup dawg
 
thanks
 
@DaveRandom Same o, same o. Waiting for these last 10 minutes of the day
Escape this horrible code for another night...
 
@DaveRandom fixed
 
8:45 PM
@ircmaxell I had assumed the buzz was somewhat overblown but I haven't had time to properly explore the details of the attack yet, it's good to outsource these things, I might read your blog more often :-P
/me pretends it's not on my feed list
@cspray ...so you can go home and dive into your personal collection of horrible code?
 
@DaveRandom Exactly
 
God damn @cryptic and her uncompiled less files, now I have to set up a handler for them :-(
 
One of these days I'll have to talk at ya about using those typesafe enums in a production environment :P
I haven't forgotten that you asked about that...
 
Oh yeh I'm still intigued about that, I can't come up with a clean (production-friendly) way of doing it certainly
I do very much want enums in PHP, they are really good for readability IMO
 
@DaveRandom Well, if you're still around when I get off I can throw my idea past you
 
8:52 PM
@DaveRandom :-P
 
@cspray I should be around for the next couple of hrs I would imagine (unless my house catches fire or something)
 
Edward Snowden's email provider, http://lavabit.com/
"I have been forced to make a difficult decision: to become complicit in crimes against the American people or walk away from nearly ten years of hard work by shutting down Lavabit. After significant soul searching, I have decided to suspend operations. I wish that I could legally share with you the events that led to my decision. I cannot."
"This experience has taught me one very important lesson: without congressional action or a strong judicial precedent, I would strongly recommend against anyone trusting their private data to a company with physical ties to the United States."
 
someone proposed use bar\baz() as baz; as an alternative syntax for use function bar\baz as baz;
thoughts?
 

« first day (1027 days earlier)      last day (3937 days later) »