« first day (637 days earlier)      last day (4533 days later) » 
00:00 - 20:0020:00 - 00:00

00:49
soon will hit 250k
@tereško Of those questions what percentage do you figure would be considered good?
1k ok .. maybe 5k
@tereško Yea, sigh
01:14
different tags have different preferred answering types.. what are yours in PHP?
-3
Q: mysql_fetch_row() vs mysql_fetch_assoc() vs mysql_fetch_array()

user1479431I want a function which can return fields in the current row of a resultset into an associative array and moves the result pointer to the next row. Confused between mysql_fetch_row() mysql_fetch_assoc() mysql_fetch_array() Which one should I use? Any help would be appreciated. Thank you.

I'm thinking about answers such as those in the above question, which one is preferable?
@refp , an expanded version of patricksweeney`s answer
it's all well and nice to provide direct answer to the OP question , but you are over 4k rep .. you should try to educate instead of rep-whoring
0
A: mysql_fetch_row() vs mysql_fetch_assoc() vs mysql_fetch_array()

refp Note: The use of mysql_* functions are now considered deprecated and you should instead use something that offers better security nad more functionality, such as MySQLi or PDO. What is it? You are looking for mysql_fetch_assoc, as the name implies it will return an associative array (with ...

@tereško and my post isn't educational, is that what you are saying?
basically, you should explain how to use PDO's fetch() and fetchAll() methods and the MySQLi alternatives: same usage , minor difference in spelling
@tereško no, I shouldn't.. that's where we disagree I guess. If someone asks a question you answer that specific question, and might provide links (as I did) to other resources explaining other ways of accomplishing the same thing.
@refp , if author's question was , "how to encrypt password with MD5 ?" , would you have the same attitude ?
01:21
you are not only answering the question for OP, but also the ones using search/google and finding the question. if someone is limited to the use of mysql_ he doesn't want to spend hours only finding questions stating that "mysql_* shouldn't be used, instead use <random>".
@tereško I would say that md5 isn't a encryption algorithm but a hashing technique, show how to do it and then add a footnote saying that storing md5($password) is considered to be insecure with todays CPU powers and that he should look into alternative hashing methods.
but I will still answer his question on how to do it with md5
i never said that you should remove what you have written
I won't refuse to just because I wouldn't recommend it.. if someone asks "how to I dereference a nullptr in C++?" I would happily provide an answer to that question, but I'll add a note saying that it isn't recommended
the idea was for you to add the better approach
@tereško did you see the edit? I've linked information to MySQLi/PDO, and also stated why he should move away from mysql_*
 
3 hours later…
04:32
Sup all
user895378
yo
05:10
hi everybody
05:38
i am facing a little problem, i divided the page into header, rightmenu, leftmenu, and the main content. the problem i, when i increase the height of the rightmenu, the height of the heder also increase even if i keep the height oh eared in px
*height of header
 
1 hour later…
07:34
Anybody know any good OOP PHP tutorials where you actually build something? Instead of the old "Build name class with name function and it returns this variable!"
08:05
Any Zend experts in the room? I am trying to understand the folder structure. It seems the standard folder structure does not follow the standard naming conventions. i.e. the folders are lower case and plural. 'models, controllers'... yet the naming of the classes is '_Model_' :s
0
Q: Read-only video (No way to download, only playable)

epic_syntaxI'm creating PHP based web project in which students can login and watch tutorials. The service is paid, so I want to prevent downloading video files from website (and sharing for free). In other words, every user can only watch videos on website, no way to download. For this purpose, I was s...

 
1 hour later…
09:11
@epicsyntax but how do you prevent to copy your video
as there is many softwares available to capture your desktop and save video
so how can you prevent them to record video ?
09:32
why does most sites use mt_rand or generating a salt when its considered to be a bad way...
or why is getandombytes more better than mt_rand
10:22
hello guys :D
Anyone knows social engine?? :D
nope
any way to delete multiple files atonce from ftp
what is the best way to draw chart just like Line Chart, Pie Chart in PHP, are there a standard/basic lib from PHP or maybe other library?
use google charts
any way to delete multiple files atonce from ftp
files name and ext different
10:37
Hey guys
why is $_SESSION not wqorking in social engine? :(
@DanishIqbal Don't think there is, otherwise filezilla would be using it
@Truth means there is no any way
@DanishIqbal Probably not. I'm not an expert though
and whats the best free ftp to list 100,000 + files
@Truth
these files which i want to delete all have part2.php?
and the actual files name is for example
1 part2.php?customer_id=221169_1000015123796.2161
ext .2161
2 part2.php?customer_id=221169_100000154573796.951
10:42
These are all the same file
i didn't get your point
no these file have different data and different ext but they all have this words common "part2.php?customer_id=221169_"
:S
erm, are you on linux?
@webarto i dont have shell control in cpanel acn i do this with PHP
yes
currently i am using but it list only 10k files
so is there any free ftp software who show 100k or 100k + files so that i can select all files and simply press delete key
grep -R 'part2.php?customer_id=221169_' /var/www/files
@webarto do i use this code
shell_exec('grep -R 'part2.php?customer_id=221169_' .');
my files in root
10:57
erm that would be syntax error, just use . (dot) then instead of /var/www/
see change in above
now its ok ?
how much time its take to remove 100k files ?
sorry, my brain started to hurt... grep will list you files containing text, you then need to rm -rf those files, probably you can mix that two commands, but I don't know...
Finally today I ditched Gnome3 for good. :D
11:31
morning
or rather: afternoon :)
11:42
I'm trying to build php5.4.4 on ubuntu 12.04. I have openssl and libssl-dev installed, but if I add --with-openssl to the configure parameters I get: "Cannot find OpenSSL's libraries". If I try with --with-openssl=/usr/include/openssl I get "Cannot find OpenSSL's <evp.h>". Can someone help?
Google suggested installing openssl-dev, but 12.04 has no such package. I also found a hint to install libcurl4-openssl-dev, but it didn't help either.
Hm, I know nothing about that, sorry
I'm assuming that you have a recent openssl version, right?
apt-cache says it's Version: 1.0.1-4ubuntu5.2
I've got a Visitor object that walks a tree of Node objects. Since I'm following the pattern to wrap the evaluation algorithm into the Visitor, in order to ensure userland extended Node classes are evaluated properly, I figured I could create an array of [$nodeClassName => $evaluatorInstance] Evaluator objects in the Visitor.
That way, as the Visitor walks the tree, if it encounters a Node it hasn't before (by checking for an instance of the appropriate evaluator in it's array) it can create one, and pass the Node to it. Each Node would then have a respective Evaluator. Does this sound like too much of a hack?
libssl-dev is the same version
@Maerlyn Hm, then I don't know what could be wrong. I'd also try installing libssl1.0.0 (non-dev) and see if it helps, but I doubt it ^^
11:50
guten tag, dobry den :P
@NikiC I got the same error, thanks for the hint, though.
just use windows binaries
That would be difficult on linux :D
@Maerlyn Also, I'm not sure whether /usr/include/openssl is the right path. Maybe try --with-openssl /usr/bin/openssl ?
@Bracketworks that sounds ok for me
11:52
(Or my personal favorite: Don't specify the path at all ^^)
but seriously, I fscking gave up after too many unmet dependacies
The /usr/include/openssl path is correct, it exists and it also has the evp.h mentioned in the error message.
@Bracketworks You have one Evaluator per node type?
@NikiC Well... Each Node needs an Evaluator, it isn't a distinct 1:1 necessarily.
2 Node types could share an Evaluator type
Likely case is that they wouldn't though.
@Bracketworks Seems overly complicated to me, but okay ^^
11:55
The Evaluator (bad name choice now that I'm thinking) actually maintains a bit of state, relative to whatever processes occur during a walk of it's respective nodes.
At the end of the whole walk, the Visitor calls commit() against all of the Evaluator objects it has aggregated, passing itself to have data written back to it.
So... basically
Visitor::visit(Node $node){
    $class = get_class($node);
    if(!isset($this->evaluators[$class])){
        $this->evaluators[$class] = create_somehow($this);
    }
    $this->evaluators[$class]->evaluate($node);
}

Visitor::commit(){
    foreach($this->evaluators as $evaluator){
        $evaluator->commit($this);
    }
}
Alrighty, thanks for listening ;) If it doesn't seem too hackish, I'll run with it, but if someone how suggestions on simplifying this, I'm all ears. (you'll probably need more info, so feel free to ask)
Anyone want to recommend a good game?
I like things with good storylines and nice graphics
Final Fantasy 6 for SNES ;)
I donno any latest ones :| how about skyrim
^ Nice graphics? :L
For 1993? It's all relative
12:04
Hahahaha
I liked the Mass Effect series
why does most sites use mt_rand or generating a salt when its considered to be a bad way...
or why is getrandombytes more better than mt_rand
ding dong
12:19
@Tim: hey tim, can you undelete your answer here stackoverflow.com/questions/4085681/…. It is really helpful for community
12:35
hello. Anybody knows online tool for text highlighting + saving & sharing. I need to highlight some parts (which should be clarified) of technical description of the project i am working on and show that highlights with client.
12:49
@NikiC I can't explain it, but I started writing a question for server fault, and to get the error message I ran ./configure --with-openssl, and it's been working ever since :D
13:04
Good morning
morning
@Maerlyn lol
@Maerlyn Good when problems solve themselves :D
hi . can any one help me to fix this : stackoverflow.com/questions/11482044/… ?
anyone knows good tool to highlight webpages + make notes + share
?
what are you talking about?
13:10
@weba
@webarto : Its a session problem
13:26
wow
13:47
morning people
good morning
@PeeHaa Howdy
afternoon
14:07
Hi,

I was wondering if anyone had any advice on where I could read about making a hashtagging system similiar to the one stackoverflow uses?
@user187680 Where does SO use hashtagging?
its not really hashtagging in the sense that there arent hashes lol. when u post a question.
tags?
@user187680 Are you talking about ?
yeah tags is a more accurate word than hashtags i suppose :)
given the lack of hashes
14:09
:P
at any rate, any advice on a good guide on how to make a somewhat similiar system
I don't know any guide, but it shouldn't be that hard when just applying some common sense
I was thinking it might work to : 1. Allow users to input up to 5 tags. 2. Store each of those tags with the entry in 5 seperate columns in my sql. 3. use those tags in desiging my orgnization system...

where i am a bit lost is how I could get two of the capalities that SO has such as 1. Showing suggestions as you type, 2. showing how many users subscribe to that suggestion (or better for my purposes just showing how many times that tag has been used).
@user187680 DOn't use 5 separate columns in the database
Each tags gets 1 row in the database
so then 3 columns in a table 1 for tags, 1 for id and 1 for reference to the entry it corresponds with in a different table?
14:17
@user187680 If you also need an id for the tags you would need two columns as far as I can see. But I don't know what the reference to the other table should do
I have a CodeIgniter session problem. Can any one help me to fix this : stackoverflow.com/questions/11482044/…
ugh.. on so the tags u enter are often entered WITH a question right... the question is the thing i would wnat to reference (in that example).
it's a bit scary , when people look at tags, which are 10+ year old concept, and go all "oh, its twitters hashtagging"
taxonomy
never said shit about twitter
14:18
@VishnuPrem you have a codeigniter problem
@user187680 The linking happens the other way around
@user187680 , what other popular site used term "hashtag" ?
umm this doesnt much help my case, instagram
Or better a separate table for the linking of quetsions to tags
@tereško yes
14:19
why so many tables?
@user187680 Because that's how it works
Database normalization is the process of organizing the fields and tables of a relational database to minimize redundancy and dependency. Normalization usually involves dividing large tables into smaller (and less redundant) tables and defining relationships between them. The objective is to isolate data so that additions, deletions, and modifications of a field can be made in just one table and then propagated through the rest of the database via the defined relationships. Edgar F. Codd, the inventor of the relational model, introduced the concept of normalization and what we now know ...
why not just another column with reference to the ID of the row which it corresponds to
@user187680 , an entry can have many tags , a tag can be used for many entries
if you are gonna store all tags in single collumn right beside the entry , you will be faked
14:20
thats why i said 5 columns!
next to the entry
^ that
@user187680 Just a suggestion as I'm going through some applications that did this. Don't. Please don't
@user187680 thats retarded
im getting so sick of so. nobody has explains shit they just tell you the best practice and expect you to understand why your being stupid
14:22
@user187680 have you read the f*&king wiki article I linked to?
@user187680 if you have a many-to-many relationship , you use junction table
Okay. I'll go read the wiki and come back.
What you're asking for is to explain RDBMS to you.
that's usually covered in second chapter of ANY book about SQL
@user187680 It's not all the other people who are stupid like you state. You should start searching the problem at yourself
14:23
have you ever learned anything about SQL, @user187680 , or just copy-pasted examples ?
neither
neither just copy pasted or book learned anything.!
:)
once again so's annoying arrogant attitude has driven me away. I am certain you arrogant folks will say good riddance!
@tereško any idea abt my Codeigniter problem ?
gods below , i am adding him to ignore list
@VishnuPrem , im gonna take a look ... but i must warn you - i hate CodeIgniter. A lot
14:25
ok :)
could someone point me to a good markdown readme example for github, I totally suck... github.com/webarto/famfamfam ktnxbai
@webarto What do you mean by readme?
You want to know syntax??
README.md < dat, now I remember I saw good example at some repo of yours
nah, just example so I can quickly edit it, I totally suck at writing (styling)
@webarto Steal as you please :-)
I wish they say that in bank :P tnx
14:29
@webarto You would be surprised what people say when you point a gun to their head ;-)
@VishnuPrem , did you try to look, if the search criteria actually are in the session ?
just do var_dump( $_SESSION );
@PeeHaa I was thinking about changing careers :P
@tereško is data also in $_SESSION if there is custom session handler (like DB one)?
it should be ( then again , it's CI .. they don't always go with "what makes sense" )
kewl
The search criteria is not displayed for '$this->session->all_userdata()'. But in session DB, I can see the search param & value !
14:33
session will be died to an ID
check to see if ID changes
wait a fscking moment, you can use $this->session in view?
@webarto , you i need to explain the whole "it's CI" thing again ?
they call it "MVC" because all the cool kids want MVC .. not because they actually have implemented it ( or anything remotely like it )
no, the ID is not changing.
then it looks like it is not retrieving information
then, how it retrieves upon refreshing browser's cache ?
14:37
is there any other information , not just criteria, stored in session ?
:shockedandappalled: :)
yes, they are all working fine.
what is the classname for your session handler ( i need to look at the source )
escuse me... if a hacker can create hash collisions by increasing the number of iterations to somehow get the password, then why cant he do that with bycrypt???
@tereško Sorry, I didn't get you
14:39
@VishnuPrem what is the classname for your session handler
which part is confusing ?
nevermind ... looks like there is only one option anyway
CI_Session
FYI - This is the setting in the config.
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_expire_on_close'] = TRUE;
$config['sess_encrypt_cookie'] = TRUE;
$config['sess_use_database'] = TRUE;
$config['sess_table_name'] = 'ci_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_match_useragent'] = TRUE;
$config['sess_time_to_update'] = 300;
i think it will be $_
@VishnuPrem , ok ..
what type of variable the search criteria is ?
@VishnuPrem , is it a string, an array .. object .. something other
its a string
14:51
it has to be $_
superglobal
i have a feeling that it might be caused by github.com/EllisLab/CodeIgniter/blob/2.1-stable/system/…
ooops
try storing a md5 of that string instead
and see if then you can store/retrieve it
but I wonder how it works fine in localhost, but not in server !
the settings may be wrong
14:53
the session setting is the same as in my local machine
@VishnuPrem , magic quotes in settings seem a viable reason
exactly
can striplashes work?
@blackbee , shut up
ok
sorrys
so, do I need to check the PHP settings for magic quotes on / off ?
14:55
@VishnuPrem , try storing an md5 of the search criteria instead on the remote server , and see if then it works
@VishnuPrem if it's on, call your host and tell them to shut it off. and if they refuse, get a better host
ok, I will do what @tereško and @ircmaxell said after my dinner. please hold on for a while. brb
ircmaxcell... i saw the previous days bycrypt use a md5, but isn't that wrong?? i mean i read md5 is out of date....
then keep reading
maybe something will stick
why do you always mock me?
because i know less?
15:02
WTF? bcrypt does not use md5
hang on ten
class Bcrypt {
private $rounds;
public function __construct($rounds = 12) {
if(CRYPT_BLOWFISH != 1) {
throw new Exception("bcrypt not supported in this installation. See http://php.net/crypt");
}

$this->rounds = $rounds;
}

public function hash($input) {
$hash = crypt($input, $this->getSalt());

if(strlen($hash) > 13)
return $hash;

return false;
}

public function verify($input, $existingHash) {
$hash = crypt($input, $existingHash);

return $hash === $existingHash;
}

private function getSalt() {
what is that on line number 62...... i may be wrong
it's part of its random number generator.
ow.. why generating random number like that better than mt_rand??
pls, teach me... its very hard to google such thingss
and if this is not storing the salt.. then how does it compare two passwords at a later point of time?
15:09
dude, go read and play with it a bit. It's quite obvious if you look at it that it's storing the salt as the first part of the hash...
:'(
storing in the database...
i do not know what is your native educational environment, but in Europe "teaching" in universities does not mean "to give answer"
instead you are provided with materials , directions and idea .. and you have to make conclusions an learn on your own
@webarto `nice
teaching !== spoon-feeding
15:13
we dont have that too... not the right kind of people live in the right place....
okay fine you are gods and i am an ant, now stab me
@tereško Having fun talking to that tiny avatar? ;)
in normal case... $2a$05$, i found 05 stands for the number of rounds, then what does $2a$%02d$ stand for?
security breach........... what is %02d
15:21
sometimes I wish I could ignore users...
no you can't
this is the last question of the day
@ircmaxell With great power comes great reponsibility annoyance
7
:-)
what is %02d and how is it storing salt in database....
aha... i found this... looks hebrew though... http://djstrong.info/hash/!!!!!!!!!!!!!!!!!!!!!%27%293*y$T9,$B-R$2a%280.html and sir,ircmaxell wil again say me wtf...
have a good day....
Are there any strategies that can be used to prevent user-land extending classes from breaking the base constructor?
@Bracketworks Break in what way?
15:31
As in, exclude arguments that are required in the base (and subsequently, not call parent::)
Simply put, eh?
Isn't that... that seems like it breaks some rule commandment.
@ircmaxell , just look into yourself and find your inner masochist
15:52
they will never learn
sigh I think I'm too stupid for abstractions :(
I use HTML to parse Regular Expressions.
lol
@webarto Makes more sense than other posts by Jeff
yeah this one is actually funny :)
16:11
...and parameter type invariance gets screws me again.
:P
also ? ;)
@PeeHaa Yea, I suppose if you have that power
I tried to delete it myself but SO said no go
neh
f* PHP, I'm photographer now i.minus.com/ibx6B8sp5i3C9s.jpg
Anybody knows what the status is of this?
16:58
@PeeHaa Speaking of status, how far is the FF ext?
Currently I'm busy creating interfaces for my blogging system. When I'm hating myself enough for not being able to come up with the correct interfaces I'll going to finish v0.1 of the FF ext (will probably be tonight)
@PeeHaa You are always finding excuses... :P
I really need to quit my job so I'll have more time for the more important stuff :D
@PeeHaa You should!
Who needs a job anyways ^^
I don't need a job at all. I need the money I get from it though ;)
17:07
Monday's blog post is scheduled (not the source code series, still working on that one)
@webarto is this some attempt at redemption?
hi
i have designed a website
@techno quiet, you died in 1990
@PeeHaa You know, it's always driven me a bit nuts that this, or some equivalence, hasn't been in core since 5.X
It has pages referring to the sub-pages using the full website address
How can i mock this website on localhost?
is there some software like wamp server?
17:10
@PeeHaa METH_HEAD is awesome, until METH_ACL comes to your house, and you have to METH_DELETE
4
Please help
@Bracketworks It is a bit strange to say the least. PHP (rasmus mostly I guess) always states that PHP is for a large part "married" with HTTP (hence the scalar values discussions and the fact they being always string)
@Leigh hahahah nice
@PeeHaa I know eh, say one thing, do another.
@techno Define mock
I would like to see, that global scope is actually some unnamed method of a class (like the classic Program::main(), though not static), whereby $this->request would be an instance of the mentioned HttpRequest
I guess it could be static; self::$request, or whatever
17:14
@PeeHaa Say i have 'contact' link in my main webpage ,due to some problems i can't directly link to the page so i referr to the webaddress www.example.com/contact
I want localhost to act as www.example.com
so that i can get test my website
@techno If it is for local testing purposes nad you want www.example.com to be your local machine you can simply edit your hosts file to map the address
nad == and
i mean if i enter www.example.com in the browser i want the local page say index.html displayed
1 min ago, by PeeHaa
@techno If it is for local testing purposes nad you want www.example.com to be your local machine you can simply edit your hosts file to map the address
can use 127.0.0.1 c:\index.html
@techno You are not mapping to a specific file. You are only mapping a domain
@techno Do you have a webserver running?
17:21
no
I have wamp server
I have a file index.htm which is the Main page
then Contact.htm ie:contact file
What is wamp server? Is it ERP software? CRM software? spreadsheet software? Texteditor?
@PeeHaa WampServer is a Windows web development environment. It allows you to create web applications with Apache2, PHP and a MySQL database. Alongside, PhpMyAdmin allows you to manage databases
And what is Apache?
17:26
from your reputation i know you don't want answer for that
plz help me
But do you or don't you agree that apache is a webserver?
yees
Do you know what your doc root is?
i have www directory for wamp
i use it to test php scripts
Add the files to that and you will be able to access it through: 127.0.0.1 or setup a vitrual host
17:32
ok
another sign that php documentation need a well written "how to set up development environment" chapter
i have solved the problem which prevented me from direct testing.Thanks anyway
Is HTML Documentation created from .chm files SEO Friendly?
17:49
@techno this isn't kindergarten, please leave
18:00
hi guys whats up :)
if someone knows how to mess with zend a bit and can help me, he is more than welcome ;)
http://stackoverflow.com/questions/11485896/shopping-cart-recursive-category-fetching-zend-framework
@ThreeDev , you might find this topic quite related to yours : stackoverflow.com/questions/11064913/…
but i am still in process of writing an answer =/
check back in 15-20 minutes
thanks a lot teresko, ill keep on update
i thought about pulling them all and then arrange it to custom array
what do you say about that?
> i have www directory for wamp i use it to test php scripts
18:18
@ThreeDev , are you good at JS ? jsbin.com/omexix/3/edit#javascript
here is a working example
is it working goode?
goode*
good*
it is possible to create similar structure without objects , but it looks a but more confusing
I've lately tried using ereg(). And actually I think it's better than preg_match().
Unlike preg_match() it seems to use finite automata.
18:56
@GlitchMr ahahaha... you're joking right? .. please?.. right?
19:54
I'm about to start a job using PHP. What's a good book for learning PHP that's useful for an experienced programmer? (Not a "newbie" book)
@OnlyBolivianHere , do you have anything current on github , so that we could determine your skill level ?
or do you want some random "good books" ?
hi all
PHP I've worked on the CakePHP introduction series. I'm looking for something that will get me from zero to familiar with PHP language constructs as quick as possible.
I just want to start getting familiar with the language, but not learn what a variable is, etc.
@OnlyBolivianHere Just use the manual. Look at good.
can someone tell me whats wrong in this sql ? mysql_query(" INSERT INTO data (id_user) SELECT id FROM users WHERE id NOT IN (select id_user from data)");
19:59
@gosto What error is it giving you?
it gives blank page
00:00 - 20:0020:00 - 00:00

« first day (637 days earlier)      last day (4533 days later) »