Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not complie in macbook air 2013 with php 5.3.15 #1116

Closed
kalenderApp opened this issue Aug 19, 2013 · 21 comments
Closed

Not complie in macbook air 2013 with php 5.3.15 #1116

kalenderApp opened this issue Aug 19, 2013 · 21 comments

Comments

@kalenderApp
Copy link

sudo ./install 32bits
Unrecognised CPU. Please email the following to: P@draigBrady.com
Vendor:GenuineIntel family:6 model:69
flags:fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clfsh ds acpi mmx fxsr sse sse2 ss htt tm pbe sse3 pclmulqdq dtes64 mon dscpl vmx est tm2 ssse3 fma cx16 tpr pdcm sse4.1 sse4.2 x2apic movbe popcnt aes pcid xsave osxsave seglim64 tsctmr avx1.0 rdrand f16c
find . -name *.gcno -o -name *.gcda | xargs rm -f
find . -name *.lo -o -name *.o | xargs rm -f
find . -name *.la -o -name *.a | xargs rm -f
find . -name .so | xargs rm -f
find . -name .libs -a -type d|xargs rm -rf
rm -f libphp.la modules/* libs/

Cleaning..
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
configure.in:3: warning: prefer named diversions
configure.in:3: warning: prefer named diversions
aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'
configure.in:3: warning: prefer named diversions
glibtoolize: putting auxiliary files in .'. glibtoolize: linking file./ltmain.sh'
glibtoolize: Consider adding AC_CONFIG_MACRO_DIR([m4])' to configure.in and glibtoolize: rerunning glibtoolize, to keep the correct libtool macros in-tree. glibtoolize: Consider adding-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
configure.in:3: warning: prefer named diversions
configure.in:3: warning: prefer named diversions
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for icc... no
checking for suncc... no
checking whether gcc and cc understand -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i386-apple-darwin12.4.1
checking host system type... i386-apple-darwin12.4.1
checking target system type... i386-apple-darwin12.4.1
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib/php/extensions/no-debug-non-zts-20090626
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking whether to enable phalcon framework... yes, shared
checking for ext/igbinary/igbinary.h... no
checking whether HAVE_BUNDLED_PCRE is declared... no
checking whether HAVE_JSON is declared... yes
checking for ext/json/php_json.h... yes
checking whether HAVE_PHP_SESSION is declared... yes
checking for ext/session/php_session.h... yes
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld
checking if the linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm
checking the name lister (/usr/bin/nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert i386-apple-darwin12.4.1 file names to i386-apple-darwin12.4.1 format... func_convert_file_noop
checking how to convert i386-apple-darwin12.4.1 file names to toolchain format... func_convert_file_noop
checking for /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld option to reload object files... -r
checking for objdump... no
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @file support... no
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... (cached) awk
checking command to parse /usr/bin/nm output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin12.4.1 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
/bin/sh /Users/yimity/cphalcon/build/32bits/libtool --mode=compile gcc -I. -I/Users/yimity/cphalcon/build/32bits -DPHP_ATOM_INC -I/Users/yimity/cphalcon/build/32bits/include -I/Users/yimity/cphalcon/build/32bits/main -I/Users/yimity/cphalcon/build/32bits -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -O2 -fno-delete-null-pointer-checks -finline-functions -fomit-frame-pointer -fno-builtin-memcmp -fvisibility=hidden -c /Users/yimity/cphalcon/build/32bits/phalcon.c -o phalcon.lo
libtool: compile: gcc -I. -I/Users/yimity/cphalcon/build/32bits -DPHP_ATOM_INC -I/Users/yimity/cphalcon/build/32bits/include -I/Users/yimity/cphalcon/build/32bits/main -I/Users/yimity/cphalcon/build/32bits -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -O2 -fno-delete-null-pointer-checks -finline-functions -fomit-frame-pointer -fno-builtin-memcmp -fvisibility=hidden -c /Users/yimity/cphalcon/build/32bits/phalcon.c -fno-common -DPIC -o .libs/phalcon.o
/bin/sh /Users/yimity/cphalcon/build/32bits/libtool --mode=link gcc -DPHP_ATOM_INC -I/Users/yimity/cphalcon/build/32bits/include -I/Users/yimity/cphalcon/build/32bits/main -I/Users/yimity/cphalcon/build/32bits -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -O2 -fno-delete-null-pointer-checks -finline-functions -fomit-frame-pointer -fno-builtin-memcmp -fvisibility=hidden -o phalcon.la -export-dynamic -avoid-version -prefer-pic -module -rpath /Users/yimity/cphalcon/build/32bits/modules phalcon.lo
libtool: link: gcc -Wl,-undefined -Wl,dynamic_lookup -o .libs/phalcon.so -bundle .libs/phalcon.o -O2
libtool: link: ( cd ".libs" && rm -f "phalcon.la" && ln -s "../phalcon.la" "phalcon.la" )
/bin/sh /Users/yimity/cphalcon/build/32bits/libtool --mode=install cp ./phalcon.la /Users/yimity/cphalcon/build/32bits/modules
libtool: install: cp ./.libs/phalcon.so /Users/yimity/cphalcon/build/32bits/modules/phalcon.so
libtool: install: cp ./.libs/phalcon.lai /Users/yimity/cphalcon/build/32bits/modules/phalcon.la

Build complete.
Don't forget to run 'make test'.

Installing shared extensions: /usr/lib/php/extensions/no-debug-non-zts-20090626/

Thanks for compiling Phalcon!
Build succeed: Please restart your web server to complete the installation

when i build it return this.

and i and the extensions to the php.ini ,and the phpinfo shows Phalcon is loaded, but i open the website it is still a mistake shows that:

Phalcon\Mvc\Application\Exception: A dependency injection object is required to access internal services File=/Users/yimity/Sites/www.limianwang.com/index.php Line=9 #0 /Users/yimity/Sites/www.limianwang.com/index.php(9): Phalcon\Mvc\Application->handle() #1 {main}
A dependency injection object is required to access internal services
#0 /Users/yimity/Sites/www.limianwang.com/index.php(9): Phalcon\Mvc\Application->handle()
#1 {main}

i dont know how to slove this issues ,can anyone help me ?

@ghost
Copy link

ghost commented Aug 19, 2013

Could you please post /Users/yimity/Sites/www.limianwang.com/index.php here?

@kalenderApp
Copy link
Author

@sjinks yes ,it like this

handle()->getContent(); } catch (\Phalcon\Exception $e) { echo get_class($e), ": ", $e->getMessage(), "\n"; echo " File=", $e->getFile(), "\n"; echo " Line=", $e->getLine(), "\n"; echo $e->getTraceAsString(), '
'; echo $e->getMessage(), '
'; echo nl2br(htmlentities($e->getTraceAsString())); }

@ghost
Copy link

ghost commented Aug 20, 2013

$application = new \Phalcon\Mvc\Application($di);

Is $di initialized anywhere?

@kalenderApp
Copy link
Author

@sjinks The $di is in services.php and it show this :

set( 'config', $config ); $di->set( 'url', function () use($config ) { $url = new UrlResolver(); $url->setBaseUri( $config->application->baseUri ); return $url; }, true ); $di->set( 'view', function () use($config ) { $view = new View(); $view->setViewsDir( $config->application->viewsDir ); $view->registerEngines( array ( '.phtml' => function ( $view, $di ) use($config ) { $volt = new VoltEngine( $view, $di ); $volt->setOptions( array ( 'compiledPath' => $config->application->cacheDir, 'compiledSeparator' => '_') ); $compiler = $volt->getCompiler(); $compiler->addFunction( 'valInArray', function ( $val, $pass ) use($compiler ) { $array = array (); $value = $compiler->expression( $pass[0]['expr'] ); if (isset( $pass[1] )) $array = $compiler->expression( $pass[1]['expr'] ); if (isset( $pass[2] )) $type = $compiler->expression( $pass[2]['expr'] ); return 'in_array(' . $value . ',' . $array . ',false)'; } ); $compiler->addFunction( 'truncate', function ( $val, $pass ) use($compiler ) { $value = $compiler->expression( $pass[0]['expr'] ); $start = 0; $end = strlen( $value ); if (isset( $pass[1] )) $start = $compiler->expression( $pass[1]['expr'] ); if (isset( $pass[2] )) $end = $compiler->expression( $pass[2]['expr'] ); return 'mb_substr(' . $value . ',' . $start . ',' . $end . ',"utf-8")'; } ); $compiler->addFunction( 'replace_url', function ( $val, $pass ) use($compiler ) { return 'Utils::replace_url('.$val.')'; } ); $compiler->addFunction( 'html_out', function ( $val, $pass ) use($compiler ) { return 'Utils::html_out(' . $val . ')'; } ); $compiler->addFunction( 'get_username', function ( $val, $pass ) use($compiler ) { return 'Utils::get_username(' . $val . ')'; } ); return $volt; }) ); return $view; }, true ); $di->set( 'db', function () use($config ) { $eventsManager = new \Phalcon\Events\Manager(); $connection = new DbAdapter( array ( 'host' => $config->database->host, 'username' => $config->database->username, 'password' => $config->database->password, 'dbname' => $config->database->dbname) ); /* $logger = new \Phalcon\Logger\Adapter\File(**DIR** . "/../logs/db.log"); $eventsManager->attach('db', function($event, $connection) use ($logger) { if ($event->getType() == 'beforeQuery') { $logger->log($connection->getSQLStatement(), \Phalcon\Logger::INFO); } }); _/ $connection->setEventsManager( $eventsManager ); $connection->query( "SET NAMES 'UTF8'" ); return $connection; } ); /_ $di->set( 'db', function () use($config ) { $eventsManager = new \Phalcon\Events\Manager(); $logger = new \Phalcon\Logger\Adapter\File( **DIR** . "/../logs/db.log" ); $connection = new DbAdapter( array ( 'host' => $config->database->host, 'username' => $config->database->username, 'password' => $config->database->password, 'dbname' => $config->database->dbname) ); $eventsManager->attach( 'db', function ( $event, $connection ) use($logger ) { if ($event->getType() == 'beforeQuery') { $logger->log( $connection->getSQLStatement(), \Phalcon\Logger::INFO ); } } ); $connection->setEventsManager( $eventsManager ); $connection->query( "SET NAMES 'UTF8'" ); return $connection; } ); */ $frontCache = new Phalcon\Cache\Frontend\Data( array ( "lifetime" => 86400) ); $memcached = new Phalcon\Cache\Backend\Memcache( $frontCache, array ( "host" => "192.168.0.181", "port" => "11211") ); $di->set( 'Memcached', function () use($memcached ) { return $memcached; } ); $di->set( 'FileCache', function () use($frontCache ) { return new Phalcon\Cache\Backend\File( new \Phalcon\Cache\Frontend\Data( array ( "lifetime" => 2592000) ), array ( "cacheDir" => **DIR** . "/../caches/files/") ); } ); $di->set( 'modelsCache', function () use($memcached ) { return $memcached; } ); $di->set( 'modelsManager', function () use($memcached ) { return new \Phalcon\Mvc\Model\Manager(); } ); $di->set( 'modelsMetadata', function () { return new \Phalcon\Mvc\Model\Metadata\Memory(); }, true ); $di->set( 'session', function () { $session = new SessionAdapter(); $session->start(); return $session; } ); $di->set( 'crypt', function () use($config ) { $crypt = new Crypt(); $crypt->setKey( $config->application->cryptSalt ); return $crypt; } ); $di->set( 'cookies', function () { $cookies = new Phalcon\Http\Response\Cookies(); $cookies->useEncryption(false); return $cookies; }); $di->set( 'dispatcher', function () { $eventsManager = new \Phalcon\Events\Manager(); $eventsManager->attach( "dispatch", function ( $event, $dispatcher, $exception ) { if ($event->getType() == 'beforeNotFoundAction') { $dispatcher->forward( array ( 'controller' => 'error', 'action' => 'index') ); return false; } if ($event->getType() == 'beforeException') { switch ($exception->getCode()) { case \Phalcon\Dispatcher::EXCEPTION_HANDLER_NOT_FOUND: case \Phalcon\Dispatcher::EXCEPTION_ACTION_NOT_FOUND: $dispatcher->forward( array ( 'controller' => 'error', 'action' => 'index') ); return false; } } } ); $dispatcher = new Dispatcher(); $dispatcher->setEventsManager( $eventsManager ); return $dispatcher; } ); $di->set( 'router', function () { return require **DIR** . '/routes.php'; } ); $di->set( 'flash', function () { return new Flash( array ( 'error' => 'alert alert-error', 'success' => 'alert alert-success', 'notice' => 'alert alert-info') ); } ); $di->set( 'security', function () { $security = new Phalcon\Security(); //Set the password hashing factor to 12 rounds // $security->setWorkFactor(12); return $security; }, true ); $di->set( 'auth', function () { return new Auth(); } ); $di->set( 'acl', function () { return new Acl(); } ); unset( $memcached, $frontCache );

@ghost
Copy link

ghost commented Aug 20, 2013

Could you please put

var_export($di);

to index.php right before

$application = new \Phalcon\Mvc\Application($di);

?

@phalcon
Copy link
Collaborator

phalcon commented Aug 20, 2013

I think the framework was compiled for 32bits but it must be compiled for 64bits.

Can you try?

sudo ./install 64bits

@ghost
Copy link

ghost commented Aug 20, 2013

@phalcon The extension would not load if it were compiled for a different architecture

@phalcon
Copy link
Collaborator

phalcon commented Aug 20, 2013

Yes, In Mac OSX there is an universal binary that loads both 32bits/64bits: http://en.wikipedia.org/wiki/Universal_binary

@ghost
Copy link

ghost commented Aug 20, 2013

What I mean is that zval* and other structures layout will be completely different for 32 and 64-bit (because of different padding and sizes of long int and pointers), An attempt to use a 32-bit zval* with 64-bit PHP and vice versa would lead to a segmentation fault very early, probably on startup.

@kalenderApp
Copy link
Author

@sjinks Yes. it shows this:

Phalcon\DI\FactoryDefault::__set_state(array( '_services' => array ( 'router' => Phalcon\DI\Service::__set_state(array( '_name' => 'router', '_definition' => 'Phalcon\Mvc\Router', '_shared' => true, '_sharedInstance' => NULL, )), 'dispatcher' => Phalcon\DI\Service::__set_state(array( '_name' => 'dispatcher', '_definition' => 'Phalcon\Mvc\Dispatcher', '_shared' => true, '_sharedInstance' => NULL, )), 'url' => Phalcon\DI\Service::__set_state(array( '_name' => 'url', '_definition' => 'Phalcon\Mvc\Url', '_shared' => true, '_sharedInstance' => NULL, )), 'modelsManager' => Phalcon\DI\Service::__set_state(array( '_name' => 'modelsManager', '_definition' => 'Phalcon\Mvc\Model\Manager', '_shared' => true, '_sharedInstance' => NULL, )), 'modelsMetadata' => Phalcon\DI\Service::__set_state(array( '_name' => 'modelsMetadata', '_definition' => 'Phalcon\Mvc\Model\MetaData\Memory', '_shared' => true, '_sharedInstance' => NULL, )), 'response' => Phalcon\DI\Service::__set_state(array( '_name' => 'response', '_definition' => 'Phalcon\Http\Response', '_shared' => true, '_sharedInstance' => NULL, )), 'cookies' => Phalcon\DI\Service::__set_state(array( '_name' => 'cookies', '_definition' => 'Phalcon\Http\Response\Cookies', '_shared' => true, '_sharedInstance' => NULL, )), 'request' => Phalcon\DI\Service::__set_state(array( '_name' => 'request', '_definition' => 'Phalcon\Http\Request', '_shared' => true, '_sharedInstance' => NULL, )), 'filter' => Phalcon\DI\Service::__set_state(array( '_name' => 'filter', '_definition' => 'Phalcon\Filter', '_shared' => true, '_sharedInstance' => NULL, )), 'escaper' => Phalcon\DI\Service::__set_state(array( '_name' => 'escaper', '_definition' => 'Phalcon\Escaper', '_shared' => true, '_sharedInstance' => NULL, )), 'security' => Phalcon\DI\Service::__set_state(array( '_name' => 'security', '_definition' => 'Phalcon\Security', '_shared' => true, '_sharedInstance' => NULL, )), 'crypt' => Phalcon\DI\Service::__set_state(array( '_name' => 'crypt', '_definition' => 'Phalcon\Crypt', '_shared' => true, '_sharedInstance' => NULL, )), 'annotations' => Phalcon\DI\Service::__set_state(array( '_name' => 'annotations', '_definition' => 'Phalcon\Annotations\Adapter\Memory', '_shared' => true, '_sharedInstance' => NULL, )), 'flash' => Phalcon\DI\Service::__set_state(array( '_name' => 'flash', '_definition' => 'Phalcon\Flash\Direct', '_shared' => true, '_sharedInstance' => NULL, )), 'flashSession' => Phalcon\DI\Service::__set_state(array( '_name' => 'flashSession', '_definition' => 'Phalcon\Flash\Session', '_shared' => true, '_sharedInstance' => NULL, )), 'tag' => Phalcon\DI\Service::__set_state(array( '_name' => 'tag', '_definition' => 'Phalcon\Tag', '_shared' => true, '_sharedInstance' => NULL, )), 'session' => Phalcon\DI\Service::__set_state(array( '_name' => 'session', '_definition' => 'Phalcon\Session\Adapter\Files', '_shared' => true, '_sharedInstance' => NULL, )), 'sessionBag' => Phalcon\DI\Service::__set_state(array( '_name' => 'sessionBag', '_definition' => 'Phalcon\Session\Bag', '_shared' => false, '_sharedInstance' => NULL, )), 'eventsManager' => Phalcon\DI\Service::__set_state(array( '_name' => 'eventsManager', '_definition' => 'Phalcon\Events\Manager', '_shared' => true, '_sharedInstance' => NULL, )), 'transactionManager' => Phalcon\DI\Service::__set_state(array( '_name' => 'transactions', '_definition' => 'Phalcon\Mvc\Model\Transaction\Manager', '_shared' => true, '_sharedInstance' => NULL, )), 'assets' => Phalcon\DI\Service::__set_state(array( '_name' => 'assets', '_definition' => 'Phalcon\Assets\Manager', '_shared' => true, '_sharedInstance' => NULL, )), 'config' => Phalcon\DI\Service::__set_state(array( '_name' => 'config', '_definition' => Phalcon\Config::__set_state(array( 'database' => Phalcon\Config::__set_state(array( 'adapter' => 'Mysql', 'host' => '192.168.0.228', 'username' => 'root', 'password' => '123456', 'dbname' => 'coremvc', 'port' => 3306, )), 'application' => Phalcon\Config::__set_state(array( 'controllersDir' => '/Users/yimity/Sites/www.limianwang.com/config/../apps/controllers/', 'modelsDir' => '/Users/yimity/Sites/www.limianwang.com/config/../apps/models/', 'formsDir' => '/Users/yimity/Sites/www.limianwang.com/config/../apps/forms/', 'viewsDir' => '/Users/yimity/Sites/www.limianwang.com/config/../apps/views/', 'extensionsDir' => '/Users/yimity/Sites/www.limianwang.com/config/../apps/extensions/', 'cacheDir' => '/Users/yimity/Sites/www.limianwang.com/config/../caches/', 'libraryDir' => '/Users/yimity/Sites/www.limianwang.com/config/../apps/library/', 'searchLibDir' => '/Users/yimity/Sites/www.limianwang.com/config/../apps/library/xunsearch/', 'baseUri' => '/', 'cryptSalt' => '$9diko$.f#11', )), )), '_shared' => false, '_sharedInstance' => NULL, )), 'url' => Phalcon\DI\Service::__set_state(array( '_name' => 'url', '_definition' => Closure::__set_state(array( )), '_shared' => true, '_sharedInstance' => NULL, )), 'view' => Phalcon\DI\Service::__set_state(array( '_name' => 'view', '_definition' => Closure::__set_state(array( )), '_shared' => true, '_sharedInstance' => NULL, )), 'db' => Phalcon\DI\Service::__set_state(array( '_name' => 'db', '_definition' => Closure::__set_state(array( )), '_shared' => false, '_sharedInstance' => NULL, )), 'Memcached' => Phalcon\DI\Service::__set_state(array( '_name' => 'Memcached', '_definition' => Closure::__set_state(array( )), '_shared' => false, '_sharedInstance' => NULL, )), 'FileCache' => Phalcon\DI\Service::__set_state(array( '_name' => 'FileCache', '_definition' => Closure::__set_state(array( )), '_shared' => false, '_sharedInstance' => NULL, )), 'modelsCache' => Phalcon\DI\Service::__set_state(array( '_name' => 'modelsCache', '_definition' => Closure::__set_state(array( )), '_shared' => false, '_sharedInstance' => NULL, )), 'modelsManager' => Phalcon\DI\Service::__set_state(array( '_name' => 'modelsManager', '_definition' => Closure::__set_state(array( )), '_shared' => false, '_sharedInstance' => NULL, )), 'modelsMetadata' => Phalcon\DI\Service::__set_state(array( '_name' => 'modelsMetadata', '_definition' => Closure::__set_state(array( )), '_shared' => true, '_sharedInstance' => NULL, )), 'session' => Phalcon\DI\Service::__set_state(array( '_name' => 'session', '_definition' => Closure::__set_state(array( )), '_shared' => false, '_sharedInstance' => NULL, )), 'crypt' => Phalcon\DI\Service::__set_state(array( '_name' => 'crypt', '_definition' => Closure::__set_state(array( )), '_shared' => false, '_sharedInstance' => NULL, )), 'cookies' => Phalcon\DI\Service::__set_state(array( '_name' => 'cookies', '_definition' => Closure::__set_state(array( )), '_shared' => false, '_sharedInstance' => NULL, )), 'dispatcher' => Phalcon\DI\Service::__set_state(array( '_name' => 'dispatcher', '_definition' => Closure::__set_state(array( )), '_shared' => false, '_sharedInstance' => NULL, )), 'router' => Phalcon\DI\Service::__set_state(array( '_name' => 'router', '_definition' => Closure::__set_state(array( )), '_shared' => false, '_sharedInstance' => NULL, )), 'flash' => Phalcon\DI\Service::__set_state(array( '_name' => 'flash', '_definition' => Closure::__set_state(array( )), '_shared' => false, '_sharedInstance' => NULL, )), 'security' => Phalcon\DI\Service::__set_state(array( '_name' => 'security', '_definition' => Closure::__set_state(array( )), '_shared' => true, '_sharedInstance' => NULL, )), 'auth' => Phalcon\DI\Service::__set_state(array( '_name' => 'auth', '_definition' => Closure::__set_state(array( )), '_shared' => false, '_sharedInstance' => NULL, )), 'acl' => Phalcon\DI\Service::__set_state(array( '_name' => 'acl', '_definition' => Closure::__set_state(array( )), '_shared' => false, '_sharedInstance' => NULL, )), ), '_sharedInstances' => NULL, '_freshInstance' => false, ))Phalcon\Mvc\Application\Exception: A dependency injection object is required to access internal services File=/Users/yimity/Sites/www.limianwang.com/index.php Line=10 #0 /Users/yimity/Sites/www.limianwang.com/index.php(10): Phalcon\Mvc\Application->handle() #1 {main}
A dependency injection object is required to access internal services
#0 /Users/yimity/Sites/www.limianwang.com/index.php(10): Phalcon\Mvc\Application->handle()
#1 {main}

@kalenderApp
Copy link
Author

@phalcon I complied it with 64bits but it show a 500 error.

@kalenderApp
Copy link
Author

@sjinks with the 64bits it show this:

Phalcon\DI\FactoryDefault::__set_state(array( '_services' => array ( 'router' => Phalcon\DI\Service::__set_state(array( '_name' => 'router', '_definition' => Closure::__set_state(array( )), '_shared' => false, '_sharedInstance' => NULL, )), 'dispatcher' => Phalcon\DI\Service::__set_state(array( '_name' => 'dispatcher', '_definition' => Closure::__set_state(array( )), '_shared' => false, '_sharedInstance' => NULL, )), 'url' => Phalcon\DI\Service::__set_state(array( '_name' => 'url', '_definition' => Closure::__set_state(array( )), '_shared' => true, '_sharedInstance' => NULL, )), 'modelsManager' => Phalcon\DI\Service::__set_state(array( '_name' => 'modelsManager', '_definition' => Closure::__set_state(array( )), '_shared' => false, '_sharedInstance' => NULL, )), 'modelsMetadata' => Phalcon\DI\Service::__set_state(array( '_name' => 'modelsMetadata', '_definition' => Closure::__set_state(array( )), '_shared' => true, '_sharedInstance' => NULL, )), 'response' => Phalcon\DI\Service::__set_state(array( '_name' => 'response', '_definition' => 'Phalcon\Http\Response', '_shared' => true, '_sharedInstance' => NULL, )), 'cookies' => Phalcon\DI\Service::__set_state(array( '_name' => 'cookies', '_definition' => Closure::__set_state(array( )), '_shared' => false, '_sharedInstance' => NULL, )), 'request' => Phalcon\DI\Service::__set_state(array( '_name' => 'request', '_definition' => 'Phalcon\Http\Request', '_shared' => true, '_sharedInstance' => NULL, )), 'filter' => Phalcon\DI\Service::__set_state(array( '_name' => 'filter', '_definition' => 'Phalcon\Filter', '_shared' => true, '_sharedInstance' => NULL, )), 'escaper' => Phalcon\DI\Service::__set_state(array( '_name' => 'escaper', '_definition' => 'Phalcon\Escaper', '_shared' => true, '_sharedInstance' => NULL, )), 'security' => Phalcon\DI\Service::__set_state(array( '_name' => 'security', '_definition' => Closure::__set_state(array( )), '_shared' => true, '_sharedInstance' => NULL, )), 'crypt' => Phalcon\DI\Service::__set_state(array( '_name' => 'crypt', '_definition' => Closure::__set_state(array( )), '_shared' => false, '_sharedInstance' => NULL, )), 'annotations' => Phalcon\DI\Service::__set_state(array( '_name' => 'annotations', '_definition' => 'Phalcon\Annotations\Adapter\Memory', '_shared' => true, '_sharedInstance' => NULL, )), 'flash' => Phalcon\DI\Service::__set_state(array( '_name' => 'flash', '_definition' => Closure::__set_state(array( )), '_shared' => false, '_sharedInstance' => NULL, )), 'flashSession' => Phalcon\DI\Service::__set_state(array( '_name' => 'flashSession', '_definition' => 'Phalcon\Flash\Session', '_shared' => true, '_sharedInstance' => NULL, )), 'tag' => Phalcon\DI\Service::__set_state(array( '_name' => 'tag', '_definition' => 'Phalcon\Tag', '_shared' => true, '_sharedInstance' => NULL, )), 'session' => Phalcon\DI\Service::__set_state(array( '_name' => 'session', '_definition' => Closure::__set_state(array( )), '_shared' => false, '_sharedInstance' => NULL, )), 'sessionBag' => Phalcon\DI\Service::__set_state(array( '_name' => 'sessionBag', '_definition' => 'Phalcon\Session\Bag', '_shared' => false, '_sharedInstance' => NULL, )), 'eventsManager' => Phalcon\DI\Service::__set_state(array( '_name' => 'eventsManager', '_definition' => 'Phalcon\Events\Manager', '_shared' => true, '_sharedInstance' => NULL, )), 'transactionManager' => Phalcon\DI\Service::__set_state(array( '_name' => 'transactions', '_definition' => 'Phalcon\Mvc\Model\Transaction\Manager', '_shared' => true, '_sharedInstance' => NULL, )), 'assets' => Phalcon\DI\Service::__set_state(array( '_name' => 'assets', '_definition' => 'Phalcon\Assets\Manager', '_shared' => true, '_sharedInstance' => NULL, )), 'config' => Phalcon\DI\Service::__set_state(array( '_name' => 'config', '_definition' => Phalcon\Config::__set_state(array( 'database' => Phalcon\Config::__set_state(array( 'adapter' => 'Mysql', 'host' => '192.168.0.228', 'username' => 'root', 'password' => '123456', 'dbname' => 'coremvc', 'port' => 3306, )), 'application' => Phalcon\Config::__set_state(array( 'controllersDir' => '/Users/yimity/Sites/www.limianwang.com/config/../apps/controllers/', 'modelsDir' => '/Users/yimity/Sites/www.limianwang.com/config/../apps/models/', 'formsDir' => '/Users/yimity/Sites/www.limianwang.com/config/../apps/forms/', 'viewsDir' => '/Users/yimity/Sites/www.limianwang.com/config/../apps/views/', 'extensionsDir' => '/Users/yimity/Sites/www.limianwang.com/config/../apps/extensions/', 'cacheDir' => '/Users/yimity/Sites/www.limianwang.com/config/../caches/', 'libraryDir' => '/Users/yimity/Sites/www.limianwang.com/config/../apps/library/', 'searchLibDir' => '/Users/yimity/Sites/www.limianwang.com/config/../apps/library/xunsearch/', 'baseUri' => '/', 'cryptSalt' => '$9diko$.f#11', )), )), '_shared' => false, '_sharedInstance' => NULL, )), 'view' => Phalcon\DI\Service::__set_state(array( '_name' => 'view', '_definition' => Closure::__set_state(array( )), '_shared' => true, '_sharedInstance' => NULL, )), 'db' => Phalcon\DI\Service::__set_state(array( '_name' => 'db', '_definition' => Closure::__set_state(array( )), '_shared' => false, '_sharedInstance' => NULL, )), 'Memcached' => Phalcon\DI\Service::__set_state(array( '_name' => 'Memcached', '_definition' => Closure::__set_state(array( )), '_shared' => false, '_sharedInstance' => NULL, )), 'FileCache' => Phalcon\DI\Service::__set_state(array( '_name' => 'FileCache', '_definition' => Closure::__set_state(array( )), '_shared' => false, '_sharedInstance' => NULL, )), 'modelsCache' => Phalcon\DI\Service::__set_state(array( '_name' => 'modelsCache', '_definition' => Closure::__set_state(array( )), '_shared' => false, '_sharedInstance' => NULL, )), 'auth' => Phalcon\DI\Service::__set_state(array( '_name' => 'auth', '_definition' => Closure::__set_state(array( )), '_shared' => false, '_sharedInstance' => NULL, )), 'acl' => Phalcon\DI\Service::__set_state(array( '_name' => 'acl', '_definition' => Closure::__set_state(array( )), '_shared' => false, '_sharedInstance' => NULL, )), ), '_sharedInstances' => NULL, '_freshInstance' => false, ))

@ghost
Copy link

ghost commented Aug 20, 2013

OK, let's try a very simple case first:

<?php

class IndexController
{
    public function indexAction()
    {
        echo "It works!\n";
    }
}

$di  = new \Phalcon\Di\FactoryDefault();
$di->set('view', function() { return new \Phalcon\Mvc\View(); });

$app = new \Phalcon\Mvc\Application($di);
echo $app->handle('/')->getContent();

Does it work for you?

@kalenderApp
Copy link
Author

@sjinks It works!

@ghost
Copy link

ghost commented Aug 20, 2013

Well, then the issue probably lays somewhere in the PHP code. If you can put your code somewhere to GitHub (feel free to remove all not relevant parts), I can try to debug it.

@kalenderApp
Copy link
Author

@sjinks but in windows or linux it works fine, so i think i complied the .so has some issues.

@ghost
Copy link

ghost commented Aug 20, 2013

OK, what git revision are you on?

git rev-parse HEAD

@kalenderApp
Copy link
Author

@sjinks 1.7.12.4

@kalenderApp
Copy link
Author

@sjinks d7af008

@ghost
Copy link

ghost commented Aug 20, 2013

Could you please install phalcon from ext/?

cd ext
phpize && ./configure CFLAGS="-O0 -g3" && make clean && make && sudo make install

@kalenderApp
Copy link
Author

Thanks All, I found the Homebrew has this framework, so I complied it thoungth the homebrew, and it works fine. It is not the code's fault. Thanks All again.

@phalcon phalcon closed this as completed Aug 21, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant