• I created a Virtual Machine (classic) in Azure.
  • Running Ubunu 16.04 LTS.
  • It is hosted in the cloud. Cloud service (classic)


  • Installed Apache2
  • Installed my required PHP version
  • My PHP based application runs fine
  • I can reach it over the internet from the browser (I had to open port 80 at the Endpoint settings)


  • Created a MySQL Database in Azure

Works fine

  • The PHP application can reach the database (hosted in Azure) if I run the PHP application from WampServer, localhost.


  • The PHP application cannot reach the database when the PHP application runs in the cloud.
  • I guess the problem might be with the Endpoints
  • But I opened some and still not working (also restarted Apache2)

enter image description here

Endpoints I opened:

  • 22: To reach the machine with SSH
  • 80: Allow the webbrowser to reach it
  • 3306: The MySQL DB's properties page shows this port
  • 1433: Just I read about it on the internet
  • 3389: Just I read about it on the internet


  • Do you see what I'm doing wrong?
  • Can you please suggest something?
  • What MySQL database did you create on Azure? ClearDB? Or did you install MySQL in a VM? Oct 14 '16 at 3:37

According to your description, I think the problem is not the endpoint.

I had deployed a VM in classic model, and add the endpoint 3306 to it, then the VM can connect to the Azure Mysql database. enter image description here
So maybe we can try to check the logs of PHP to find the real reason. By default, we can find the logs in /var/log/apache2/error.log,

Besides, to troubleshoot this issue more efficiently, you may try to perform a network capture on the client. Then we are able to find the detailed behavior of the client, which is very useful for further troubleshooting

If you still have questions, welcome to post back here. Thanks.

  • Thank you for the tip. I got this: script '/var/www/html/mydomain.net/xmlrpc.php' not found or unable to stat
    – Tomi
    Oct 13 '16 at 16:47
  • Posting troubleshooting tips (e.g. looking at the log) should be a comment, not an answer. Oct 13 '16 at 17:33
  • 1
    Most of time not found or unable to stat means the specified file does not exist, maybe we should try to make sure is the file in the default “DocumentRoot” , is the permission right? And then restart the service, if you still have questions, welcome to post error logs back here. please refer to the link serverfault.com/questions/183725/…, hope this helps you.
    – Jason Ye
    Oct 14 '16 at 8:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.