error with prestashop smarty template when adding price rule - smarty

I am getting following error when I add to catalog price rule and go to product page. when i checked the path /var/www/Germany/cache/smarty/compile/43/ and check directory there is no directory found
[Tue Jul 31 08:19:55.349417 2018] [:error] [pid 9379] [client
172.31.22.27:19804] PHP Fatal error: Uncaught --> Smarty: unable to write file
/var/www/Germany/cache/smarty/compile/43/b7/ef/wrt5b601bab5205b6_55461255
<-- \n thrown in
/var/www/Germany/tools/smarty/sysplugins/smarty_internal_write_file.php
on line 46, referer:
http://de.galaxykayaks.eu/admin088rkbwnk/index.php?controller=AdminProducts&id_product=34&updateproduct&token=9149fd1199969891eb153b8825d58dbb
please help me what is the issue

First, try to disable the cache.
Second, check your permissions files/folders, because it looks like this kind of problems

This issue with the wrong old version override folder smarty cache file
When I remove the old smarty cache file then its work fine.

Related

Solve 500 response Laravel (Uncaught UnexpectedValueException: Laravel.log)

I have a problem with my (new/clean) Laravel (tried v5.2 and v5.5) application on Centos 7. It shows a 500 error when i visited the URL of the application with no error. I checked the log file of apache (/etc/httpd/logs/error-log.log) what contained the 2 errors bellow:
[Mon Dec 04 10:32:34.108956 2017] [:error] [pid 25889] [client 192.168.1.240:63437] PHP Fatal error: Uncaught UnexpectedValueException: The stream or file "/var/www/public/blog_project/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied in /var/www/public/blog_project/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:107\nStack trace:\n#0 /var/www/public/blog_project/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(37): Monolog\Handler\StreamHandler->write(Array)\n#1 /var/www/public/blog_project/vendor/monolog/monolog/src/Monolog/Logger.php(337): Monolog\Handler\AbstractProcessingHandler->handle(Array)\n#2 /var/www/public/blog_project/vendor/monolog/monolog/src/Monolog/Logger.php(616): Monolog\Logger->addRecord(400, Object(UnexpectedValueException), Array)\n#3 /var/www/public/blog_project/vendor/laravel/framework/src/Illuminate/Log/Writer.php(202): Monolog\Logger->error(Object(UnexpectedValueException), Array)\n#4 /var/www/public/blog_project/vendor/laravel/framework/src/Illuminate/Log/Writer.php(113): Illuminate\Log\Writer->writeLog('error', Object(U in /var/www/public/blog_project/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php on line 107
&
[Mon Dec 04 10:32:34.109334 2017] [:error] [pid 25889] [client 192.168.1.240:63437] PHP Fatal error: Uncaught UnexpectedValueException: The stream or file "/var/www/public/blog_project/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied in /var/www/public/blog_project/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:107\nStack trace:\n#0 /var/www/public/blog_project/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(37): Monolog\Handler\StreamHandler->write(Array)\n#1 /var/www/public/blog_project/vendor/monolog/monolog/src/Monolog/Logger.php(337): Monolog\Handler\AbstractProcessingHandler->handle(Array)\n#2 /var/www/public/blog_project/vendor/monolog/monolog/src/Monolog/Logger.php(616): Monolog\Logger->addRecord(400, Object(Symfony\Component\Debug\Exception\FatalErrorException), Array)\n#3 /var/www/public/blog_project/vendor/laravel/framework/src/Illuminate/Log/Writer.php(202): Monolog\Logger->error(Object(Symfony\Component\Debug\Exception\FatalErrorException), Array)\n#4 /var/www/public/blog_project/vendor/laravel/framework/src/Illuminate/Log/Writer.p in /var/www/public/blog_project/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php on line 107
To solve these problems i Googled a lot. Solutions i found where all related to permissions so I tried to set chmod 777 to all directories and files (for test purposes, not recommended at live environment!) in /var/www/public/blog_project but this did not solve the problem.
I also found that the owner/group could be the problem (unlikely with chmod 777 but ok) so I changed the owner and group to "apache". Unfortunately this did still not solve my problem.
I also tried a "php artisan cache:clear" (suggested in some topic what described the same problem as i have)
At the moment of writing i already had found the solution (after many hours of Googling) for my problem but i still want to post this question because i could not find another question what solved my problem. I hope to help other people who have the same problem this way.
The problem was that SELinux was enabled which prevent Apache to write files even with 777 mode. It seems that SELinux is active by Centos 4 or higher by default. I also found that Fedora has SELinux activated what results in the same problem (no own experience with Fedora).
I solved the problem by disabling SELinux. For CentosOS7 id did this by editing /etc/sysconfig/selinux
and changing the line SELINUX=enforcing into SELINUX=disabled. After that i rebooted the server and the problem was solved.
I solved the problem by disabling SELinux. For CentosOS7 id did this by editing /etc/sysconfig/selinux and changing the line SELINUX=enforcing into SELINUX=disabled. After that i rebooted the server and the problem was solved.
Thanks :)
please don't disable your selinux. there is a better way to do it
See this, i posted a better way Laravel: file_put_contents() failed to open stream: Permission denied for Session folder

