« first day (2239 days earlier)      last day (2703 days later) » 

12:16 AM
Anyone want to help me execute a batch file from a php script? Been exec/system/fopen arent working for me, no idea why.
exec("cmd /k batchpath.bat param1 param2") for example would work, right? in theory?
 
@JustinG whenever I have to use exec command I use a PHP class
created by someone on php.net
I don't find the link anymore but I can paste the code if you want
 
Yeah I'd like that, thanks
 
ah but...
it's only for linux systems ..
you are on windows right ?
 
Yup :/
 
argh
I don't do windows ^^
 
12:29 AM
Logically what I'm doing should work. Dunno where I'm screwing up tbh
 
exec and shell exec only works when god wants
 
The only explanation :p
 
it might be a permission problem
of your batch file
it's often the case
also be sure to use absolute path for everything @JustinG
 
Well I'm sure the path is correct, C:\Users\Administrator\Desktop\file.bat for example. Using the full path.
 
brb coffee time
 
12:33 AM
Alright
 
@JustinG and what about permissions of the file ?
 
let me take a look
My accounmt has full control
 
what about the system account ?
 
account* and I don't see a UAC prompt or anything
yeah, SYSTEM has full control aswell
 
you run apache ?
IIS ?
 
12:36 AM
IIS
yeah
 
I don't know how IIS works but the "IIS account or group" should also have the permission to execute the file
also I think you should change the location of your bat file
I see its on the desktop .. but the desktop of your server ?
 
Where do you recommend I keep it? Same directory as the php file?
 
are you programming locally ?
 
Yeah, just trying to get it to work at the moment
Well
 
the bat file cannot be anywhere it should be where your IIS server lives
 
12:39 AM
Alright, I'll try moving it
 
or for easier test although insecure , move it to your "public" folder of your PHP project
at least in your www directory
 
I moved it to the www directory
same location where my php file is
so now I'd use the local path? so exec("cmd /k batchfile.bat param1 param2"); ?
 
yeah I guess
 
Interestingly enough I now see "Windows Command Processor (32 bit)" open up in task manager
Doesn't seem to be running though
 
now you structure is : www/test.php and www/file.bat
right ?
 
12:43 AM
yes
 
I still believe you should check under which user IIS server runs and give that user execution permissions to your file
60
Q: IIS7 folder permissions for web application

AndrewI am using windows authentication without impersonation on my company's intranet website with IIS7. Under IIS7, what account is used to access the folder which contains my web app using these settings? Would it be IIS_IUSRS? Or NETWORK SERVICE? Or another I don't know about?

 
well there's only 1 user on the machine
i'll take a look
 
windows users accounts or services accounts are differents things
 
NETWORK SERVICE and IIS_IUSRS both have full control, still doesnt seem to be working
 
1:03 AM
ㅜㅜ
did you try to run your bat file directly from the terminal ? @JustinG
 
1:43 AM
best site for remote jobs?
 
Wes
2:01 AM
@bwoebi around?
maybe andrea? i think i've found a bug about ints/floats/intdiv but i can't reproduce it on 3v4l 3v4l.org/gRuTk
but i'm using a 7.1-dev version. what should i do?
 
@SalOrozco remoteok.io ?
 
thank you
any other site?
freelance sites
 
2:17 AM
@Valentincognito Yeah, works fine
 
what does php says when you echo the output ? @JustinG
 
i see it
 
Wes
2:50 AM
does exactly the same on php-src master @bwoebi 3v4l.org/gRuTk :| halp. i just compiled it...
 
3:45 AM
Colleagues, why does new \DateTime('m'); not throw? While it does when the argument is a 2 character long string
It returns
```
object(DateTime)#1 (3) {
["date"]=>
string(26) "2016-12-02 04:49:16.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
string(1) "M"
}
```
but what's the point of doing that?
 
Wes
i gave up understanding DateTime. we should all use IntlCalendar
 
4:38 AM
morning
o/
 
