phreeze
phreeze copied to clipboard
Problem with path of Phar file
Hi, I have problem with self package of phreeze libraries, when generate app and set this option with yes, the app show me this error:
Warning: Uncaught exception 'Exception' with message 'require_once(verysimple/Phreeze/IDaoMap2.php): failed to open stream: No such file or directory in TweetMap.php at line 6' in phar:///home/aitnet/public_html/100lpg/libs/phreeze-3.3.phar/verysimple/Util/ExceptionThrower.php:80 Stack trace: #0 /home/aitnet/public_html/100lpg/libs/Model/DAO/TweetMap.php(6): ExceptionThrower::HandleError(2, 'require_once(ve...', '/home/aitnet/pu...', 6, Array) #1 /home/aitnet/public_html/100lpg/libs/Model/DAO/TweetMap.php(6): require_once() #2 /home/aitnet/public_html/100lpg/libs/Model/DAO/TweetDAO.php(6): require_once('/home/aitnet/pu...') #3 /home/aitnet/public_html/100lpg/libs/Model/Tweet.php(5): require_once('/home/aitnet/pu...') #4 /home/aitnet/public_html/100lpg/libs/Controller/TweetController.php(6): require_once('/home/aitnet/pu...') #5 phar:///home/aitnet/public_html/100lpg/libs/phreeze-3.3.phar/verysimple/Phreeze/Dispatcher.php(79): include_once('/home/aitnet/pu...') #6 /home/aitnet/public_html/100lpg/index.php(28): Dispatch in phar:///home/aitnet/public_html/100lpg/libs/phreeze-3.3.phar/verysimple/Util/ExceptionThrower.php on line 80
Fatal error: main(): Failed opening required 'verysimple/Phreeze/IDaoMap2.php' (include_path='/home/aitnet/public_html/100lpg/libs/:phar:///home/aitnet/public_html/100lpg/libs/phreeze-3.3.phar:/home/aitnet/public_html/100lpg/../phreeze/libs:/home/aitnet/public_html/100lpg/vendor/phreeze/phreeze/libs/:.:/opt/php54/lib/php') in /home/aitnet/public_html/100lpg/libs/Model/DAO/TweetMap.php on line 6
I have enable phar extension and run php 5.5, have any idea of the problem?
this is the configuration in _app_config.php
set_include_path( GlobalConfig::$APP_ROOT . '/libs/' . PATH_SEPARATOR . 'phar://' . GlobalConfig::$APP_ROOT . '/libs/phreeze-3.3.phar' . PATH_SEPARATOR . GlobalConfig::$APP_ROOT . '/../phreeze/libs' . PATH_SEPARATOR . GlobalConfig::$APP_ROOT . '/vendor/phreeze/phreeze/libs/' . PATH_SEPARATOR . get_include_path() );
Thanks
I have another one:
If I make a self contained app, any of cruds will show me an error:
Constant FM_TYPE_UNKNOWN already defined in FieldMap.php at line 5
Note that I just only created the app, without any modifications. I'm using xampp 5.6.8 in Win 7 Ultimate 64 bits. This is the stack trace:
#0 [internal function]: ExceptionThrower::HandleError(8, 'Constant FM_TYP...', 'C:\\xampp\\htdocs...', 5, Array)
#1 C:\xampp\htdocs\phreeze\libs\verysimple\Phreeze\FieldMap.php(5): define('FM_TYPE_UNKNOWN', 0)
#2 C:\xampp\htdocs\phreeze\libs\verysimple\Phreeze\IDaoMap2.php(5): require_once('C:\\xampp\\htdocs...')
#3 C:\xampp\htdocs\leodash\libs\Model\DAO\StatusItemAcaoMap.php(6): require_once('C:\\xampp\\htdocs...')
#4 C:\xampp\htdocs\leodash\libs\Model\DAO\StatusItemAcaoDAO.php(6): require_once('C:\\xampp\\htdocs...')
#5 C:\xampp\htdocs\leodash\libs\Model\StatusItemAcao.php(5): require_once('C:\\xampp\\htdocs...')
#6 C:\xampp\htdocs\leodash\libs\Controller\StatusItemAcaoController.php(6): require_once('C:\\xampp\\htdocs...')
#7 phar://C:/xampp/htdocs/leodash/libs/phreeze-3.3.phar/verysimple/Phreeze/Dispatcher.php(79): include_once('C:\\xampp\\htdocs...')
#8 C:\xampp\htdocs\leodash\index.php(28): Dispatcher::Dispatch(Object(Phreezer), Object(SmartyRenderEngine), '', NULL, Object(GenericRouter))
#9 {main}
If I select no to the self contained question, it's working ok.
This happens because the current .phar package of phreeze is outdated. You can either just delete the file live/phreeze.phar, or you can build a new phar (see phreeze/phar/).
I'll try to fix the distro version this weekend.