« first day (558 days earlier)      last day (4616 days later) » 

02:43
@ircmaxell Know of any good nonce libraries/information?
03:02
what are you trying to do?
just make sure the same form doesnt get submitted twice
 
1 hour later…
04:11
@Petah You don't really have a say in what someone submits to you (if they are evil enough to want to force it).
04:23
@Paul its more to prevent clicking a button twice, or hitting refresh and the like
not as a primary security measure
Post/Redirect/Get (PRG) is a web development design pattern that prevents some duplicate form submissions, creating a more intuitive interface for user agents (users). PRG implements bookmarks and the refresh button in a predictable way that does not create duplicate form submissions. Duplicate form submissions When a web form is submitted to a server through an HTTP POST request, a web user that attempts to refresh the server response in certain user agents can cause the contents of the original HTTP POST request to be resubmitted, possibly causing undesired results, such as a duplica...
@Petah I think this is what you are looking for then.
yep i know about that, and use it currently, but thought a nonce could still be of added benifet
say for example a user clicks submit, it takes a few seconds to load, then they click it again at the same time the request just finished processing
and likewise you could avoid this by disabling the submit button on click, but i think a nonce would be better suited at fixing more of these issues
@Petah hmm, AJAX POST then, if you are wanting to try to modify the client side behavior.
04:39
yea, or i could use a nonce, right?
nonce seems (to me) a better solution
fair enough
Sam
Sam
05:36
howdy partners
hi
Sam
Sam
anything new in the world of coding? hi @Petah
I do not understand PRG; is it different from just disabling the submit button?
of course, that would only work if JS were enabled
@Sam Yes, that article explains it pretty well. It is a server-side thing.
Hi
I am beginner in php, today i implemented login page with core php with using dreamweaver
Sam
Sam
@Paul I never was familiar with the http codes; I think the most familiar (to me) are 404 and 500......and maybe 200 for AJAX purposes
05:49
morning everyone
morning tereško
Sam
Sam
morning @tereško
looks like it was very quite during the night
Sam
Sam
@tereško is being a lecturer foreseeable in your future?
and also i learned record set, master page and pagination... today i being eager to learn more any one pls say more than this what we can do in php with using dreamweaver
05:51
no , but going to lectures - is
Sam
Sam
@Dhamu is there a question coming on?
@ s sam.. also i learned record set, master page and pagination... today i being eager to learn more any one pls say more than this what we can do in php with using dreamweaver
Sam
Sam
you should be one.....your intelligence might make you commit suicide one day if you don't have a way to channel it out safely...:P
@Dhamu , how is any of this related to php ?
Sam
Sam
@Dhamu first, change your primary editor from Dreamweaver to an actual IDE something else
05:55
@sam , i have taught in the past, but that was with people who actually wanted to learn .. that would be the case when lecturing
@tereško S, dreamweaver auto generate core php, before this i used onlr frame work (codeigniter)
@Dhamu , that' a lie
Sam
Sam
@tereško lol.....well, given that a large percentage of students (today) don't want to learn, it'll be frustrating, but out of the minority, you might find some faithful followers
then again .. if you used CI in the past, (almost) anything would be a step up
Sam
Sam
@Dhamu if you are new to PHP, then I don't think you should let an editor generate the code for you.......in IMO
05:57
+1
@sam but, i comfortable dreamweaver, for validation i using spry validation, and also i took 15 min only for login oage with core php codes
@sam Ya sam, that's right....
Sam
Sam
@Dhamu experts will tell you otherwise, but alright......whatever makes you happy
@sam from that we cant learn manual coding, but it saves more time
@Dhamu Saves more time until you get hacked because you didn't know what was going on with the login code to your database.
Sam
Sam
that's true; as long as you are in for the long haul, you'll eventually get it....:D, along with a lot of head banging
06:00
@tereško not lie, today i done login page with that
please dont
you are making internet a worse place
@paul ya till i know i happening in login page, but it working nice...
please stop using dreamweavers built in components in a production code
@paul any suggestion for editors...?@tereško @sam
how about "anything else"
Sam
Sam
06:03
well, I'm still testing PhpStorm myself, and it seems to be fine so far
netbeans?
phpstrom?
Sam
Sam
I'm still scratching my head on Eclipse, and Sublime 2 just seems too......bland for me
yeah..
ok
Sam
Sam
but I'm still testing them
just getting a feel for them
I use emacs, it takes you 2 or 3 years to learn how to use it though.
Sam
Sam
06:07
@Dhamu you are not by any chance using mysql functions for your database functions, are you?
@Paul what's that in IT yrs? 100 yrs?...:D
@sam i cant understand...
@Sam mysql_* with SQL injectability plaintext unsalted, its working nice!
Sam
Sam
@Dhamu you said you created a login mechanism; what did you use to connect to the db mysql_connect, mysql_query(), etc?
db connection also done by auto, it created connect.php like that
Sam
Sam
ohhhhhhhhh.......not good
06:12
<?php require_once('Connections/mycon.php'); ?> like this all pages
Sam
Sam
so, open the file up, and see what's going on behind the scenes
@Paul it's still my dream to work on Linux 80% of the time; hopefully, I'll achieve that soon
@Sam , i used Aptana for long time ( before switching to sublime ) , you could take a look at that
Please stop writing new code with the ancient mysql_* functions. They are no longer maintained and community has begun the deprecation process . Instead you should learn about prepared statements and use either PDO or MySQLi. If you care to learn, here is a quite good PDO-related tutorial.
Sam
Sam
@tereško will take a look at it, once I eliminate one of the current contestants
@Dhamu , it seems that you do not understand even the basics of working with database
@Sam I work on linux 99% of the time. I haven't touched windows for the last 4 years. The 1% is because I'm still considered an 'expert' from friends and family not in the IT field. So my 1% is spent fixing windows issues (and normally very basic ones at that).
06:19
@tereško i know the functions of database.. before this my all projects in codeigniter, now i got new project in fully in core php..
Sam
Sam
hopefully, I can get my 3 monitors working fine on Ubuntu.....then, I start start reducing my time on Windows
... that did not come out in english , @Dhamu
and what does "full in core php" mean ?
Sam
Sam
which sorta makes me mad when about 90% of employers in my city/state want .NET/Java developers
@Dhamu "core php" you mean "php". There is nothing core about writing php code.
with out any framework
06:21
core would suggest perhaps the C code that is the engine of PHP.
@Dhamu does that mean that you have not ever really leaned how to write php without use of any framework ?
@tereško S, before this i used all functions from framework... Now learning
Komodo \o/
Sam
Sam
@Dhamu you just experienced what we were talking about concerning IDE earlier; if you use something to get the job done fast without understanding it, you either have to learn how it works later embarrassingly, or would just not be proficient in it at all
@Dhamu , you might start by actually learning php .. this book should be ok for a beginner :
Sam
Sam
06:33
@tereško thanks for the link; will be useful for me too
@tereško thanks tereško ...
did you used live video chat with html5 and php?
@sam @tereško
.. that again was not in english
Sam
Sam
you mean create it using html5 and php?No....I've only used swf (Flash)
ya @sam for previously i used av chat
but i wish 2 do with fully htmls and css
Sam
Sam
I have no plan on using html5 for video chat, until it's widely accepted, especially in existing browsers
06:49
@tereško not in english?
!
!
Sam
Sam
lol....dude, what are you trying to say? :P
@sam :) tereško saying not in english? did you got?
Sam
Sam
no, I believe he was referring to your sentences as not being in an acceptable english language structure
lol...
@sam Have website?
Sam
Sam
for?
07:00
to know and share?
Sam
Sam
lol.... php.net is your source of knowledge; google.com is your search engine, chat.stackoverflow.com/rooms/11/php is your PHP university
for all your other shenanigans, facebook.com and twitter.com are the ways to go....:P
@sam thanks
I think it kinda sucks that we don't have the possibility to use package-private visibility in PHP. Anyone knows if this will be supported in the future?
I want to make a site that will save content when I click on text and they convert to jeditable textarea and save the text after my edit. Can someone tell me how I can do this with PHP.
07:16
@user1252580 What have you tried so far?
Hi :)
@Paul hey! how you have been ?
hi @OmeidHerat Things are good here. I hear you are in Melb now?
@user1252580 dont you need php for this.. even can do with css nad jquery
Actually a site with few web-pages with click and edit functionality then people are save the mockup.
@Paul Yeah! have just moved a few days ago. things are awesome here!
lots of things happing, way more fun then SA.
07:21
@Dhamu Can you tell me how it's possible.
@OmeidHerat Are you still doing your research/thesis?
@Paul the highschool one right ? I finished it a few months ago and went good.
@user1252580 make all text inside the textarea with readonly, also with using styles you can show that as <P>, and using jquery click function make that textarea to writiable and visible
like textarea using css
morning all
morning
07:34
morning
@Paul well, I know I talk as if I have got a couple of degrees in computer science or I am about to get my PHP. but it's only that I started studying computers way too young.
i dont know what its called in css, but its like a outward bar containing the title of say a blog post or an article
@OmeidHerat lol, that is a good thing. Yes, I'm surprised you would do something so complicated at high school. We played with LOGO en.wikipedia.org/wiki/Logo_%28programming_language%29 trying to make a turtle go around and draw pretty squares.
can anyone tell me how to get this css effect google.com/url?source=imglanding&ct=img&q=http://…
its the top bar saying "your cover"
Hey guys, I am having trouble displaying the list of countries from my database table in a drop down menu using php. I have already posted a question on this at: http://stackoverflow.com/questions/10327873/dynamic-php-dropdown-menu-for-countries

