I am using an include in that file to get config variables. The config file included is a class.
Code: Select all
class config
{
function config()
{
// Database related configurations
$this->db_engine = 'mysql';
$this->db_username = 'root';
$this->db_password = '';
}
}Code: Select all
$cfg=new config();If I remove the config file and use something like :
Code: Select all
$cfg->db_engine = 'mysql';
$cfg->db_username = 'root';
$cfg->db_password = '';Even when using an include, if I run the script via command line and not through popen, everything is fine.
Could you please suggest whats wrong here?
The popen call is
Code: Select all
$proc = popen('php ' . $path . $file . ' ' . $args . ' &', 'r');Ashish