zf.php won't recognize any command - zend-framework2

I'm using the ZF2 Skeleton application. I installed zftool using composer: composer require zendframework/zftool:dev-master but then, when I run zf.php I get the HTML of the Skeleton app homepage instead of a list of commands or something...
Any ideas? Thanks!
Edit:
This is the output from php-v:
PHP 5.6.23-2+deb.sury.org~trusty+1 (cli)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

Related

php-cs-fixer stopped working after php 7.3 update

I'm using Homebrew to manage both of them and they are up to date.
~ $ brew --version
Homebrew 1.8.4
Homebrew/homebrew-core (git revision a166; last commit 2018-12-08)
~ $ php --version
PHP 7.3.0 (cli) (built: Dec 7 2018 11:00:11) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.0-dev, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.0, Copyright (c) 1999-2018, by Zend Technologies
~ $ php-cs-fixer --version
PHP needs to be a minimum version of PHP 5.6.0 and maximum version of PHP 7.2.*.
~ $ brew upgrade php-cs-fixer
Error: php-cs-fixer 2.13.1 already installed
This happens when I try to use php-cs-fixer
~ $ php-cs-fixer fix file.php
PHP needs to be a minimum version of PHP 5.6.0 and maximum version of PHP 7.2.*.
So, I downloaded php#7.2 and php-cs-fixer.phar to test and it works that way.
~ $ /usr/local/Cellar/php#7.2/7.2.13/bin/php /Users/aaronk/php-cs-fixer.phar fix file.php
Loaded config default from "/Users/aaronk/.php_cs".
Using cache file ".php_cs.cache".
Paths from configuration file have been overridden by paths provided as command arguments.
1) file.php
Fixed all files in 0.014 seconds, 10.000 MB memory used
~ $
So my question is, how do I get homebrew's php-cs-fixer to work?
Is homebrew doing something wrong here?
(p.s. is there a tag for php7.3)
As said by godbout, PHP-CS-Fixer does not yes support PHP 7.3. You can track the GitHub issue [Meta] PHP 7.3 support #3697, to follow the evolution of the situation. According to this issue, the following changes in PHP 7.3 still need to be adressed:
Flexible Heredoc and Nowdoc Syntaxes
list() Reference Assignment
instanceof now allows literals as the first operand, in which case the result is always false.
Allow a trailing comma in function calls
hrtime function has been added
is_countable function shall be handled as all other native functions
The current version "friendsofphp/php-cs-fixer": "^2.14" now supports php 7.3. You could upgrade it and it should work fine.
Nothing to do with Homebrew. It's php-cs-fixer itself that doesn't support PHP7.3. You would get the same issue through composer, with unmet dependencies.
The mentioned issues isn't related to the PH PC Fixer code, rather to it's features. It's clear missuse of composer.json, where are dependencies, not features.
PHP CS Fixer works fine on PHP 7.3, see this PR.
This command allows you to install it on PHP 7.3:
composer update --ignore-platform-reqs
Let me know if you came across any troubles.
To clarify - PHP CS Fixer being run under PHP 7.3 may fix code written using syntax up to PHP 7.2. But if one would run tool on code written in 7.3, eg is_null($foo, ) (trailing comma), then behavior of fixer is not stable (producing null === $foo, - still, with trailing comma), which is an issue.

The type or namespace name 'TwinCollection' could not be found

Following the article to build an Azure Iot Edge module on Windows 10 https://learn.microsoft.com/en-us/azure/iot-edge/tutorial-csharp-module
In the step 12 to Build IoT Edge Module, VS Code generates following error message: This is consistent experience in two different new Win 10 Environment I have tried to Build a docker image.
All the prerequisite steps have been successfully completed.
PS C:\Users\\Code\FilterModule> dotnet publish "c:\Users\\Code\FilterModule\FilterModule.csproj"
Microsoft (R) Build Engine version 15.5.180.51428 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
Restoring packages for c:\Users\\Code\FilterModule\FilterModule.csproj...
Generating MSBuild file C:\Users\\Code\FilterModule\obj\FilterModule.csproj.nuget.g.props.
Restore completed in 392.82 ms for c:\Users\\Code\FilterModule\FilterModule.csproj.
Program.cs(110,47): error CS0246: The type or namespace name 'TwinCollection' could not be found (are you missing a using directive or an assembly reference?) [c:\Users\\Code\FilterModule\FilterModule.csproj]
Anyone came across this issue and any advise on resolution?
The tutorial walks you through the process of pasting a bunch of code into your own sample project, but it leaves out a few necessary using directives. So if you try to compile as is, you get errors.
To work around this, you can add three using directives to the top of your Program.cs file:
using System.Collections.Generic; // for KeyValuePair<>
using Microsoft.Azure.Devices.Shared; // for TwinCollection
using Newtonsoft.Json; // for JsonConvert
I've also submitted a PR to get the tutorial updated:
https://github.com/MicrosoftDocs/azure-docs/pull/4600/files

