I'm transfering a Prestashop server to another server. The origin server is a CentOS with Apache and the destination is a Ubuntu with Nginx.
The problem is that I got this error when I open a product link in Prestashop:
Fatal error: Uncaught SmartyCompilerException: Syntax Error in
template
"/var/www/loja/themes/default-bootstrap/product.tpl" on line
48 "{/addJsDefL}{/strip}{/if}" unexpected closing tag in
/var/www/loja/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php:667
Stack trace: #0
/var/www/loja/tools/smarty/sysplugins/smarty_internal_compilebase.php(170):
Smarty_Internal_TemplateCompilerBase->trigger_template_error('unexpected
clos...', 48) #1
/var/www/loja/tools/smarty/sysplugins/smarty_internal_compile_private_registered_block.php(85):
Smarty_Internal_CompileBase->closeTag(Object(Smarty_Internal_SmartyTemplateCompiler), 'addJsDefL') #2
/var/www/loja/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php(475):
Smarty_Internal_Compile_Private_Registered_Block->compile(Array,
Object(Smarty_Internal_SmartyTemplateCompiler), Array,
'addJsDefLclose', NULL) #3
/var/www/loja/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php(417):
Smarty_Internal_TemplateCompilerBase->callTagC in
/var/www/loja/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php
on line 667
It seems that, for example, the code "{/addJsDefL}" need to have spaces like this "{ /addJsDefL }"
But in the old server the code "{/addJsDefL}" works without any problems.
So, is there a way to make the new server work with the old way? Maybe a parameter in the server?
Thanks in advance,
Related
I tried to activate an installed plugin and I got this error. I can't open the site again. I restarted my computer and load the localhost URL, got the same error below:
Fatal error: Uncaught Error: Call to undefined function create_function() in C:\xampp\htdocs\university\wp-content\plugins\full-site-builder-for-elementor\extensions\google-maps\google-maps.php:136 Stack trace: #0 C:\xampp\htdocs\university\wp-content\plugins\full-site-builder-for-elementor\extensions\google-maps\google-maps.php(441): stylepress_dtbaker_Shortcode_Google_Map->init() #1 C:\xampp\htdocs\university\wp-content\plugins\full-site-builder-for-elementor\inc\class.plugin.php(184): require_once('C:\xampp\htdocs...') #2 C:\xampp\htdocs\university\wp-includes\class-wp-hook.php(307): DtbakerElementorManager->load_extensions('') #3 C:\xampp\htdocs\university\wp-includes\class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array) #4 C:\xampp\htdocs\university\wp-includes\plugin.php(476): WP_Hook->do_action(Array) #5 C:\xampp\htdocs\university\wp-settings.php(598): do_action('init') #6 C:\xampp\htdocs\university\wp-config.php(96): require_once('C:\xampp\htdocs...') #7 C:\xampp\htdocs\university\wp-load.php(50): require_once('C:\xampp\htdocs...') #8 C:\xampp\htdocs\university\wp-blog-header.php(13): require_once('C:\xampp\htdocs...') #9 C:\xampp\htdocs\university\index.php(17): require('C:\xampp\htdocs...') #10 {main} thrown in C:\xampp\htdocs\university\wp-content\plugins\full-site-builder-for-elementor\extensions\google-maps\google-maps.php on line 136
It appears that some code from some plugin or active theme is not compatible with the PHP8 which is why it is throwing Fatal error.
Please follow the article https://ehikioya.com/fix-for-function-create_function-is-deprecated-in-php-7-2/ to solve this issue.
It's difficult for me to troubleshoot for you specific use case - but here are some notes and tools that may help you decipher and fix this. The error is because you are running on PHP8 but your code has PHP7 incompatibilities.
A.) Either downgrade the server to PHP7
B.) Or update the extension to PHP8 compatibility
C.) Or manually update the extension yourself.
The depreciated create_function() from > PHP7 needs replaced with an anonymous PHP8 function call.
For more information on this:
see: PHP 7.2 Function create_function() is deprecated
and: https://www.php.net/manual/en/function.create-function.php
If you want to dive in to the code itself to fix this:
Download Notepad++ https://notepad-plus-plus.org/
Open this document in your code editor: C:\xampp\htdocs\university\wp-content\plugins\full-site-builder-for-elementor\extensions\google-maps\google-maps.php
Got to: line 136
Use the notes above and experiment trying to rewrite the function using the notes above.
You will likely have other depreciated functions in the code:
Go to Search -> Find in Files (Ctrl+Shift+F) Search the document
base of C:\xampp\htdocs\university\wp-content\plugins\full-site-builder-for-elementor\extensions\ for "create_function("
These instances of the depreciated function will need to be updated in order for
your errors to go away.
Know this: there are likely other types of depreciated code errors that will crop up in this extension. It's best to not try and fix these individually unless you have no other option such as updating or downgrading the PHP version.
OS
Plesk Obsidian Web Pro Edition
SilverStripe
PHP
MariaDB
Ubuntu 20.04.4 LTS
v. 18.0.44
v. 4.10
v. 7.4.30
v. 10.3.34
I state it is a clean installation
The frontend works perfectly, instead calling /admin
"Server error there was a problem handling your request."
Error log extract:
Error 500 GET /Security/login?BackURL=%2Fadmin%2Fpages%2F HTTP/1.0
Warning (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
Error End of script output before headers: index.php
Has anyone encountered this problem?
Thank you
I made other tests on other environments always plesk and the scenario is similar, in one case the following "Emergency" occurred in the creation of the following table:
Error log extract:
[Emergency] Uncaught SilverStripe\ORM\Connect\DatabaseException: Couldn't run query:
CREATE TABLE "File" ( "ID" int(11) not null auto_increment
...
ENGINE=InnoDB Index column size too large. The maximum column size is 767 bytes.
GET /dev/build
Line 64 in /var/www/vhosts/.../vendor/silverstripe/framework/src/ORM/Connect/DBConnector.php
For this I found an explanation in the documentation that might be useful to someone
I'm trying to set the GLOBAL time of my MariaDB database to UTC. I've followed the recommendations of their official documentation and default_time_zone="+00:00" in the my.cnf file, however it does NOT work and I get the following error when I start it in the shell: mysql: unknown variable 'default_time_zone=+00:00'.
Does anyone have an idea?
Thanks
Remove the quotes
As the error message states command line client (mysql) complains about unknown variable, since default_time_zone is a server but not a client variable. So you added it in wrong section. Move the entry to the server section:
[server]
default_time_zone=+00:00
Trying to clean the index:
Apache_Solr_HttpTransportException: '400' Status: Bad Request em Apache_Solr_Service->_sendRawPost() (linha 364 de /home/mercado/public_html/sites/all/libraries/SolrPhpClient/Apache/Solr/Service.php
Trying to index itens:
Couldn't index items. Check the logs for details.
Log Says:
An error occurred while indexing: '400' Status: Bad Request.
Im using the latest release for apache solr and solrPHPclient. Everything seens ok, im using the schema.xml from the module and the module checks the solr server ok...
There is no log file in my path/to/solr/example/logs
Thanks in advance
I was having the same problem and realized I had the copied the wrong configuration files to the /Applications/apache-solr-3.6.1/example/solr/conf directory. Once I copied the correction version from sites/all/modules/search_api_solr/solr-conf/3.x it started to index properly.
Check your Apache solar is running on your server
I am trying to use the Zend Gdata framework with wordpress but I am having some issues.
Now everything works perfectly fine when I test on localhost with XAMPP. However on my web server my code breaks down.
Here is my code to include the framework.
`set_include_path(TEMPLATEPATH . '/includes/');
require_once ('Zend/Loader.php');
Zend_Loader::loadClass('Zend_Gdata_Youtube');`
That code produces the following error.
Warning: Zend_Loader::include_once(Zend/Gdata/Youtube.php) [zend-loader.include-once]: failed to open stream: No such file or directory in /home/damain/public_html/mysite.com/wp-content/themes/mysite/includes/Zend/Loader.php on line 146
Warning: Zend_Loader::include_once() [function.include]: Failed opening 'Zend/Gdata/Youtube.php' for inclusion (include_path='/home/damain/public_html/mysite.com/wp-content/themes/mysite/includes/') in /home/damain/public_html/mysite.com/wp-content/themes/mysite/includes/Zend/Loader.php on line 146
Fatal error: Uncaught exception 'Zend_Exception' with message 'File "Zend/Gdata/Youtube.php" does not exist or class "Zend_Gdata_Youtube" was not found in the file' in /home/damain/public_html/mysite.com/wp-content/themes/mysite/includes/Zend/Loader.php:99 Stack trace: #0 /home/damain/public_html/mysite.com/wp-content/themes/mysite/includes/modules/yt_link_checker.php(19): Zend_Loader::loadClass('Zend_Gdata_Yout...') #1 /home/damain/public_html/mysite.com/wp-includes/plugin.php(405): load_zend_gdata('') #2 /home/damain/public_html/mysite.com/wp-admin/admin.php(111): do_action('load_zend_gdata', Array) #3 /home/damain/public_html/mysite.com/wp-admin/index.php(10): require_once('/home/damain/...') #4 {main} thrown in /home/damain/public_html/mysite.com/wp-content/themes/mysite/includes/Zend/Loader.php on line 99
I cannot seem to figure this issue out. Can anyone help?
The best solution in this case is to run the script requiring the Zend Loader and use var_dump(get_include_path()) to see what the server says the path is. Then keep modifying the php.ini include_path until the script finds it.
In your case, I'm not sure if 'damain' is supposed to be 'domain'. My include path which finally worked was:
/home2/thelove6/public_html/zf/ZendGdata/library" thelove6 being the username.
Did you look to see if those files exist in those directories? (/mysite/includes/Zend/Loader.php) and they have the correct permissions? It sounds like that could very well be the issue. The other thing to check with a simple phpinfo() would be that you have all of the libraries install on the live server.
Ok, the possible reason is: You're not using the proper case for the classname. For the version 1.11.11, it will be Zend_Gdata_YouTube rather than Zend_Gdata_Youtube.
Windows OS is ignoring the case, whereas the Linux server does not. Hope this will solve your problem, just look at the proper case of the Class or filenames.