5:10 AM
good morning all
is there any way where I can convert printed array into normal array ?
 
5:27 AM
wow, this is a great tool for configuring a server simply, quickly and clean 😊, enjoy it ...
 
 
1 hour later…
6:50 AM
@Shafizadeh people are moving to rkt already
 
user7029249
0
Q: Filter results based on From & To Date not working if we remove HH ; mm : sec

abcdwe are Displaying From & To Date for filtering orders based on those dates. here 00:0:00 & 23:59:59 is displaying along with from & To date. [ hours : min : sec] but i want to hide : 00:00:00 & 23:59:59 , so i removed those text from code, after that Filtering based on Dates not working. i...

 
@Wes so, probably either the fast multiplication asm or the processor are broken… good luck figuring out what.
@Wes Are you by chance on Windows?
Because that Windows specific php-lxr.adamharvey.name/source/xref/master/Zend/… code looks broken
given that visual studio interprets long double as a 64 bit double today
which will lead to it giving bad results
 
7:08 AM
@Shafizadeh also, the idea of docker is microservices, not configuring servers… well, at least not if we are talking monolitihic servers with multiple services running on it. you can obviously do that with docker, but usually people use docker compose to knit together small containers serving one piece of a larger thing. A LAMP stack would be three containers, one running apache, one mysql and one php
 
is it good to use '{$result['key']}' I means curly brackets ?
 
@Wes I've annoyed Anatol with it now.
 
moin
 
7:28 AM
@SixthSense good for what? context pls.
 
in terms of good coding practice..
 
7:44 AM
morning
^ Why is something like that not pinned yet?
 
@kelunik it is pinned
 
8:01 AM
When I would like to move folders to an other one, like mv _target destination, you don't have the option to add a -r parameter right? What does that exactly do? ( Like in CP you do have that option. )
 
@kelunik I see no mailing list announcement?
 
@bwoebi Doesn't matter. php.net and the Twitter account have it.
 
@kelunik Doesn't matter, that's not official :-P
 
@bwoebi php.net is official.
 
8:08 AM
@bwoebi Ecelerity probably ate the mail.
 
@kelunik dunno, there are other mails coming in, so probably the daemon still lives
 
@Duikboot not sure what you are asking. cp -r copies directories recursively. mv will always include all the subfolders because it reassigns the location of the folder in the filesystem to a different place. you just move the folder node to a different position in the fs tree.
 
What makes you say it doesn't @JayIsTooCommon?
 
But what does that 'recursive' thing do? @Gordon kopy.io/PVeV7
What could be the difference?
 
@Duikboot recursive means it will also copy the contents of any folders and files within found within the directory you are copying, e.g. it's a deep copy. Without the -r flag, it will only copy the files in the folder. Again, think of the filesystem as a tree. cp just copies the leaf nodes. cp -r copies the entire subtree.
 
8:17 AM
@kelunik The PHP announcement reads like only syntax changes are true features … somehow.
 
@Duikboot in your linked example. cp- r will also copy ---/Folder1/001.jpg in addition to the files. Without the flag, it will ignore the folder and just copy the files in top folder, but not from any subfolders.
 
@bwoebi They are the interesting ones.
 
Meh
 
8:31 AM
gut moaning
 
Anonymous
@PeeHaa hm?
 
@Duikboot kopy.io/agtPG
 
Anonymous
moins
 
Anonymous
slack down?
 
@JayIsTooCommon nope
 
Anonymous
8:34 AM
'twas me
 
Morning
 
Sup Gordon
 
@SalOrozco the ceiling
 
What time is it there?
 
its not good at giving the time. It will always round up.
 
Anonymous
8:41 AM
does slack notify you when someone has edited a message?
 
@JayIsTooCommon no
 
Anonymous
crikey joe
 
@bwoebi Why meh?
 
mofrinday
 
Anonymous
moin davedo
 
Anonymous
8:50 AM
oh wow it's Friday
 
Anonymous
\o/
 
