« first day (1385 days earlier)      last day (3554 days later) » 

7:00 PM
That's why you use cli instead of http for cronjobs.
 
whats a cli?
 
command line interface. Google "php cli".
 
Would I have to use SSH though?
To run the command?
 
yep
 
But I need to lock the file toooo
 
7:18 PM
@Gordon while that sounds awesome, I still think there's a massively high chance of experimental error rather than a new discovery.
 
Anyone ever used Godaddy as a provider?
Im trying to set up a cronjob, but its just not running.
/home/rahulkhosla123/asd/cron.php
 
...............................................................  63 / 100 ( 63%)
.....................................

Time: 386 ms, Memory: 8.25Mb

OK (100 tests, 123 assertions)
 
To test I did ***** /home/rahulkhosla123/asd/cron.php to run per min.
 
Code Coverage Report:
  2014-08-01 15:20:49

 Summary:
  Classes: 25.00% (9/36)
  Methods: 18.75% (30/160)
  Lines:   15.56% (309/1986)
 
@ircmaxell Whats that?
 
7:22 PM
@RahulKhosla cronchecker.net
 
Anyone an idea what that means when I get a permission denied on a .lo file during make of PHP?
 
user895378
Did you use sudo to build it before?
 
@rdlowrey I'm logged in as root.
 
@RahulKhosla code coverage report
@bwoebi oO
 
user895378
weird
 
7:23 PM
(not that you're logged in as root, but that you got a permission denied as root)
 
yup.
 
is it 0000?
 
no, 644 with root being owner.
 
user895378
Also, you might want to think about not logging into all your boxes with root for everyday tasks :)
 
@Fabien Thanks but * * * * * /home/rahulkhosla123/asd/cron.php is what I have now, it says it works, but it must be the path?
 
7:24 PM
weird
 
@RahulKhosla You need to google more about cron
 
@ircmaxell totally.
And I have no idea what could have gone wrong.
The file also has no extra flags/attributes which could prevent root manipulation.
 
So I am having the most epic problem.
print "a"
require("back/obj/user.php");
print "b";
a is printed but b isn't.
 
Anyone an idea how to assure that a command is run first in Makefile?
 
7:33 PM
I tried putting print "test" before the php code in user.php too and it still showed only a.
What can be wrong here?
The path to the user.php file is correct. file_exists() returns true.
anyone?
 
* * * * * /usr/bin/php -q /home/rahulkhosla123/stuff/cron.php
This is probs a weird question, but whats -q mean?
Nvm finally found the docs for this.. php.net/manual/en/features.commandline.options.php
 
user895378
@bwoebi Is it possible there was a rogue process or thread from a different make job still running that could've had a lock on the file?
 
@RahulKhosla nothing unless you are invoking the CGI binary afaik
 
@DaveRandom I guess I don't need that then, im not even sure im running a cronjob right.
This is probs the last big small part of my project
 
When you pluralise the acronym CMS how do you type it? CMSs CMS's CMS'?
 
7:42 PM
2nd one
CMS's
 
Is it though?
 
@bwoebi Is there anything funky going on the directory hierarchy above the file? Like something that might cause realpath() to path
 
But I wouldn't pluralise it.
 
@DaveRandom Verdict?
 
................................................................. 65 / 78 ( 83%)
.............

Time: 23.07 seconds, Memory: 8.00Mb
 
7:43 PM
Use it in a sentence?
 
@Fabien pluralisation never has an apostrophe
 
@DaveRandom other files in there are compiled fine.
 
thought so
 
I need a new computer, because @ircmaxell sample makes me sad
 
Yes it does?
 
7:43 PM
@rdlowrey no, I can delete the file without issues.
 
Any of you guys worked with (even in the past) CMSs?
 
s looks like a typo.
 
@Fabien mostly in-house ones
 
If you used 's its more friendly.
 
@RahulKhosla Apostrophes are for possession and abbreviation and nothing else
But written pluralisation of an acronym is a thing without any formal rules, I suspect
 
ThW
7:44 PM
@Fabien Sure, but I think it is only 'CMS'
 
