zend

Installing xdebug with PHP 5.5

匿名 (未验证) 提交于 2019-12-03 01:33:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I've read quite a lot answers but couldn't figure out why xdebug doesn't work. php.ini: [ xdebug ] zend_extension = "/usr/lib/php5/20090626/xdebug.so" php -v: PHP 5.5 . 6 - 1 + debphp . org ~ precise + 2 ( cli ) ( built : Nov 21 2013 14 : 31 : 41 ) Copyright ( c ) 1997 - 2013 The PHP Group Zend Engine v2 . 5.0 , Copyright ( c ) 1998 - 2013 Zend Technologies with Zend OPcache v7 . 0.3 - dev , Copyright ( c ) 1999 - 2013 , by Zend Technologies /usr/lib/php5/20090626/xdebug.so does exist. No zend optimizer in php.ini. Also if I try to

php iconv translit for removing accents: not working as excepted?

匿名 (未验证) 提交于 2019-12-03 01:28:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: consider this simple code: echo iconv('UTF-8', 'ASCII//TRANSLIT', 'è'); it prints `e instead of just e do you know what I am doing wrong? nothing changed after adding setlocale setlocale(LC_COLLATE, 'en_US.utf8'); echo iconv('UTF-8', 'ASCII//TRANSLIT', 'è'); 回答1: I have this standard function to return valid url strings without the invalid url characters. The magic seems to be in the line after the //remove unwanted characters comment. This is taken from the Symfony framework documentation: http://www.symfony-project.org/jobeet/1_4/Doctrine

PHP with APC: Fatal errors: Cannot redeclare class

匿名 (未验证) 提交于 2019-12-03 01:27:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Since I installed APC for PHP with PECL I get sometimes these errors: Cannot redeclare class xxx xxx changes from time to time. I could disable APC but APC improves the performance great! Is there a known bug or could I do something else to prevent these errors? I'm using Ubuntu 8.04 LTS with PHP 5.2.4. Edit/Update (from comments): I use the Zend Framework Autoloader and these error never occurred before I enabled APC. A few moments ago I get for example that error: Fatal error: require(): Cannot redeclare class zend_db_adapter_abstract in

PHP Fatal error: Class 'Curl' not found with PHP 5.5

匿名 (未验证) 提交于 2019-12-03 01:26:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to run this code: <?php $url = 'https://api.stackexchange.com/2.1/comments'; $data = array("site" => 'graphicdesign', "key" => "W*i*e*V*M*N*F*y*b*t*R*((", "filter" => "!2.5sIHWRkCVWC)rFPY_1P", "order" => "desc", "sort" => "creation"); $httpresponse = (new Curl)->exec($url . '?' . http_build_query($data), [CURLOPT_ENCODING => 'gzip']); //Line 6 $obj = json_decode($httpresponse); $response = $obj->{'items'}; However, it fails with this error: $ php getcomments.php PHP Fatal error: Class 'Curl' not found in /home/me/gdcommentgetter

Travis CI: PHP 7.2 don&#039;t support Argon2i

匿名 (未验证) 提交于 2019-12-03 01:18:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've an error in my project with Travis CI: Argon2i algorithm is not supported. Please install the libsodium extension or upgrade to PHP 7.2+. But, Argon2i is present in the PHP 7.2 version and Travis CI install the PHP 7.2 version: $ phpenv global 7.2 2>/dev/null 7.2 is not pre-installed; installing Downloading archive: https://s3.amazonaws.com/travis-php-archives/binaries/ubuntu/14.04/x86_64/php-7.2.tar.bz2 $ curl -s -o archive.tar.bz2 $archive_url && tar xjf archive.tar.bz2 --directory / $ phpenv global 7.2 $ php --version PHP 7.2.0 (cli)

ZEND FW : Joining two tables from different databases

匿名 (未验证) 提交于 2019-12-03 01:05:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to join two tables in differenet databases on the same server. Could someone tell me how I could do this in Zend Frameworks Db adapter? 回答1: see: connecting to two different databases with Zend Framework http://blog.keppens.biz/2009/04/zendapplication-multiple-databases.html http://blog.ekini.net/2009/03/04/zend-framework-connecting-to-2-databases/ 回答2: Build tableGateway from your dbAdapter before joining two tables from different database. use use Zend\Db\Sql\Select; use Zend\Db\Sql\Where; $someCondition=new Where(); $someCondition-

Zend_Form_Element_File and “File exceeds the defined ini size” issue

匿名 (未验证) 提交于 2019-12-03 01:05:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm using Zend_Form_Element_File to validate certain file properties. The file input element in question is created dynamically - ie. it can be in the form, but doesn't need to; however, if it is, and a file has been submitted via it, it needs to meet certain criteria. I've encountered the "File exceeds the defined ini size" issue, when the form doesn't contain the file element. Is it an intended behavior? Please bear in mind that the FormUpload should validate for both form elements. I can use different Zend_Forms, depending on

Joining tables within a model in Zend Php

匿名 (未验证) 提交于 2019-12-03 01:05:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I understand the usage of Zend_Table and can obtain data using the Zend functions from the table associated with that class. For example I have a video table and in another table I have the association between the video and what category it is in. Im a little stumped how to active a select like the following within the framework: SELECT * FROM video,category WHERE category.category_id = 3 AND video.id = category.video_id I wish to do this within the video model which refers to the video table. 回答1: Here is a rough class. Its using the Zend

Zend Debugger Eclipse Startup Error: eclipse.php.debug.core was unable to load class debug.core.model.PHPConditionalBreakpoint

匿名 (未验证) 提交于 2019-12-03 01:03:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I work on Mac OSX Lion and ever since I've installed the Zend Debugger and gotten it to be able to debug php web applications, I often encounter this Eclipse startup error: Error creation extension for extension-point org.eclipse.php.internal.debug.daemon.communication Plug-in org.eclipse.php.debug.core was unable to load class org.eclipse.php.internal.debug.core.zend.communication.DebuggerCommunicationDaemon. An error occurred while automatically activating bundle org.eclipse.php.debug.core (258). The error log contains the following stack

Zend_form_element_select onchange in zend framework

匿名 (未验证) 提交于 2019-12-03 00:56:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a form named createDevice.php as: class Admin_Form_CreateDevice extends Zend_Form { public function init() { $this->setName('Create Device Access'); $sort=new Zend_Form_Element_Select('employee_name'); $sort->setLabel('Employee Name:'); $this->addElements(array($sort)); /* Form Elements & Other Definitions Here ... */ } } Now In controller action named viewDeviceAction() I have called this form as: public function viewDeviceAction() { echo 'viewDevice: '; $form_device=new Admin_Form_CreateDevice(); $form_device->setMethod('post');