The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mail error
#1
Trying to call on the email function and hitting error:

PHP Fatal error: require(): Failed opening required 'vendor/autoload.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/users/helpers/helpers.php on line 128

I thought the path should be ../vendor/autoload.php but tried that and remained the same.

Tried on 4.3.2 & 4.3.4

//
Slight update with a bit of context, calling email function from a file that sits in a folder that is different to users but sits at the same level ( has both helpers & init included).
Email test page works normally. :\
  Reply
#2
Amended helpers/helpers.php to the following and now working:

function email($to,$subject,$body,$attachment=false){
$abs_us_root=$_SERVER['DOCUMENT_ROOT'];
require $abs_us_root.'/users/vendor/autoload.php';
  Reply
#3
Thanks for this. I'm sorry for the slow response. I was on vacation. I'm going to look for other includes that are in the helper files and add that as well.
  Reply
#4
I believe I put this in the to-do list previously, identified it as a problem from my project. Fails outside of the users directory.
  Reply
#5
Dang. I just pushed before seeing this. We have a fix for it. I'll bump it up the todo list.
  Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)