Osclass Support Forums
General osclass questions => General discussion => Topic started by: Sinto001 on December 12, 2020, 11:38:50 AM
-
I tried to update my listing as user and also tried to add new listing but both the time it on clicking update (on existing listing) or publish (on new listing). It leads to HTTP Error 500 page. In case of new listing it gets add in the listing but when the users publish it for first time it goes to HTTP Error page. Same for updating the existing listing.
When the page is reloaded users go to Recaptcha validation has failed message as shown in snapshot or goes to login page with other error messages like "listing update error 3" snapshot
How to avoid this HTTP Error 500 page redirection so users can go to proper account page and don't get logged out as it happens sometimes ?
-
Enable error log and you will also see details.
-
Enable error log and you will also see details.
Which error log you intended. I found following in the options
define(OSC_DEBUG, true); - enable PHP debugging
define(OSC_DEBUG_LOG, true); - stores PHP debug into log file
define(OSC_DEBUG_DB, true); - enable DB debugging
-
Please reply
-
You need to place the lines below into config.php file located at the root of your installation.
This way you will see what is the reason of your error 500 sicne you will see the logs.
define(OSC_DEBUG, true);
define(OSC_DEBUG_LOG, true);
define(OSC_DEBUG_DB, true);
I had the same error and i solved it this way: ( this does not mean you have the same issue but to know it you need see the error log )
Settings --> Mail Server - >Use POP before SMTP
uncheck this and tell me if it works now.
-
You need to place the lines below into config.php file located at the root of your installation.
This way you will see what is the reason of your error 500 sicne you will see the logs.
define(OSC_DEBUG, true);
define(OSC_DEBUG_LOG, true);
define(OSC_DEBUG_DB, true);
I had the same error and i solved it this way: ( this does not mean you have the same issue but to know it you need see the error log )
Settings --> Mail Server - >Use POP before SMTP
uncheck this and tell me if it works now.
Settings --> Mail Server - >Use POP before SMTP
is already unchecked
-
I had turned on the debug as suggested by you but there is nothing displayed there. And the same redirection issue persists. Take look at the snapshots.
On submitting update or new listing first snapshot appears
On reloading page second snapshot appears and users gets logged out.
-
@Sinto001
This is proper code to enable debugging.
// Enable debugging
define('OSC_DEBUG', true);
define('OSC_DEBUG_DB', true);
define('OSC_DEBUG_LOG', true);
-
I have added your code and tried updating a listing. Again I got the same issue, the page is redirected to HTTP Error 500 Page. Same thing I suppose happens when user adds a new listing. Why it is redirecting that is the problem but I can see the changes are updated or the listing is added. Issue is this redirection and user getting logged out. Admin also has same problem when they updates any listing or add a new one from their end.
The redirected link is myclassifiedxx.com/index.php
See 1st snapshot after new listing is added and/or a listing is modified or updated
See 2nd snapshot after page is reloaded, where user is logged out with some error messages
-
@Sinto001
If error log is enabled, you should not have such error shown but you should see details. Consolut with your hosting provider.
You might have also output in oc-content/debug.log file in your hosting.
-
Ok I will take their help but meanwhile can you see the debug file and suggest where is the issue coming from.
-
@Sinto001
[14-Dec-2020 20:20:39 Asia/Kolkata] PHP Fatal error: Uncaught PHPMailer\PHPMailer\Exception: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting in /home/u794139114/public_html/classifieds/oc-includes/vendor/phpmailer/phpmailer/src/PHPMailer.php:1879
You should first test your mail server.
-
@Sinto001
[14-Dec-2020 20:20:39 Asia/Kolkata] PHP Fatal error: Uncaught PHPMailer\PHPMailer\Exception: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting in /home/u794139114/public_html/classifieds/oc-includes/vendor/phpmailer/phpmailer/src/PHPMailer.php:1879
You should first test your mail server.
I cannot understand what to do?
-
@Sinto001
First, properly configure and test your mail server.
Your hosting provider should be able to help with that.
-
@Sinto001
First, properly configure and test your mail server.
Your hosting provider should be able to help with that.
What is this message in mail server options in Settings
Apache Module mod_ssl is not loaded
-
It is not important.
-
I entered correct credentials in the Mail Server and now the redirection to HTTP Error 500 stopped.
Thanks for Support
-
@Sinto001
Nice to hear that ;)
-
@Sinto001
First, properly configure and test your mail server.
Your hosting provider should be able to help with that.
What is this message in mail server options in Settings
Apache Module mod_ssl is not loaded
do NOT use SSL connection, it wont work, its an old problem with OC
-
I would say it work for me. Many aspects depends on mail server.
-
I would say it work for me. Many aspects depends on mail server.
I have worked on atleast 20 osclass based websites on clients, most of them on different hosting providers, worldwide.... I dont remember even one that didnt had problems with SSl emails.
P.S. Here is a feature request - It will be cool if the emails are working like worpdress php mailing without need of connecting any servers etc.
-
@pipetko
Well, emails are completely handled by PHP mailer library and currently, there is nothing better than PHP mailer library.
-
@pipetko
Well, emails are completely handled by PHP mailer library and currently, there is nothing better than PHP mailer library.
That is true, but why it is not working without email settings / server set up?!
Havent tested in your version yet. But until Now from when I am using osclass, it never worked sending emails without set up email settings. Currently with one of the websites I maintance is with not set up email server and it is not sending emails. Only the Contact form of the website is working. User emails are somewhere, nowhere. later we set up Mail server and it is working with the propper settings ( no ssl offcorse, SSL never worked ). Now it is sending emails BUT here is another problem. Now the email server of the web hosting is blocking email by automated bot. I was labeled as spammy email because sending notifications of the users. They remove the mail and domain from the list but some days later it is again blocked. That is why I hate using email set up server. In wordress I never spammed my domains because using only php without connecting it to the provirder's mail servers I only receive messages there and no problem... Its a long storry but its a pain in the .... this with the mails. So now even with set up mail server the website is not sending most of the mails and the client made me to remove the account mail verification on user register. Later the owner changed the webhosting and there was the same problem.
-
@pipetko
Mails sent from PHP have almost 100% probability to be marked as spam.
-
Agree... And still.... Why for example in Wordpress such a problem is a rare case ?!
-
All depends on what libraries use wordpress, but for me it sound weird that person that did not configured mail server complains why it does not work.