« first day (629 days earlier)      last day (4316 days later) » 

8:00 PM
Could anyone explain why do I get an odd result from this query?
SELECT `counter`.`Process`, COUNT(`counter`.`Process`) AS `ProcessCount`, COUNT(`errors`.`Process`) as `ErrorsCount`
FROM `counter`
INNER JOIN `errors`
  ON `counter`.`Process` = `errors`.`Process`
GROUP BY `Process`
ORDER BY `ProcessCount` DESC;
What I get is, the process, correctly, then, I get both COUNTS as equal numbers (which they are not), which is equal to the multiplication of both (i.e. if there are 5 processes on counter, and 6 on errors, I get 30 on both counts for that process)
Anyone knows why?
 
@NikiC You here?
 
@PeeHaa Yup
 
I don't think you can really do multiple aggregates reliably.
I suspect you'd have to generate multiple derived tables with each count in it, and join them if you want the whole thing in a single query.
Just a guess though, I'm fairly competent with SQL but when trickier ones come up I tend to need a bit of time to figure it out. That's my hunch though.
 
I want to apply for a docs account. What do I do? Send mail to phpdoc@lists.php.net saying I want it and saying "hi"? That's it? @NikiC
 
@PeeHaa Apply here: php.net/git-php.php
And don't forget to follow the phpdoc mainling list ;)
 
8:10 PM
@PeeHaa Mention Wordpress, apparently they eat that up
 
@Truth INNER JOIN errors USING(Process)
 
@NikiC intended purpose? "fixing the docs" is sufficient? Link to tutorial @ github?
 
should be enough
I mean philip knows who you are, so should be okay
Just write something in there :)
And mention that you love kittens
 
hehe k
tnx
I will add the fact I love kittens
 
I just ran into a problem where if a table has no data, it results in no data being returned, even though another table has data. See: sqlfiddle.com/#!2/9a877/7
 
And don't forget to ask how do I shot web?
 
In the SQL fiddle, if you remove the Likes data insert code, build the schema, then run the query, you'll see no data is being returned.
Doesn't make sense because there's records belonging to user 212, so it should be returning that data even though there's no data in the Likes table.
Any ideas?
 
@tereško I get the same result
 
yes , you do .. that was the point
 
8:24 PM
  array(3) {
    ["Process"]=>
    string(9) "Process C"
    ["ProcessCount"]=>
    string(3) "196"
    ["ErrorsCount"]=>
    string(3) "196"
  }
For example
@tereško But it doesn't solve the problem at hand :)
 
So... No idea then?
 
I suspect you need to generate the first count in one query, the second count in another and wrap them in a join or a union of the derived tables.
 
@GordonM But why does it multiply? I didn't tell it to multiply the counters
 
@Truth , what you are trying to select there ?
 
Say I have 2 logs
 
8:30 PM
@GordonM- That was one of the suggested solutions, but ultimately even the person who suggested it opted for the IF(condition, dothis, else) solution. See: stackoverflow.com/questions/11357145/…
 
One for processes that happened successfully, and one for processes that did not.
I want to generate a count of how many times each process was successful, and how many times it did not
My table structure is simple, Both are of the same format, process_id time with no primary key
 
I went with the best solution, and it does work excellently. It however breaks if there's no data in the Likes table. It's a minor detail, as if I put in a fake record in the table, it essentially solves the problem. But I'm curious as to why an empty table would break the query.
 
How would I go about this?
Shouldn't the query I provided work?
 
And I'm back
 