Hello, my name is Dave, I have come to have sex with your family.
3
 
!!friday
 
already friday evening here !!! beeeeeer time
in 25min and 4 sec
 
8:51 AM
apache is such a piece of crap
 
Anonymous
@PeeHaa Oi, get back here
 
Anonymous
@DaveRandom did you the vile I posted yesterday btw? the ruby thing
 
-1
Q: How to get back original array?

Sixth SenseI have array like this - Array ( [a] => apple [b] => banana [c] => Array ( [0] => x [1] => y [2] => z ) ) How can I convert it to my normal array or json ? array ('a' => 'apple', 'b' => 'banana', 'c' => array ('x', 'y', 'z')); Actually I am getting this data ...

why this is on HOLD?
its very simple question..
 
@JayIsTooCommon yeh I was on my phone and couldn't be arsed typing... wtf was that
it's not fucking code golf, there's no constraint on characters :-P
 
Anonymous
@DaveRandom It's a solution for advent code #1 :P
 
8:57 AM
@SixthSense it's not practical to parse print_r() output, don't use print_r()
 
Apr 15 at 9:40, by Jay
ffs. Ruby is a piece of fucking shit.
 
@DaveRandom then what will be the solution?
 
@SixthSense Where do you get the data from?
 
Anonymous
@kelunik heh, back when I was common
 
@SixthSense Where did the "data" come from?
 
9:00 AM
@kelunik its just script I wrote and printed that array . :(
 
print_r() output is not designed to be computer-readable. It will be simpler to hand-write it out as valid PHP syntax
and don't use print_r() to output something that you later want to use in a program
 
okay..
 
mornin
 
I just wanted to check whether data is getting collected in array of not so that I can process it for export functionality
 
9:03 AM
Morning all
 
posted on December 02, 2016

New Cyanide and Happiness Comic

 
@DaveRandom In that case better serialize than var_export.
 
@SixthSense well look on the bright side... it's not a mistake you'll make twice ;-)
@kelunik well possibly. I'm just sort of allergic to serialize(), I usually forget it exists
 
@DaveRandom Well, then don't suggest var_export. You need eval to parse that again.
 
@kelunik I use var_export() more often than serialize() (code gen)
 
9:06 AM
@DaveRandom For code gen it's fine, yes. But I use a custom thing there, so it uses short arrays syntax. :P
 
Yes I do as well actually (also for indentation reasons), but I still var_export() the scalars
 
moin
 
@JoeWatkins gratz on making an actual release :-)
 
@DaveRandom I should probably indent based on the length of the resulting string.
 
9:14 AM
Alright stop, refrigerate and listen https://t.co/MKsZGp1mpN
!!dad add currant / I recently swapped 100 raisins for 50 sultanas / I couldn't believe the currant exchange rate
 
@DaveRandom Ha ha ha! Brilliant! I'll save that one about currant for later!
 
var_export is fine ..it gives us exact array format
 
@SixthSense Yes it's fine for the things it's fine for, which it basically generating code and nothing else. If you are just passing data around, use something that does not require executing the string as code
 
@DaveRandom cool
@DaveRandom but at the end its giving , (comma) which is I think not required codepad.org/02IYmvpQ
 
It's not required but it's also not a problem
I tend to use trailing commas in array literals that I hand write, it makes copy and paste easier
In fact I wish you could put trailing commas in argument lists for the same reason
 
9:29 AM
means like functionname(a,b,c,) like this
 
Anonymous
@DaveRandom Sorry 3v4l.org/KkaBl
 
@SixthSense yes
 
@DaveRandom is there any technical importance?
 
@SixthSense no it's just ignored, it makes no difference to the result
 
@Danack E_CONTEXT
 
Anonymous
9:33 AM
@DaveRandom show off
 
@DaveRandom and it was also giving me parse error codepad.org/UliGTbnV
 
@SixthSense yes that doesn't work, I just wish it did
 
@DaveRandom poor guess
 
best way to implement a chat room with more then 50 users at a time.
 
