More Invoice/Email problems . . .

I’m self-hosting using the local PhantomJS, which produces a beautiful invoice if I download it, but just hangs forever if I try to email it.

Any help is appreciated.

Terry

storage/logs/laravel-error log is empty for anything recent, although there are a bunch of these from during the install, even though I never had a user named “forge” :

[2019-01-08 21:06:28] production.ERROR: Doctrine\DBAL\Driver\PDOException [1045] : /opt/invoiceninja/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php [Line 47] => SQLSTATE[HY000] [1045] Access denied for user ‘forge’@‘localhost’ (using password: NO) {“context”:“PHP”,“user_id”:0,“account_id”:0,“user_name”:"",“method”:“GET”,“user_agent”:“Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.80 Safari/537.36”,“locale”:“en”,“ip”:“72.230.xxx.xxx”,“count”:1,“is_console”:“no”,“is_api”:“no”,“db_server”:“mysql”,“url”:"/"} []

PS. You probably already know this, but PhantomJS is no longer supported, so you might want to be looking into alternatives.

From http://phantomjs.org/ :
“Important: PhantomJS development is suspended until further notice (more details).”

PhantomJS development is suspended, but the precompiled binaries are still available and work fine. And PhantomJS Cloud is still an option as well.

As to your specific error, what do you get when you run php -v and also php -m?

Everything should be pretty vanilla. It’s a new install of Fedora 28.

php -v

PHP 7.2.12 (cli) (built: Nov 6 2018 10:48:33) ( NTS )
Copyright © 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright © 1998-2018 Zend Technologies
with Zend OPcache v7.2.12, Copyright © 1999-2018, by Zend Technologies

php -m

[PHP Modules]
apcu
bcmath
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
igbinary
intl
json
libxml
mbstring
mcrypt
memcache
memcached
mongodb
msgpack
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_pgsql
pdo_sqlite
pgsql
Phar
posix
readline
recode
Reflection
session
shmop
SimpleXML
sockets
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

I suggest either using PhantomJS cloud or running through the steps here:

https://invoice-ninja.readthedocs.io/en/latest/configure.html#troubleshooting

The problem turned out to be some sort of issue with http auth on apache. There was nothing in the logs mentioned in the troubleshooting section, although there were errors in the apache error log.

I had IN behind http basic auth, which worked perfectly for the entire app/site but for some reason breaks the invoice pdf creation.

I suspect it’s a cookie problem but I don’t have time to troubleshoot it. Once I disabled basic auth, everything worked again.