« first day (678 days earlier)      last day (4270 days later) » 

4:00 PM
@DaveRandom dafuk is IonCube?
 
@DaveRandom I've read that
Still have no idea what its supposed to do...
 
lol
 
@KuldeepDaftary congrats :)
 
To achieve it I use PEAR Mail package REF : http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm

Everything is working fine, but html email formatting. I created a variable and I'm adding html to it and I want to send that as formatted html email. But I'm receiving unformatted html email .. Which shows me raw html code in my outlook..
haha here I go.. Sorry took bit long
 
4:02 PM
@DaveRandom From what I see, it's supposed to somehow compile you PHP code? or encode it or whatever?
But why in the world would you need that?
 
So what can be the problem ?
I followed this http://css-tricks.com/sending-nice-html-email-with-php/ to add formatting...
 
Zend Guard with a different hat on. But it needs a Zend extension to work, and (fairly obviously) the source code for the ZE is not available.
Supposedly your scripts run faster, but the real reason people use it is obfuscation/licensing
 
@KuldeepDaftary Your headers are probably off
Care to pastebin your entire code?
 
which as we all know, if you're going to write apps in an open source language is a complete waste of time and energy
 
@DaveRandom Who are they afraid that will read their codez?
The only ones who suppodingly have access are the employees, and if they don't trust them enough, well that's an entirely different problem.
 
4:05 PM
@DaveRandom fire the client , this cannot be worth all that effort
 
@Truth how headers? Can i TURN it on in my script? or is it outlook problem ?
 
@KuldeepDaftary The SMTP protocol requires 2 things
 
One is the headers, and the second is the content of the message
 
@Truth , seems like a help vamp .. all the signs indicate that he just copy-pasted the script
so . be warned
 
4:06 PM
You got the second part right, I'm sure you have
 
Well the entire web interface for the system used to be PHP driven and I sort of get them wanting to protect it - but now it's a compiled CGI. I guess the manufacturer have some big client who demand that it be there, so it stays.
 
@tereško Aye
 
At the end of the day it is a PBX, being a web server is not it's primary purpose so I guess it's just not that important to them.
 
@KuldeepDaftary But the headers you've sent don't correspond with an HTML message.
 
@tereško No trust me I have not.
 
4:07 PM
But if I'm going to break my toys I like to do it good and proper.
 
I have being working on this script since a week !
 
@KuldeepDaftary Care to share your code?
 
alright give me a sec
 
@tereško thanks for your help on my question regarding ACL implementation, much appreciated man!
 
what where why ?!
but you're welcome
 
4:09 PM
posted on August 24, 2012 by Lukas Smith

So a while back I wanted to add native support for API versioning to FOSRestBundle. While working on this I began to realize that this would really require supporting proper content negotiation. Note that while there is a spec for how to express the preferences of the client, there is no spec on "negotiating" between what the client wants and what the server has to offer. My current implementat

 
@tereško Has your other personality been using your SO account again? I thought you'd nipped that in the bud...
 
no , but looks like someone named "Jojo" has been copying my content
 
Ah sorry it was actually to another user's question, but regardless, your input was insightful and helpful. Seems I need more coffee. Your post described using a SecurityContainer decorator pattern for ACL.
 
27
A: ACL implementation

tereškoFirst part/answer (ACL implementation) In my humble opinion, the best way to approach this would be to use decorator pattern, Basically, this means that you take your object, and place it inside another object, which will act like a protective shell. This would NOT require you to extend the orig...

 
4:12 PM
Yep, that one. Jojo referenced your post in a question I asked.
Haha, exactly.
 
I have just copied the bits that might be useful for u to understand. As My script is really long.
 
@KuldeepDaftary , you might benefit from reading this : codeangel.org/articles/simple-php-template-engine.html
 
                    $headersuser = array ('From' => $fromuser,'To' => $toemailuser,'Subject' => $subjectuser);
 
it won't help you directly , but it would aid you in cleaning up your code
 
You're lacking the Content-type header required for HTML messages
"Content-type" => "text/html"
Try that, I gtg :)
 
