Smarty error on webserver - smarty

I've made a website by Smarty templating engine and appear this error only on server
Fatal error: Uncaught --> Smarty: unable to write file
smarty/templates_c\wrt53346bde790e08_38443293 <-- thrown in
D:\Inetpub\webs\casasorgenteit\site_new\smarty\libs\sysplugins\smarty_internal_write_file.php
on line 44
I've changed the permission but nothing.In local the website works fine.

This usually happens in case of wrong permissions. You are saying that you have checked the permissions.
I can see something odd in the file path
smarty/templates_c\wrt53346bde790e08_38443293
There are two different type of slashes in path. Are you testing on windows in dev and linux on prod or vice versa? I guess that might be the source of problem

Related

Joomla "Fatal error: Cannot redeclare jblogerror() in on line 0"

Here is a weird problem i'm facing; after updating Joomla to the latest version, website failed to up load but, as i've made a backup manually from these folders:
administrator
bin
cli
components
includes
layouts
libraries
modules
plugins
yt-assets
and all the root files, after restoring the backup still the website is not loading and just says
"Fatal error: Cannot redeclare jblogerror() in on line 0" !
Any suggestion? Thank you.
Apparently, the version of jBlog you are using is loading its attempting to load its own classes twice.
Let's assume the jBlog developers already fixed it and you carelessly ignored the warning to ensure all your extensions are compatible before updating.
Are you able to access administrator? Simply go there and upgrade jBlog including any modules.
Else, the issue lies within a plugin. In order to access the administrator and perform the update, you will need to manually disable the offending plugin.
A simple way is to rename its folder: start from plugins/system then plugins/content hopefully you'll have spotted it by then. Look into the subfolders of each and spot any that may be relevant to jBlog (or grep through the folder to locate the specific string)
If you have console access, simply run
# grep -rl jblogerror plugins/system
and you should see all the files that include such string, just rename their main plugin folder. But you could also do all this through ftp and guessing.

Vapor `Public` directory inside docker image is not exposed

I'm running Vapor 4.3 and Leaf with Xcode on my Mac without any issues.
public directory middleware is enabled:
let fileMW = FileMiddleware(publicDirectory: directory)
app.middleware.use(fileMW)
as soon as I build the image using the default dockerfile and run it on the docker, the css and all image files are not loaded anymore.
Note: the dockerfile is the exact same one that came with the vapor new command. (Updated to the date of the writing this post)
Safari shows this error:
[Error] Did not parse stylesheet at 'http://127.0.0.1/styles/index.css' because non CSS MIME types are not allowed in strict mode.
Chrome shows this warning:
Resource interpreted as Stylesheet but transferred with MIME type text/plain: "http://127.0.0.1/styles/index.css".
What am I missing?
Looks like it is a case sensitivity issue! Mac has no problem finding files with this issue but Linux not!
⚠️ Even if you already set: app.routes.caseInsensitive = true, it will not affect your resources requests.
So make sure you have set all paths exactly as they appear in pwd command.

This page isn't working ERROR 500 Savsoft

I uploaded files from SavsoftQuiz_v5.0 to my web server and configured all the necessary files step by step. Tried running the site on the web and it keeps producing an error:
HTTP ERROR 500 - This Page isn't working.
The error logs generated this file
ERROR - 2020-04-21 22:45:31 --> Severity: error --> Exception:
Session: Configured save path '/var/lib/php/session' is not a
directory, doesn't exist or cannot be created.
/var/www/vhosts/africansurveyors.co.zw/httpdocs/Eduline/system/libraries/Session/drivers/Session_files_driver.php
138
HOW DO I FIX THE PROBLEM?
shan is correct, you need to configure your php session to allow write access or to point to a folder you control that actually exists.
Reading a similar usage from https://codeclimate.com/github/bcit-ci/CodeIgniter/system/libraries/Session/drivers/Session_files_driver.php/source [Line112]
it looks like you can set "session.save_path" value from php.ini. Set this to something you control, maybe it supports relative paths, go find out!
You may find you have other folders incorrectly set or defaults assigned, like your temp folder. Don't be afraid to get familiar with php.ini if you plan to stick with php things, but backup before you make changes!

Path Error running CakePHP's "cake" console utility in Windows

