MAMP and Yosemite PDO Exception Driver Issue - mamp

I installed Yosemite and now when I use MAMP I receive this Fatal error:
Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in
/Applications/MAMP/htdocs/CRUD/pdo.php:3 Stack trace: #0
/Applications/MAMP/htdocs/CRUD/pdo.php(3): PDO->__construct('mysql:host=loca...', 'fred',
'zap') #1 /Applications/MAMP/htdocs/CRUD/index.php(2): require_once('/Applications/M...')
#2 {main} thrown in /Applications/MAMP/htdocs/CRUD/pdo.php on line 3
Any ideas?

Here is a way to fix it:
Start MAMP
On the top left, go to "MAMP" -> "Preferences"
Go to the "PHP" tab
Tick PHP 5.5.17 (or whatever you have) instead of the one which is ticked by default (5.6.1 -> 5.5.17 with he latest version of MAMP)

Related

why am I getting error on compile time in magento 2

I am having this error while executing the setup:di:compile command
$ php bin/magento s:d:c
PHP Fatal error: Uncaught Error: Cannot instantiate interface Symfony\Component\Console\Output\OutputInterface in vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:116
Stack trace:
#0 vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Symfony\\Compone...', Array)
#1 vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Compiled->create('Symfony\\Compone...')
#2 vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(160): Magento\Framework\ObjectManager\ObjectManager->get('Symfony\\Compone...')
#3 vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(246): Magento\Framework\ObjectManager\F in vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 116
Fatal error: Uncaught Error: Cannot instantiate interface Symfony\Component\Console\Output\OutputInterface in vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:116
Stack trace:
#0 vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Symfony\\Compone...', Array)
#1 vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Compiled->create('Symfony\\Compone...')
#2 vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(160): Magento\Framework\ObjectManager\ObjectManager->get('Symfony\\Compone...')
#3 vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(246): Magento\Framework\ObjectManager\F in vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 116
i thing the issue is due any custom module di.xml file In case your interface still won't be loaded, check your di.xml and validate that a preference is available.
i hope you understand what i want to explain you
for info check below link Abstraction-implementation mappings topic
https://devdocs.magento.com/guides/v2.3/extension-dev-guide/build/di-xml-file.html

Magento 2: Slider Overview Fatal Error

I have this issue with Magento 2 (Ver 2.2.0) in my localhost when I try to click on Slider Overview I get this error.
Fatal error: Uncaught Error: [] operator not supported for strings in /opt/lampp/htdocs/fprimavera/app/code/Nwdthemes/Revslider/Model/Revslider/Framework/RevSliderBaseAdmin.php:99 Stack trace: #0 /opt/lampp/htdocs/fprimavera/app/code/Nwdthemes/Revslider/Model/Revslider/RevSliderAdmin.php(650): Nwdthemes\Revslider\Model\Revslider\Framework\RevSliderBaseAdmin::addMetaBox('Revolution Slid...', '', Array, NULL) #1 /opt/lampp/htdocs/fprimavera/app/code/Nwdthemes/Revslider/Model/Revslider/RevSliderAdmin.php(151): Nwdthemes\Revslider\Model\Revslider\RevSliderAdmin->addSliderMetaBox() #2 /opt/lampp/htdocs/fprimavera/app/code/Nwdthemes/Revslider/Model/Revslider/RevSliderAdmin.php(121): Nwdthemes\Revslider\Model\Revslider\RevSliderAdmin->init() #3 /opt/lampp/htdocs/fprimavera/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(111): Nwdthemes\Revslider\Model\Revslider\RevSliderAdmin->__construct(Object(Nwdthemes\Revslider\Helper\Data), Object(Nwdthemes\Revslider\Helper\Framework), Object(Nwdthemes\Revslider\Helper\Qu in /opt/lampp/htdocs/fprimavera/app/code/Nwdthemes/Revslider/Model/Revslider/Framework/RevSliderBaseAdmin.php on line 99
Thank you in advance

Uncaught Error: Class 'Zend_Cache' not found in magento2 installation

