« first day (1354 days earlier)      last day (3600 days later) » 

12:00 PM
14
Q: To Google something: capitalize or not?

Pío Pío 1949I have a small question about the usage of Google as a verb. Is it always capitalized, even as a verb? For instance: I Googled his name and I got hundreds of results. Now, I am aware that this is a neologism and as such, it's probably not going to be in any dictionaries, but what is the mos...

 
@Billy is this 65.39.128.45/~sp/wp-content/uploads/2014/06/FA2.png what you are looking at
 
Yes
 
What is on line 49 in that file?
that is refered
 
@RonniSkansing Bear in mind I have purposely changed the permissions to show that error..
 
@tereško, why is it wrong to say MVC Framework?
 
12:02 PM
@HamZa Capitalization is the difference between "I helped my uncle Jack off a horse" and "i helped my uncle jack off a horse".
@amenadiel A framework that claims to be "MVC" either lies or is deluded.
 
@SecondRikudo lolz(wut)
 
@Billy that is pretty much the issue, the warning gets spits out, and the header can not be reset (another warning) and in the end all the "garbage" is the picture.. so we need to understand the perm denied by opening the file and look at what it is trying to open
 
MVC is an architectural design pattern of your code, not of the framework.
 
^ that
 
@SecondRikudo well yes, you can use a so called MVC framework and still write procedural code, but certain frameworks are meant to be coupled with certain design patterns.
 
12:04 PM
if (!is_dir("$document_root/$cache_path")) { // no
  if (!mkdir("$document_root/$cache_path", 0755, true)) { // so make it LINE 49
    if (!is_dir("$document_root/$cache_path")) { // check again to protect against race conditions
      // uh-oh, failed to make that directory
      sendErrorImage("Failed to create cache directory at: $document_root/$cache_path");
    }
  }
}
 
mvc has nothing to do with object-oriented, procedural or functional programming paradigms , @amenadiel
 
I'll point out here that $document_root/$cache_path actually does exist, so, the script shouldn't get here anyway
 
and frameworks are NOT meant to be coupled with any patterns at all
 
"MVC Framework" is a marketing catch
 
@Billy notice ! infront of it, it means if it is false
so it is pretty much the if (!mkdir("$document_root/$cache_path", 0755, true)) setting it all off?
 
12:06 PM
Yes
And no..
And I don't know..
 
ok
I think it is
 
@PeeHaa Is it possible to use PHPoAuthLib to just sign requests without going through the authorization step? Aka flickr requires requests to be signed, but not authorized for public access.
 
But it is permission denied. If I give the script 777, that would solve that error?
 
Also, why you no Artax?
 
