Sudden Mail Error - php

Today, after working for ages, my mailing stopped working.
Zend Framework returned an error
Message: Could not read from localhost
After searching on the web, I relaised it came from Dovecot, on my Debian machine.
Looking at the logs, it said:
server1 postfix/smtpd[15194]: fatal: no SASL authentication mechanisms
And I couldn't find what was working wrong.

After some unlucky try, I decided to restart dovecot, which said:
Restarting IMAP/POP3 mail server: dovecotLast died with error
(see error log for more information): Time just moved backwards by 899 seconds.
This might cause a lot of problems, so I'll just kill myself now.
http://wiki.dovecot.org/TimeMovedBackwards
Which made me realise that I installed ntp because I had some problem with time synchronisation and it got the time back from more than 10 mn, which seem to give a hard time to dovecot.
So if that happen to someone, don't look for way to fix a SASL authentication, just try to restart your dovecot.
Since there is not once a mention of this problem I could find on the web, I hope this one will help people.

Related

PHP sockets - connection refused (unusual cause?)

I have a problem with a PHP script triggering a "connection refused" message. Im trying to execute file_get_contents('http://some_domain'). I have also tried fsockopen(), socket_create() and curl_exec() but they all result in "connection refused" on some specific sites that I want to reach. (i.e. its not a general problem).
The resources do exist and I can contact them via my browser.
If I run the PHP on my localhost server, it connects OK
The problem is only apparent if I run the code on either of my remote servers
The problem only occurs with some sites, not all sites
The code worked OK until a few weeks ago
A common factor is that the three sites Im trying to reach are all running web servers behind domestic broadband routers that I installed (but with different broadband providers). But - as I said above - I can access them all from my browser, and the code worked until a few weeks ago. As far as I can see its not a firewall issue in the routers.
Im not sure what all that means - could there be some firewall issue on some intervening machine? How could I tell?
The answer to this turned out to be nothing but a server firewall problem. A new rule set had been loaded into iptables. Hopefully this will be useful to future enquirers - check iptables and your server log and save yourself a lot of time!

Check who made changes in server

We have a digital ocean server which runs 5-6 wordpress websites we have. We have 3 programmers who have access to the server. And today all websites were down until I fixed. I didn't know this issue until one programmer told me.
I checked the log and found out:
unix:/run/php/php7.0-fpm.sock failed
I saw this
Failed to restart php7.0-fpm.service: Unit php7.0-fpm.service is masked.
When I tried to restart it.
I checked the file and nothing was in that directory, so I install, then restarted the server, websites were back online.
My question is: is there any way to find out who did this? Or when it happened? Any helps will be appreciated. Thanks.
It sounds to me like nginx crashed and had to be restarted.
It's something that happens every now and again on our servers and restarting the server always gets it back online.
In this case, I don't believe that you should point the finger at anyone as sometimes these things just happen with servers.
It might be worth checking over the server for any potential issues like the disk space, etc.
Keep an eye on the error log and see if that provides any clues.

Forbidden you don't have permission to access /~username/Sites from this server

Just back from six months away with work, wireframe in hand, ready to try my hand at programming again, only to be met with 'Forbidden you don't have permission to access localhost/~username/Sites from this server' when trying to open a textwrangler .php file in safari.
It worked a few weeks before I left, but now even those projects refuse to open. I've spent my first weekend off googling like a mad 'un, trying all the solutions without success. 10 hours over two days and nothing.
So I'm hoping those with more knowledge than I can think of what could have gone belly up. Localhost by itself returns the 'It Works!' message. I have run Apache configtest; it stated something but I've resolved that. Now it returns syntax OK. The httpd file has allow where it should be. And I've checked that I'm a user in the users list and that there is a config file with the same name. Added localhost after ServerName in the httpd file. Restarted Apache but that also failed.
Nothing has been updated or changed in respect to OS or browser. I installed the arduino software at Christmas, I can't see that don't anything but it may mean something to you. I don't get how it can now not work when nothing has changed? I'm running Mavericks and it's Apache 2.2. I am stumped, and I'm hoping someone may have a clue. The guys at Apple's store said they couldn't help because it's not their software.
If you could answer in baby steps it would be greatly appreciated as I thought I knew computers until I started opening the terminal and doing all this.
Thank you very much for your time and advice,
Keep well
EDIT: console log displays - client denied by server configuration: /Users/myUserName/Sites