4:15 PM
@tereško yup! Thanks! Will definitely give it a go..
@Truth Thanks a lot man ! :) It works
 
btw , i actually notice that the picture above comes with a list of quotes about coffee : silverjames.com/?p=18103
> Caffeine isn’t a drug, it’s a vitamin!
 
That's pure gold.
 
@KuldeepDaftary Consider switching to swiftmailer - it gives that warm fuzzy feeling inside that PEAR projects so often fail to deliver. If you're sending HTML mails you should send a text version as well, and it makes that much easier than PEAR::Mail
 
And I agree completely.
 
@DaveRandom i actually usually go with PHPMailer. The code is shit , but it is small and it works.
 
4:21 PM
I'm a bit confused, is it generally considered bad practice to instantiate a Data Mapper in controller actions? I don't quite get how I would otherwise handle interacting the database....
 
And every month I decide that next month i will fork it and make it into proper object oriented thing
 
@JohnHall: a model?
 
Scheduled for Q5...
 
@JohnHall , because you are essentially pushing from domain business logic in the controller
 
@DaveRandom haha!
 
4:22 PM
lol
Q5?
haha I know
 
@netcoder I invisioned my "create" action looking something like... Decode request data from front end, populate model properties with said data, send model object to save() method of data mapper.
 
@DaveRandom Thanks for recommendation ! I'm checking it out..
 
@JohnHall , what exactly are you creating ?
 
@tereško application wise?
 
in that controller's method
 
4:26 PM
@tereško ah, for example, saving a new company in my application to the database.
 
If I were to add a profile picture to my users, in the database, what's the best way to structure it? Should I add a "picture" column that has the name of the picture like "username.jpg" or is there a better way?
 
@tereško If you want something else to never do, consider helping me not doing the project I have been considering for the best part of two years - A single library to abstract MySQL code from a particular driver/extension. I'm so sick of writing everything three times some it will work with PDO, MySQLi and fall back to mysql_*
 
Thanks a lot guys for all your help ! Bye...
 
@AlexCastro are you storing uploaded pictures in file storage, db storage, or remotely?
 
4:27 PM
@Sam I did. :-) I really just want to talk to their sys admin...hopefully I'll do that today...
 
public function postCompany( $request )
{
    $library = $this->serviceFactory->create('Library');
    $library->addCompany( $request->getPost('title')
                          $request->getPost('description') );
}
 
@JohnHall simple file storage
just uploading them to a profile directory
 
@JohnHall , that's how i would see that method
 
@AlexCastro then yeah, I'd say a filename would work just fine, the application then needs to understand how to locate the retrieved filename in the filesystem
 
4:29 PM
@Neal not old enough for 10k users
 
@JohnHall What about doing something like naming each picture user.jpg and having the folder structure be the thing that varies, like pictures/1/user.jpg, with the number changing for userid
 
@tereško Thank you! I'm currently not using a factory pattern, but perhaps I should look into that
 
@JohnHall , the point is not in the factory , but in service , which actually deals with domain object and mapper initialization
 
@tereško what isn't old enough?
 
@AlexCastro that would work as well, and would save you extra column in the DB
 
4:31 PM
I was able to vote to delete
 
it also is able to contain the error state , if addition of new company fails , which then can be extracted by view instance and acted upon
 
@tereško I see.. I believe I need to investigate implementing a service layer
 
@Neal , the 20k+ user have different permissions , for 10k users to vote on deleting question there needs some time to pass after question has been closed
 
@tereško interesting... It does not say that in the FAQ, unless I am reading it wrong.
 
nope , it's not mentioned there
 
4:34 PM
hmmmm
 
@Neal @tereško It's sort of mentioned here
 
So how do why know it is true?
 
> Voting to delete questions immediately after they are closed (even if they are new)
 
@DaveRandom ahhh I see now ^_^
interesting
 
@Neal , we developers usually excel and noticing patterns
 
at least some of us
 
> You must wait for a question to be closed for 2 days before you can vote for deletion
 
@tereško :-P pfffft
 
^ asking why user-agent is not set while commenting out setting the user-agent - priceless.
 
