I have a form in a joomla website on altervista.org and I use phpmailer to send the output of this form (quote) throught email.
But when I load the page it occurs this error
Fatal error: require(): Failed opening required
'http://lindoelinda.altervista.org/reception2/phpmailer/PHPMailerAutoload.php'
(include_path='.:') in/
membri/lindoelinda/plugins/system/sourcerer/helper.php(607) :
runtime-created function on line 481
the file is well PHPmailer is located in that folder but it seems tell me that file doesn't exist
You should be using the Joomla! jMail class and not phpmailer. There's no point in using Joomla! CMS if your not using its classes and functions.
As it is a simple form you would be best just getting a new form component like rsforms to handle this and remove your custom setup.
Related
i have installed browsershot in my laravel project
I have installed puppeteer, installed chromium , my npm version is updated, but still i am unable to get the PDF of my simple html input , i have tried to take screenshot by URL method and save as image(It works), but my requirement is to generate PDF of my html.
This is my code in controller
$output=Browsershot::html($html)
->setNodeModulePath("/var/www/html/ProjectName/node_modules/")
->setChromePath("/usr/bin/chromium-browser")
->setNodeBinary('/usr/local/bin/node')
->setNpmBinary('/usr/local/bin/npm')
->showBackground()
->noSandbox()->timeout(60)
->save(public_path("DevTest.pdf");
Error Message:
"message": "The process "PATH=$PATH:/usr/local/bin NODE_PATH='/var/www/html/ProjectName/node_modules/' /usr/local/bin/node '/var/www/html/benesprint/vendor/spatie/browsershot/src/../bin/browser.js' '{"url":"file:\/\/\/tmp\/1933874416-0068512001600765779\/index.html","action":"pdf","options":{"path":"\/var\/www\/html\/ProjectName\/public\/DevTest.pdf","args":["--no-sandbox"],"viewport":{"width":800,"height":600},"displayHeaderFooter":false,"executablePath":"\/usr\/bin\/chromium-browser","timeout":60000,"printBackground":true}}'" exceeded the timeout of 60 seconds.",
**i would be grateful if you can help me out.**
i have similiar problem when browsershot inside container. and my step to resolve is like this:
Manual generate PDF from html using laravel tinker. if there is an error, try reinstall chromium and puppeteer library.
If success, then try remove all css and javascript links from html, and check for the result.
If success, then add --proxy-server="direct://" and --proxy-bypass-list=* into browsershot args
If step 3 is not working, then you can put css and javascript directly into view template or using php code to inclue those files like
<?php include public_path('css/styles.css') ?>
When I got an error in laravel site then i have received this error page.I want to redirect to another page which I have created custom looks like a valid error page.
enter image description here
enter image description here
First in your .env file (in your project's root) set false for app_debug ->
APP_DEBUG=false
Then create a file named 500.blade.php that contains your custom html css in (resources\views\errors)
Done.
(for others errors like 404 , 503 , just change the name of file to that error code)
More information Here
In prestashop 1.6.0.13.
using pf_stationery theme if i go to authentication form (log in as a customer not as a visitor) then i log-in the entire site not work. Only error message I have is:
Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "/var/www/vhosts/***********.com/httpdocs/themes/pf_stationery/header.tpl" on line 114 "{plugin module='ptsmegamenu' hook='displayTop'}" unknown tag "plugin"
<-- thrown in /var/www/vhosts/*********.com/httpdocs/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 114
I've activated debug in defines.config
Maybe it is a problem with the version of smarty but i've tried an older version and still not work..
At the end the problem was not related to smarty but in fact the user that i was using to login in the front-office has associated any group. I associate the user to the prestashop default group "Customer" and the problem disappear...
My Magento site has suddenly stopped working. The homepage loads a blank page, and when I go to the admin I get the following error:
Fatal error: Call to a member function getBlockName() on a non-object in ../app/code/core/Mage/Captcha/Block/Captcha.php on line 43
I have deleted the cache and session files but this didn't have any effect.
Make sure your Var folder has proper permission.
When captcha image are created they first get store in var folder.
Due to improper permission images will not be saved.This will result in a NULL object hence that error.
If your store doesn't use captcha, then rename the folder ./app/code/core/Mage/Captcha/ to something other like ./app/code/core/Mage/Captcha_old/ then you can access the site.
I have a page that includes a php file I have written like so
HTML
<div id="playlists_div_holder">
<?php include(dirname(__FILE__) . '/includes/get_playlists.php'); ?>
</div>
I have created a button that will refresh the playlists , incase the user has uploaded (added/removed) anything, and I am trying to do so with an ajax request to get the file and include it back into that div, but I am receiving a 500 error.
I am doing this in WordPress so that may be an issue.
The Button
<span class="button-primary refresh-playlists" onclick="ReloadPlaylists()">Refresh Playlists</span>
Ajax Request
function ReloadPlaylists() {
jQuery.get('<?php echo plugins_url();?>/Player/includes/get_playlists.php', function(data) {
jQuery('#playlists_div_holder').html(data);
alert('Load was performed.');
});
}
Including it works but an ajax get throws a 500 error
It's pretty hard to guess the problem but some simple workarounds that you can use all the time:-
CAUTION! Please take backup of your WordPress before doing anything.
1st workaround:-
Download fresh WordPress copy
Delete every folder, except the wp-content folder.
Upload all the files and folders again, except the wp-content folder.
2nd workaround:-
Rename
wp-content/themes
to
wp-content/themes-backup
Create a new folder:-
wp-content/themes
start copying each theme from themes-backup to themes one by one and see if the error is gone.
Now what you have done with the themes folder, do exactly with the plugins folder.
Based on your comment,
i'm getting call to undefined function get_option on line 8 , which is odd because it works when i include it the first time. Could it be because its calling the same file on the other and it has some sort of variable conflict?
This is because when the plugin in running as an include, all the wp-includes are laoded before your plugin code is execute. However when you make an AJAX call directly to that file, the wp-includes are no loaded hence your get_option() isn't working.
You can fix that by adding include_once("../../../wp-blog-header.php"); on top of your get_playlists.php file. That might break your plugin (not sure) so in that case its safe to use it inside a condition like this
if(stristr($_SERVER["REQUEST_URI"], get_playlists.php))
include_once("../../../wp-blog-header.php");
However once you do that you will get an Error 404 when you make an AJAX request because that URL is not registered in Wordpress URL Rewrite. You can override that by using header() function.
if(stristr($_SERVER["REQUEST_URI"], get_playlists.php)) {
include_once("../../../wp-blog-header.php");
header("HTTP/1.1 200 OK");
}