A while ago when I started with Cake, I managed to get the console running in my Windows environment, and I have no idea how. I'm now having problems to make it work again in another computer.
This is what I've done in the new machine:
Downloaded my Cake code from source control (so all the files are exactly the same as the computer where it worked, including the configuration files)
Added PHP and "c:\my_cake_path\cake\console" to the path
If I run "cake OneOfMyShells", either standing on the /app, or in /cake/console directories, I get the following error:
Warning: get_object_vars() expects parameter 1 to be object, null given in C:\my_cake_path\cake\libs\model\connection_manager.php on line 199
Error: Missing Database Connection. Try 'cake bake'
"cake Bake", if run normally, when I try to get it to do the DB config ends up throwing another error (which is not that relevant to this)
However, if I run: cake bake -app "c:\my_cake_path\app"
Then bake works, I can do the database config, and it writes the DB config file (which is useless at this point, since I already had one)
Then, of course: cake OneOfMyShells -app "c:\my_cake_path\app"
does work perfectly well.
So, everything's working fine, I just need to manually specify the path to "app" every single time, which is very annoying.
How can I get around this? Where is Cake looking for to find the path to app?
Thanks!
Daniel
Not much of a difference in the sense you still need to type but you can run cake from the app dir like this: C:\XXX\project\app> ..\cake\console\cake.bat
To make it smaller you can put that line on a .bat or just add the \cake\console dir the windows path

Zend OSX, and a "." added to context path

I downloaded and unpacked the latest version of Zend Framework, onto OSX (10.6) (am also running webserver with XAMPP, but I added the include_path change to both XAMPP and OSX path, but this is all command line so I dont think the php compiler is using the XAMPP install)
I try to create a project and get the following: (note that i am replacing part of the path with "----" just for the purpose of privacy)
sh-3.2# zf create project
testProject
Fatal error: Uncaught exception
'Zend_Exception' with message 'File "Zend/Tool/Project/Context/Zf/./AbstractClassFile.php" does not exist or class "Zend_Tool_Project_Context_Zf_._AbstractClassFile" was not found in the file' in /Volumes/----/----/z/library/Zend/Loader.php:99 Stack trace:
0 /Volumes/----/----/z/library/Zend/Tool/Project/Context/Repository.php(88):
Zend_Loader::loadClass('Zend_Tool_Proje...')
1 /Volumes/----/----/z/library/Zend/Tool/Project/Context/Repository.php(79):
Zend_Tool_Project_Context_Repository->addContextClass('Zend_Tool_Proje...')
2 /Volumes/----/----/z/library/Zend/Tool/Project/Provider/Abstract.php(87):
Zend_Tool_Project_Context_Repository->addContextsFromDirectory('/Volumes/----/...',
'Zend_Tool_Proje...')
3 /Volumes/----/----/z/library/Zend/Tool/Framework/Provider/Repository.php(187):
Zend_Tool_Project_Provider_Abstract->initialize()
4 /Volumes/----/----/z/library/Zend/Tool/Framework/Client/Abstract.php(128):
Zend_Tool_F in
/Volumes/----/----/z/library/Zend/Loader.php
on line 99 sh-3.2#
Note the period after "Context_Zf_"
I've narrowed it down to this block of code:
File: /Volumes/----/----/z/library/Zend/Tool/Project/Provider/Abstract.php
public function initialize()
{
// initialize the ZF Contexts (only once per php request)
if (!self::$_isInitialized) {
// load all base contexts ONCE
$contextRegistry = Zend_Tool_Project_Context_Repository::getInstance();
$contextRegistry->addContextsFromDirectory(
dirname(dirname(__FILE__)) . '/Context/Zf/', 'Zend_Tool_Project_Context_Zf_'
);
$contextRegistry->addContextsFromDirectory(
dirname(dirname(__FILE__)) . '/Context/Filesystem/', 'Zend_Tool_Project_Context_Filesystem_'
);
// determine if there are project specfic providers ONCE
Specifically "dirname(dirname(FILE))" is echoing as "."
if I wrap the block with an 'if (dirname(dirname(__FILE))!=".") { … } ', then I don't get that error, but I get another:
sh-3.2# zf create project testProject
An Error Has Occurred
Context by name applicationDirectory does not exist in the registry.
Zend Framework Command Line Console
Tool v1.11.3 Details for action
"Create" and provider "Project"
Project
zf create project path name-of-profile file-of-profile
I tested on my Mac and it works fine. Have you tried to restart you xampp server, I don't really know how it works as I use Apache & PHP already installed versions not a "AMP pack". Maybe it's a problem with the php.ini include_path which has not been reloaded.
It's clearly a problem with the path as it don't succeed to build the class name :
"Zend/Tool/Project/Context/Zf/./AbstractClassFile.php"
the dot should not appear here.
Can you share you PATH variable from the terminal and your include_path from your php.ini.
Sadly the solution was to install zend server community edition, and have that take care of everything for me. For anyone else on OSX going this route, check out: http://cmorrell.com/webdev/installing-zend-server-zend-framework-on-os-x-291
includes the steps for enabling CLI support.

Resources