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.
Related
I have a newly cloned phalcon repository:
software: MacOS
Phalcon: 5.0.0RC4
PHP: 8.1
Zephir: 0.16.0
brew: phalcon#4.1.0
Location: ~/Documents/cphalcon
I am trying to set up my new repository by following the tutorial here.
However when I go to my page at localhost:8000, this error pops up:
Fatal error: Uncaught Error: Class "Phalcon\Loader\Loader" not found in /Users/apple/Documents/cphalcon/public/index.php:16 Stack trace: #0 /Users/apple/Documents/cphalcon/.htrouter.php(15): require_once() #1 {main} thrown in /Users/apple/Documents/cphalcon/public/index.php on line 16
I found some similar thread and they said to check my phpinfo to see if phalcon is there, and it was.
I checked for more materials but couldn't find any other clues.
I also tried changing the call to:
use Phalcon\Loader;
But it was the same
Fatal error: Uncaught Error: Class "Phalcon\Loader" not found in /Users/apple/Documents/cphalcon/public/index.php:16 Stack trace: #0 /Users/apple/Documents/cphalcon/.htrouter.php(15): require_once() #1 {main} thrown in /Users/apple/Documents/cphalcon/public/index.php on line 16
Any clues?
I believe that in version 5 the proper syntax now is Phalcon\Autoload\Loader().
Since Phalcon 5 is still in Release Candidate mode (hence the "RC4" on the version), the docs are still lagging a bit behind.
I've converted a couple of Phalcon 3 and 4 sites, and I found the Phalcon 5.0.0RC4 ChangeLog to be helpful when moving from Phalcon 4 to 5. The move from 3 to 5 is far more involved and requires finding the Phalcon 4 update doc on the Phalcon web site.
I hope this helps.
I've installed Phalcon and trying to create new project: phalcon project store. But instead of this I get these errors:
PHP Fatal error: Uncaught Error: Class "Phalcon\Config" not found in C:\Composer\vendor\phalcon\devtools\src\Builder\Component\AbstractComponent.php:48
Stack trace:
#0 C:\Composer\vendor\phalcon\devtools\src\Commands\Builtin\Project.php(74): Phalcon\DevTools\Builder\Component\AbstractComponent->__construct(Array)
#1 C:\Composer\vendor\phalcon\devtools\src\Script.php(109): Phalcon\DevTools\Commands\Builtin\Project->run(Array)
#2 C:\Composer\vendor\phalcon\devtools\src\Script.php(148): Phalcon\DevTools\Script->dispatch(Object(Phalcon\DevTools\Commands\Builtin\Project))
#3 C:\Composer\vendor\phalcon\devtools\phalcon(65): Phalcon\DevTools\Script->run()
#4 {main}
thrown in C:\Composer\vendor\phalcon\devtools\src\Builder\Component\AbstractComponent.php on line 48
Fatal error: Uncaught Error: Class "Phalcon\Config" not found in C:\Composer\vendor\phalcon\devtools\src\Builder\Component\AbstractComponent.php:48
Stack trace:
#0 C:\Composer\vendor\phalcon\devtools\src\Commands\Builtin\Project.php(74): Phalcon\DevTools\Builder\Component\AbstractComponent->__construct(Array)
#1 C:\Composer\vendor\phalcon\devtools\src\Script.php(109): Phalcon\DevTools\Commands\Builtin\Project->run(Array)
#2 C:\Composer\vendor\phalcon\devtools\src\Script.php(148): Phalcon\DevTools\Script->dispatch(Object(Phalcon\DevTools\Commands\Builtin\Project))
#3 C:\Composer\vendor\phalcon\devtools\phalcon(65): Phalcon\DevTools\Script->run()
#4 {main}
thrown in C:\Composer\vendor\phalcon\devtools\src\Builder\Component\AbstractComponent.php on line 48
My PHP version is 8.0.8 Thread Safe x64, I've installed PSR extension and Phalcon 5.0.0 from here: https://github.com/phalcon/cphalcon/releases/tag/v5.0.0beta3, file phalcon-php8.0-ts-windows2019-vs16-x64.zip, that means I have compatible version of framework. phalcon.bat was added to environment variables. What's the problem?
Usually this error occurs when the extension is not loaded by php, see with phpinfo(), also run the componser install insider phalcon-devtools, but probably it is the php not loading the phalcon extension or PHP is not in the windows PATH , also check if the php-fpm log does not contain any extension loading errors, test in cmd the command php -v
also create a index.php and try it
<?php
use Phalcon\Mvc\Micro;
$app = new Micro();
$app->get('/', function () { echo "<h1>test</h1>";});
$app->handle();
Try do the following Go to Edit The system environment variables -> system variables -> path -> edit add phalcon.bat folder path testing here i used C:\Users\renato\Downloads\phalcon-devtools-4.2.0\phalcon-devtools-4.2.0 ( just path folder where the .sh/.bat it is, do not include the file and extension) and worked fine with php 8.0.16 windows 10 phalcon 5
and then go to the power shell and input phalcon
https://helpdeskgeek.com/windows-10/add-windows-path-environment-variable/
Do not forget to run composer install inside phalcon devtools folder.
also on powershell input php -m to see the loaded modules and if it has an error
I have installed magento2 in my linux centos7. After installing magento2 successfully while accessing the web page is getting following error with empty content.
{{menuState.title}}
PHP version:7.1.3
OS: centos7
And the PHP-fpm error log has following error.
PHP Fatal error: Uncaught TypeError: Argument 1 passed to Zend_Controller_Plugin_Abstract::setResponse() must be an instance of Zend_Controller_Response_Abstract, instance of Magento\Framework\HTTP\PhpEnvironment\Response given, called in /var/www/magento2/lib/internal/Magento/Framework/Profiler/Driver/Standard/Output/Firebug.php on line 61 and defined in /var/www/magento2/vendor/magento/zendframework1/library/Zend/Controller/Plugin/Abstract.php:70
Stack trace:
#0 /var/www/magento2/lib/internal/Magento/Framework/Profiler/Driver/Standard/Output/Firebug.php(61): Zend_Controller_Plugin_Abstract->setResponse(Object(Magento\Framework\HTTP\PhpEnvironment\Response))
#1 /var/www/magento2/lib/internal/Magento/Framework/Profiler/Driver/Standard.php(195): Magento\Framework\Profiler\Driver\Standard\Output\Firebug->display(Object(Magento\Framework\Profiler\Driver\Standard\Stat))
#2 [internal function]: Magento\Framework\Profiler\Driver\Standard->display()
#3 {main}
thrown in /var/www/magento2/vendor/magento/zendframework1/library/Zend/Controller/Plugin/Abstract.php on line 70
How can I resolve this error?
This was a Magento Bug reported ...
But it's already been ...
https://github.com/magento/magento2/issues/7068
So, come on ...
Did you update the magento? What is the current version?
I found this information at the base of Magento: https://devdocs.magento.com/guides/v2.3/config-guide/bootstrap/mage-profiler.html
You have this option ...
The temporary fix is install symfony / yaml from dev branch and then our module:
composer require symfony/yaml: dev-issue-814
composer require mirasvit/module-profiler
Try using / installing php7.2
See this Magento Project reference >>>
https://magento.stackexchange.com/questions/49000/magento-2-is-there-a-profiler
Be sure to back up before the above procedures ...
Since I don't know the correct version of your current Magento, I looked for alternatives to fix.
I hope it helps you ...
Good luck! Send news about your progress ...
I am trying to follow the instructions for the cakephp tutorial found here: http://book.cakephp.org/2.0/en/getting-started.html
I uploaded the CakePHP files to my webserver, created the database using MySQL workbench, and created database.php and updated it to point to my MySQL server.
At this point it sounds like I should be able to open up the website in my browser and see something, but instead I get these errors (I have removed the full path):
Warning: _cake_core_ cache was unable to write 'cake_dev_en-us' to File cache in /caketut/lib/Cake/Cache/Cache.php on line 325
Warning: caketut/app/tmp/cache/persistent/ is not writable in /www/premium/med/pediatrics/www.hobmt.umn.edu/htdocs/caketut/lib/Cake/Cache/Engine/FileEngine.php on line 380
Fatal error: Uncaught exception 'CacheException' with message 'Cache engine _cake_core_ is not properly configured.' in /caketut/lib/Cake/Cache/Cache.php:181
Stack trace:
#0 /caketut/lib/Cake/Cache/Cache.php(151): Cache::_buildEngine('_cake_core_')
#1 /caketut/app/Config/core.php(367): Cache::config('_cake_core_', Array)
#2 /caketut/lib/Cake/Core/Configure.php(72): include('/www/premium/me...')
#3 /caketut/lib/Cake/bootstrap.php(177): Configure::bootstrap(true)
#4 /caketut/app/webroot/index.php(92): include('/www/premium/me...')
#5 {main} thrown in /caketut/lib/Cake/Cache/Cache.php on line 181
I tried setting the permissions for the Cache folder located in /caketut/lib/Cake and all subfolders/files to be 0776, and this removes all errors except this one:
Fatal error: Class 'Cache' not found in /caketut/app/Config/core.php on line 361
I tried doing searches but was unsuccessful in finding a solution. I would really appreciate any assistance!
try to chmod the whole script with 0777 permissions .
sudo chmod -R 0777 caketut
I'm trying to get a cakephp project up and running from a svn checkout on my mountain lion computer.
I changed all the cache write permissions find but now I have one last fatal error that's not letting the app run.
Fatal error: Uncaught exception 'ConfigureException' with message 'Could not load configuration file: /Users/mike/cake2cribs/cake2cribs/app/Config/core-production.php' in /Users/mike/cake2cribs/cake2cribs/lib/Cake/Configure/PhpReader.php:77
Stack trace: #0
/Users/mike/cake2cribs/cake2cribs/lib/Cake/Core/Configure.php(267):
PhpReader->read('core-production') #1
/Users/mike/cake2cribs/cake2cribs/app/Config/core.php(287):
Configure::load('core-production') #2
/Users/mike/cake2cribs/cake2cribs/lib/Cake/Core/Configure.php(76):
include('/Users/mike/cak...') #3
/Users/mike/cake2cribs/cake2cribs/lib/Cake/bootstrap.php(146):
Configure::bootstrap(true) #4
/Users/mike/cake2cribs/cake2cribs/app/webroot/index.php(81):
include('/Users/mike/cak...') #5 {main} thrown in
/Users/mike/cake2cribs/cake2cribs/lib/Cake/Configure/PhpReader.php on
line 77
it fails on this line inside index.php inside webroot
if (!include ('Cake' . DS . 'bootstrap.php')) {
$failed = true;
}
Any ideas as to what could be the cause?
I've never done an Ubuntu install, I've always just downloaded the source and put it in my webroot. Anyway, cake always expects to have a file called core.php which holds all the config info. Maybe the Ubuntu install just expects core-production.php, so you might just need to copy the core.php file in app/Config and rename it to core-production.php.