zf create project error (Zend Framework) - php

I got a error when I try create a project using the zend framework command line:
[user ~] /home/user/public_html $ zf create project openstart
PHP Catchable fatal error: Argument 1 passed to Zend_Tool_Framework_Client_Console_ArgumentParser::setArguments() must be an array, null given, called in /home/user/downloads/ZendFramework-1.10.5/library/Zend/Tool/Framework/Client/Console.php on line 194 and defined in /home/user/downloads/ZendFramework-1.10.5/library/Zend/Tool/Framework/Client/Console/ArgumentParser.php on line 79
Catchable fatal error: Argument 1 passed to Zend_Tool_Framework_Client_Console_ArgumentParser::setArguments() must be an array, null given, called in /home/user/downloads/ZendFramework-1.10.5/library/Zend/Tool/Framework/Client/Console.php on line 194 and defined in /home/user/downloads/ZendFramework-1.10.5/library/Zend/Tool/Framework/Client/Console/ArgumentParser.php on line 79
zf is a symlink to /home/user/downloads/ZendFramework-1.10.5/bin/zf.sh
Any ideas?

Try a newer version of Zend Framework if possible, they are at 1.11.10 now and I think a number of zend tool issues have been resolved since then.
If I run your command on the newest version I get no errors and the project is created.

Related

php spark serve Codeigniter 4 not working

I installed library from endroid's github (qr-code).
When i was trying to do php spark serve, it said:
Fatal error: Uncaught TypeError: Argument 1 passed to CodeIgniter\CLI\Console::_
_construct() must be an instance of CodeIgniter\CodeIgniter, int given, called i
n D:\Kuliah\Magang\akses-log-data-center-itb\spark on line 49 and defined in D:\
Kuliah\Magang\akses-log-data-center-itb\vendor\codeigniter4\framework\system\CLI
\Console.php:29
Stack trace:
#0 D:\Kuliah\Magang\akses-log-data-center-itb\spark(49): CodeIgniter\CLI\Console
->__construct(1)
#1 {main}
thrown in D:\Kuliah\Magang\akses-log-data-center-itb\vendor\codeigniter4\frame
work\system\CLI\Console.php on line 29
How do i fix this?
try this
copy the index.php file in vendor/codeigniter4/framework/public/index.php (to) public/index.php
then
copy spark file in vendor/codeigniter4/framework/spark (to) root folder
from:
https://forum.codeigniter.com/printthread.php?tid=82087
Just to add to Brian's answer, I found out that the spark file was updated in version 4.2.0. If you have experienced this issue, I suggest you read its changelog to learn about other breaking changes.

MediaWiki Wikibase Installation Trouble