The issue I am specifically having is that nothing is being displayed in the drop down menu.
07:43
@Yohann rightmouse click inspect element
i dont have the page its a picture
@RepWhoringPeeHaa
afk, time to cook dinner
@RepWhoringPeeHaa thanks oh yeah found out its called a "ribbon"
Sam
Sam
08:03
@shade917 I'm assuming that the table has columns called Country and Code, correct?
@shade917 your select statement is only selecting Country, so where is 'id' and 'name' coming from?
Sam
Sam
hey Rep; how did you manage to obtain over 14k points in about a yr?
@Sam It's not that much. I really didn't try that hard. My name is repwhore, but I mostly don't do that :)
Sam
Sam
you got all that from answering questions?
or you performed some special favors? :P
@Sam :P nope. mostly by providing answers
Sam
Sam
lucky bastard.....:P
09:16
morning folks
morning @mUnk3y
Sam
Sam
morning, monkey
0
A: Mirc control codes to html, through php

hakreYou should divide the problem, for example with a tokenizer. A tokenizer will scan the input string and turn the special parts into named tokens, so the rest of your script can identify them. Usage example: $mirc = "\x034this text is red\x033this text is green\x03 \x02bold text\x02 \x034,3this t...

09:31
hello u guys
how you doing today?
@hakre tnx for testing btw
10:21
morning
morning @NikiC
10:48
What chmod values do i set for different types of files on the server and why?
@Yohann it depends
The different types being:
- Models Views and Controllers
- Assets like JS CSS and Images(Unique MD5 Name to each so no lucky guessing image names)
I'm on shared hosting and i didnt quite get what the execute part does
read =4 write = 2 execute =1 so for php scripts dont we execute them?
@Yohann nopez php reads them
executing stuff is for executables
oh ok so i guess 744 would do? for like every file?
@Yohann The best option is to have the minimal set of permissions (so that it is as closed as possible). You have to think of the three different groups of users for each file. (the 7, the 4 and the 4) and understand how they relate to the owner and group of the file.
10:59
I'm having a pagination issue which really should be very simple to resolve, but I just don't get it, I've posted the full question here: stackoverflow.com/questions/10325128/… can anyone see the problem?
744 user=anybody group=anybody is different from 744 user=root group=root
@Paul If a anonymous person requests a PHP script which does alot of internal file creation , The file creation part is being done on the server , so does that fall under "User"
@Yohann when someone makes a request to your web server the web server responds... so, the question is: who is the owner of the process running your web server? (it might be apache)
@Paul oh ok i think i got the idea thanks :D
11:16
Why would a pagination cause an infinite loop?
@hsmoorecom There is not enough information to give a good answer to that.
@Paul, I'm referring to my question just above up ^
@hsmoorecom also, in that question there is not enough.
@Paul, ok, fair enough, quite hard to elaborate with my example.
@hsmoorecom Do you have a for loop within your foreach loop that isn't shown in your question?
11:20
posted on April 25, 2012 by PHP: Hypertext Preprocessor