Code Igniter / Pyro CMS Call to a member function result_array() on boolean

I have just downloaded a git of a site running on Pyro CMS on the Code Igniter PHP framework and tried to run it locally however it is throwing this error:
[Mon Jul 24 10:05:39.868253 2017] [:error] [pid 5944:tid 1944] [client ::1:55468] PHP Fatal error: Call to a member function result_array() on boolean in C:\\xampp\\htdocs\\system\\codeigniter\\database\\DB_driver.php on line 831
I have tried using result() rather than result_array() however it throws the same error.
The site is running on PHP version 5.6.31 on an XAMPP local server.
Below is the file which is throwing the error:
https://pastebin.com/QXSUD5u6
Little late to the party here but usually that happens in codeigniter when there is no database connection. Check the database config file to make sure it is properly set up for your local host credentials; my guess is that it is still configured to access the 'online' database from which you downloaded the files.

Magento before install on centos 7 getting 500 internal server error

Hi I am trying to install magento 1.9.x and magento2 in my centos operating system.. the following links help to configure apache2.4, php7 and mysql5.7 in centos.
Install magento link
after configure web server, php, mysql, magento files and all. I create database for magento2. Based on above link i did all steps one-by-one. After i run in browser localhost/magento2/
it show 500 Internal server error in firebug and blank browser.
I am beginner of centos and magento
Please any one help how to solve this problem i was spend past two days.
Apache error log:
[Sat Sep 10 14:22:33.728848 2016] [:error] [pid 2809] [client
::1:45432] PHP Fatal error: Uncaught Zend_Cache_Exception: cache_dir
"/var/www/html/magento2/var/page_cache" is not writable in
/var/www/html/magento2/vendor/magento/zendframework1/library‌​/Zend/Cache.php:209\‌​nStack
trace:\n#0
/var/www/html/magento2/vendor/magento/zendframework1/library‌​/Zend/Cache/Backend/‌​File.php(180):
Zend_Cache::throwException('cache_dir "/var...')\n#1
/var/www/html/magento2/vendor/colinmollenhour/cache-backend-‌​file/File.php(87):
Zend_Cache_Backend_File->setCacheDir('/var/www/html/m...')\n‌​#2
/var/www/html/magento2/vendor/magento/zendframework1/library‌​/Zend/Cache.php(153)‌​:
Cm_Cache_Backend_File->__construct(Array)\n#3
/var/www/html/magento2/vendor/magento/zendframework1/library‌​/Zend/Cache.php(94):
Zend_Cache::_makeBackend('Cm_Cache_Backen...', Array, true, true)\n#4
/var/www/html/magento2/lib/internal/Magento/Framework/App/Ca‌​che/Frontend/Factory‌​.php(158):
Zend_Cache::factory('Magento\\Framewo...', 'Cm_Cache_Backen...',
Array, Array, true, true, true)\n#5
/var/www/html/magento2/lib/internal/Magento/Framework/App/Ca‌​che/Frontend
in
/var/www/html/magento2/vendor/magento/zendframework1/library‌​/Zend/Cache.php
on line 209
To me this look like the main problem:
Uncaught Zend_Cache_Exception: cache_dir
"/var/www/html/magento2/var/page_cache" is not writable in /var/www/html/magento2/vendor/magento/zendframework1/library‌​/Zend/Cache.php:209\‌​nStack
You have the wrong permissions or wrong owner for this folder. You can fix this using chown for fixing the owner of that folder or chmod for fixing writing permissions for that folder.
Try this:
chown -R apache.apache /var/www/html/magento2/
This sets the whole magento2 folder to have apache as owner and group. It is not the best security measure but for testing is fine.

