Questions tagged [zend-framework]

1

votes
1

answer
266

Views

Zend framework: Execute code after response sent to user

I have a simple requirement to execute some code after the view has rendered and been sent back to the user. The user does not need to be notified of the results of the processing and I do not want to hold up the user while processing something that is not relevant to them, even though it will only...
MarkOfSine
1

votes
0

answer
9

Views

Insert one instance in mysql with zf1

I work currently under zend framework 1.12 I would like to insert a hash of timestamp into mysql table (zb_table) via API I am looking for a mechanism of insertion , such kind for each insertion I must make sure that there was no other insertion at the same time The order of insertion is important...
NF38
1

votes
1

answer
120

Views

How to have Curl_Multi_Exec return more than 20 good requests without having 500 error code

I'm currently in the process of creating a script that will send a large number of Urls to the Google Pagespeed Insights API (under the specified 100 per user per 100 seconds), process the returned information, and have the scores added to my database tables accordingly. My problem arises when I att...
Caffeine_Intensifies
1

votes
2

answer
58

Views

How to remove index controller name from url in zend framwork 1.2?

I am using Zend framework v1.2 for my work. and I have a controller IndexController containing few methods like indexAction() -----------> www.website.com/index/index howitworksAction() ---> www.website.com/index/howitworks pricingAction() ---> www.website.com/index/pricing contactAction() ---> ww...
AWE
1

votes
1

answer
52

Views

Zend xmlrpc error

I have this error with Zend (v1) XmlRpc client : Uncaught exception 'Zend_XmlRpc_Client_FaultException' with message 'Failed to parse response'. It's the error status 651. The call never reaches the class/method requested, it seems that the call is not fired like it was blocked or something. I'm in...
banibanc
1

votes
1

answer
218

Views

How to minify HTML output in Zend Framework 1.12

As per the process mentioned here https://www.tkcodez.info/minify-html-output-via-php-code/. I have tried to inject one script in one of my layout files like this: // Layout.phtml ---- rest of the phtml file ----- But could not find my html view source minified. What else I need to do?
Subhasis Laha
1

votes
0

answer
160

Views

Zend - Moving from reCaptcha to reCaptcha2

