Hi Simon,
This is exactly the reason I hate to use these 3rd party installers etc., you spend half the day chasing around trying to figure out what they are complaining about!!
I have tried everything suggested but the error is still there without any changes no matter what I try and do.
My version of Composer is the latest one you just updated to.
When I try you final suggestion using copy and paste directly into an elevated powershell terminal I get this:
The "--disable-tls" option does not exist.
How about that for an obscure thing to come back with!
I tried disabling the openssl extension, stopped my server and restarted but no change either.
I use Laragon on Windows as it makes switching between php and apache versions easy and never had a problem like this until now.
Tony.
3 years ago
#11
3 years ago
#12
That's a shame Composer is not working for you with phpmailer. Have you tried another package to see if that works and why do you choose to run PHP 7.4?
I haven't used Laragon, so can't comment. Other than Xampp, I do use a Docker container that works well with Trongate called devilbox.org, where I can change versions quickly and it has everything you need already installed - even Composer.
I still think it's either your PHP installation or a problem with your Composer install.
Have you tried doing a 'Composer self-update' as I've read it will grab the right version for whatever php version you are running and 'may' fix your issue.
Let me know if you want a zip file of my app with the member's module and PHPmailer package already installed - the only thing you would need to do is put your email credentials in and it should work.
I haven't used Laragon, so can't comment. Other than Xampp, I do use a Docker container that works well with Trongate called devilbox.org, where I can change versions quickly and it has everything you need already installed - even Composer.
I still think it's either your PHP installation or a problem with your Composer install.
Have you tried doing a 'Composer self-update' as I've read it will grab the right version for whatever php version you are running and 'may' fix your issue.
Let me know if you want a zip file of my app with the member's module and PHPmailer package already installed - the only thing you would need to do is put your email credentials in and it should work.
3 years ago
#13
Hi SImon,
Thanks for sticking with me on this one as I have now got it working on my local machine which like you is windows but I am using Laragon.
It appears that my local machine got itself in a bit of a mess due to all of the frameworks I was trying out prior to settling on Trongate!!
I did download and install a new copy of composer using its setup utility and got it installed and working so that it would get PHPMailer for me as well and ensuring that the environment path variables were pointing correctly this time. This only worked for though using a Powershell on windows as my VS Code terminal still complains about the openssl every chance it gets - no idea why that should happen but it's a solid fault!
I then moved the vendor folder across to my basemodule assets folder so that it is contained within the module making it portable between projects.
Interestingly, although this process worked perfectly for me, when I tried to send an email openssl raised it's ugly head once again so I focussed on that next.
I have spent the morning going through everything and double checking everything right to environment path variables and php.ini settings and generally making sure that everything is pointing to where it should - bit of long job but well worth it.
As a result I can't actually say which of my minor tweaks on the settings actually cracked the openssl thing in the end and I am reluctant to go backwards until it breaks just to find out!
End result is I now have PHPMailer installed and working the way I need it to thanks to your very helpful posts on this thread.
As an aside which PDF library do you favour for creating your PDF files through code? I am currently using tcpdf but I noted that it is undergoing a rewrite so I am open to trying something better if there something you recommend that I can install using composer?
Thanks for sticking with me on this one as I have now got it working on my local machine which like you is windows but I am using Laragon.
It appears that my local machine got itself in a bit of a mess due to all of the frameworks I was trying out prior to settling on Trongate!!
I did download and install a new copy of composer using its setup utility and got it installed and working so that it would get PHPMailer for me as well and ensuring that the environment path variables were pointing correctly this time. This only worked for though using a Powershell on windows as my VS Code terminal still complains about the openssl every chance it gets - no idea why that should happen but it's a solid fault!
I then moved the vendor folder across to my basemodule assets folder so that it is contained within the module making it portable between projects.
Interestingly, although this process worked perfectly for me, when I tried to send an email openssl raised it's ugly head once again so I focussed on that next.
I have spent the morning going through everything and double checking everything right to environment path variables and php.ini settings and generally making sure that everything is pointing to where it should - bit of long job but well worth it.
As a result I can't actually say which of my minor tweaks on the settings actually cracked the openssl thing in the end and I am reluctant to go backwards until it breaks just to find out!
End result is I now have PHPMailer installed and working the way I need it to thanks to your very helpful posts on this thread.
As an aside which PDF library do you favour for creating your PDF files through code? I am currently using tcpdf but I noted that it is undergoing a rewrite so I am open to trying something better if there something you recommend that I can install using composer?
3 years ago
#14
Great to see you finally have Composer working with PHPMailer!
If you need to troubleshoot again like that I highly recommend devilbox.org - it's a full-featured dev environment inside of Docker so it doesn't matter what shape your system is in - everything should just work - and Trongate works without any BS!
With VS Code - you can configure it to open Powershell by default (mine is set to that) just open the terminal and where you see the +with a down arrow, select Powershell and make it the default (I have several to choose from Powershell(Default) Command Prompt, Git Bash, JavaScript Debug Terminal and Ubuntu-20.04(WSL)) - that's probably why I don't see any of those openssl shenanigans you are seeing.
I use spipu/html2pdf v5.2.5 for PDF via code - I have written an invoicing system with it. Found it feature-rich and so very easy to use I did find this version didn't like PHP 8.2, but so do some parts of Trongate which I will look into soon and try to fix. I may switch to mpdf/mpdf as it supports a lot more. I think I may have used tcpdf in the past, and DC has a few tutorials using dompdf.
If you need to troubleshoot again like that I highly recommend devilbox.org - it's a full-featured dev environment inside of Docker so it doesn't matter what shape your system is in - everything should just work - and Trongate works without any BS!
With VS Code - you can configure it to open Powershell by default (mine is set to that) just open the terminal and where you see the +with a down arrow, select Powershell and make it the default (I have several to choose from Powershell(Default) Command Prompt, Git Bash, JavaScript Debug Terminal and Ubuntu-20.04(WSL)) - that's probably why I don't see any of those openssl shenanigans you are seeing.
I use spipu/html2pdf v5.2.5 for PDF via code - I have written an invoicing system with it. Found it feature-rich and so very easy to use I did find this version didn't like PHP 8.2, but so do some parts of Trongate which I will look into soon and try to fix. I may switch to mpdf/mpdf as it supports a lot more. I think I may have used tcpdf in the past, and DC has a few tutorials using dompdf.
3 years ago
#15
Once again Simon thanks for your informative response.
I now have docker installed - phew that was a big install !
And I have devilbox up and running, or at least I think I do :)
I am struggling to get the project file structure correct but it's been a long day so I will come back to it in the morning.
It does look like an interesting way of going about things but obviously it's another steep learning curve for me.
I now have docker installed - phew that was a big install !
And I have devilbox up and running, or at least I think I do :)
I am struggling to get the project file structure correct but it's been a long day so I will come back to it in the morning.
It does look like an interesting way of going about things but obviously it's another steep learning curve for me.
3 years ago
#16
Devilbox issue - not sure if we are allowed to discuss this here?
Simon I can't get my symlink to work which means I am stuck on 403 Forbidden when I try and call my trongate app from within devilbox on docker desktop?
Can we discuss this anywhere other than on here maybe?
Simon I can't get my symlink to work which means I am stuck on 403 Forbidden when I try and call my trongate app from within devilbox on docker desktop?
Can we discuss this anywhere other than on here maybe?
3 years ago
#17
Hi Tony,
Yeah, Docker Desktop takes a bit of time to get to grips with but once understood it is a great way of separating work from the main OS and you know what works here will work anywhere you choose to move it to - even from PC to Mac to Linux...
I'm not sure what you mean by 'struggling to get the project file structure correct'. For me once Devilbox running with:
I just goto localhost on the URL and I see the devilbox home page, then go to localhost/myapp - the app is found in devilbox/.devilbox/www/htdocs/ this is where I tell the Trongate desktop app to create my new app.
I don't use a symlink - but a quick internet search shows this method:
- Create a new file in the root of devilbox project called docker-compose.override.yml
- Copy and paste this into the file
- Now you are able to create symlinks such as:
You can contact me via my email in 'Learn About Consultations' - green button on the main Help-bar page.
Cheers,
Si
Yeah, Docker Desktop takes a bit of time to get to grips with but once understood it is a great way of separating work from the main OS and you know what works here will work anywhere you choose to move it to - even from PC to Mac to Linux...
I'm not sure what you mean by 'struggling to get the project file structure correct'. For me once Devilbox running with:
I just goto localhost on the URL and I see the devilbox home page, then go to localhost/myapp - the app is found in devilbox/.devilbox/www/htdocs/ this is where I tell the Trongate desktop app to create my new app.
I don't use a symlink - but a quick internet search shows this method:
- Create a new file in the root of devilbox project called docker-compose.override.yml
- Copy and paste this into the file
- Now you are able to create symlinks such as:
You can contact me via my email in 'Learn About Consultations' - green button on the main Help-bar page.
Cheers,
Si