I am currently attempting to install the Wikibase extension to my new Mediawiki installation. Here is the php stack trace:
running media wiki
Notice: Undefined index: entityNamespaces in /var/www/mediawiki/extensions/Wikibase/lib/includes/WikibaseSettings.php on line 212
Warning: array_merge(): Expected parameter 2 to be an array, null given in /var/www/mediawiki/extensions/Wikibase/lib/includes/WikibaseSettings.php on line 212
Notice: Undefined index: entityNamespaces in /var/www/mediawiki/extensions/Wikibase/lib/includes/WikibaseSettings.php on line 212
Warning: array_merge(): Expected parameter 2 to be an array, null given in /var/www/mediawiki/extensions/Wikibase/lib/includes/WikibaseSettings.php on line 212
Notice: Undefined index: entityNamespaces in /var/www/mediawiki/extensions/Wikibase/lib/includes/WikibaseSettings.php on line 212
Warning: array_merge(): Expected parameter 2 to be an array, null given in /var/www/mediawiki/extensions/Wikibase/lib/includes/WikibaseSettings.php on line 212
Fatal error: Uncaught TypeError: Argument 2 passed to Wikibase\Lib\WikibaseSettings::applyEntityNamespacesToSettings() must be of the type array, null given, called in /var/www/mediawiki/extensions/Wikibase/lib/includes/WikibaseSettings.php on line 103 and defined in /var/www/mediawiki/extensions/Wikibase/lib/includes/WikibaseSettings.php:218 Stack trace: #0 /var/www/mediawiki/extensions/Wikibase/lib/includes/WikibaseSettings.php(103): Wikibase\Lib\WikibaseSettings::applyEntityNamespacesToSettings(Object(Wikibase\Lib\SettingsArray), NULL) #1 /var/www/mediawiki/extensions/Wikibase/client/includes/WikibaseClient.php(689): Wikibase\Lib\WikibaseSettings::getClientSettings() #2 /var/www/mediawiki/extensions/Wikibase/client/includes/WikibaseClient.php(737): Wikibase\Client\WikibaseClient::newInstance() #3 /var/www/mediawiki/extensions/Wikibase/client/includes/Hooks/MagicWordHookHandler.php(39): Wikibase\Client\WikibaseClient::getDefaultInstance() #4 /var/www/mediawiki/vendor/wikimedia/object-factory/src/ObjectFactory.php(172): in /var/www/mediawiki/extensions/Wikibase/lib/includes/WikibaseSettings.php on line 218
I tried to follow the Wikibase Installation guide to the letter to only install Wikibase Client, but I don't think I did. Sepcificially I think my LocalSettings.php is the issue. I installed the extension as instructed by the guide, so I'm confident that I'm using whatever the most recent version of Wikibase is (though I can't seem to find a version number anywere) and I am using MediaWiki 1.35 with PHP 7.3.23-4 on Ubuntu 18.04 hosted with nginx.
This is the bit I added to the end of my LocalSettings.php that breaks my installation, but without I can't use infoboxes, which is my real goal here.
# Wikibase
wfLoadExtension( 'WikibaseClient', "$IP/extensions/Wikibase/extension-client.json" );
require_once "$IP/extensions/Wikibase/client/ExampleSettings.php";
$wgWBClientSettings['repoUrl'] = 'https://pool.my.wiki';
$wgWBClientSettings['repoScriptPath'] = '';
$wgWBClientSettings['repoArticlePath'] = '/wiki/$1';
$wgWBClientSettings['repositories']['']['repoDatabase'] = 'poolwiki';
$wgWBClientSettings['repositories']['']['changesDatabase'] = 'poolwiki';
$wgWBClientSettings['siteLinkGroups'] = [ 'mywikigroup' ];
wgWBClientSettings['siteGlobalID'] = 'en';
I'm sure I just bungled an obvious step somewhere, but I've been over it so many times and I have no idea where.
I try to document all new installations very thoroughly for situations just like this, you can find my current setup along with the steps I took during installation on my github repository: https://github.com/PickleProgramming/AlQinaWiki
You can find my full LocalSettings.php there, along with any other files I might have bungled.
First of all, you need to switch your WikiBase to the version 1.35. Currently, you have 1.36 (master):
cd .../extensions/WikiBase
git checkout REL1_35
git pull
git submodule update --init --recursive
You also may need to install dependencies with Composer as described here.
Secondly, make sure that your wiki doesn't think that it is also a WikiBase repository. Insert $wgEnableWikibaseRepo = false before wfLoadExtension( 'WikibaseClient', "$IP/extensions/Wikibase/extension-client.json" );
Thirdly, which wiki is going to serve as a WikiBase repository for you?

ZF 2 :Catchable fatal error: Argument 1 passed to Zend\View\HelperPluginManager

I run the app created with Zend Framework 2 i get this Error:
Catchable fatal error: Argument 1 passed to
Zend\View\HelperPluginManager::__construct() must implement interface
Interop\Container\ContainerInterface, none given, called in
C:\wamp\www\blog\vendor\zendframework\zend-mvc\src\Service\AbstractPluginManagerFactory.php
on line 32 and defined in
C:\wamp\www\blog\vendor\zendframework\zend-view\src\HelperPluginManager.php
on line 241
how can i resolved that
Thanks in advance
See the repo:
https://github.com/zendframework/zend-view/issues/43
It's a bug in constructor of HelperPluginManager

Class not found fuelphp oil

i am trying to run fuelphp 1.6 oil on ubuntu server and i get this error message:
PHP Fatal error: Class 'Error' not found in /home/user/public_html/fuel/core/bootstrap.php on line 79
Fatal error: Class 'Error' not found in /home/user/public_html/fuel/core/bootstrap.php on line 79
PHP Fatal error: Class 'Config' not found in /home/user/public_html/fuel/core/bootstrap.php on line 47
Fatal error: Class 'Config' not found in /home/user/public_html/fuel/core/bootstrap.php on line 47
The command i run:
php oil
Any suggestion ?
Probably your autoloader in not correctly configured. This is the first place I would look.
There is nothing to configure in Fuel's autoloader.
FuelPHP uses the COREPATH constant defined in your index.php to find the framework's core classes, and this is defined correctly unless you have changed the location of the files.

Error while executing zf.sh in Zend Framework 2

In Zend Framework 2, I added the library directory to php include_path. But when I run zf.sh I get the following errors:
PHP Fatal error: Class 'Zend\Tool\Framework\Client\Console\Console' not found in /var/www/html/zend/bin/zf.php on line 611
Fatal error: Class 'Zend\Tool\Framework\Client\Console\Console' not found in /var/www/html/zend/bin/zf.php on line 611
I checked Library/Zend directory and there is not any directory named Tool.
Is there any extra step I should do?

Categories