I used Ubuntu Desktop to be my server hosting Magento. I have restored the Magento in following way:
Import Magento database to MySQL server
Copy and paste all the files to /var/www/html
Remarks:
Permission: 755
Magento Version: 1.9.2
PHP version: 7.0
Unfortunately, I have got an error related to the code generated by Magento.
Fatal error:
Uncaught Error: Call to a member function extend() on boolean in /var/www/html/lib/Varien/Simplexml/Config.php:600
Stack trace:
#0 /var/www/html/app/code/core/Mage/Core/Model/Config.php(278): Varien_Simplexml_Config->extend(Object(Mage_Core_Model_Config_Base))
#1 /var/www/html/app/code/core/Mage/Core/Model/App.php(391): Mage_Core_Model_Config->loadBase()
#2 /var/www/html/app/code/core/Mage/Core/Model/App.php(304): Mage_Core_Model_App->_initBaseConfig()
#3 /var/www/html/app/code/core/Mage/Core/Model/App.php(348): Mage_Core_Model_App->baseInit(Array)
#4 /var/www/html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#5 /var/www/html/index.php(83): Mage::run('', 'store')
#6 {main} thrown in /var/www/html/lib/Varien/Simplexml/Config.php on line 600
How can I solve this error in order to restore Magento on a new domain?
I have tried to lower the permission to 644 but it failed. Moreover, I have tested that PHP7.0 can also open the installation page of a new Magento.
Although you have tried to set permissions of folders and files but still it seems to be a problem with folder and file permission.
Please try resetting permission using magento-cleanup.php
file.
Please put this file in document root of your magento and run this file from browser.
Please let me know whether it solves your problem or not.
This will help:
Try clearing cache, and check file permissions are correctly set,
Directories : 755
Files : 644
If this still doesn't work then may be your files are corrupt.
Related
For the New Laravel project, I need to update the PHP version using XAMPP,
After the update, the PHP version and apache folder when I start apache and MySQL from the XAMPP control panel this working but I open localhost/phpmyadmin/ it shows me fatal error and doesn't show the database.
Fatal error: Uncaught mysqli_sql_exception: You are not using binary logging in C:\xampp\phpMyAdmin\libraries\classes\Dbi\DbiMysqli.php:199 Stack trace: #0 C:\xampp\phpMyAdmin\libraries\classes\Dbi\DbiMysqli.php(199): mysqli->query('SHOW MASTER LOG...', 0) #1 C:\xampp\phpMyAdmin\libraries\classes\DatabaseInterface.php(316): PhpMyAdmin\Dbi\DbiMysqli->realQuery('SHOW MASTER LOG...', Object(mysqli), 1) #2 C:\xampp\phpMyAdmin\libraries\classes\DatabaseInterface.php(1869): PhpMyAdmin\DatabaseInterface->tryQuery('SHOW MASTER LOG...', 256, 1, false) #3 C:\xampp\phpMyAdmin\libraries\classes\Menu.php(573): PhpMyAdmin\DatabaseInterface->fetchResult('SHOW MASTER LOG...', 'Log_name', NULL, 256, 1) #4 C:\xampp\phpMyAdmin\libraries\classes\Menu.php(107): PhpMyAdmin\Menu->_getServerTabs() #5 C:\xampp\phpMyAdmin\libraries\classes\Menu.php(70): PhpMyAdmin\Menu->_getMenu() #6 C:\xampp\phpMyAdmin\libraries\classes\Header.php(445): PhpMyAdmin\Menu->getDisplay() #7 C:\xampp\phpMyAdmin\libraries\classes\Response.php(323): PhpMyAdmin\Header->getDisplay() #8 C:\xampp\phpMyAdmin\libraries\classes\Response.php(336): PhpMyAdmin\Response->_getDisplay() #9 C:\xampp\phpMyAdmin\libraries\classes\Response.php(495): PhpMyAdmin\Response->_htmlResponse() #10 [internal function]: PhpMyAdmin\Response->response() #11 {main} thrown in C:\xampp\phpMyAdmin\libraries\classes\Dbi\DbiMysqli.php on line 199
I feel the main issue is that your tried to upgrade only php instead of the whole Xampp Bundle. Either you should install complete xampp again or you should upgrade phpMyAdmin manually too as this will fix the php compatibility issues.
I had this exact same issue and I have spent many hours trying to figure this out, so it is as simple as this.
Once you have upgraded your php. (In my case I upgraded to php 8.1.10)
Make a copy of your phpMyAdmin folder renaming it different than the current value that it has.
Download phpMyAdmin 5.2.0 or higher.
Unzip the file, and then copy it into your xampp folder replacing the old phpMyAdmin folder.
Inside the new folder create the file config.inc.php and paste inside there the data that is in config.inc.php located in your old phpMyAdmin folder.
Thats it!
For a project I want to test the new database from Firebase, Firestore with PHP. But before i can use it, I need a couple of tools. I am trying for a day now to get it work, but no success.
I'm stuck on gRPC. I installed is, and it's working on my Mac and I can install Firestore with Composer, but I can't get it to work with XAMPP.
When I load a page I get
Fatal error: Uncaught Google\Cloud\Core\Exception\GoogleException: The requested client requires the gRPC extension.
Please see https://cloud.google.com/php/grpc for installation instructions. in /vendor/google/cloud-core/src/ClientTrait.php:75 Stack trace: #0 /vendor/google/cloud-firestore/src/FirestoreClient.php(115): Google\Cloud\Firestore\FirestoreClient->requireGrpc() #1 /app/firebase.php(18): Google\Cloud\Firestore\FirestoreClient->__construct() #2 /app/firebase.php(21): App\initialize() #3 /template.php(688): require_once('/Applications/X...') #4 /template.php(647): load_template('/Applications/X...', true) #5 /App in /vendor/google/cloud-core/src/ClientTrait.php on line 75
I added extension=grpc.so to the php.ini that is loaded by XAMPP.
But no success.
Try to use DLL file, download from here https://pecl.php.net/package/gRPC
Open your php.ini file and uncomment the line extension_dir="ext",
add extension="grpc".
Then go to the environment variables in the properties, choose path in the system variables and add the php path you are using.
I am using C:\xampp\php that's where all the magic will happen it's been a tag of war.
I looked everywhere on the web and just couldn't find a solution.
I am getting this error:
Warning: fopen(/var/www/html/includes/../log/404/log_2018-04-07.txt): failed to open stream: Permission denied in /var/www/html/vendor/katzgrau/klogger/src/Logger.php on line 167
Fatal error: Uncaught exception 'RuntimeException' with message 'The file could not be opened. Check permissions.' in /var/www/html/vendor/katzgrau/klogger/src/Logger.php:134 Stack trace:
#0 /var/www/html/includes/db_class.php(7204): Katzgrau\KLogger\Logger->__construct('/var/www/html/i...')
#1 /var/www/html/includes/db_class.php(7217): db_class->getLogger('404')
#2 /var/www/html/includes/furl_router.php(55): db_class->logger('404')
#3 /var/www/html/includes/furl_router.php(229): goTo404('no page-data / ...')
#4 /var/www/html/index.php(17): require_once('/var/www/html/i...')
#5 {main} thrown in /var/www/html/vendor/katzgrau/klogger/src/Logger.php on line 134
From what I read here it's a permission issue but I can't figure it out. I granted all permissions from root folder, I have no idea what am I doing wrong.
Check folder write permissions. Maybe the user trying to write the log has no permissions. sudo chmod -R 666 logs gives read and write permissions to all users.
For anyone using Katzgrau\KLogger\Logger and using relative paths to locate the log file, use an absolute path, e.g.:
$logger = new Logger(__DIR__ . '/../../logs');
After reading a bit about another issue I had but with a MySQL function, after exploring, I figured out I should use MySQL version 5.6 while I used version 5.7.
I uninstalled MySQL 5.7 and install 5.6 instead. It solved both the MySQL issue and the issue mentioned above.
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.
Hi i am facing this error on my magento
Unable to find writable var_dir
#0 /home/glasses/html/includes/src/Mage_Core_Model_Config_Options.php(66): Mage_Core_Model_Config_Options->getVarDir()
#1 /home/glasses/html/includes/src/Varien_Object.php(112): Mage_Core_Model_Config_Options->_construct()
#2 /home/glasses/html/includes/src/Mage_Core_Model_Config.php(200): Varien_Object->__construct(Array)
#3 /home/glasses/html/app/Mage.php(739): Mage_Core_Model_Config->__construct(Array)
#4 /home/glasses/html/app/Mage.php(678): Mage::_setConfigModel(Array)
#5 /home/glasses/html/index.php(71): Mage::run('', 'store')
#6 {main}
currently i have httpd web server, and also i issue chmod -R 777 var/ directory but the problems is still there. Other pages can be access except the front page.Thanks
Currently on you site I can see the error - cache_dir must be a directory
To fix this issue - make a tmp dir in the root of the magento installation hope this will solve your problem.
Magento checks tmp dir next way:
$dir = $this->getSysTmpDir().DS.'magento'.DS.'var';
if (!$this->createDirIfNotExists($dir)) {
throw new Mage_Core_Exception('Unable to find writable var_dir');
}
As you can see, the piece of code is trying to create temporary directory in the system tmp directory. And if the creation process is failed - it throws an error. So, first of all, you should check the "tmp" dir exists in the system's root directory (/tmp) and php has enough rights to create/write into magento tmp dir there.