@tereško researching server layer implementation, thanks for the pointer
 
4:41 PM
the idea is to completely separate the presentation layer (views, controllers and templates) from model layer
if you are dealing with mapper directly in controller , then in that same controller you also have to decide what to do when mapping fails or there is some condition set on one of domain objects
 
right, I've encountered this and it felt wrong
Before delving too far into code I'm attempting to have a somewhat complete understanding of how my application will work in terms of security and basic CRUD
 
the factory in this case serves two purposes :
1. it decouples the the controller from the services , buy delegating the creation to an external structure
2. it create a way to ensure that there is only one instance of each service per application and that , if service is already initialized , lets reuse it
because you view should be requesting information from the model layer , and it usually (not always) will use the same services
 
ah that makes perfect sense
 
> 2. it create a way to ensure that there is only one instance of each service per application and that , if service is already initialized , lets reuse it
General comment: I just don't see how that's different from a singleton
 
no global state required , because you can pass the same instance of factory to both view and controller
 
4:50 PM
Nor do I
 
Many people have tried to explain it to me many times, and I just don't see it
 
Ah
 
Hi every one Do you have any idea how to post a result obtained from php to facebook?
 
Global state clears that up thanks @tereško
 
So basically your saying it's because you're calling an instance method and not a static method?
 
4:52 PM
@DaveRandom , because data is tied the the object
you can replace object whenever you want
 
Riiiight. Why can't people just say that? That makes perfect sense.
 
Anyone know a reasonable size in KB for a 75x75 picture?
 
something under 100MB for a normal TIFF
=P
 
lol JPG or PNG
@tereško should I allow maybe a max of 100KB for a 75x75 jpg/png?
 
i honestly don't know
you could just create worst case scenario (that would be fully randomized PNG) and see how large it is
 
4:59 PM
I see an interesting tool here. A website to tell you what max size you should make for a picture of X dimensions that you input.
 
@ircmaxell back
 
Sam
@AlexCastro open up your Photoshop; download images off the internet, set the width and height of the image to 75 by 75 (in Photoshop), and observe the size. You don't need to ask for something you can test yourself
 
34 mins ago, by Neal
http://stackoverflow.com/q/12112874/561731
 
fixed
 
5:01 PM
its a duplicate. I clicked the wrong radio button....
 
@Neal duplicate of what ( i am lazy )
 
Welcome back
 
@AlexCastro 100KB will comfortably fit a 75x75 uncompressed bitmap of 64-bit colour depth. I suspect your limit should be lower than that, although it depends on the purpose of the limitation you are imposing.
 
@DaveRandom thanks, appreciate it.
 
@ircmaxell can you send me the log?
 
5:07 PM
@tereško dunno, but it looks duplicatey
 
well , lets assume the general one will do
 
@ircmaxell And also, what do you think about the AOP stuff on the list?
 
@NikiC Let's have our own conversation together ;-)
@NikiC drafting a reply now...
 
@ircmaxell Right, that makes more sense
on irc?
 
@tereško trying to better understand what logic the service layer should encapsulate, currently focused on validation of model properties. I use Zend_Form to validate properties (which have a corresponding element with validators in the Zend_Form). Should this logic exist in the Service layer, perhaps via a Validation class?
 
5:18 PM
validation should be mostly in the domain objects (what people usually mistakenly call "models")
 
Sure
 
services should deal with interaction between domain objects and mappers
 
in fact, let's get a room with jpauli... nevermind, he's gone
 
@tereško I believe I may be on the right track. I have an abstract class App_Model_DomainObjectAbstract which essentially just handles populating properties and handles validation via overloading __set()
 
would_you_mind {
    // Code here
} actually_i_do_mind (Exception £e) {
    // Politely move on
    cheerio('Message');
}
 
5:23 PM
and yes, sometimes shutdown -r now is faster than clicking around
 
@hakra you log in as root?
 
@ircmaxell that post is hilarious
 
Black Hole Sun, Won't you come and wash away the rain...?
 
@ircmaxell LOL
 