Anonymous
 
9:34 AM
@SalOrozco IRC?
:-P
 
irc?
 
srsly do we really need another fucking chat platform?
buzzfeed.com/robinedds/… <-- some real gems in there
 
what if you dont know how it works.
You can implement irc into a php app?
 
@SalOrozco you mean you just want to build a chat platform to figure out how chat platforms work? In that case knock yourself out :-)
 
yeah
exactly
what i want to do.
 
9:36 AM
If you want to do it in PHP I recommend you take a look at github.com/amphp/amp
 
I read about storing users chat in a text to save server load.
other tutorials have you store all the messages in database.
 
@JayIsTooCommon removing of pings?
 
Anonymous
oh
 
Where is the reply?
> I thought it stripped replies?
I don't see it? :P
 
Anonymous
9:39 AM
i meant reply pings
 
Where is the reply ping?
 
Anonymous
am I missing something :P ?
 
Anonymous
The tweet has Tiffany in it's body
 
It first checks if it can find the twitter profile if not it just displays the name
That's not a reply fwiw just a text
@DaveRandom made it so with his last twitter rewrite
 
Anonymous
I meant the original message was a reply
 
9:41 AM
I was thinking about that last night
maybe we could add a --no-mention flag?
 
Anonymous
oh wtf, there's a part 2 to this
 
I don't think just stripping it from replies is the right solution, I'm pretty sure that has be good before
@JayIsTooCommon yeh there are 2 every day :-P
 
Anonymous
Ah well, I've had my moment ;-P
 
Señor Moment
 
@Gordon Ah I see
 
9:47 AM
@JayIsTooCommon I have no idea what you mean
 
@Gordon "moving to" means "using", right?
 
Anonymous
@PeeHaa ehhhhhh
 
I always felt like that OS was under the influence of... something
 
Fix PHP Timezone warning - can we directly edit in configuration file or is we need to change in php.ini file ?
i folowed accepted answer here : webmasters.stackexchange.com/questions/21460/…
is that wrong way ?
 
Aslam o Alaikum
%loading......
how i can get my own Youtube channel list in php
using google api
 
10:01 AM
@nsdlfefinedieicbe You can either set a server-wide default in php.ini or use date_default_timezone_set() to set a script default (personally I always do the latter anyway, so I always know what timezone my app operates in) - either way is perfectly fine
 
Just set it to UTC in php.ini
UTC is the only sane timezone for a server anyway
you adjust for local time on the client side
because that's where local time applies
Also UTC is the sexiest timezone. I would like to marry it.
 
what are the (dis)advantages of using yoda conditions in code?
 
Anonymous
@DaveRandom Yeah not a clue, stars are overrated anyway
 
%loading......
 
Thanks a lot @AllenJB @DaveRandom
 
10:04 AM
how i can get my own youtube channel list using google api in my php page
 
Search for "how i can get my own youtube channel list using google api in my php page" (https://www.google.com/search?q=how+i+can+get+my+own+youtube+channel+list+using+google+api+in+my+php+page&lr=lang_en)
• Channels: list | YouTube Data API | Google Develo… - 2 nov. 2016 - GET https://www.googleapis.com/youtube/v3/channels … Use the subscriptions.list metho… (https://developers.google.com/youtube/v3/docs/channels/list)
• PHP Code Samples | YouTube Data API | Google Deve… - 19 nov. 2015 - You can download these code samples from the php folder of the YouTube APIs …. Other… (https://develope
 
Anonymous
@BadshahSahib You've already asked that question
 
ThW
Morning
 
okay Thanks alot
 
10:06 AM
@SixthSense you cannot confuse it for an assignment. if ($x = 42) will execute, if (42 = $x) won't
 
@Sjon and that is the only advantage ,right?
 
@SixthSense yes
 
@Sjon The name for this programming style is derived from the Star Wars character named Yoda, who spoke English in a non-standard syntax.
hahaha
 
I don't think speech has syntax
 
@SixthSense Obvious is your remark
 
10:13 AM
this is like this ..okay I like this name Yoga and lets give this name to my next invention .. what a crap..
 
@JoeWatkins Congrats on the GA! :)
 
 
1 hour later…
Anonymous
11:29 AM
!!wotd
 
Faustian: sacrificing spiritual values for power, knowledge, or material gain.
 
page not found
then why it still shows in google searching
-1
 
It's a deleted question
the page is still there, 10k users can see it
 
@DaveRandom but it shouldn't be in search result of google
something like negative SEO for that?
 
11:44 AM
dunno about that. I don't know how Google works. it may be that if you pretend to be googlebot you'd see it
 
!!rebecca
 
@SagarNaliyapara you're not missing much
That's the only possibly useful thing from that question
 
@DaveRandom yup already got it... :-) Thanks man
 