The PHP development team announces the immediate availability of PHP 5.3.11 and PHP 5.4.1. These releases focuses on improving the stability of the current PHP branches with over 60 bug fixes, some of which are security related. Security Enhancements for both PHP 5.3.11 and PHP 5.4.1: Fixed bug #54374 (Insufficient validating of upload name leading to corrupted $_FILES indices). (CVE-2012-11

@Paul, no, that's the only loop, once checked to make sure the data returned isn't empty that is the only loop.
@hsmoorecom if not then it is probably $pagination->generate how can anyone answer that without the implementation details though? If i were you I would write echo statements in a few different places to see what was going on.
@Paul, ok, good idea
@hsmoorecom oh, i see, you are doing a redirect there too: kb.mozillazine.org/The_page_isn%27t_redirecting_properly
you are redirecting yourself to the same page
@Paul, really odd, I put a die("<><>") at the very top of the index.php file, and it still did a "page isnt redirecting properly" issue. now that's odd!
@Paul, but it only does that if I add a GET var called "page" to the uri
if I remove that GET var it redirects properly, even with the die()
11:30
@hsmoorecom the page variable must be getting processed to give the redirect.
it could be an apache url rewriting misconfiguration perhaps?
@Paul, it turns out it was because of an .htaccess
didnt see that there!
that can happen pretty easily
@RepWhoringPeeHaa :-D
11:49
Can anyone help me tune my apache2? Think it needs some tweaks
12:00
@Feeds @all anybody knows what Added debug info handler to DOM objects. is about?
@rlemon LOL You can just drag and throw your computer monitor, it will make the circle keep moving into the direction pretty realistically.
trolls trollin accidental trolls is luls.
@Anupama hi
12:06
hi
u work as @Anupama
@Paul Oh well things have changed :)
12:55
@OmeidHerat Yes, I guess I am getting old, time doesn't seem to stop.
13:37
can sublime edit 2 autocomplete php methods etc?
and also to jump to the method
@hakre It just means that var_dump()/print_r() for DOM gives more info.
good morning
Incidentally, it's broken :( (see line 108 in php-5.4.1.txt)
@CarrieKendall good morning :)
@salathe supercool, thx!
morning Carrie
13:51
morning @CarrieKendall
hey guys
can anyone quickly tell me how to take a modulus of very large number? :)
i mean very large
like pow(2,80) % 20000003
php seems to fail even with storing that kind of number
keeps saying its INF or something like that
but i don't get it.. why do they take remainder and multiply it.. instead of real number
well.. time's up.. noone wins :D
I think you'll do something like
for ($i = 1 ; $i < 81; $i++) {

}
oops
anyways, keep a running modulus inside the loop.
yeah.. why?
i mean 2^80 = 20000003^x + remainder
how is getting remainder on each multiplication mathematically correct?
14:05
if c = a*b % m, c = a*(b%m) %m
is it possible to do something like this with php?
echo "<form action=\"xyz.php?id=$uID&li=$lidID\">";