@ircmaxell Otherwise this would not lead to nowhere, yes.
The post is great. I want a pound of variables please.
 
hilarious I say
 
@ircmaxell bloody brilliant
 
yeah , but it is ancient
 
> If PHP Were British, by Dave Child, was posted on 20 August 2011 and has been tagged with php, development, humour and empire.
ancient. 1 year and 4 days
 
practical_extraction_and_report_language_regular_expression_match()
 
5:36 PM
@ircmaxell The world is moving fast.
 
5:58 PM
press ESC to stop animation
 
@webarto what should I press to get it back (short of reload)? :P
 
1 message moved to bin
 
@anyone if i am registering my domain name and uploading files at 000webhosting.com, then what should be the host name instead of localhost
 
I thought everybody loves kittens :D
 
hi frnds
i have a problem in php with its GD library
 
6:03 PM
$('.message').html('<img src=i.imgur.com/vmf8N.gif>');
@NikiC try this :D
 
and i am using localhost/avatar.php?pid= ... what can i use instead of localhost to make that universal. i dont qiute remeber it was something like HTTP[server] ....
 
now it's allll kittens :D
 
:D
 
can any one interested to solve this -when we rotate image in php then its size increased and also dimensions
how we prevent same size
of that image
in short I need image rotation functionality similar to phtoshop image rotation by php
 
\0/
 
6:06 PM
u want to prevent same size!! but that what it is exactly happening when u rotate the image
 
@blackbee...when we rotate an image its dimension increased for exmaple
 
do you have multiple personalities disorder?
 
so u want to oprevent the increase in dimension
:D
 
@webarto lol and rofl too
 
6:08 PM
BANANAS
 
actually problem is this main image gone smaller and smaller when we apply number of rotation on it
 
ooops
 
and its outer increased every time
 
yeah, JPEG does that sometimes, it shrinks when you rotate it many times...
 
yeah, i m using jpg
 
6:10 PM
its lossless
 
@webarto any idea for balnk corners
which comes after rotation
 
0
Q: php rotate image WITH clipped edges

w00With the GD library of php you can rotate an image with the imagerotate() function. The downside of this function is that it doesn't clip the edges and that is exactly what i need... Here's an example image that shows my problem: As you can see, in photoshop the edges are clipped. In PHP the...

 
i want to run a wordpress site on my local wampp server
 
@blackbee yeah, i face this problem
 
i am getting this error on local
Warning: require_once(): http:// wrapper is disabled in the server configuration by allow_url_include=0
 
6:15 PM
@rahularyansharma: and?
 
@SaurabhMishra well i didnot show the problem, i gave u a solution
 
I don't think there's anything I can add to this
 
@rahularyansharma , why the hell you would want something like that ?!?
 
this is site
develped by any other person
i just started working on it
and its shows errors
 
an include from external location is considered to be a security flaw
 
6:18 PM
@tereško hi !!
 
Can anybody help me get back in community?
I didn't read the rules and FAQs,TOS. I got negative votes in my questions and I got banned from asking more. Please help, I won't diss-obey any other rules.
 
@blackbee , Thnx frnd
 
so how can i remove these errors
?
 
usually people want to fix the problem , not remove the notification ...
 
ffs anyone familiar with ruby?
 
6:21 PM
so how can i fix these errors ?
 
@gorelative , you will be better off in ##ruby chat room on freenode
@rahularyansharma , find the line which causes it
 
now to find a web irc
 
doesn't your bowser come with build in IRC client ?!
... you poor thing
 
i think this is line
which causing problem
require('./wp-blog-header.php');
 
no, it isn't
 
6:24 PM
require_once(WP_PLUGIN_URL."/dspl-estate/estate_db.php");
 
that might be it
 
( ! ) Warning: require_once(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in C:\wamp\www\estate\wp-content\plugins\dspl-estate\dspl-estate.php on line 25
 
the error is actually IN the dspl-estate.php file
 
Yeah]
 
why the hell are you responsible for a site , if you cannot even read the error messages ?!
 