Anonymous
Jira is the standard for decent issue tracking, right?
 
11:51 AM
@Jimbo phpuk.
Congrats btw.
 
@JayIsTooCommon Sure. My only advice about that is to use the self-hosted version. In the cloud version they make your data hostage and you have to pay for shitty plugins to make a simple query because you don't have easy raw access to your data. IMMV thou
 
@Danack Why did they announce it?
Oh they did
 
Anonymous
@pmmaga thank you
 
12:12 PM
Hi
 
Anonymous
mother fff
 
She is annoying
 
@BarneyStinson she is the patron saint of r11
 
@Gordon lol
 
12:22 PM
hahaha
 
12:34 PM
@FélixGagnon-Grenier this week I have been listening to Antimatter (melancholic rock)
 
Anybody here used amazonlightsail.com before?
Hey @tereško, I made up my mind to try out a VPS
amazon seemed to offer the most straight-forward deals.
 
@sweg_yolo_69 what do you mean by "before"? it was just announced and released yesterday at re:invent afaik
 
well ... my recommendation was digitalocean.com
 
@Gordon well I'm not sure what I was expecting
 
I guess that was not advertising in your vicinity
 
12:37 PM
I must've missed your message, though it looks like they have the same offers
Is there any particular reason you recommend digitalocean?
 
it's cheap and well documented
 
Much like @PeeHaa's mother
 
digitalocean has a reputation of knowing what they are doing and they have a good standing with the open source community, sponsoring events and stuff. also their customer support is quite helpful.
 
I too recommend DigitalOcean from my limited experience with them
 
I dont find them exactly cheap though
 
12:41 PM
I would rephrase to "good value for money"
 
Seeing that their hardware plans are the same as the amazon ones, I'll go for DigitalOcean based on your recommendation
I'll buy a 5$/month now, but can I upgrade it in the future while keeping all my data?
 
oh and they have a cute shark mascot
@sweg_yolo_69 yes afaik
 
@sweg_yolo_69 yes, but if you are running out of rive space, you can increase it independently: digitalocean.com/products/storage
 
Not necessarily storage, but if I want better performace(2 CPUs, more transfer data etc.). Basically upgrading from the 5/month plan to the 20/month for example
 
yes
 
12:48 PM
Great
I'm torn between using something like LAMP or going fully manual and getting Nginx with MySQL and PHP
 
I would recommend the latter
 
@sweg_yolo_69 Go manual, if you ever plan using PHP in production, Nginx and php-fpm all the way.
 
I'll keep my current site on GoDaddy until I've sorted everything out with the VPS, which will most likely be next year.
 
I'll read through that but I don't think I'll be using ArchLinux.
 
12:57 PM
@sweg_yolo_69 Go with debian/ubuntu
Better documentation altogether
 
Then again I don't need much from the OS
 
There ^
Note that this is an installation guide for PHP 5
So instead of PHP 5, just install PHP 7
The rest of the configuration should be exactly the same
 
Oh, it's great that they have a LEMP tutorial for most OSs
I'll manage with the versions
 

« first day (2239 days earlier)      last day (2703 days later) »