views:

158

answers:

1

Hi

I use NearlyFreeSpeech.Net as my host, and my php app (coded in CodeIgniter) needs to make exec() calls. As this is not allowed under safe-mode, we are given a "special" was of executing things via a perl script. See details here: https://members.nearlyfreespeech.net/wiki/HowTo/PHPExec

However, following those instructions causes the following CI errors every time any command is passed to the exec wrapper:

A PHP Error was encountered
Severity: Notice
Message: Constant EXT already defined
Filename: public/index.php
Line Number: 88

A PHP Error was encountered
Severity: Notice
Message: Constant SELF already defined
Filename: public/index.php
Line Number: 89

A PHP Error was encountered
Severity: Notice
Message: Constant FCPATH already defined
Filename: public/index.php
Line Number: 90

A PHP Error was encountered
Severity: Notice
Message: Constant BASEPATH already defined
Filename: public/index.php
Line Number: 91

A PHP Error was encountered
Severity: Notice
Message: Constant APPPATH already defined
Filename: public/index.php
Line Number: 104

and the call fails with no output.

I know a bunch of you are hosted at nfs.n, and a lot of you also use CodeIgniter... so here's me hoping that some of you will be in both categories, and will have needed to exec things :)

Thanks!
Mala

+1  A: 

Without being able to view their howto, I'd assume they're trying to redefine constants that CI uses. If you look in index.php for CI you'll see they define a handfull of constants, like basepath. Look through the code their howto gives you, you'll probably see the code trying to do something like define('basepath', 'blah');. You'll need to remove those from the howto's code (assuming they line up with the ones CI is using).

Parrots