Do zend framework has application setup wizard module?

I'm looking at zend framework 2 to use it for my project.
Wanted to know if it has an in-build php web application installer script/module like mentioned in this thread How I can create installer for website. PHP mysql
I would say using Composer with your own composer.json is as close as you can get...
As an example there is the ZF2 Skeleton Application. Similarly you can also make a composer.json for your own custom application pointing to your custom repository and all dependencies.

Getting Started with Zend Framework2

I m reading the tutorial of getting started with zend framework2, when I came to this :
I don't know how to excecute this :
here is the link of the page : http://framework.zend.com/manual/2.0/en/user-guide/skeleton-application.html
How can I achieve this?
i have written a throughout article on how to install Zend Framework 2 on a windows environment. It is directed at Win7, but works very similar (if not identical) for XP, too.
Please read my Blog "Zend Framework 2 Installation on Xampp for Windows"
Well, the best way to get started with Zend Skeleton Application is:
$cd my/project/dir
$git clone git://github.com/zendframework/ZendSkeletonApplication.git --recursive
$cd ZendSkeletonApplication
In your project root you will find two files: composer.json and composer.phar. You can get more information about composer from the official Getting Started.
The composer.json file describes the project's dependencies:
{
"require": {
"php": ">=5.3.3",
"zendframework/zendframework": "~2.4"
}
}
In order to get the dependencies you need to execute from you project root:
$composer.phar self-update
$composer.phar update
Finally, you can start the internal PHP cli-server in the root directory:
$php -S 0.0.0.0:8080 -t public/ public/index.php
I hope this will help you to install and configure your app.
If you're using Windows, please check your php.exe directory. And execute it. Example:
C:\php\php.exe composer.phar self-update
If you're linux user, you already know the answer.
Zend Framework 2 has just been release and it is not a framework for newbies. There are a few different ways to install which you can find on http://framework.zend.com/downloads
or with XAMPP at Xampp In Windows
But I have the feeling that if you are having trouble at this point then ZF2 is not for you.
Per chance if you were on a Mac or Linux box, you would open the Terminal application. Navigate to the zend framework application (cd /path/to/app), and then run the commands.

Connection reset when adding <script></script> in CMS Block using Magento

When saving a CMS block in Magento 1.4.1, I am getting an error, connection reinitalized by my web browser. I only get this this error, when adding the tags <script></script>. Any other changes I can save and I can add new blocks as long as I don't use <script></script>
The only error I'm seeing is in /var/www/website/var/log/exception is this and only if I hit F5 after getting the connection reinitalized error. Apache and other system logs are not reporting any additional errors.
2012-07-06T08:47:22+00:00 DEBUG (7): HEADERS ALREADY SENT: <pre>[0]
/var/www/vhosts/site/app/code/core/Mage/Core/Controller/Response/Http.php:44
[1] /var/www/vhosts/site/lib/Zend/Controller/Response/Abstract.php:727
[2] /var/www/vhosts/site/app/code/core/Mage/Core/Controller/Response/Http.php:75
[3] /var/www/vhosts/site/app/code/core/Mage/Core/Controller/Varien/Front.php:188
[4] /var/www/vhosts/site/app/code/core/Mage/Core/Model/App.php:304
[5] /var/www/vhosts/site/app/Mage.php:596
[6] /var/www/vhosts/site/index.php:78
This website was working fine on a Centos 5.4 with PHP 5.2.13. All the same Apache and PHP modules were installed on the new Debian server. Any help would be sincerely appreciated.
Version Information
Magento 1.4.1
Debian 6.0 i386
PHP 5.3.3-7+squeeze13 with Suhosin-Patch (cli) (built: Jun 10 2012 09:35:18)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with the ionCube PHP Loader v4.0.7, Copyright (c) 2002-2011, by ionCube Ltd.
Server version: Apache/2.2.16 (Debian)
Server built: Apr 1 2012 06:40:08
A rule in our Netasq firewall was blocking the <SCRIPT> tag. Once we disabled the rule, the client was able to use the tag again. We did warn him, however, that netasq probably put that rule their for a very good reason.

Resources