Magento error after moving website to another server

I just transferred my website to another server by using this guide: http://www.atwix.com/magento/moving-magento-to-another-server/
but when i access the it gives me this error. What does it means? what do i need to do to make it work?
Warning: include(Zend/Log.php) [function.include]: failed to open stream: No such file or directory in /var/www/site/lib/Varien/Autoload.php on line 93
Warning: include() [function.include]: Failed opening 'Zend/Log.php' for inclusion (include_path='/var/www/site/app/code/local:/var/www/site/app/code/community:/var/www/site/app/code/core:/var/www/site/lib:.:/usr/share/php:/usr/share/pear') in /var/www/site/lib/Varien/Autoload.php on line 93
Fatal error: Class 'Zend_Log' not found in /var/www/site/app/code/core/Mage/Core/functions.php on line 247
As far as i can see, it looks like the file in question can't be found at all. What to do is check the directory /www/work/newshop/lib/Zend and make sure the log file is within there. If not, double check your previous server and see if it's there as well. It's possible for you to have just missed it.
If it IS there, make sure permissions are set accordingly. eg; the log.php file should have it's permissions set to 644. (Read and Write for owner, Read for group and read for public)
did you remove the cache folder from Magento After moved your installation?
And wich PHP Version ist installed on the new Server?
Magento have already problem with php5.4 and php5.5 (reference: https://bugs.php.net/bug.php?id=62639)

(random?) 500 errors in Magento front and backend - version 1.4.1.1

i need your help once again :)
For some time now i get strange 500 errors in the front and backend of magento. I use magento 1.4.1.1.
The errors can appear everywhere, anytime. I get about 10-20 of them every day. The errorlog reads something like this:
[Wed Oct 17 16:02:19 2012] [warn] [client 93.219.97.29] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server, referer: /index.php/admin/sales_order/view/order_id/1617/
[Wed Oct 17 16:02:19 2012] [warn] [client 93.219.97.29] (104)Connection reset by peer: mod_fcgid: ap_pass_brigade failed in handle_request_ipc function, referer: http://www.xxxx.com/index.php/admin/sales_order/view/order_id/1617/
I have attached a screenshot of the error.
http://i.imgur.com/i6dvO.jpg
Do you guys have any idea what i can do? Thank you very much :)
Greets
I was receiving similar errors on 1.7.0.2 community edition on a Ubuntu 10.04 LTS LAMP server. In my case (using Virtualmin) I had incorrectly set the virtual server to run php in FastCGI as the website owner. The apache user is different from the site owner, and magento multi-site install was setup to run as that apache user.
ALSO, I had uncommented Magento's profiler inside index.php Varien_Profiler::enable();
and turned on the profiler via Magento admin panel (System->Configuration->Developer.
Commenting out the profiler object AND reversing the change to php execution mode did the trick.
See attached for the proper virtualmin setting, found in Virtualmin->Server Configuration->Website Options

Resources