Or better permissions.. 755? (I don't know what is best)
 
12:07 PM
before the if(!mkdir(.. add var_dump($document_root, $cache_path); die;
 
@amenadiel MVC is about separating the layers of your application.
 
so you can see where it is trying to create a folder
 
@SecondRikudo @tereško, let's compare, for example Backbone and Knockout. The first one claims to be MVC, the second one is MVVM. You mean both of them are none and someone chose to label them so arbitrarily?
 
Input, Output, and Logic. Implementation details don't matter.
 
@amenadiel lol
backbone is not MVC and knockout is (probably) not MVVM
 
12:08 PM
I've been living in a lie?
 
@amenadiel Yeah.
 
Welcome to the club
@amenadiel
 
@SecondRikudo what's up? :)
 
@amenadiel try reading this: martinfowler.com/eaaDev/uiArchs.html
 
Batteries also don't contain electricity, and there's no such thing as a centrifugal force.
 
12:08 PM
what about Movel View Presentation in .NET, does it even exists?
 
@RonniSkansing I just thought to do the same thing. usr/local/apache/htdocs/public_html/ai-cache
 
@Naruto o/
 
@Billy does the user have permission to create a folder there?
 
I'm not sure if this is correct as I cannot see usr/local/apache/htdocs in my directory structure
 
12:10 PM
First tooth fairy and easter bunny and now this
 
@amenadiel for MVP read this: wildcrest.com/Potel/Portfolio/mvp.pdf
 
@RonniSkansing I don't know
I don't know A) if that path is correct or B) what are the correct permissions to give to the script
 
@Billy it because you only have access from the htdocs/ right?
so you can see the public html folder ?
 
Yes
public html is in my highest folder
 
okay, the rest is just stuff that is outside your "home" directory
 
12:11 PM
@amenadiel Like I said, the idea of MVC is to simply separate the three components of your application, input, output and logic
 
@amenadiel for "cliff-notes" version can read this: stackoverflow.com/a/7622038/727208
 
@Billy try creating a folder in the public_html called ai-cache
it might be because you have wp installed in a subdirectory and the plugin or whatever it is, is not configured or can not handle it
 
@RonniSkansing I have already
That is why I thought that the script should never get to that line
 
yeh @RonniSkansing I don't think it's going to play the game unless you respond
 
I get it @SecondRikudo, but there are many ways to separate the components. I could use raw queries in the controllers, or have business logic in the views. I mean, not every separation of concerns lead to an MVC pattern.
 
12:14 PM
if (!is_dir("$document_root/$cache_path")) { // Line 48, before mkdir(), this should be true... unless the path is incorrect
 
I like LI even less now, this is just stupid
 
BRB.
 
@amenadiel The idea is to not use raw queries in the controller and not to have business logic in the views.
 
@amenadiel yes. MVC is one of interpretations for SoC
 
Well I guess I'll have to read a lot. I've bookmarked the links. I'm off to answer jQuery related questions until I fill my conceptual gap :(
And CSS questions. Those are easy too
 
12:18 PM
@amenadiel , you also could benefit from this list of materials: stackoverflow.com/a/16356866/727208
 
@DaveRandom lol this is hard
 
I've read a few of them, but that's a sweet reading list. Thank you.
 
@Danack some of the 3ds folks have build a site to try around (blocks? sth) and it uses a very nice highlighter. no time to dig right now, just leaving a pointer, ping me later.
 
@hakre 3ds? That makes me think of nintendo.
 
right @RonniSkansing I think it worked that time
oh ffs it just sent out 52 invitations
 
12:25 PM
@tereško, what would be a real persistent model in PHP?
 
@DaveRandom lol
 
@amenadiel Impractical.
 
@SecondRikudo Where have you been upto lately?
 
@Naruto You know, killing here, slaughtering there...
 
@DaveRandom it looks nice and simple
 
12:28 PM
@amenadiel You would need memory retained between requests.
 
@SecondRikudo Mm.. I still sense a large dark hole in your heart :D
 
what if the model lives in an app and the controller communicates with it via websockets? you only instantiate the model once and the same php process keeps listening forever
 
@Naruto You have no idea.... cc @HamZa @Fabien
@amenadiel That would work, but like I said, hardly practical.
You might as well use Node or Java
 
I would rather do that with node.js but still possible
So frameworks, you da real MVP
 
12:33 PM
@amenadiel Basically, the workflow should be: request hits your "app", gets routed to "controller", "controller" changes the "model", "view" asks data from "model", "view" renders output.
 
or WWW as in whatever whatever whatever
 
"model" is responsible for storage
The principle is that "controller" or "view" are unaware of the actual logic being done.
 
@SecondRikudo controller passes data to the view, not view asking for the data, or am I wrong?
 
@SergeyTelshevsky Controller doesn't pass data to View.
 
@amenadiel technically you probably could do it with github.com/rdlowrey/Arya .. but in web it not a pragmatic option to begin with. Instead you would be using something like Model2 MVC, where model layers can be destroyed between requests and is a lot more friendlier for web.
 
12:34 PM
It can happen both ways
 
@SecondRikudo Someone didn't get enough love when he was young ;)
 
Nor does View ask for data from Controller
 
its funny that we call it the view and rendering
 
@Naruto I got enough love. That's the problem. Won't say more because spoilers :D
 
but controller can call view->setdata($data)->render()
 
12:35 PM
@amenadiel Nope. That's not the controller's job.
 
@SecondRikudo sorry, I mean model passes data to the view?
 
@amenadiel nope
 
Controller will make changes to the model
Afterwards, somewhere later
View will ask for data from the model
Neither are aware of one another.
Note the difference between web MVC and "real" MVC
With "real" MVC, you'd have the Model implement an Observable, and register the View as an Observer, and so any changes to the Model are instantly represented by the View
 
it makes sense. It's just that I'm used to dumb views that only render what the controller returns after interacting with the model
 
@SecondRikudo Well yeah You lost your loved ones and turned dark.. What A pussy :D
 
12:38 PM
I am back @RonniSkansing are you still willing to help me try to fix this error?
 
@SecondRikudo could you please explain the work "asks" in "view asks" in non web mvc?
 
@Naruto Not exactly. Again, spoilers.
 
I would just like to add that the response is not a view, it is a response, and the content of the response might have data for the view, but it is not the view
 
@SergeyTelshevsky Let's say that you have a gallery
User is viewing the gallery.
 
@Billy I am not sure how to help you. I am pretty sure I have pinpointed where the error is. Is there no way to configure the basepath of the plugin/imageResponssive thingy?
 
12:40 PM
The Controller doesn't do much in this case, the view will probably do something like $galleryTemplate->bind("images", $galleryService->getImages());
 
@SecondRikudo just like you said in observer pattern, the observable is sending the request to the observer to update itself, while observer is simply registering itself, isn't it?
 
@RonniSkansing Don't I just need to give it permission to operate where it needs to
?
 
@SergeyTelshevsky The observable merely notifies all the registered observers "I've changed!"
It's up to the overservers to do something with it.
 
@RonniSkansing I'm simple, but I'm not nice :-P
 
@SecondRikudo right, I understand now what you mean
 
12:42 PM
@DaveRandom You look nice in your photo :D
 
@amenadiel views are where the UI logic is contained. Views are often as complicated as model layer.
 
@Billy I am not sure, try it =]
 
That pic is pretty old (~3 yrs) but it's the best combination or recent and good
 
@SecondRikudo Damn you with your spoilers :P
 
@RonniSkansing I tried giving it 777 and it gives me 500 internal server error. That is why I was trying to turn on error logging earlier.
 
12:43 PM
Although now I look at it it looks like I'm licking a child's head
3
 
k guys, thanks for illustrating me
 
@Naruto If you want I can tell you all about it
 
But I am not confident setting correct permissions anyway so that is part of my problem
 
@Billy yea but what if the error is because the user does not have permission to create a folder?
you could make a new test.php file and test it right away
 
@Billy Just FYI, giving a directory 777 chmod is bad practice.
 
12:44 PM
@DaveRandom you need more skulls in the profile picture if you want to be more unnice
 
Don't do it unless you know what you are doing
 
@SecondRikudo I know! I keep asking what permissions I need because I don't know what I am doing
 
@DaveRandom You mean that you weren't?
 
@DaveRandom Ah man you come out with some amazing things sometimes :'D
 
@Billy Well, that depends.
 
12:45 PM
I like this chat room
 
@DaveRandom lol yes it kinda does look like that
 
Basically, 4 = read, 2 = write, 1 = execute
First number is owner, second number is group, last number is everyone
So 777 == everyone can read, write and execute
Including other users on your shared host
 
I know that. I don't understand what permissions I need to give to the file
 
For the record, octal notation should die
 
12:47 PM
it is a folder
 
@Billy Have a PHP file with just this:
<?php echo `whoami`; ?>
 
I don't even need to know that because My FTP allows you to change file permission by ticking boxes
 
Note the backticks around whoami (` and not ')
 
@SecondRikudo "sp" - the cpanel user
 
@SecondRikudo I've got 'time' today :P
 
12:49 PM
@Billy What about
 
@Billy PHP scripts should generally be 644 or 640, directories should generally be 755, 750 or 700 depending on what you are doing. Any other combination is unlikely to be the right one and generally indicates you did something wrong somewhere
 
<?php echo `ls -la`; ?>
 
PHP script do not need execute perms except under rare circumstances by people who know what they are doing
 
12:50 PM
@Billy Take this one for example
-rwxr--r--  1 sp sp     12475 Jul  1 13:36 adaptive-images.php
 
This hosting should be soo black listed
 
Owner can Read Write eXecute, group can only read, others can only read
So that's 744
 
@SecondRikudo notice he is trying to create the dir in the parent directory
 
@DaveRandom I regularly make PHP scripts executable!
 
If you're trying to create a dir, you need the parent directory to be writable to you
 
12:52 PM
@SecondRikudo I just changed to 644
My parent directory is 750
 
@Billy In that case if you refresh and view source, you'd see it's now -rw-r--r--
@Billy If it's owned by sp (which I'm guessing it is), then you should be able to create directories in it
@Billy Do you understand how permissions work? I know it's a bit of a confusing concept for someone arriving from Windows
 
lol
 
Sort of.. I'm getting it. I don't understand about groups
and, if I give a php file public write permissions, does that mean anyone can edit that file? Or does it mean that file can write any other file or something??
 
@Billy Permissions are not granted to files, they are granted on to files
If you make a file 777, it means that any user on the machine, even those who are not sp would be able to edit your file.
 
@salathe As indeed do I, but I, like you, know what I am doing :-P
 
12:57 PM
I see only two usecases for making a PHP file executable
Either you use it as a CLI tool
or you use it in cron
 
@SecondRikudo But other users can't see my files anyway how is that possible
 
@Billy Someone with ssh access to the machine can access it
That could be only the admin, or it could be any other user
 
I will learn about all this stuff another day
 
@Billy wp often has serious security issues which might allow for such things
 

« first day (1354 days earlier)      last day (3600 days later) »