6:27 PM
i have opened the same file
and this message from
this file
I am able to check the error message and line numbers
now i am trying to check
require_once(WP_PLUGIN_URL."/dspl-estate/estate_db.php");
here i am just to someone me to guide
that vairable value
and thanks
 
6:45 PM
@rdlowrey , you around ?
 
user895378
@tereško yes
 
user895378
been buried in the text editor all day :)
 
ok .. this is something you might be able to shed some light on
$builder = new OpenID\Http\RequestBuilder();
$request = $builder->create( 'http://placpad.com/login' );
next i need to either perform a HEAD , GET or POST query
what API should i use ?
$request->getHead() sounds wrong , and `$request->query('HEAD'); would look like crap under the hood
any suggestions ?
fyi , at this point socket already is opened , i just need to generate the header
 
user895378
Does your RequestBuilder::create method generate the full HTTP message?
 
user895378
Ah, no, okay
 
6:49 PM
so .. giving names , the most common problem of programing
 
lol
 
common != simple
@Lusitanian , yes , that was one of reasons why i said, that it sounds wrong
 
lol i know
 
user895378
@tereško I prefer requiring the HTTP method along with the URI because you have to have it: $builder->create( 'http://placpad.com/login', 'GET' ); ... then you can have a simple getHeader method that delegates to protected/private methods underneath based on which HTTP method your request uses.
 
user895378
Every request needs a method verb, so it seems to me that would solve your problem.
 
6:53 PM
somewhat , yes
 
user895378
getHeader getRawRequestHeaders
 
header is the entire part afaik
 
user895378
You can have an infinite number of headers, each terminated by \r\n with the group of headers terminated with an empty line \r\n that indicates what follows is the entity body (if one is coming)
 
(php newbie) quick question: what's the difference between using the error_log function and just writing to a text file?
 
user895378
The first "header" is technically called the "Request Line" (GET /someUrl HTTP/1.1)
 
6:56 PM
what's the difference between using a database and a file?
 
I'm open to that.
 
@ircmaxell for storing what?
 
oh...that was a rhetorical question wasn't it
 
here's the scenario: we have a email service that sends out emails from our application
 
6:57 PM
@ircmaxell: when using SQLite: none
:)
 
I need to capture what was trying to be sent during that time
 
@netcoder not really ;)
 
mysql is our db
 
@Lusitanian bingo
 
I have my call in a try-catch so that we don't keel over and die if the service is unreachable
 
6:58 PM
I love it when non-technical people argue for a solution they don't understand because someone said it before you did. #NOT #sigh...
 
how is a sqlite db not a file?
 
@netcoder how is MySQL not a file?
how is MongoDB not a file?
 
so, the difference between using error_log and fwrite?
 
how is Terradata not a file?
How is Oracle not a file?
 
@rdlowrey , i am specifically requesting for HEAD, because Yadis puts directions to XRDS file in the header , therefore i do not need to fetch whole content from claimed identity provider
 
6:59 PM
those databases are sets of files
 
if you have to ask that question, you missed the entire point of the question that I put forth
@netcoder Mongo isn't
and neither is Oracle
 
pce
The filesystem is also a HA Database :D
 
and neither is MySQL
 
so what are they? wind?
 
7:00 PM
 
@netcoder it's not that they use a file as the underlying storage that's the takeaway here...
 
how did he manage to get all that rep ?
 
The point of a database isn't the storage mechanism
it could be stored on a paper plate for all i care
 
user895378
@tereško As long as you terminate each header in the raw message you send with \r\n and add a final \r\n after the last header your message will be understood by the server ...
 
@netcoder That's like calling a car an engine
Because the car uses an engine.
 
7:03 PM
@netcoder are you aware that SQLite can work with RAM only too ? Does it make it RAM ?
 
user895378
@tereško Of course, you could also just do this if you didn't want to worry about it:
 
user895378
require '/hard/path/to/Artax.php';
$client = new Artax\Http\Client(new Artax\Http\ConnectionManager, new Spl\HashingMediator);
$request = new StdRequest('http://placpad.com/login', 'HEAD');
$response = $client->send($request);
print_r($response->getAllHeaders());
 
yes, I think SQLite is RAM
there I said it
I think MySQL is the universe and also 42
 
@rdlowrey that makes sense , actually
well .. at least some of it
 
hi guys ! how can i select all ids of a specifique userid , lets say userid 47 in the picture how can i select all ids relating to it .thx
 
7:05 PM
Something @rdlowrey did makes sense?
 
user895378
blind luck, apparently.
 
@gosto , you use SQL
 
i couldnt male picture here ;(
how to make the picture here ?
 
@rdlowrey or could it be that you have spent more time on this then me =P ... naah .. must be the luck
 
user895378
I finally am happy enough with the architecture and functionality to stop refactoring it ad nauseum. Now I just have to fix all the tests I've broken over the last few days getting it to that point :)
 
7:07 PM
@tereško '' ok here imgur.com/MY4QN
 
user895378
Famous last words -- I think everything works really, really well.
 
lol...
 
user895378
If you're interested in some of the features: gist.github.com/3251540
 
how can i select all ids of a specifique userid , lets say userid 47 in the picture how can i select all ids relating to it . look in this picture imgur.com/MY4QN
 
user895378
7:08 PM
lol
 
@rdlowrey , and now you will spend next hour reading the comic strips from that site
 
user895378
Friday afternoon comics ... what else would I be doing anyway?
 
/me gets back to coding and listening to ancient Danzig albums
 
@rdlowrey cannot tell if braves fan...or just clicked on first MLB team in alphabetical order
 
user895378
Braves fan. Not as much as I used to be -- the strike in 1994 ruined baseball for 12-year-old-me
 
user895378
7:11 PM
For which you may or may not have been alive :)
 
The strike in 1994 ruined baseball for -1 year old me
ah beat me to it
The Indians were damn good in the 90s
 
how can i select all ids of a specifique userid? , lets say userid 47 , how can i select all ids relating to it . this is my exemple imgur.com/MY4QN
 
that last picture made me chuckle, ah it's friday
 
@tereško 10 years ago, my friend held power button for 4 seconds, and computer turned off along with everything in the house... and we was like, funk...
 
:D
 
7:29 PM
@webarto
how di dyou sell this codecanyon.net/item/php-mobile-device-detect/246397 so many times
i need to get on this codecanyon website....lol
 
7:49 PM
no help ?:(
 
8:03 PM
> Saying that because it's global, it's a bad thing doesn't seem to be a valid point in my opinion. There are many global concepts in programming, like Logging/Authorization/Database connections etc. In fact it is one of the strong argument for AOP, because it will not be of much use if you only can point cut the execution of one class don't you think? But I'm in favor of being able to organize aspects into namespace though, it will be a nice addition to the proposal.
 
@webarto: what caught my attention was the 10,770.50$ to be honest :)
 
that was the product of it :P I never got that money
 
@webarto: You mean you made a hack and got paid for it, or is it the other way around? ;-)
 
8:18 PM
@netcoder I made a hack and it was impossible to track if it's legit or not, I gained about $1000 and got paid off (because I used it silently)... and one I night I got bored and they had to shut down entire site for couple of hours...
hack = stupid XSRF
 
@ircmaxell The AOP thread is making me again
 
yeah
I like the concept
 
where is the fun?
 
but like traits, I think it will result in more abuse than good things
 
8:23 PM
@ircmaxell Just wanted to type a response but decided that it's not worth my time. Will end in the usual circles-discussion anyway
@ircmaxell Yes, yes, definitely
 
which is what I was trying to get across in my replies, but obviously I was wrong
 
i am not sure ,which of you two is Don Quixote and which - Sancho Panza
2
 
hahahaha
 
8:50 PM
hiya
 
@PeeHaa y u no outside drinking
 
@webarto Just got home from drinking. Had to take the dog out
 
@PeeHaa I just got back from a walk, was 42*C today, now 3x*C but concrete is hot...
 
@webarto It was hot here too, but now it's raining like hell. So it's getting nice cool
 
noice :)
 
8:59 PM
Best explanation of why a singleton is better than a global:
 

« first day (678 days earlier)      last day (4270 days later) »