-1

I am having hard time fixing this issue, when i upload this files on GoDaddy the phpinfo.php is working but index.php gives message "Failure", surprisingly after 6 hours same started working without any issues. I am new to php and just started one simple project for my friends website. I have uploaded my project zip file, can someone help me troubleshoot this issue.

https://drive.google.com/file/d/0B5MAQGmHi8iZdkRtQzJzenEzMDg/view?usp=sharing

Akshay
  • 657
  • 2
  • 19
  • 38
  • I reached out to goDaddy and they said the issue is with index.php, where as i am not able to understand how did it started working after 6hr if it has issue. – Akshay May 29 '17 at 17:00

2 Answers2

0

The problem is definitely in this line: mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader) or die ("Failure"); You yourself print "Failure", and the problem is with mail function. Probably godaddy hosting doesnt have installed sendmail. By the way, you should probably consider sending the e-mail using smtp server instead of php mail() function.

Mat
  • 2,378
  • 3
  • 26
  • 35
  • Thanks for your response, I will try to check that. Meanwhile i just tried mail functionality from site and it does works. So it seems like mail goDaddy does have sendmail and its working as i get emails. The only issue here is site doesn't shows failure for first 1-2 hr and then works fine with no issues. – Akshay May 29 '17 at 18:37
  • It still seems like a hosting problem, not problem with your code. Can you try other hosting to confirm, that it works somewhere else? – Mat May 29 '17 at 21:15
  • I tried but goDaddy just not ready to entertain that, they are not ready to accept its issue at there end. :(... – Akshay May 30 '17 at 00:25
0

Finally got some help from goDaddy, as per goDaddy i am using shared server and when we upload new files it doesn't take effect immediately. It may take around 10-15 min to get site up and running. I am still not convinced as phpinfo.php page is immediately available once i make changes, but looks like i have no other options. Please provide your inputs if you find anything...

Akshay
  • 657
  • 2
  • 19
  • 38
  • GoDaddy's so shitty I'd actually believe that explanation. I'd find a new host even if they're not the cause of *this* problem. – ceejayoz May 30 '17 at 14:04