I have a web application that runs over a Centos Server. It was written in php and python. Suddenly without modification something starts to works in alternate and randomly way (one time fileB.php is called, one time not). I'll try to explain this problem better... This is the application flow:
filePy.py by an exec command) ->
filePY.py (it sends 5 mails and then calls
fileB.php declare this process close
# -*- coding: utf-8 -*- from email.mime.text import MIMEText from email.mime.application import MIMEApplication from email.mime.multipart import MIMEMultipart import smtplib import subprocess #cmdargs comes from fileA.php val1 = cmdargs subject = cmdargs toAddress = cmdargs mailText = cmdargs attachment = cmdargs fromAddress = cmdargs i = 0 while (i < 5): i+=1 msg = MIMEMultipart() msg['Subject'] = subject msg['From'] = fromAddress msg['To'] = toAddress # That is what u see if dont have an email reader: msg.preamble = 'Multipart massage.\n' # This is the textual part: part = MIMEText(mailText) msg.attach(part) # This is the binary part(The Attachment): if attachment: part = MIMEApplication(open(attachment,"rb").read()) part.add_header('Content-Disposition', 'attachment', filename=attachment) msg.attach(part) server = smtplib.SMTP_SSL('stmp-server',port) server.login(fromAddress, 'password') server.set_debuglevel(1) server.sendmail(fromAddress, [toAddress], msg.as_string()) server.quit() #call a php file and send val1 as parameter cmd = 'php -f fileB.php '+val1 subprocess.call(cmd, shell=True)
So what's the error? Suddenly the last part of the python file seems that isn't execute, this is the file's part:
#call a php file and send val1 as parameter cmd = 'php -f fileB.php '+val1 subprocess.call(cmd, shell=True)
Our server provider tells that no update was deployed on our machine. I can exclude any code related problems because there's no update or modifications. We can't find a reasons to that behaviour... So my question is , can someone suggest me something in server that can cause an alternate behaviour like this? I know that is a too much generic question but what i need is only a general suggestion that help me to investigate better the problem.
We have also set and reads a python.log but i can't print/see anything interesting. Please tell me if i have to place more server's details.