Diagnosing "The connection to localhost was interrupted"

I've been developing a Laravel 4 site on my work machine for over a year. Today I began receiving a The connection to localhost was interrupted error whenever I attempt to access the site. At the moment I'm just trying to find applicable log files that might tell me what's failing, and would appreciate suggestions from those more versed in tracking down this kind of failure. You'll see one possible cause below, but I still need to find some error logs to have any idea how to fix it. Here are some pertinent details:
I'm running Windows 7, IIS 7.5, PHP 5.5.1, and Laravel 4.1.23.
The application is accessed via https://localhost/ephy, and IIS is configured to deliver the ephy directory over SSL.
http://localhost/ephy correctly returns a 403 error indicating that the page must be accessed over SSL.
When copies of phpinfo.php (containing just a call to phpinfo() ) are placed in both the root directory and the ephy subdirectory, http://localhost/phpinfo.php executes, while https://localhost/ephy/phpinfo.php returns the connection reset error.
The application itself is executing successfully on the production server, so the PHP code is valid.
Yesterday I installed Office 2013, uninstalled Office 2010, uninstalled Office 2013, and then reinstalled Office 2013 (in that order). I also installed 2 GB of memory, because Outlook 2013 kept hanging.
The site was accessible as of 4pm yesterday, after all of that installation activity was already over.
I've made no changes to the application or the computer configuration since 4pm.
I've restarted the computer several times.
I've checked the files in C:\inetpub\logs\LogFiles , but they don't show any error messages.
So, I know PHP is running successfully and that the issue is specific to serving the application directory itself, but that's as far as I've been able to get. Recommendations on where to find (or how to generate) logs which would indicate what's happening, or any insights into the failure itself, would be appreciated.
Ok, after finally finding the magic combination of search terms on Google (ERR_CONNECTION_RESET localhost iis 7, for those who are curious, the first term being the error message from Chrome specifically), I was able to determine that this behavior can be caused by not having the self-signed security certificate correctly bound to the site in IIS. As I said, the site had been working successfully, but with the software updates I'd done something probably got borked (maybe adding the memory changed the computer's identity such that the certificate was no longer valid? I don't know).
So, I followed the instructions at http://weblogs.asp.net/scottgu/tip-trick-enabling-ssl-on-iis7-using-self-signed-certificates (with a bit of adjustment because apparently the binding has to be done at the default site level in IIS 7.5, rather than at the individual site level), whacking and replacing the existing certificate and SSL binding in the process. The site is now working again on my box.
So, in a nutshell: if you're running SSL on localhost under IIS and you get "connection to localhost was interrupted" messages, try redoing the certificate and binding.
Man, glad that's over...

Error 324 when signing in to PHPMyAdmin

I've been struggling with a frustrating problem for a few days and I'm being more and more confused; I can't login to PHPMyAdmin without receiving a Web Error 324 after about thirty seconds. The communication between MySQL and PHPMyAdmin is working but the failed login is the problem. I'm suspecting the configuration of PHP but I'm not sure.
I'm running a web server with Apache 2.0.64 with PHP 5.2.17 on Windows Server 2003 and I can run PHPINFO without problem.
I've reinstalled both Apache and PHP several times, but the problem is the same. Any ideas?
If you have this problem with Chrome, you can try the solutions posted here. If your problem is in any browser, then you have to check a bit more the related logs. Start with the logs from apache, then, you can check, and post, the response headers that live http headers gives you (firefox addon).
I've setup another web server now with the exact software environment and everything is running smooth on that one so there's probably something wrong with Windows. But I've to take that another day... Thank you for all support and help!

Categories