I tried but the parameters are not showing...
@ErselAker use hidden input tags
hmm.. thats not so obvious to me
<input type="hidden" name="id" value="$uID">
i meant the equation :)
14:08
yes, I will give that a try. Cheers
@ArtjomKurapov operations with respect to a modulus are equivalent to doing operations within a mathematical structure named a ring. Basically the (b%m) is just casting b into the ring Z%m. Multiplication can be pictured as rotations around the ring; modding b by m just removes any whole rotations b may contain.
Not sure if that helps or not; if you haven't studied rings it probably just muddies the water.
oooh.. rings? never heard of them
Not helping then. Sorry. The theory is sound though.
Just ask Euler or Gauss. ;)
Good day everyone!
14:38
@ArtjomKurapov sorry, i wasn't here... but you want bcmath php.net/manual/en/book.bc.php
@Paul nope
@ArtjomKurapov you already tried it?
yes, the number is too big for php to store
thats why you need it
For arbitrary precision mathematics PHP offers the Binary Calculator which supports numbers of any size and precision, represented as strings. (from the introduction)
well if its a string.. how do i multiply it?
14:42
bcmul
15:15
word
15:30
working on a web form of seven pages, the data is transferred across the pages using sessions, but if the user wants to change some data in the previous form and go back, the data isn't there, is there a way to make a 'fake post' so the data repopulates the form?
@PurpleSmurf Do you know AJAX?
I don't, but if it's the only/best way then I'll definitely give it a go
well, apart from doing a real post. if you want to try to fake it, then AJAX will help you modify the way it looks on the clients computer
the most recent thing I tried was a fake submit button using JQuery to try and trick it into posting the session backwards, it didn't work haha
user895378
To the other chat regulars: just throwing this out there for anyone who has considered writing a technical book(s): I picked up a superfluous English degree when I was in school and was the editor -in-chief of the newspaper at university. Though my opinion is biased, I like to think I'm a pretty good writer. I'm interested in doing some extensive free editing for the express purpose of résumé/cv whoring. So, just keep that in mind.
7
15:37
Nice
@rdlowrey thats why the comments in your code are so good.
I can talk @rdlowrey up significantly in that regard. He's done some reviewing for me (blog post and the like), and he's really good!
user895378
Addendum: flattery will get you everywhere with me.
Sorry. Just more zend rage on my part :)
@rdlowrey I can't hold back, my provider is going to have an interface router to find a concrete class for an Interface dependency.
I'm slightly annoyed. NJ EZPass almost doubled my replenishment method 2 weeks ago without notifying me about the change. /rant
user895378
@Paul can you elaborate on how your strategy differs from the in-built system for defining the specific concrete class that should be used?
Hey guys
15:58
@Truth Howdy
user895378
@Paul just for my own informational purposes ... or, don't bother and I'll just look at source code.
@rdlowrey Unless I missed something the in-built system doesn't automatically inject interfaces (because they aren't concrete)?
@CharlesSprayberry lol, nice
user895378
@Paul Correct: it doesn't automatically inject them (it couldn't possibly). But there is a mechanism for informing the class that if MyInterface is typehinted you want MyClass to be injected.
16:00
I've asked yesterday but found no concrete answer
Can anyone recommend a good solid MVC framework?
CI's source code looks like my troubles.
@Truth Guys in here seem to like Symfony. Not used it myself but quick skimming of the source didn't turn up any horrors. I don't know that it has an MVC implementation included though.
user895378
@Paul consider:
@rdlowrey Its not impossible.... I'll be routing the Interface name to a concrete class with my Interface Router. I might code the basics of it now. I haven't created the interface router and rules, but it will be quite similar to my HTTP routing. Let me just code it up quickly and then you will see the kind of interface.
@rdlowreylong time no see, how goes the framework?
user895378
interface DepInterface  {
    public function doSomething();
}