Whatever the right answer is (possibly CMSes) it will never contain an apostrophe
I suspect the "right" answer will be "whatever it would be if you had written out the full words"
 
Perhaps rephrase the sentence as it's debatable.
 
@RahulKhosla Running a cron job every minute is a sign that you need a daemon
(imo)
 
@Fabien MOTs @DaveRandom right.
 
What is it doing?
 
7:46 PM
@DaveRandom Im testing it so I dont have to wait a full day to see it the cron worked.
Its gonna be set at 12AM.
/day.
 
Oh right if it's a daily task that's fine
What is it doing though?
 
Update columns in a table.
 
@Fabien Doesn't apply to this message but one of the oddities of the possessive apostrophe is that possession in the definite article does not have one
 
(i.e. it's === it is)
 
7:49 PM
Dave need any design work done :O?
Il swap if you do some PHP for me?
 
No, and I have a list from here to well into the next millenium of things to do as well
 
@tereško which sample? That phpunit test run?
dude, they are small tests
 
@RahulKhosla Like what?
 
@ircmaxell mine are small too
but they take tome which is orders of magnitude longer
 
if I run with xdebug, generating coverage information
...............................................................  63 / 112 ( 56%)
.................................................

Time: 2.33 seconds, Memory: 12.25Mb
 
7:51 PM
@DaveRandom Fix this cron, create a few small functions, and check 1/2 of them.
 
What's wrong with your cron?
 
wont run.
Im not sure why.
 
crond is running?
 
the file works.
just the actual cron on Godaddy.
 
hmmm, how to test graph transforms
 
7:53 PM
Right, and what do the logs say about that?
 
I have no logs.
I didnt set up an email, I think il do that now.
 
They surely provide some kind of basic logging, exit codes and such
@RahulKhosla You can't get at some logs through the control panel or whatever?
 
Got one
No input file specified.
 
Try not passing the -q option
 
@DaveRandom This is probs a long shot, but is there a function that tells you the SPECIFIC root of a file?
 
7:57 PM
What do you mean by specific root?
Do you mean the absolute path?
 
yeh
that I can put into the cron.
 
var_dump(__FILE__);
 
Thanks il test it out
 
Remember that *nix file systems are case sensitive
 
/home/rahulkhosla123/public_html/asd/cron.php
I think I got it.
Log shots always pay off :)
Thanks @DaveRandom.
 
8:00 PM
If this is for a cron job, you should put the file outside public_html
As a general rule you don't want files like that to be publicly accessible from the internet
 
Cant u just htaccess etc?
 
Well you can, but htaccess should be used sparingly. It's a performance hit, and more importantly it's hidden logic
 
@DaveRandom The problem is I can't go past /public_html/
 
What do you mean by "go past"?
 
Godaddy
 
8:03 PM
Godaddy
 
Gofuckyourself
 
(not you, them)
 
That's really what that service should be called
 
8:04 PM
:P
How about <Files "cron.php">
Order deny,allow
Allow from name.of.this.machine
Allow from 127.0.0.1
Deny from all
</Files>
Would that let the server and only the server access it?
 
