Menu
  • HOME
  • TAGS

ZendX Console Process posix functions

Tag: zend-framework,zendx

I am catch the follow exception in my code:

ZendX_Console_Process_Exception' with message 'posix_* functions are required

What's posix function is need for it work right?

Thanks

Best How To :

I am installed the php-process package.

In Red Hat, or Centos, to use:

sudo yum install php-process -y

Zend date validator fail for format dd-mm-yyyy

php,validation,date,zend-framework

There is a bug in ZF-7583: Zend_Date::isDate accepts invalid dates. Thats why some dates are showing in correct. Its better to use a regex validation for it. You can check this post for the regex Regex to validate date format dd/mm/yyyy...

Pimcore multilanguage site static route

php,zend-framework,routing,pimcore

There is the "Sites" - feature in Pimcore that lets you do this. The documentation page describes how you set this up, but I'll explain it quickly: You basically set up your document tree like this, creating a usual document for each of your languages: After this, all you need...

PHP ZF2 Mysql has gone away

php,mysql,zend-framework,zend-framework2

Yes, I check the persistent connection option, but I also not fond of it. I find the problem, it cause by mysql server close idle connection after 'wait timeout'. when mysql closing the idle connection, PDO will not receive any event so the next time you initiate a query it...

Zend 1 3d party NameSpaces autoload don't working

php,zend-framework,amazon-web-services,namespaces,autoloader

In order to use $autoloader->registerNamespace('Aws'), the AWS lib you seek must be on your PHP include path, which probably includes your ./library directory. Instead, you have the AWS lib buried down in ./library/Eplan/AmazonCloudSearch, which almost certainly is not on your PHP include_path. Try moving the AWS library up two levels,...

is not null condition in zend framework 2

php,mysql,sql,zend-framework,zend-framework2

got it..!! $select->where->isNotNull('pe_name'); and $select->where('pe_name IS NOT NULL'); also works....

How to get all available languages from Localized Fields in pimcore?

php,zend-framework,zend-locale,pimcore

After crawling through tons of pimcore-backend-Classes I found the solution here: $config = \Zend_Registry::get("pimcore_config_system"); $validLanguages = strval($config->general->validLanguages); ...

Fetch the maximum value of a field having same id in php

php,mysql,zend-framework,zend-framework2,zend-db-table

->join(array('oid' => DB_TABLE_PREFIX . 'order_installment_details'), 'oid.OrderInstallmentId = oi.OrderInstallmentId', array( 'OrderInstallmentDetailsId', 'lastInstallmentDate' => new Zend_Db_Expr('MAX(InstallmentDate)') )) ->join(array('f' => DB_TABLE_PREFIX . 'firm'), 'f.FirmId = c.FirmId', array('FirmName')) ->join(array('u' => DB_TABLE_PREFIX . 'user'), 'u.UserId = c.CustomerId', array('FirstName', 'LastName')) ->group('a.AccountId') ->order('j.CreatedDate ASC'); ...

File upload form validation invalid

php,zend-framework

If somebody is interested and may be has the same problem, I finally got the solution: Solution 1: The problem was, that the submitted $_FILES was limited to 20 file upload fields. See php ini max_file_uploads -> http://php.net/manual/en/ini.core.php#ini.max-file-uploads. And that was why Zend always said that the form is not...

Validation for Add screen not working but it working in edit screen with same code

php,validation,zend-framework,zend-form

You need to change following code in the addAction logic: instead of: $this->populate($formData); use $form->populate($formData); The reason is $this means Action object in this context and you have correctly used $form object in EditAction so it is working properly, so it is kind of silly typing mistake. PS: you should...

Failed installation of zend-escaper with Composer

php,zend-framework,composer-php

The PHP version on the command line can be a different executable than the PHP running inside the web server. It also can use a different pho.ini configuration file. So if Composer states the PHP it is using is 5.3.5, this is correct because Composer is directly asking the PHP...

Zend paginator with AJAX

jquery,ajax,zend-framework,pagination

It depends how your front-end is built but you are on the right track. Zend1 provided a nice helper called a context switch that does most of the work for you (disables view, sets appropriate headers) but it's not necessary to use it. The general idea is to keep that...

Zend InputFilter requires intl PHP extension?

php,zend-framework,zend-framework2

Fixed it by going to php.ini and uncommenting extension=php_intl.dll