class DepClass implements DepInterface {
    public function doSomething(){}
}

class MyClass {
    protected $dep;
    public function __construct(DepInterface $dep) {
        $this->dep = $dep;
    }
}

$provider->define('MyClass', ['DepClass']);
$myObj = $provider->make('MyClass');
var_dump($myObj instanceof MyClass); // true
user895378
16:03
@GordonM No different -- was on vacation for the last couple of weeks. I'm just easing back into things right now.
Hey guys can someone help me figure out exactly why my drop down menu doesn't have any information in it?

I posted the question here: http://stackoverflow.com/questions/10327873/dynamic-php-dropdown-menu-for-countries

The edit is the updated code that I have... I have been stuck on this for about a week and seriously need a solution because I have tried everything I could think of...
@Truth Also, if you value your sanity, avoid Zend 1.x
@rdlowrey Yep, I'm going to have:
$interfaceRouter = new Provider\Interface\Router();
$interfaceRouter->addRule(
	new Provider\Interface\Rule\StrReplace('\Iface\\', '\\'));
$provider = new Provider($interfaceRouter);
user895378
@Paul Oh cool. I'll be interested to see it in action
16:11
@rdlowrey Actually, I'll have it ready tomorrow. Virtually all of my classes have changed for the better over the last few weeks thanks to your provider. Although, the provider I have is really a big merge between what I had before and yours. Actually merging it helped me understand it (which I needed).
user895378
@ircmaxell Oh thank goodness someone shared these for the betterment of those without the rep clout to view deleted posts.
nice, I'm glad I didn't miss those, thanks @ircmaxell
no problem
16:16
if (count ($gods) > 0) {unset $richardDawkins; }
@ircmaxell LOL that's gold
user895378
@GordonM lol nice
user895378
Of course, there's the Oolon Colluphid compendium: Where God Went Wrong, Some More of God's Greatest Mistakes, Who is this God Person Anyway? and Well That About Wraps it Up for God
H2G2 fan huh? :)
user895378
Oh yes: In the beginning the universe was created. This made a lot of people very unhappy and has widely been regarded as a bad move.
16:22
:)
is viper broken again?!
@CarrieKendall looks like it
user895378
lol, welcome at this point
16:36
i think viper-7 has been broken since the "new skin"
@ircmaxell , thing is that goto would not be executed even assuming the if condition was true
Well you have to die before you can go to heaven.
but when you die() , there is no going enywhere
@salathe does gist.github.com/2499678 mean we can mark bugs.php.net/bug.php?id=48527 fixed?
@tereško
Woah, nice @Gordon
16:53
goodnight all
night
user895378
later
@ircmaxell funny thing is i've grown so accustomed to not having it that I wont need it. But nice nonetheless
@Gordon Oh man, love @salathe gist! Been working more with DomDocument and the var_dumps would be nice
yeah, very much
16:58
To check if the uploaded file is excel file i am checking all its possible mime type like application/vnd.ms-excel,application/ms-excel,application/octet-stream etc ..can you please suggest me any better way to do the same thing?
@fluty you could try to open it with phpexcel
@Gordon thanks for your reply,anyway what if its happen to be some other type of file like PDF?
@fluty it depends, are you checking for excel template files, binary workbooks, workbooks, xml, etc
@fluty then phpexcel wont open it
@Gordon i mean what if i want to make sure user can upload only PDF file.
17:06
i hate when idiots delete username/passwords out of the VPN tunnel
congrats you locked me out of work for the day
@Carrie Only file with extension .xls
then validate with the ext rather than mime type
@fluty the general approach for limiting file access is via mime types so you already did the right thing by checking them. i was just giving alternatives.
@Carrie ext alone is not much useful anyway thanks
@Gordon ok
anyway. time to go home now
laters
17:08
@Gordon Bye,Have a nice time
17:34
evening
Sam
Sam
evening Rep

« first day (558 days earlier)      last day (4616 days later) »