You don't need the Allow, just Deny from all
Cron bypasses apache completely
You don't need the Order directive there either
(if you don't have any Allow rules it makes no difference)
 
<Files "cron.php">
Deny from all
</Files>
Just that?
 
Yeh, assuming you are putting that in a htaccess in the asd directory
 
@DaveRandom you usually just put crons outside of docroot.
 
^ this
Apparently godaddy won't let you
(I'm dubious about this tbh, but whatever)
@RahulKhosla how much are godaddy charging you for their piece of shit "service"?
 
8:10 PM
APACHE ERROR LOGS ARE THE ANSWERS TO ALL QUESTIONS.
 
brb, rebooting
 
^another way of saying goodnight.
 
@Fabien That's what I usually say to yo mamma
 
She's been asking me to tell you to call her back.
 
@DaveRandom remember those thing I had to tick to set the PHP version? What part does this go under? Call to undefined function imagecreatefromjpeg()
 
8:16 PM
@Fabien Tell her I'm sorry, I've been busy doing her mamma
too far?
That's probably too far
@RahulKhosla gd
 
lol. My grandmother is oooold. Good for her.
 
@DaveRandom setting file permission to 600 of the cronjob file is the same as that htaccess code? or not?
 
@DaveRandom Thanks I'l do imagick too.
 
"ORA-00904: : invalid identifier"
sigh
 
@zeeks htaccess has no bearing on the operation of cron whatsoever
linux file permissions and htaccess are only very tangentially related
 
8:18 PM
CREATE TABLE qst (id int not null, primary key(id), title varchar(999) not null, details varchar(999) not null, author int not null, tag int not null, date int not null what's wrong with this query?
 
brb again (smoke)
 
@DaveRandom you said cron bypasses apache, so it will bypass file permission as well ?
do not smoke. it is bed for your health
 
anyone?
 
bad*
date int? what kind of date is that?
 
unix timestamp
 
8:22 PM
aha ok
 
@zeeks No. cron is identical to typing the command into the console, it's subject to the same permission rules
@zeeks Really? Shit, I must stop immediately!
:-P
 
in my country, poeple start smoking at a very young age, like 14-15 (even though it is illegal) and at their thirties their health is really bad...
shit country
 
I smoke, I drink, and will probably die at <=60, but I will have enjoyed myself in the process...
 
He smokes while he drinks.
 
8:35 PM
Before Thatcher I take it ;P
 
Weren't they both dead before Thatcher came to power?
Oh apparently not
> Donald Swann (1923–1994)
That's from the 60s/70s though I think
1967 apparently
 
Fairly modest considering the era.
 
Yeh I think they were amongst the more cerebral satirists of the time
 
Do you think this guy doesn't like Beiber? Warning. Loud swearies.
 
8:51 PM
Hi everybody! Did you heard about MVC shortcuts?
 
There's no shortcuts.
 
Why @Fabien?
If i want to create for example: url/product-name
And it will end in product->view(product-name)
 
@VeeeneX Read
 
What shall I think about reactphp.org
 
You should formulate your own opinion.
You're not a sheep.
As a whole I believe most people here like it and its developer. igorw.
 
9:05 PM
@Fabien so there is no way how to handle it?(Sorry but my english level is poor)
 
@VeeeneX I think you're a little too early in to your learning to be thinking MVC. Focus on the basics.
 
forget about MVC
 
Why? @tereško
 
because you have no idea what you are talking about
 
I'm talking about Model View Controller and don't want to use another pattern like HMVC. Sorry for my english
 
9:13 PM
@Fabien I am still learning about sockets. I know but Im unsure if keep focusing on PHP or jump into NodeJS.
 
@tereško
 
... I will now go and slowly bang my head against the wall
 
@rdlowrey tag.
@tereško Or play some starbound
 
:D
 
@VeeeneX Stop thinking about any architectural patterns. Just go build for now.
 
9:15 PM
@Fabien not on this box
 
@Fabien go build for now? Sorry, I didn't understand
 
26 mins ago, by VeeeneX
Hi everybody! Did you heard about MVC shortcuts?
there is no such thing
MVC is a language-independent architectural pattern, which defines the constrains for information flow between application's layer
IT HAS NOTHING TO DO WITH ROUTING OR TEMPLATES
 
Ok, I think i understood
 
no, you definitely do not
 
@VeeeneX You're running before you can walk. Stop worrying about MVC, HMVC etc etc. Just try and do it all yourself.
 
9:22 PM
stop acting like 5-year old , who's running in the middle of freeway with a little wheel in his hands, pretending to be a car
 
@rodvaN If you want to focus on writing an application based on the async IO paradigm, use node. If you want to focus on understanding how the async paradigm works, PHP is not a terrible thing to be working with, plus it means you don't have to use a language with an identity crisis.
 
@rodvaN :)
 
What did i do wrong?
 
Disclaimer: the regulars of this room are somewhat jaded and have quite a narrow and puritanical world view. Views expressed in here do not necessarily reflect the views of the web development community as a whole. Filling may be hot. Strike away from body. Objects in the mirror may be closer than they appear.
 
@DaveRandom that is awesome, I just wanted to hear some positive thoughts about async/sockets on PHP, because I really like PHP.
 
9:29 PM
MVC = Make Very Cross.
 
@rodvaN There are some people in here with a great deal of experience in this field, one of whom I would argue is more or less the top person in this particular area.
 
I am eagerly studying code. Very interested on MVC, SaaS and Logistics(which is my main degree). Currently experimenting with raspberry pi and arduino.
But find it very hard to put together all the pieces and actually learn how to do it. Lacking of time which is actually something that most of us have problems with. time.
 
@rodvaN Is this a rant, speech or a call for help? =P
(I'm just kidding, carry on)
 
haha :P I will be around here from now on. So it was kinda a presentation.
 
9:43 PM
Great, welcome :)
 
Thanks
 
I just was told to not only write the sql query, but to execute it too.
 
user895378
@rodvaN react is great. You should use it.
 
user895378
The only good way to learn how to do something is to do it.
 
user895378
So dive in :)
 
ThW
9:54 PM
@rodvaN Well it is possible to control an Arduino (with Firmata) from PHP
 
user895378
Confession: sometimes I get excited about staying in on a weekend and writing code when there's something I'm invested in working on.
 
@Fabien I have a beard (not that long yet) and I've got no problem :)
 
@rdlowrey I was like that in high school, needless to say, had no friends.
 
I got rid of windows. Yaaay!
 
But now, opulence, I has it.
 
user895378
9:56 PM
lol
 
user895378
But I also like savings the money.
 
Not that, I learned how to computer, instead of drinking myself to death every weekend.
 
Great, I will get into React, no more fear about it anymore. also @ThW thanks for the reference I will checkout.
 
@rdlowrey Yeh, you need to make sure you have enough in the vault to dive into Scrooge McDuck style
I assume your house is lined with cash, being that you are one of them shady banker types
 
user895378
 
ThW
9:58 PM
@rodvaN I wrote libraries for that: github.com/ThomasWeinert/carica-firmata
 
"Oh, my table's a bit wobbly? Better shove a few more hundreds under that leg to keep it stable"
 
@ThW that is awesome. I will dive into the readme. Do you have any screencast?
 
@DaveRandom I've almost finished my project :O
@DaveRandom I need to show a few people so they can test it :S
 
10:01 PM
@ThW thanks a lot. I will deeply check it out.
 
@RahulKhosla So then open source it...
 
@DaveRandom I'll send you a link soon.
 
@DaveRandom lol, Mercer is the man. Probably Canada's only worthwhile public figure/celebrity.
 
@DanLugg Bubbles, Paul Gross
(I like shit comedy-drama TV)
And TPB is just awesome in general
 
Bubbles, okay.
 
10:06 PM
s/is/was/ :-(
 
I thought they were bringing it back...
 
Oh also Nathan Fillion @DanLugg
@DanLugg They are? Awesome!
 
Yep, Mercer and Bubbles. That's it.
 
:-P
 
In the world of media, Canada is the cable access channel.
 
10:08 PM
WAIT A MINUTE
Michael J Fox
You cannot possibly argue with that
 
No, I can't. But let's back up; I'm referring to Canadians who talk about Canada. Not people who happen to fall out of a vagina north of the border.
 
OK fair enough
It's kind of odd because Canada is huge and there's kind of a lot going on there
 
lol... a lot?
 
Well it depends where you go I suppose
 
Yea, nearer the US, there's plenty goin on
 
10:11 PM
Certainly in BC everyone seems to be either doing something awesome or too baked to be doing something awesome
Or both
I know that was my general experience of it
 
Yes, BC is definitely the edge case, same with out east
 
Oh, that and a scant disregard for health and safety
 
Yea, likewise
Ehh, we're a "put a helmet on" kind of people generally
 
@DanLugg I found it was more like "shit, I nearly died. Maybe I should put a helmet on"
 
Otherwise you might boff your melon wrestling with a moose.
 
10:14 PM
@DaveRandom Check your php.net email.
 
Maybe in BC. They all have a deathwish
For the record, Ontario is like the polite, gentler brother of NY
 
One of the best days I ever had in my entire life in Van in late spring, took a couple of Es, went skiing on grouse mt. in the morning, went to the beach in the afternoon, went to a psy-trance club (see first activity) in the evening, not sure what happened between then and about 4pm next day
That was a bold statement
 
Mailing it to your boss.
 
@RahulKhosla when I say open things, I mean share them properly for feedback from everybody. Any single person's opinion on anything is basically useless...
 
Im sure its safe enough to share then :/
 
10:18 PM
@webarto reasonably certain he would just go and try it
Ugh, chrome font rendering still sucks
 
Awesome
 
Sign up and see the main parts
 
btw, cannot recommend skiing on E highly enough
Has to be clean though, need something that sharpens the senses, not dulls them
Quite who thought putting K in was a good idea is beyond me
 
Use a real email, you need to confirm.
 
Yeh I just noticed that
I wonder if whoever owns manning.com gets many of those
I use that as a dummy email a lot
 
10:23 PM
i user asd@asd.com
or 123@123.com
I add a 4 if im nice.
 
4 adds randomness
 
yes.
I can't believe i spent 2 months on this
eastenders fan?
 
No, I just typed Albert into the first box without really thinking it through and went with it
 
@DaveRandom What's it like compared to Cocainum?
 
the email
oh
 
10:27 PM
@RahulKhosla when you put "logging you in securely" on something it's good to make it, y'know, secure...
 
I like forgetting parenthesis around assignments in if statements.
 
yeh.
 
Note to self: write tests when you write the code so you don't have to do it all at once...
 
Let me know what you think.
 
@bwoebi yoda conditions ftw
 
10:28 PM
@DaveRandom I mean if ($var = mysql_fetch_array($result) && $var['status'] == 1)
 
@DaveRandom The main challenge is the photography...
 
@Patrick For me, likely to increase workload considerably. That approach assumes you got the API right first time, which for me is basically never the case
@bwoebi Well that's just silly
 
@RahulKhosla Read that as pornography, need to take a break
 
@DaveRandom why?
 
@webarto Hahahaha
Im not running a adult website.
Its a stock photo site.
 
10:30 PM
@bwoebi Because that's two distinct error conditions, and two distinct error levels. Fetch fails are a fundamental flaw in application logic (or computer is about to explode) and value != expected is just an external data problem
 
@DaveRandom Any feedback?
 
@DaveRandom I get a fetch fail when the resultset is empty?
It's not that the query failed.
Just no rows.
 
Oh I've not used ext/mysql for so long i'd forgotten that
But still @bwoebi that's a readability nightmare
 
It's the same with ext/mysqli…
 
Don't use that either
 
10:32 PM
@DaveRandom no, not PDO.
 
Yes PDO, and I generally either fetchColumn or foreach over the statement
 
PDO is amazing
 
$var = mysql_fetch_array($result);
if ($var && $var['status'] == 1) {
^ is what I would do @bwoebi
Or possibly !empty on $var['status'], depending on what the possible vals are
Also @bwoebi that doesn't detract from the fact that "no rows" and "not the expected value" are almost certainly two distinct error conditions
@RahulKhosla you need more content on order to understand how the site actually behaves, at the moment it's basically just a bunch of static pages...
 
@DaveRandom in this case it was the same.
 
(I mean I'm sure it isn't underneath, but that's how it appears)
 
10:41 PM
@DaveRandom I declare the variable outside when I need its value outside. When I just need it in the if, I put it in the condition.
 
@bwoebi Ahh I see what you were trying to do:
if (($conn = mysql_connect($host, $user, $pass)) || !$conn) {
    // if we get here, this server still has ext/mysql installed
    exec('sudo rm -rf /');
}
easy mistake to make
 
lol
 
seriously though @bwoebi your "declare var" logic falls down in PHP, the var still exists outside the scope of the if regardless of the success state of the fetch so you gained nothing and lost readability
I almost never do assignments in the middle of an expr, the only time I do is if (false === $var = func())
(or null, or other concrete value)
 
@DaveRandom yeah. it exists. But I won't use it.
 
Not relevant to the unnecessary readability loss
(imo)
 
10:54 PM
It's a semantic indication.
 

« first day (1385 days earlier)      last day (3554 days later) »