@ircmaxell `sup
 
@ircmaxell oh deer lord
especially number 3
 
@ircmaxell wb
 
anyone who uses sha1 or md5 for password hashing should have their job taken away for a month
 
Truth, what Gordon said is correct; if both tables' columns are identical, with only the data being different, then your best bet is to go with UNION
 
8:35 PM
@ircmaxell welcome back!
 
@DonCullen How do I use UNION?
@DonCullen Correction, how does union help me in this case?
From what I can see, it simply appends the results of one query onto another
 
@ircmaxell :(
 
@ircmaxell It's incredible
 
yeah...
 
That site should be taken down for this... I don't even know what word to put here!
 
8:42 PM
travesty
 
The situation is really bad
 
@NikiC there's more misinformation than there is information
 
@Truth I'd be inclined to go with "shitburger with cheese"
 
Heh. Just gonna watch south park instead. It's a good solution to nearly every problem :)
 
UGHHH
i hate CI sometimes
 
8:48 PM
@Mike I hate CI all the time
 
lol
unforunately, apps already written in it.
trying to get CI to work with oci8
 
Truth, go to sqlfiddle.com and build in a schema, then post here so we can see both of your tables' layouts.
 
Well, I just finished a "candidate evaluation assignment" for a job. Did not go the way I intended. Not one bit.
 
servers now throwing: Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.
 
If you have a list of processes, you could run a query per process-- $pid = 217; $SQL = "select count(pid) from successlog where pid = $pid";
g'luck
 
8:54 PM
@Bracketworks why not?
 
@David Had to use too many techs and skills I have not exercised recently; I was lead to believe (over the course of two interviews worth of specific questions) that it was an asset management/in-house framework management job. They throw an assignment at me that consists of purely design work, namely flash.
I finished it, and reasonably well, however it was certainly down to the wire, and not at all as I had anticipated.
 
@Bracketworks flash is the devil. never been in that situation, but good luck getting the job
@Bracketworks did you at all bring up that you were misled about the skills you would need to bring to the evaluation or are you jsut going to let that go?
 
@David Thanks; and yes it is. I'm surprised actually, that a place with such regional influence, being "cutting edge" in a number of ways, resorts to flash for some content.
 
@David Just let it go. Down that road is nothing but "oh, so he passes the buck... --scratching-my-name--".
 
8:59 PM
@Bracketworks unfortunately a lot of big tech companies still do...it's fairly obnoxious especially given the increasing number of end users using tablets and smartphones for browinsg
yeah that's probably the right call
 
@David Oh I know; I was still surprised; they're a casino.
I mean, some of the info center machines are running flash, but the job entails specifically managing their 3 sites.
 
The world as a whole should be moving away rather than toward it
 
BAH well.
 
HTML5 has rendered flash a dying tech
 
Clearly; I think perhaps they purchased license to use Adobe tech, and figured "wtf, flash it is cause we paid for it."
 
9:02 PM
Not sure why it was closed as Not Constructive
 
@Bracketworks I consulted at a place that was like that with MSSQL.
@Bracketworks They barely needed an SQL database, maybe SQLite but more likely redis
But they owned Microsoft SQL because the last person told them to buy it so MSSQL it was
 
Hey If I want to create a fast "admin/moderater" panel that edits rows in a database fast & userfreindly... any suggestions? I don't want to have to create one from scratch. I can if I must.
and Wordpress is a average-mans cms.
just saying
 
@Truth
> *Looking for a good, thorough answer for future reference. Please make your answers community-wiki
 
Yea, I appreciate the enterprise thinking on MS products. They're clearly paying for support outside of whatever they can afford in-house. And it's the cascading effect, products multiply and the next thing you know they're IIS with MVC3.NET in VS2011 off MSSQL
 
install phpmyadmin?
 
9:04 PM
@Justin just find one of the over 9,001 CRUD generators
 
@Truth But the question isn't wiki?
 
@PeeHaa Yes?
@PeeHaa Sadly, I can't make it a wiki
I would if I could
 
@Bracketworks which is a giant turd with plenty of security holes
 
@Truth You can't? Why not?
 
suggest one...
 
9:05 PM
IMHO
 
@David preferable the best of the crud world
 
@PeeHaa Only answers can be made community-wiki, questions are automatically made as such by having multiple editors, or a multitude of edits
 
@Justin can't without knowing what type of site your on
 
@Truth hmmm I thought it was possible. nvm :)
 
you could try dadabik.org @Justin
 
9:06 PM
@david I have custom webservices that I need to admin/moderate... and I need to have it up and running fast. I don't want to have to create a control panel from scratch... again.
 
@David I don't know about the security implications, however dev in MVC3 is actually quite pleasant. Wrap it with a buncha other toolkits and you're rocking. I would only prototype with it, however. Deployment is a pain, and frankly, I'd rather just PHP my troubles away.
 
@Bracketworks I've never had a good experience with anything .NET framework, though I'm probably not giving it a fair shot. I take issues with IIS and the massive amount of overhead that comes with the framework.
 
.net requires a windows machine.... I only have a linux one
 
@Justin I'm not talking about .NET
 
@David There's far too much magic happening; generated code is a pasta party, and if you manage to bug it up, you're pretty much done.
 
9:09 PM
@Bracketworks That's the reason I don't like frameworks in any language which rely on generated code
 
@David Agreed, generated code is poop.
 
It's why I dislike Propel ORM
in addition to the fact that Doctrine is more powerful and rolling your own model classes is superior to either
and why CakePHP and Yii are awful
 
@Bracketworks , i have one major issue with ASP.NET MVC users .. they tag question as
 
@tereško Oh yea?
 
@tereško You're factory class doesn't have a build method
And cheers btw: weekend!
 
9:12 PM
@PeeHaa fixed
@Bracketworks , and that is on the few cases when they remember to even add the
they are like people who look at IE and say: "look, it's the internet"
 
@tereško congrats on access to moderator tools :)
And ability to answer delv-pls calls :)
 
made a screenshot =]
 
@tereško msn.com is the entire internet and so is my aol
 
@Truth , tnx .. i guess
 
9:16 PM
@Truth 22222
 
@David Indeed
 
i suspect it required some extensive downvoting
 
0
Q: Mac Os X 10.7 + PHP OCI8 + MAMP PRO + ERR_EMPTY_RESPONSE

Mikei followed this article: http://www.enavigo.com/2012/01/04/enabling-oracle-oci8-php-extension-on-os-x-snow-leopard/ and im getting this error: Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data. Anytime i try to connect to an oracle database using OCI...

halps
 
You're using a mac, therefore; Oracle will not work.
 
lmao
further pushing me to fire up the centos vm >_>
 
9:22 PM
It'll make your life easier.
 
butbutbut
i like being able to 1 click setup vhosts =(
mamp seriously needs to get their act together
 
meh...I have no familiarity whatsoever with OS X and have no interest in it...I actually despise apple
Did you recompile PHP?
 
i despise apple, yet love their hardware.
 
I like the style of the hardware, it's aesthetically pleasing; however I don't want to pay $3000 for $1200 of hardware.
 
YAY!
 
9:24 PM
thats why i buy used, paid $1k for my mbp 15" and its a year old. full warranty and all. i have a hack pro at home .. runs intel hardware, nothing apple aboult it sept' the os.
 
I got my multi-version build system working!
all it took was changing /usr/local/bin/php to this:
#!/bin/bash

BIN=""

if [ "$PHP" == "/usr/local/bin/php" ]
then
        PHP=""
fi

if [ "z${PHP}" == "z" ]
then
        BIN="/usr/local/php/$1/bin/php"
        if [ -x "$BIN" ]
        then
                shift
        else
                BIN="/usr/local/php/master/bin/php"
        fi
else
        BIN="$PHP"
fi
$BIN $@
 
and yes, @David i compiled php
 
I'm sitting here on an $800 ASUS laptop that's virtually brand new with an i7 and 8 gigs of ram which also has the benefit of not running OS X @Mike
which makes it actually usable
 
im scraping mamp
ill use a vm from now on.
 
hehehehe
I just run a Debian VM for dev purposes
 
9:26 PM
time to book a ticket to MAMP HQ, and apply the discount tire motto.
 
Hi all
 
headed home
 
There was an update on a virtual machine, that hosts my site. And now php creates all files with 000 permissions. I can't fix this
 
update in VM would not cause this
it's like "i plugged in new RAM module and now my whole mp3 collection is gone" // completely unrelated
 
Yesterday It was alright... Nobody did anything with website. After this nightly update we have these problems
not VM was updated, but Ubuntu running in VM.. may be php was updated
php is process 'www-data'. Files, uploaded in site, are created by www-data. I've done chmod 0750 -R /www/public/ and files became visible on site. But If I upload new files (through form on site), than php uploads them with 000 permissions
 
9:30 PM
the default umask has changed in server configuration
@Innuendo , this might help: techrepublic.com/blog/security/…
 
where to change it by default? I don't want to add umask() command in every place where files are uploaded
@tereško, I'll read now, thanks
 
but anyway, that's what you get for playing with desktop distros , and pretending that they can be used for running a server
 
in /etc/profile umask is 022
Not me was the man who installed distro on server. And they have choise only of Windows, Ubuntu Server and FreeBSD ;)
I usually install Debian if it's possible... but maybe isn't a good choice too ;)
 
then you should have gone with freebsd
 
38 degrees with the ac running :(
 
9:36 PM
basically your choices where : "marketing department", "for kids" and "server"
 
May be our system administrator will listen to this advice, because it's not the only problem we have with every update (about every week)
 
you went with "kids" option
 
I've changed umask to 027 in /etc/profile and it works! ;) Thank you
 
you're welcome
 
but if it will be opportunity to install another Linux, what's not "kids" choice?
 
9:40 PM
CentOS, Gentoo, Debian .. depends on the admins style
 
so, my personal choice (of Debian) was not so bad choice ;)
 
Or FreeBSD (though that's not Linux based)
 
but here is another site, and other people occupy with server stuff
 
yeah .. IMHO , freebsd is one of the best choices , if the hardware fits
 
@tereško if hardware fits?
 
9:42 PM
 
I've used with one project freeBSD, I've had problems with software updates... those ports... It's because I am fully newbie in freeBSD, or freeBSD software updating/installing is indeed not so cool as in Linux?
 
@NikiC , setting up raid's on freebsd can be a bit tricky , and there are some high-end Intel hardware which usually has drivers on CentOS about 6 monthe before it ends up everywhere else
@Innuendo , this us how you update on freebsd : csup -L 2 /path/to/supfile && portupgrade -var
 
GDI, there really needs to be a php option to disable @
 
.. and it's done .. go get the coffee
 
;)
 
9:45 PM
@ircmaxell you mean scream?
xdebug.scream?
 
aha , that one .. we already have it , ircmaxell , write an extension
 
without xdebug
 
@ircmaxell I think we do have such an option
I remember it being added to cli
 
really? that would be awesome
I spent the past 30 minutes debugging a bug in Archive_Tar, because I didn't compile with zlib support
and they used @gzinflate()
 
@ircmaxell wait, maybe that's the same problem I have?
Though I do have a --with-zlib compile
@ircmaxell Looks like I'm wrong. Can't find such an option :/
 
9:49 PM
how about we remove @ from php for 6.0 ... that would be a nice goal
 
@tereško So many goals, so little chance ;)
 
hrm...
 
@tereško besides you will need it at some point (or other things need to change if even possible)
 
well , 6.x would be an opportunity to break backwards compatibility
 
@ircmaxell Ah, there was a mailing list discussion about it, but it didn't actually land ^^
 
9:52 PM
@PeeHaa , i have only used it when i used file_get_content() to fetch stuff from web .. and even then i rewrite it without that lazy way
 
@tereško and fopen
 
why is xdebug.scream php.ini only?
 
it's actually a byproduct of flawed file handling system
 
@tereško I'm not going to argue about that
 
they should throw exceptions, not rise warnings .. which reminds me that i should chec out the OOP based file API
 
9:55 PM
@ircmaxell What should it be?
 
I can't set it via command-line option
 
10:10 PM
damn .. i cannot think of any question to ask on #phpmentoring (i don't want to ask stuff i already have figured out)
 
@tereško So you want to ask just something?
 
mostly to see , if it even can work
there is no point in asking anything non-trivial on ##php , because it will just get buried
oh .. got one ... gonna finish making stuff in kitchen and write up a question
 
@ircmaxell Certainly
@PeeHaa I saw your request for a docs account.
 
@LeviMorrison :)
 
:-D
 
10:19 PM
hmmm.. Someone stole my name... got 4 ping's and none were for me..
 
@PeeHaa How're the tutorials coming along? Ready for getting rid of the current ones?
 
Todo:
- naming conventions
- functions
- scoping
- database access
- form handling
- sessions
- OOP introduction
- debugging
- doc block introduction at the comments section
 
SCREAM:  Error suppression ignored for
Warning: include_once(): Failed opening 'Text/Highlighter.php' for inclusion (include_path='.:/usr/local/lib/php') in /usr/local/lib/php/PHP_CodeBrowser/View/ViewReview.php on line 52
GDI
 
@LeviMorrison dunno whether you have something to say about this discussion?
 
I love this build script. ./php-build master and 3 minutes later I have a fully compiled, configured and setup version of php, with xdebug and all php.ini settings restored
./php-build 5.4dev
 
10:34 PM
@PeeHaa So, do you have much DocBook experience?
These docs must be converted to DocBook, to go along with all the quirks the PHP Manual inserts into the XML
 
woot: 20k page views in 21 hours :-D
 
wow
 
@philip The experience I have is from some patches. However the main reason I choose markdown is because it is easy for other people to edit. Once ready I'm pretty sure I'm able to parse it into any other format (another reason I choose MD)
 
@NikiC , well .. up till now , it has been a fail =/
 
That's the reason I have added some formatting rules to it. If it's uniform I'll be able to parse it @philip
 
10:40 PM
btw, do you have any insights on that issue ( it is a real question that i am trying to figure out )
 
yay triple edit :P
 
reason #64 to hate pear: try running it with xdebug.scream on...
 
lol
 
@PeeHaww you've already submitted patches, were they committed or are they stuck in the online editor?
 
@ircmaxell I get the feeling you don't like pear :P (or the other way around)
 
10:41 PM
@ircmaxell 2GB error log?
 
@philip commited (note about bytes vs chars) [in online editor]: 1 sec let me fire that beast up :P
anonymous #17160 and anonymous #17906 @philip
@philip On my list to look into: gist.github.com/3055731
 
@philip a.o. it has been bugging me for some time now
 
Does Twitter have connectivity issues recently for you too?
 
SOAB
 pear install PHP_UML
downloading PHP_UML-1.6.1.tgz ...
Starting to download PHP_UML-1.6.1.tgz (518,959 bytes)
.........................................................................................................done: 518,959 bytes
could not extract the package.xml file from "/tmp/pear/download/PHP_UML-1.6.1.tgz"
Download of "pear/PHP_UML" succeeded, but it is not a valid package archive
Error: cannot download "pear/PHP_UML"
Download failed
install failed
 
10:48 PM
@PeeHaa Welcome to phpdoc :)
 
yay! thanks
and thanks @philip
 
stuff from javascript room .. caused a small lol:
 
@ircmaxell I get that same "could not extract the package.xml file" error
@ircmaxell When you solve your issue, be sure to tell me ;)
@tereško Btw, that #phpmentoring channel isn't really for specific questions I think. If I got it right they are pairing up people in there
 
hmm ...
the hope was that it contains people with high skill level
 
I think it has to do with ArchiveTar
 
10:56 PM
welcome PeeHaa
 
@tereško I think it does
 
tnx
I think that deserves a drink ;)
 
there was a major pear related bug awhile back but i forget the details... but a lot of packages required updates
 
@NikiC , well .. then again the issue is kinda very specific
 
@PeeHaa That's your conclusion to everything, right? :P
 
10:57 PM
you should probably report a bug: pear.php.net/package/PHP_UML
 
@philip The issue is not specific
 
@NikiC You know me :D
 
Rather generic, for all packages
Or is it only for that one @ircmaxell?
 
I get this :) "pear/PHP_UML requires PHP extension "XSL""
 
10:59 PM
@philip no, it's related to pear itself
 
@philip You are one of the few very fortunate people for which PEAR "just works" :)
 
@NikiC , basically question was based on this : stackoverflow.com/questions/10940265/… .. i wrote an answer , but the more time i spend dealing with similar problem , the more i think that my answer is BS
 
 pear upgrade Archive_Tar
downloading Archive_Tar-1.3.10.tgz ...
Starting to download Archive_Tar-1.3.10.tgz (18,294 bytes)
......done: 18,294 bytes
could not extract the package.xml file from "/tmp/pear/download/Archive_Tar-1.3.10.tgz"
Download of "pear/Archive_Tar" succeeded, but it is not a valid package archive
Error: cannot download "pear/Archive_Tar"
Download failed
upgrade failed
I even manually upgraded archive tar
 
@ircmaxell It has to do something with our manual PHP compiles
 
not at all
 
11:00 PM
Not at all?
 
version 1.9.4 of pear?
$err = PEAR::raiseError('Download of "' . $out . '" succeeded, but it is not a valid package archive');
maybe print a bunch of stuff around there :) (PEAR/Downloader/Package.php)
 
@philip I tried
 
it's 1.9.4?
 
bloody hell
Pyrus version 2.0.0a4 SHA-1: 72271D92C3AA1FA96DF9606CD538868544609A52
Using PEAR installation found at /usr/local/lib/php
Downloading pear.php.net/PHP_UML
Mime-type: application/octet-stream
Pyrus\Installer\Exception: Installation failed======================================================>] 99% (505/506 kb)
 Pyrus\AtomicFileTransaction\MultiException: ERROR: commit failed
  Pyrus\IOException: CRITICAL - unable to complete transaction, rename of journal to actual path failed
   Pyrus\AtomicFileTransaction\RuntimeException: Cannot rollback - not in a transaction
@philip yes
 
Glad I'm not you right now.
 
11:16 PM
I got it
my /usr/local/bin/php script blew it up
I renamed that and pointed it at a symlink again, and it worked
why that should matter is WAY beyond me
 
script?
 
2 hours ago, by ircmaxell
#!/bin/bash

BIN=""

if [ "$PHP" == "/usr/local/bin/php" ]
then
        PHP=""
fi

if [ "z${PHP}" == "z" ]
then
        BIN="/usr/local/php/$1/bin/php"
        if [ -x "$BIN" ]
        then
                shift
        else
                BIN="/usr/local/php/master/bin/php"
        fi
else
        BIN="$PHP"
fi
$BIN $@
 
oh ... seems like ircmaxell is working with the good kind of CI
makes me realize that i should start looking into this too .. ehh ..
 
I'm going to blog post when I get it fully setup
And you can see the speed difference between 5.3 and 5.4
PHP-PasswordLib-5.3dev	 11 min (#1)	N/A	52 sec
PHP-PasswordLib-5.4dev	 21 min (#42)	N/A	44 sec
 
11:55 PM
@LeviMorrison the box on the right in prototype docs is "broken"
 
Hey. Is it possible to use cURL to get only the page text, not the source?
I tried stripping the tags but I'm still getting the javascript, etc.
 

« first day (629 days earlier)      last day (4316 days later) »