logs archiveIRC Archive / Freenode / #php / 2015 / June / 26 / 7
ule
how can I see which encode a string are using?
NeoThermic|Work
mb_detect_encoding()?
pihpah
EdwardIII: what do you mean?
I got used to the console.
EdwardIII
pihpah: well, what are you using it for?
ule
NeoThermic|Work: I'll try.. thanks!
EdwardIII
pihpah: no i mean like what are you actually caching? what's the context?
pihpah
EdwardIII: just to test APC cache.
Figure out whats wrong
EdwardIII
like, if you try it in a more common context (e.g. behind apache with mod_php or whatever) does it just start working?
ule
caffinated are you there?
         

Chunk2
Is there a windows GUI for vagrant?
EdwardIII
ule: not caffinated enough
Chunk2: isn't that a better Q for #vagrant?
Chunk2
huh I thought that's what this was. sorry
ule
EdwardIII: lol
horsewhip
Chunk2: VirtualBox comes with a GUI? (If that's your VM software.)
Chunk2
It's not that I want the resulting system to have a GUI but I need a gui for configuring it. I'm trying to drag the head of the dev department into the 21st century and... he wants a gui
he thinks something isn't "professional" unless it has one
xa0z
Is there a way to make multiple php curl connections happen at the same time, instead of waiting for one to complete before making the second one connect?
sorabji
xa0z: there's curl_multi_exec
charginghawk
Chunk2: puphpet is a GUI for configuring
merkazu
Good morning all, does anyone have tips on working with longer scripts such as report preparation and CSV file packaging without having to continually extend apache's or php's timeouts as some reports could take quite some time?
xa0z
sorabji, ah, let me look that up. Thanks.
sorabji
xa0z: i'd probably look into guzzle if i were you though
charginghawk
Chunk2: if you want, you can download it and run it locally
Chunk2
charginghawk: huh now that's interesting
sorabji
merkazu: don't execute long running scripts from a browser
Chunk2
I had ruled out puphpet because it was a website and I didn't want to have to explain "Yes, we're sending details about our server to this random server. Is that a problem?
jtreminio
wait what?
sorabji
lol, trade secrets
shhhh, we use nginx
merkazu
yeah, I figured that much. but we're dealing with intranet users who wants to generate a report on stuff and would much rather not force command line usage
charginghawk
Chunk2: in that case, you can run it locally, open source ftw
         

jtreminio
Chunk2: you know you can set values that don't include passwords or anything important...
Chunk2
Yeah I really should have checked for that
sorabji
merkazu: use a queue or something. web request can put the job in the queue
assuming their on-demand reports
if it's a regular sort of thing, use cron
o god. they're
>.<
merkazu
shame!
:)
sorabji
(Action) hides
charginghawk
(Action) alerts the police
Chunk2
sorabji: I know. Nobody else knows about nginx or ... DUNDUNDUN... PHP FPM
...everyone thinks this stuff is voodoo here
(although I have to use apache)
merkazu
beware the voodoo?
EdwardIII
nginx is a god amongst webservers
charginghawk
the one thing that keeps me from hacking a site is uncertainty about whether or not they're using apache
Chunk2
lol how so?
charginghawk
jk
can you imagine?
Chunk2
Oh right sarcasm.
I was about to say isn't that sent with the headers...
horsewhip
Apache with mod_proxy_fcgi and PHP-FPM isn't that bad.
Chunk2
That's what I use
I just vastly prefer nginx
horsewhip
Nginx is much nicer to configure.
asteele
and also much more powerful, and performant
horsewhip
If they're both using Sendfile, there's not a huge performance difference.
... and you can't use Sendfile with VirtualBox shared folders :(
Chunk2
apache DOES manage to close the gap to a large extent using the newest MPM
the callback based one
SuperTyp
what does exec return if it fails and $output is not set?
AllenJB
Probably either null, false or an empty string. Try it and see =)
I'd use the return_var parameter to determine the success
midgetpower
Is there a PHP function that takes an integer in bytes as input and outputs a "human friendly" version? Like "100000000" would output "100 MB"?
AllenJB
midgetpower: I'm not aware of any native function to do that, but see the bytes2human function at: https://github.com/AllenJB/ci-boilerplate/blob/master/application/libraries/file.php
salathe
midgetpower: not built-in, but there are thousands of them on the internets
midgetpower
That code doesn't make sense to me, frankly.
Actually, it does.
Horrific formatting, though.
I wish I had a button I could just press to properly format code.
Instead of having to do it manually.
abs25
hello
why doesnt this channel open even though its on my autojoin list
bango2
you have to be logged in before you join
asb25
EdwardIII
midgetpower: most editors have a feature to do that
laszlof
any editor worth a grain of salt should have some sort of code formatting tool
either via plugin or otherwise
midgetpower
Notepad++.
I sure as hell haven't found such a feature in any program.
laszlof
.
you havent looked.
jimlei
midgetpower: netbeans, phpstorm, zend, eclipse, etc all have "prettify code" features. They even have pre set keyboard shortcuts to do so
laszlof
so does sublime text, komodo, atom, and brackets
and I'll bet if you dig around, you'll find a Notepad++ plugin that does it too
midgetpower
No such thing.
Especially not properly formatted.
laszlof
you havent looked.
cythrawll
most of the formatting is based on PSR-2, and in a lot of cases they are configurable
midgetpower, move goal posts much? first you said it didn't exist, now you say it doesn't do it right... whatever that means.
laszlof
fact is, you don't want to look it up or take the time to actually install it. Because it does exist, it took me 5 seconds of googling to find several options.
Bad_Advice_Cat
komodo edit has this feature.
Some does it automatically upon pasting code.
laszlof
I have to hit mine manually, but I prefer it that way
converge
my apache server is not reading <? its just reading <?php , how to fix it.. ?
« prev 1 2 3 4 5 6 7 8 9 10 11 12 next »