I currently have a Recaptcha form on my site, which uses Zend. What do I need to change here to implement Recaptcha2? $reCaptcha = new Zend_Service_ReCaptcha($config->recaptcha->site_key, $config->recaptcha->secret_key); $captcha = new Zend_Form_Element_Captcha('captcha', array( 'captcha' => '...
fractal5
1

votes
0

answer
77

Views

SiberianCMS installation Fatal Error “String could not be parsed as XML”

While installing siberianCMS SAE version on my windows 10 os with wamp64 version getting below error. [exception] => Exception Object ( [message:protected] => String could not be parsed as XML [string:Exception:private] => [code:protected] => 0 [file:protected] => F:\wamp64\www\sbcms\lib\Siberian\L...
Phil Winston
1

votes
0

answer
11

Views

Zend Lucene Search

What could cause differences in the way Zend Lucene indexes the same data on two different servers? I've found that the use of glibc vs libiconv might be one possible culprit, but are there any others? I've indexed the same database on two servers, using identical PHP code - one on my local dev mach...
Kieran Metcalfe
1

votes
0

answer
91

Views

Zend Framework Serialization of Closure not allowed

I'm having difficulty finding an answer to this issue specifically for zend framework on the internet. I'm getting an error of Serialization of Closure is not allowed. The issue I have is that its just the zend internal code, not any of my code. I know this because i used the zend skeleton applicati...
jkushner
1

votes
0

answer
333

Views

React and Zend Framework 3 layout

I'm actually starting to use React and I want to integrate to my project that is made with ZF3. I want to manage the layout of the project with React but i don't understand how manage the content of the templates since that content is on a variable of the layout named $content Which is the best app...
matiasmaquez
1

votes
0

answer
20

Views

Getting data as array instead of stdClass in zf-rest

I'm using zf-rest for building my RESTful web apps. I have the following configurations: 'zf-rest' => [ Resource\FeedbackResource::class => [ 'listener' => Resource\FeedbackResource::class, 'route_name' => 'api/rest/feedback', 'entity_http_methods' => [ ], 'collection_http_methods' => [ 'POST', ], ]...
altralaser
1

votes
1

answer
283

Views

Unable to resolve service “Zend\Db\Adapter\AdapterInterface” to a factory

I am a newbie to zf.I downloaded the album project from github and started working on it . I did all the configuration as been written in the tutorial . But i am getting this error continuously . Unable to resolve service 'Zend\Db\Adapter\AdapterInterface' to a factory; are you certain you provide...
1

votes
1

answer
308

Views

Zend Expresive - EmitterException: Output has been emitted previously

I was trying to configure my website on VPS. On my local machine everything works fine, but on VPS I got 500 error. This is log: PHP message: PHP Fatal error: Uncaught Zend\HttpHandlerRunner\Exception\EmitterException: Output has been emitted previously; cannot emit response in /var/www/project/ven...
Robin71
1

votes
0

answer
39

Views

Are Module Names Consdiered to be Lowercase in Zend Framework?

With the first version of Zend Framework modules were introduced. By bootstrapping their Controllers the module name by the definition in the code must not be explicitly lowercase only, however I have the strong assumption that these module names (in the end directory components of a path) are to be...
hakre
1

votes
1

answer
123

Views

A text must be provide to Barcode before drawing in codeigniter

I use zend libraries to generate barcode in codeigniter. This is my controller : $this->load->library('zend'); $this->zend->load('Zend/Barcode'); $barcode = $this->input->post('barcode'); //nomor id barcode $imageResource = Zend_Barcode::factory('code128', 'image', array('text'=>$barcode), array())...
Akmal Athallah
1

votes
0

answer
28

Views

how to get zend subform values

I have zend project up and running. How to get zend subform values and save it in a controller? If I use extends Zend_Form it's working. But if I use extends Zend_Form_SubForm it's not showing the form values. I use the following code in my controller to show the values: public function registerActi...
Test admin
1

votes
0

answer
209

Views

zend framework zend_mail not sending email

Inherited a zend framework application version 1.12 and as of recent stopped sending emails. indexcontroller.php $mail = new Zend_Mail('UTF-8'); $mail->addTo($sender_email); $mail->setSubject('Result of Payment Transaction (Success)'); ob_start(); include APPLICATION_PATH . '/views/scripts/file.ph...
noe
1

votes
0

answer
44

Views

zend framework 2 view public function

I have read many entries and tried a lot (for example, viewhelpers), but unfortunately nothing works (which is definitely due to my little knowledge). We use the Zend Framework 2 internally with CdliTwoStageSignup (https://github.com/cdli/CdliTwoStageSignup). In this module i want to realize that yo...
Flo
1

votes
1

answer
75

Views

Zend View behaviour in a Swoole http server

we are facing a strange behaviour with a Zend Expressive application using Zend View and running in a swoole http server. This behaviour is related with the Singleton pattern. We have configured Zend Expressive to run in a swoole http server - https://docs.zendframework.com/zend-expressive-swoole/ -...
Javier Gálvez
1

votes
0

answer
28

Views

PHPUnit is showing test as passed when there are Fatal Exception Errors

I am using Netbeans 8.2 and PHPUnit 4.8.36 along with PHP 5.6.36 and I have some issue when there is some Fatal Error Exception within the tests functions. /** * @runInSeparateProcess */ public function testEquals() { thisMethodDoesNotExistsAndTestShouldFail(); } It works fine if I add the annotatio...
Mizlul
1

votes
1

answer
72

Views

Multiprocessing in php using zend framework 3

Is it possible to multiprocess/multithread in php from a http request. Background I am working on a project where I expect some data (not from a user so data upload is consistent) to be uploaded to an api. I want to decouple the process such that if data upload is successful, I notify this client an...
J.Ewa
1

votes
0

answer
23

Views

Using zf-hal hydrator fails

I've a problem to use the zf-hal hydrator in combination with an abstract factory. This is my module configuration: public function getConfig() { return [ 'hydrators' => [ 'abstract_factories' => [ AbstractHydratorFactory::class, ] ], 'service_manager' => [ 'factories' => [ ModuleOptions::class => M...
altralaser
1

votes
0

answer
18

Views

ZendFramework 1.12 with Doctrine can't get a query to work.

I am kinda new to ZF1 and Doctorine, and I can't figure out the problem. I inherited an old protect so I am learning as I go with this one. Here is whats in my model public function recordResponded($contact_id = 0) { $this->createQuery() ->update() ->set($this->_tableAlias . 'responded', '1') ->wher...
chris
1

votes
0

answer
39

Views

Remove duplicates values from dropdown in php

Hi all i am trying to remove duplicate values from my dropdown. But somehow i couldn't able to understand how to do. Here is my code: /** * Get order ticket details */ public function ticketDetailsAction() { $orderId = $this->getRequest()->getParam('orderId', 0); $contactId = $this->getRequest()->ge...
suresh
1

votes
0

answer
28

Views

Remove radio button by default checked in zend

Hi guys I am trying to remove radio button by default checked in my application AS I am new to zend I couldn't able to understand how to do that Here is my code: /** * Get single selection action column for grid. * * @return Bvb_Grid_Extra_Column */ protected function getSingleSelectionActionColumn...
suresh
1

votes
1

answer
53

Views

Doctrine on linux: unable to connect to sql server

I am trying to run a zend + doctrine web application from a Debian 9 host, using php 5.6 I've the need to connect to a sql server that is on different host (it's a windows machine, obviously) I tested connection using isql command line and I am correctly able to login and to operate in the desired d...
realtebo
0

votes
1

answer
80

Views

I dont understand why my variable is NULL

First of all, sorry my english isnt so good. So i have a problem, when i display my variable, he return me NULL and i dont know why :( Label.php class Services_Label extends Services_Abstract { public function getlibelle() { $sRequest = 'SELECT NAME FROM menu WHERE id_application = 2'; $this->execu...
Nico
1

votes
1

answer
33

Views

Escaping output may help protect from which common security vulnerabilities?

Clickjacking Cross-Site Scripting Cross-Ste Request Forgery SQL Injection This question is part of PHP 7 certification guide by ZEND. The provided answer in the guide seems to be wrong! My answer is Cross-Site Scripting. However the answer provided by guide is 'Cross-Site Scripting' & 'SQL Injection...
Amir
1

votes
0

answer
20

Views

Filter category products by Attribute Set Id

I have created a custom module which rewrite the Mage_Catalog_Block_Product_List class, now I want to filter Category product collection by attribute_set_id. Below is my code for this: protected function _getProductCollection() { if (is_null($this->_productCollection)) { $layer = $this->getLayer();...
Karan Adhikari
1

votes
0

answer
18

Views

Zend or Apache is replacing my src value with data:image

I am working on a web site that I worked heavily on a couple of years ago but only maintained since. It was recently migrated to another server. The new server uses ZendFramework version 1.12.20 on Apache (httpd=2.4.6-88.el7.x86_64). There seems to be a weird bug where instead of using the URL of an...
HealerLolCat
1

votes
1

answer
110

Views

PHPMYADMIN Exception: Specified context (“\SqlParser\Contexts\ContextMySql50724”) does not exist

I'm using Ubuntu 18.04,Zend framework 3, and integrated Xdebugger with Visual studio. Now when I start debugger in visual studio and reload phpmyadmin web page on my localhost localhost/phpmyadmin in browser, it shows me this error Even though I did not put any breakpoint but everytime it still sto...
Aamir
1

votes
0

answer
19

Views

Use Zend_Paginator without loading all data from WebAPI

Almost similar question to here: (how to use zend paginate without loading all the results of a database) But in that case the question was solved by building a Table_Select to feed onto Zend_Paginator. My situation is that I am going to receive the data from a ASP.NET Web API. The Web API have a ca...
Farid
1

votes
0

answer
19

Views

How to build Zend Predicate with And instead of Like

I'm building a function that turns a set of parameters into a Zend\Db\Sql\Predicate\Predicate to pass to a select statement. I have had success turning an array of columns and terms into a 'and like' query, $p = new Predicate(); foreach ($columns as $index => $value) { $predicate->and->like($columns...
K Adrian
1

votes
2

answer
30

Views

Why am I getting the wrong document root?

I am working through this tutorial- https://docs.zendframework.com/tutorials/getting-started/skeleton-application/ In trying to get it setup on an Apache local server I have used this code- ServerName zf-tutorial.localhost DocumentRoot /var/www/html/skeleton-application/public SetEnv APPLICATION_EN...
tjjen
1

votes
1

answer
43

Views

How to left join in query builder without entity in doctrine zend

Hi I have M:M relationship between two tables, Contacts and Tags and their M:M table is called Contacts_Tags: Contacts ------------ ID Name Tags ----------- ID Name Contacts_Tags -------------- Contact_ID Tag_ID I have entities for Contacts called Contact and for Tags called Tag but not for Contacts...
Ali Rasheed
1

votes
0

answer
34

Views

How to update referenced key id to null in one to one doctrine

I am running in this issue. Whenever I delete a company entity, the contact entity which has company's id as reference key throws an error. Company for IDs ID(29) was not found I have this: Contacts Table ID, Name, Company_ID Companies Table ID, Name And I have these relationships in their entities....
Ali Rasheed
1

votes
0

answer
30

Views

Phpunit using zend framework 3 and doctrine, Mocking not working

I'm using zend-test in zf3, using doctrine, when I run the test for PostController showAction(),it is showing following error $ vendor/bin/phpunit --testsuite Post --stderr PHPUnit 7.5.2 by Sebastian Bergmann and contributors. F 1 / 1 (100%) Time: 169 ms, Memory: 16.00MB There was 1 failure: 1)...
Aamir
1

votes
1

answer
20

Views

How to get a list of objects with a 3 table join zend/sql?

I have three tables. Football_club Football_club_player Football_club_Title The last two tables have a many to one Relationship to the Table Football_club structure of the tables: Football club coulmns: football_club_id name ... _______________________________ Football club Player coulmns: footba...
KicksheepSon
1

votes
1

answer
294

Views

What is the best code location to define table relationship methods using Zend Framework models?

I'm creating a simple tag system that allows me to link a tag to almost everything in my application. In order to facilitate this, I created a table called 'objects', referenced by my model 'Object'. I've got three models setup at the moment: Tag (with TagObject defined as a dependentTable) Object (...
Aron Rotteveel

View additional questions