Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hiphop error when running program had compiled

I have succeed when using Hiphop to try compile a simple yii app (generate with cmd yiic webapp demo).

hphp test.php --keep-tempdir=1 --log=3 --include-path="../yii/framework"

Compile-processing is not has any error or warning. I can start server with compiled-program with cmd:

sudo /tmp/hphp_8AcATe/program -m server -p 8008 -v "Server.SourceRoot=pwd" \ -v "Server.DefaultDocument=index.php" -v "Server.EnableStaticContentFromDisk=true" -c $HPHP_HOME/bin/mime.hdf (This cmd refer from here - Example: Compiling WordPress)

After that, I access by browser via http://127.0.0.1:8008 and then meet errors:

UPDATE (I have confusion in path below and fixed)

HipHop Notice: Tried to invoke /var/www/demo/../yii/framework/yii.php but file not found. in index.php on line 12

HipHop Fatal error: Required file that does not exist: /var/www/demo/../yii/framework/yii.php in index.php on line 12

Here is line 12, index.php:

4.  $yii=dirname(__FILE__).'/../yii/framework/yii.php';
...
12. require_once($yii);

UPDATE

I've tried with realpath() as @prodigitalson's hint, but in console, program still output the same content :

Required file that does not exist: /var/www/demo/yii/framework/yii.php in index.php on line 12

To avoid in relative path confusion case, I copied compiled program folder to /var/www (root dir with yii lib: /var/www/yii/framework), but nothing change :(

Have anybody meet this error the same to me? How to fix them? Thank for you help!

like image 801
Davuz Avatar asked Jun 22 '12 03:06

Davuz


1 Answers

get rid of '/..' from '/../yii/framework/yii.php'

like image 65
segFault Avatar answered Nov 01 '22 07:11

segFault