Manipulate value in Zend_Registry

php,zend-framework

It has been a long while since I have manipulated the registry as you have asked, however I think you can do the following: $myArray = Zend_Registry::get('myArray'); $myArray['key'] = $value; Zend_Registry::set('myArray', $myArray); This gets the value out of Zend_Registry, adds another element to the array, and sets it back into...

PHP - how to send png or jpg email attachment?

php,zend-framework

Use the official reference from Mandrill: API reference.

Transfert a Zend Project to Symfony

php,symfony2,zend-framework

There is no way* I can think of that would allow you to automatically transfer a project from Zend Framework 1 to Symfony2. You would have to start all over again, from scratch. My boss made me do that, there was this app written in C, Python, Perl, Bash and...

How to route pages using text instead of IDs?

zend-framework,zend-framework2,zend-route,zend-router

There are a couple of ways. Without your code it will be pretty difficult to explain, but i'll give it a shot. First, there is one way you could solve it is by storing your news with an attribute called friendlyUrl (for example) and instead of selecting your news by...

Zend File Create folder while uploading

zend-framework,zend-form

You will have to remove ->setDestination from your form and put it in your controller. The following is what you will put in your controller. $upload = new Zend_File_Transfer_Adapter_Http(); if (//code to check if folder '/var/www/upload' does not exist) { //code to create a folder '/var/www/upload' and then set destination...

Zend framework - how can i update the row if status field and id match?

php,zend-framework

For your comparison you can't use an array for the where part of the statement. Instead you should use the Where class. Add at the top of the .php file the following: use Zend\Db\Sql\Where; Then where you use now the array you should use the Where instance: $where = new...

Bootstrap of Zend Module is not loading

php,zend-framework,autoload

I did some tests in my basic ZF1 setup and the only way this does not work is when the filename is not Bootstrap.php. In terms of Linux it is also case sensitive. As you mention correctly the modules path is looked at every time and exit() is working in...

Password protecting Apigility admin UI without htpasswd

zend-framework,zend-framework2,apigility

You don't need password protection for ApiGility UI. Access should only be allowed in the Dev environment. php public/index.php development enable <- to enable the UI php public/index.php development disable <- to disable the UI If you consist of having password protection for it. Then you can add an event...

Zend Skeleton Application album tutorial 404

php,zend-framework,zend-framework2

It turns out in module.config.php I had split the array with the controllers and router into two arrays by mistake. Combining them into one seems to have solved this particular issue. Code follows: return array( 'controllers' => array( 'invokables' => array( 'Album\Controller\Album' => 'Album\Controller\AlbumController', ), ), 'router' => array( 'routes'...

Zend Framework 2 Cache filesystem

php,zend-framework,zend-framework2

Here is a useful link to the official ZF2 documentation for the specific StorageAdapter that you are using (filesystem).

Is it possible to set a separator for Zend Framework 2 form rows or display them in paragraphs?

php,zend-framework,formcollection

Best thing to do is override the formRow helper with your own version that outputs the markup you want. I wrote a little lib that does just this, feel free to use it or copy the approach. Define your own helper: https://github.com/tfountain/tf-form/blob/master/src/TfForm/Form/View/Helper/FormRow.php and then update your module config to use...

Overriding ZF2 global/local config: unsetting

zend-framework,zend-framework2

You can add a listener on the event Zend\ModuleManager\ModuleEvent::EVENT_MERGE_CONFIG to remove the required options. Zend\ModuleManager\Listener\ConfigListener triggers a special event, Zend\ModuleManager\ModuleEvent::EVENT_MERGE_CONFIG, after merging all configuration, but prior to it being passed to the ServiceManager. By listening to this event, you can inspect the merged configuration and manipulate it. Such a listener...

Pass array on url using zend framework 2 routes

php,zend-framework,routes,zend-framework2

Since I had no feedback I had to make a workaround. Here's how I managed to accomplish what I asked: First, instead of using: www.example.com/Search/Attribute1-X-Attribute3-Y/Search/Attribute2-Z I used something like this: www.example.com/Search/Attribute1/X/Attribute3/Y/Search/Attribute2/Z I first used a regex to this route on my module.config: 'search' => array( 'type' => 'Application\Router\SearchesImprovedRegex', 'options' =>...

Uninstalling php 5.3 in ubuntu 14.04

php,zend-framework,ubuntu-14.04

The below answer credit goes to Maythux To uninstall something you installed from source, you would use cd back into the directory you built it from and then run sudo make uninstall but I don't think this will work with PHP since it doesn't have an uninstall. So what you...

How to manage Zend session save handler using Zend?

php,zend-framework,memcached,zend-session,libmemcached

I found a solution to manage sessions for sub domains. What I did is I placed below three lines in .htaccess file to manage sessions on Memcache rather than files based sessions. That means no need to make changes in php.ini file. Memcache option php_value session.cookie_domain "{your_domain}" php_value session.save_handler "memcache"...

Content type-error when using Zend_Http_Client

php,post,zend-framework,zend-http-client

This answer brought me back on track: http://stackoverflow.com/a/7407491/3218828 $rawData = ''; foreach ($postParams as $postParam => $postValue) { if ($rawData !== '') { $rawData .= '&'; } $rawData .= $postParam . '%5B%5D=' . $postValue; } $client = new Zend_Http_Client(); $client->setRawData($rawData); $client->setUri('https://ssl.google-analytics.com/debug/collect'); $client->request(Zend_Http_Client::GET); ...

Zend_Pdf how to reduce the loading time of images?

zend-framework,zend-pdf

If your images contain transparent backgrounds, they will take a long time to render in Zend_Pdf. Try removing the transparent backgrounds (if possible) and see if that makes a difference. If that helps, you could use GD library or ImageMagick to replace transaparent backgrounds with white backgrounds as the logos...

ZF Error ZF tool setup

zend-framework,command-line-interface

I ended up using Zend Framework 1 final release - version 1.12.11 to get around this headache and it worked perfectlt as it should have. Had to be a bug in the 1.9 version!

controller action not found on production server

php,zend-framework

since your are using zend framework why don't you use the Zend_Date $dateObj = new Zend_Date(); $dateObj->set($form->getValue('datum'),'dd/MM/yyyy'); $datum = $dateObj->toString('yyyy-MM-dd'); ...

Socialengine addon Advanced Events Plugin v4.8.8p2 throwing errror on create

php,zend-framework,socialengine

Its seems you need to verify license .Contact the Socialengineaddson guys will help you.

Get Google Plus Images Using Zend Framework 1 Gdata

php,cakephp,zend-framework,google-plus,gdata

Zend_Gdata uses ClientLogin which was deprecated as of April 20, 2012 and turned off on May 26 2015. This code will not longer work you need to switch to using Oauth2. You can use the current Google PHP client library to authenticate then use the access token created there to...

Zendframework(1.12.11) view helper not found in phpunit

zend-framework,phpunit

I got solution. I have replace my configuration setting of application.ini resources.view.helperPath = APPLICATION_PATH "/views/helpers" with resources.view.helperPath.Application_View_Helper = APPLICATION_PATH "/views/helpers/" and changed naming convention of Test.php with class Application_View_Helper_Test extends Zend_View_Helper_Abstract {} now zend loder will try to find view helper in application directory rather than Zend...

Understanding bootstrap, config.php, application.ini

php,zend-framework

Well, bootstrap extends Zend_Application_Bootstrap_Bootstrap and gives you the opportunity to add in any functionality you might need for the application during its startup phase (e.g. registering plugins etc). config.php and application.ini are essentially the same thing, just different formats. You could also do config.xml if you prefer. application.ini is the...

Wrong datatype for referenced entity on Doctrine ObjectSelect

php,zend-framework,orm,doctrine2

What are your hydrator settings on this fieldset? For example; $this->setHydrator(new DoctrineHydrator($em, 'Blog\Entity\Category')) ->setObject( new Category() ); ...

Php Mysql select query not working

php,mysql,zend-framework,zend-framework2

AccountId put like finance_account.AccountId or ac.AccountId because query ambiguous on which table to look at $select = $this->select() ->from(array('finance_account' => DB_TABLE_PREFIX . 'finance_account'), array( 'AccountId', 'ParentAccountId', 'AccountGroupId', 'AccountPath', 'AccountCode', 'AccountName', 'Description' )) ->joinLeft(array('ac' => DB_TABLE_PREFIX . 'customer'), 'finance_account.AccountId = ac.AccountId', array()) // using "array_unique()" to minimize db overhead ->where('ac.AccountId IN...

Error in Array comparison in php

php,arrays,zend-framework,foreach,zend-framework2

Solved it,simply by using (($csvRow[$this->_csvColumnJournalDate]) == $csv_ied_journal_date) ) instead of (($csvRow[$this->_csvColumnJournalDate]) === $csv_ied_journal_date) ) now works like a charm! == for same value === same data type type and value...

Doctrine2: Lazy loading fails and I have to re-initialize the class

php,zend-framework,doctrine2

The code was called in loop like below: foreach( ... ) { $wall_post_obj->getAlbum() } But accidentally $em->clear() was placed at the end of the loop. $em->clear() clears the data from your current object. so $em->refresh() will not work....

zend framework 2 nested module structrue in one main module

php,zend-framework,zend-framework2

Your autoloader probably can't find your controller because it's under a different namespace. Try specifying the Login namespace and see if it helps. 'Zend\Loader\StandardAutoloader' => array( 'namespaces' => array( __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, 'Login' => __DIR__ . '/src/Login', ), ), ...

Zend And YouTube Not Deleting Videos

zend-framework,youtube-api,google-client-login

Zend_Gdata uses ClientLogin which was deprecated as of April 20, 2012 and turned off on May 26 2015. This code will not longer work you need to switch to using Oauth2. You can use the current Google PHP client library to authenticate then use the access token created there to...

How to send field name for required true validation in zend

php,zend-framework,zend-form,zend-validate

Try this:- $this->addElement( 'text', 'title', array( 'placeholder' => 'Title', 'class' => 'form-control', 'required' => true, 'filters' => array( 'StringTrim' ), 'autocomplete' => 'off', 'validators' => array( array('NotEmpty', false, array('messages' => array(Zend_Validate_NotEmpty::IS_EMPTY => 'Title is required and cant be empty'))) ) ) ); ...

zend 1 xsd validation

xml,zend-framework,xsd-validation

No, it does not provide anything, but there is no reason as you can use PHP's DomDocument class to perform this validation and it is a very simple task: $dom= new \DomDocument(); $dom->loadXML($xmlContent); $dom->schemaValidate('xsd/schema.xsd'); I would use this code to build a custom validator, so it's easy to reuse: http://framework.zend.com/manual/1.12/en/zend.validate.writing_validators.html...

Zend 1 Redirect to controller from library

php,zend-framework

You should really try to do this kinda thing from a controller, but I've found a use-case for this in a library file as well, so there's no shame in it :-) $redirector = new Zend_Controller_Action_Helper_Redirector(); $redirector->gotoSimpleAndExit($action, $controller, $module, $params); More info here http://framework.zend.com/apidoc/1.9/Zend_Controller/Zend_Controller_Action_Helper/Zend_Controller_Action_Helper_Redirector.html...