Fatal error: Uncaught Error: Class 'Zend_Cache' not found in /var/www/html/stdcw/vendor/magento/framework/App/Cache/Frontend/Factory.php:148 Stack trace: #0 /var/www/html/stdcw/vendor/magento/framework/App/Cache/Frontend/Pool.php(67): Magento\Framework\App\Cache\Frontend\Factory->create(Array) #1 /var/www/html/stdcw/vendor/magento/framework/App/Cache/Frontend/Pool.php(146): Magento\Framework\App\Cache\Frontend\Pool->_initialize() #2 /var/www/html/stdcw/vendor/magento/framework/App/Cache/Type/FrontendPool.php(84): Magento\Framework\App\Cache\Frontend\Pool->get('default') #3 /var/www/html/stdcw/vendor/magento/framework/App/Cache/Type/Config.php(49): Magento\Framework\App\Cache\Type\FrontendPool->get('config') #4 /var/www/html/stdcw/vendor/magento/framework/Cache/Frontend/Decorator/Bare.php(65): Magento\Framework\App\Cache\Type\Config->_getFrontend() #5 /var/www/html/stdcw/vendor/magento/framework/App/ObjectManager/ConfigLoader.php(66): Magento\Framework\Cache\Frontend\Decorator\Bare->load('global::DiConfi...') #6 /var/www/h in /var/www/html/stdcw/vendor/magento/framework/App/Cache/Frontend/Factory.php on line 148
It seems cache issue, Clear your all cache which you have installed on your server like APC, MemCached.
if it still give an issue then the problem is in improper installation of Magento2 instance. Install new Magento 2 install with same version you have installed with Separate DB. Hope it helps.

Tikiwiki 16.2 Error while registering new user

I did a fresh install of 16.2 and when I try to register a new user I get the error below. I've re-extracted the zip and reinstalled the database, but I get the same error.
Tikiwiki is in a public_html/tiki folder and I have made no adjustments to it.
Any help would be appreciated.
Here's the error:
Fatal error: Uncaught exception 'Zend\Math\Exception\RuntimeException' with message 'The RandomLib fallback pseudorandom generator is not installed. Please install it to support secure random numbers' in /home/ghsfhaco/public_html/tiki/vendor/zendframework/zend-math/src/Rand.php:75 Stack trace: #0 /home/ghsfhaco/public_html/tiki/vendor/zendframework/zend-math/src/Rand.php(60): Zend\Math\Rand
getAlternativeGenerator() #1 /home/ghsfhaco/public_html/tiki/vendor/zendframework/zend-captcha/src/AbstractWord.php(354): Zend\Math\Rand
getBytes(32) #2 /home/ghsfhaco/public_html/tiki/vendor/zendframework/zend-captcha/src/AbstractWord.php(340): Zend\Captcha\AbstractWord->generateRandomId() #3 /home/ghsfhaco/public_html/tiki/vendor/zendframework/zend-captcha/src/Image.php(447): Zend\Captcha\AbstractWord->generate() #4 /home/ghsfhaco/public_html/tiki/lib/captcha/captchalib.php(150): Zend\Captcha\Image->generate() #5 /home/ghsfhaco/public_html/tiki/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(171) : eval()'d c in /home/ghsfhaco/public_html/tiki/vendor/zendframework/zend-math/src/Rand.php on line 75
This also caught us out the other day and it's due to an older version of PHP 5 which hasn't got the mcrypt extension enabled, and we fixed it recently, so there are a few options for you I think:
Upgrade to php 7 (probably not an option unless it's your own server)
Enable php-mcrypt for you php (also probably not possible)
Try again with a recent "daily build" 16.x tarball from dev.tiki.org
Or enable one of the other CAPTCHA methods on Control panels->Security->Spam Protection, such as ReCaptcha or CAPTCHA Questions
HTH

Zend Framework: Fatal error on the server

I'm trying to put a ZF website on the Internet which works well on my local machine (WAMP).
But on the Linux server, only the main page can be properly displayed. For the other pages, I've got a fatal error:
Fatal error: Uncaught exception
'Zend_Controller_Dispatcher_Exception' with message 'Invalid
controller specified (error)' in
/var/www/staging/library/Zend/Controller/Dispatcher/Standard.php:248
Stack trace: #0
/var/www/staging/library/Zend/Controller/Front.php(954):
Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http),
Object(Zend_Controller_Response_Http)) #1
/var/www/staging/library/Zend/Application/Bootstrap/Bootstrap.php(97):
Zend_Controller_Front->dispatch() #2
/var/www/staging/library/Zend/Application.php(366):
Zend_Application_Bootstrap_Bootstrap->run() #3
/var/www/staging/public/index.php(26): Zend_Application->run() #4
{main} Next exception 'Zend_Controller_Exception' with message
'Invalid controller specified (error)#0
/var/www/staging/library/Zend/Controller/Front.php(954):
Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http),
Object(Zend_Contr in
/var/www/staging/library/Zend/Controller/Plugin/Broker.php on line
336.
I activated the URL rewriting. I'm using modules. The index.php and application.ini are very basic, we didn't custumize it.
I suppose that there is something wrong with the configuration... Thanks.
When deploying application from windows platform to Linux, most typical type of error that can be encountered is due to the filename cases. Linux system are very strict about file name and cases.
The error you are encountering is also probably one of these cases. Check the name of ErrorContainer.php and try to match the name you specify in your route and file system.
In changing server Windows => Linux. The first main things to check is ignore case in Windows. Check filenames and class names if spelled with proper first capital letter etc.