phalcon

Fatal error: Class 'Phalcon\\Http\\Client\\Request'

匿名 (未验证) 提交于 2019-12-03 01:00:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Error on request Fatal error: Class 'Phalcon\Http\Client\Request' not found in ControllerBase.php on line 41 use Phalcon \Http\Client\Request as CRequest ; $provider = CRequest :: getProvider (); $provider -> setBaseUri ( 'http://localhost/testing' ); 回答1: You will need to a copy of the incubator library files from the Phalcon/Incubator github. Download and copy all or just the HTTP directory to your /app/library/ folder. In your public/index.php, add $loader->registerNamespaces with the correct path to the incubator library.

Compiling Phalcon - Virtual memory exhausted: Cannot allocate memory

坚强是说给别人听的谎言 提交于 2019-12-02 22:39:49
When I try to compile Phalcon, I get an error: virtual memory exhausted: Cannot allocate memory I am running the following commands git clone --depth=1 git://github.com/phalcon/cphalcon.git cd cphalcon/build sudo ./install I have a VPS with 1GB RAM Add more swapfile may help. I met this problem when tried to compile YouCompleteMe for vim, solved it by adding swapfile. https://www.digitalocean.com/community/articles/how-to-add-swap-on-ubuntu-14-04 It seems GCC is allocating a lot of memory, check this https://web.archive.org/web/20141202015428/http://hostingfu.com/article/compiling-with-gcc-on

Mac下安装phalcon

*爱你&永不变心* 提交于 2019-12-02 22:26:40
Mac下安装phalcon 按照 Github phalcon 上的教程进行安装 git clone git://github.com/phalcon/cphalcon.git cd cphalcon/build sudo ./install 然后在php.ini下添加 extension=phalcon.so 因为本人使用的是XAMPP,该扩展安装到默认的php-config下, 所以无法使用集成安装,只能进行手动编译 进入系统位数对应目录下 cd cphalcon/build/64bits 此处需要定位你正在使用的php下的phpize 否侧编译后无法加载phalcon扩展 /Applications/XAMPP/xamppfiles/bin/phpize 同理此处需要指定你正在使用的php的php-config目录 sudo ./configure --with-php-config=/Applications/XAMPP/xamppfiles/bin/php-config sudo make && make install 将extension=phalcon.so 添加到php.ini下 最后在 phpinfo() 或者 php cli 下执行 php -m 看到扩展即为成功 附录phpize:phpize是用来扩展php扩展模块的

How to implement \\Phalcon\\Mvc\\Model::findIn()?

守給你的承諾、 提交于 2019-12-02 10:19:07
Fairly simple question, but I can't seem to find anything about it. I've got a set of ids, and I need to find all matching records. So I'd like to query : $records = MyModel::findIn([1,2,3,4]); But I don't know how to implement it. Any idea ? Check out the Phalcon\Mvc\Model\Criteria , in the inWhere method. You could create a new model's method like: public static function findIn(array $identifiers) { return self::query() ->inWhere('id', $identifiers) ->execute(); } 来源: https://stackoverflow.com/questions/23368383/how-to-implement-phalcon-mvc-modelfindin

为什么叫Phalcon7?

别来无恙 提交于 2019-12-02 06:50:38
因为Phalcon2.0之前,我一直参与Phalcon的开发,对之前的版本有感情。这个只是对Phalcon1.3的延续,而不是想另起炉灶。为什么加7,因为我一共维护了两个分支,一个支持php5系列,一个支持PHP7系统,这样彻底分开更方便维护和优化。 自然而然,这个支持PHP7的分支代号,就加了个7结尾,当然他们还有同一个代号Dao。 目前官方一直致力于 Zephir 的开发与完善,Phalcon 3.x 也出来了,还是鼓励大家参与 Zephir 来开发,以及对 Phalcon 和 它的文档进行完善优化。 来源: oschina 链接: https://my.oschina.net/u/64801/blog/758197

“Invalid Service Definition” when using DI->Get Phalcon PHP

做~自己de王妃 提交于 2019-12-02 06:17:34
This question is related to Appending multiple config arrays in PhalconPHP I am trying to get retrieve an object from the DI using the get method. The object is being set like this // $new_array the array with the merged data. Load it in a // \Phalcon\Config object $config = new \Phalcon\Config($new_array); //Store the config in your DI container for easier use $di->set('config', $config); And this is the error message I am getting when I call $new_array = $di->get('config'); [Uncaught exception 'Phalcon\DI\Exception' with message 'Invalid service definition. Missing 'className' parameter'] I

Fatal error: Class 'Phalcon\Http\Client\Request'

谁都会走 提交于 2019-12-02 05:55:45
问题 Error on request Fatal error: Class 'Phalcon\Http\Client\Request' not found in ControllerBase.php on line 41 use Phalcon\Http\Client\Request as CRequest; $provider = CRequest::getProvider(); $provider->setBaseUri('http://localhost/testing'); 回答1: You will need to a copy of the incubator library files from the Phalcon/Incubator github. Download and copy all or just the HTTP directory to your /app/library/ folder. In your public/index.php, add $loader->registerNamespaces with the correct path

Force autocomplete suggestions for file paths

会有一股神秘感。 提交于 2019-12-02 03:54:49
问题 I am currently working on a controller file for a Phalcon project. I like how PhpStorm gives you autocomplete suggestions when writing a src or href value in an HTML file. I was wondering, is possible to enable autocomplete suggestions when adding resources in a controller? This is what happens when I force autocomplete suggestions(Ctrl + Space) This is what I would like to happen. EDIT: I should also note that I have marked the folder, containing all my resources(ie. CSS, javascript, and

Fatal error: Class 'Phalcon\\Http\\Client\\Request'

北战南征 提交于 2019-12-02 02:43:48
Error on request Fatal error: Class 'Phalcon\Http\Client\Request' not found in ControllerBase.php on line 41 use Phalcon\Http\Client\Request as CRequest; $provider = CRequest::getProvider(); $provider->setBaseUri('http://localhost/testing'); You will need to a copy of the incubator library files from the Phalcon/Incubator github. Download and copy all or just the HTTP directory to your /app/library/ folder. In your public/index.php, add $loader->registerNamespaces with the correct path to the incubator library. $loader = new Phalcon\Loader(); $loader->registerNamespaces(array( 'Phalcon' => APP

Force autocomplete suggestions for file paths

守給你的承諾、 提交于 2019-12-02 01:02:19
I am currently working on a controller file for a Phalcon project. I like how PhpStorm gives you autocomplete suggestions when writing a src or href value in an HTML file. I was wondering, is possible to enable autocomplete suggestions when adding resources in a controller? This is what happens when I force autocomplete suggestions(Ctrl + Space) This is what I would like to happen. EDIT: I should also note that I have marked the folder, containing all my resources(ie. CSS, javascript, and images), as the "Resource root". RE: EDIT This does not affect availability of this feature/functionality