Zend Framework 2 routing error: resolves to invalid controller class or alias

zend-framework,routing,zend-framework2,zend-framework-mvc,zend-framework-routing

At the moment the route named application (the parent) defines a URL route of /application. The child route default however requires the controller name to be passed in as the first argument, followed by action. This means the URL would be /application/[:controller]/[:action] So visting /application/test You are inadvertently trying to...

Zend Framework 2 - Sending form using Zend\Mail

php,jquery,ajax,zend-framework,sendmail

While I was implementing my email method I was never able to get the exception with: catch (\Exception $e) { return false;} For me it was not so important to get it though. But at some point I noticed that I was getting an exception when the domain did not...

ZF2 - Display image in view based on full path

php,image,zend-framework,zend-framework2

I have created a module HtImgModule for doing image manipulation in Zend Framework 2. Here is an example to simply output an image: namespace Applicaton\Controller; use Zend\Mvc\Controller\AbstractActionController; use HtImgModule\View\Model\ImageModel; class MyController extends AbstractActionController { public function displayImageAction() { return new ImageModel('path/to/image'); } } So, it is not absolutely necessary to...

ZendX Console Process posix functions

zend-framework,zendx

I am installed the php-process package. In Red Hat, or Centos, to use: sudo yum install php-process -y ...

Object of class Zend_Db_Table_Row could not be converted to string

php,mysql,zend-framework

The error message is telling you what the problem is. fetchRow() is returning a Zend_Db_Table_Row object which you are then storing in an array in the index 'weekpages'. I'm not sure what you intend to do with the data from the retrieved row but you can try either converting the...