Questions tagged [k2f]

K2F - PHP framework; write once, plug anywhere.

K2F is a brand new framework for helping people write web apps rapidly with the right tools while at the same time having the ability to make your apps run on different systems (CMSes, CRMs etc) without changing a single line of code.

4 questions
9
votes
4 answers

Proper shell execution in PHP

The problem I was using a function that made use of proc_open() to invoke shell commands. It seems the way I was doing STDIO was wrong and sometimes caused PHP or the target command to lock up. This is the original code: function execute($cmd,…
Christian
  • 27,509
  • 17
  • 111
  • 155
8
votes
3 answers

PHP proc_open opens multiple times

I have a utility function used for executing a program through CLI (cmd, bash etc). It returns an array of 3 items: STDOUT, STDERR and EXIT CODE. So far, it's been working nicely without issues. In fact, the problem I have with it doesn't really…
Christian
  • 27,509
  • 17
  • 111
  • 155
4
votes
3 answers

PHP strange DOCUMENT_ROOT

So basically, I'm writing a framework, and as part of it features, it's supposed to provide a set of well-established URIs/paths to the end-developer. Some two of these paths make use of $_SERVER['DOCUMENT_ROOT']: /** * Absolute filesystem path to…
Christian
  • 27,509
  • 17
  • 111
  • 155
1
vote
4 answers

Using eval() to enhance security

I admit the title is mostly a catch 22, but it's entirely relevant, so please bear with me for a while... Background As some may know, I'm working on a PHP framework whose major selling point is that of bridging functionality between different…
Christian
  • 27,509
  • 17
  • 111
  • 155