Site keeps on hanging on Windows Azure Server - php

I have an online education site. The site is made up in WordPress and CakePHP 1.3. Recently I have migrated the site to Windows Azure server. Since then i am getting a problem. We have various portals in our site like ops portal, students portal.
All the session scheduling part is taken care of from ops portal. In the ops portal we have a "S Availability" tab that connects to a folder "bes" which is made in core php to schedule the session. Now what is happening is that after every 8- 9 clicks on this tab it starts hanging . It just keeps on processing and when I check the debug window by clicking "Inspect Element" in chrome it keeps on giving pending status to a program "ops_stu_calendar.php".
This "ops_stu_calendar" is the program that connects to "bes" folder and loads the calendar. After processing for a long time sometime it loads the calendar and sometimes I get the error:
"500 Internal Server Error Web server cannot perform this request http://example.com/bes/calendar/ops_stu_calender?id=14996&user_type=ops" .
Also while it is processing on the bottom left of the window it keeps on giving the message "waiting for example.com". Can somebody please explain any reason for this behaviour as it is giving a lot of serious problems in our process.

Gary Liu It is cloud app . My site name in azure is vnayatest.cloudapp.net and the server is windows server 2012 r2
Based on my understanding, cloudapp.net could refer to both Cloud Service and Virtual Machine deployed web application, it would be better if you can let us know what exactly you are using. If you are on a virtual machine deployment, in this case standard PHP troubleshooting tips apply, please make sure you are writing the logs, i.e. http://php.net/manual/en/function.error-log.php, the server logs could also help us to further troubleshoot the root cause. Additionally, this thread may provides some insights about troubleshooting hangs: How to find out what makes my PHP application to hang the Apache server?, please check it and see if it helps.
AFter processing for a long time sometime it loads the calendar and sometimes i get the error "500 Internal Server Error Web server cannot perform this request http://example.com/bes/calendar/ops_stu_calender?id=14996&user_type=ops" .
If you are using Wordpress's All-in-One Event Calendar, it looks like there are some known browser compatibility issues: https://wordpress.org/support/topic/calendar-hangs-no-response-from-any-on-page-functions

Related

Azure App - Web PHP - newly deployed 404 error

I recently deployed a web app to test out Azure as a hosting platform.
The configuration is php 8 with local git. I was able to connect through git and deploy a website. When I try to navigate to the site I get a 404 error. I did some digging and if I use: myapp.azurewebsites.net/.auth/login/aad/callback it will redirect a couple times and take me to a landing page and then from there on I can navigate to my website... at least until the session ends and then I'm back to 404 errors.
This is a free azure deployment there is no special configuration or setup... I'm really just testing out azure as a hosting platform and wondering how to solve this issue.
The site is also configured such that only members of the tenant can access the site, which is by design, and I can authenticate and access the site but only after using myapp.azurewebsites.net/.auth/login/aad/callback
I would have expected.. so long as I have logged in and have an open session / cookie then I can freely navigate the page without first needing to use the callback
I suspect some sort of authentication or redirect issue but I've also followed the instructions in:
https://learn.microsoft.com/en-us/azure/app-service/configure-authentication-provider-aad
The app registration from step 1 was already done as part of the deployment of the site. Kind of odd that after I use the callback URL I'm able to access the site as normal for a while.
Suggestions?
Thanks!

Drupal update.php on Azure throws error "Could not connect to server"

For migrating D7.3 to D7.42 completed the normal steps. Post that run /update.php.
=> Requirements verifications was okay
=> Overview stage instructions in place
=> Review updates "Runs for 2-3 minutes" and then throws back error as below:
Could not connect to server
Overview:
Could not connect to abc.azurewebsites.net .
Details:
Peer disconnected after first handshake message: Possibly SSL/TLS Protocol level is too low or unsupported on the server
URL formed in browser even during the error is as below:-
https://abc.azurewebsites.net/update.php?op=selection&token=JYkvAlNOkbWlBmj8BFRDrUlWmFXmZIysqgXO9ZzUjNs
Other Details
=> Azure Subscription
=> To Scale, Kept instance count to 3/ Pricing Tier to standard / Instance size to medium 2 cores.
=> First time, I run, I got the Review updates stage with 2 database columns alteration message listed and applied it. After few couple of attempts, I also got the message "No Pending updates" and link to front and admin sites.
=> In Settings.php, $update_free_access = TRUE was kept for update run.
Query:
Am curious to know why this Peer disconnected message came in
between the attempts?
b. Is it because of my SSL using TLS1.2? How to avoid this in future?
I follow the official guide at https://www.drupal.org/node/1494290 to upgrade Drupal from 7.3x to 7.42, which works fine on my side. Also I cannot reproduce your issue here.
And there some points we should pay attention to during the updating.
make sure to set the site on maintenance mode
Delete all the files & folders inside your original Drupal instance except for /sites (do not delete web.config as well on Azure). Which should be in D:\home\site\wwwroot on Azure Web Apps.
Copy all the folders and files except /sites from inside the extracted Drupal package [tar ball or zip package] into your original Drupal instance location. On Azure, we can login KUDU console site of your Web Apps Service and directly copy the zip package to the file list table to automatically upload and extract the zip to Azure.
Login to your site as administrator and Run update.php.
As a workaround, you can upgrade your site on locally, and with the database connection info to the MySQL Service on Azure. Then deploy your new Drupal site to Azure.

php with symfony website tracing request on production server

I have a php website using symfony2 framework .I wanted to know what would be the best method to trace incoming request on production server in order to troubleshoot client issues .The only way that i know of is using php log file in C:Windows/Temp directory .Is there any other way of tracing request and troubleshooting error with respect to such request .all the request to website are https not sure fiddler can help me in this scenario .Please let me know your feedback on the same .
Thanks
There are more than on way to log client requests.
First, Apache will log incoming requests in the /var/log/www/access.log
Secondly, Symfony has its own logging enabled by default available in app/logs/prod.log
Thirdly, you can implement client side logging and logging with monolog , example : Javascript errors => send ajax request to log endpoint => log with monolog action
Now, on what type of OS will your site run ? You speak about Windows Temp directory, will your site be hosted on Windows or UNIX servers ? configurations and available tools will then be different.
I am currently working on some project where I plan to do it via GrayLog2 (as #Christophe suggested in a 3rd solution).
I ran some local trials and it seems more than capable of logging just anything.

App on Facebook

I'm trying to run the example.php file that comes with the facebook sdk. I do have a hosting server that runs php, and also changed the ID's to the corresponding one on my app. Here is the message i'm getting:
This webpage is not available
The webpage at https://filipeximenes.com/facebook/ might be temporarily down or it may have moved permanently to a new web address.
Error 501 (net::ERR_INSECURE_RESPONSE): Unknown error.
i'm pointing the canvas to this adress: http://filipeximenes.com/facebook/
Thanks.
Based on your description, I think that this is your problem:
Do you have a valid security certificate on the hosting server? I ran into that problem recently when deploying an FB app. Since October, you have to have a valid cert even in sandbox mode for the FB app to run properly. If you don't have one it causes weird problems.
Just a thought that I hope helps.
One other thing to do from a debugging perspective is to take a look at the actual app running on your hosting server without viewing it via FB. If you get the same error message there, you know that it has nothing to do with the FB SDK.
Thanks!
Matt

Session timing out on ASP.NET app after visiting PHP app on same server

I'm working with a client's proprietary ASP.NET app, to which we added a PHP wiki to a subdirectory on the same server. The PHP app authenticates against the cookies that the .NET app uses. This all works fine.
When you login to the .NET app and then visit the PHP app (Dokuwiki), and then visit any page on the .NET app, it reports that the session is expired and asks you to log back in.
Both apps generate cookies, but none of them conflict in name. I stripped out the code in the PHP app that authenticates against the cookie to make sure I wasn't causing the issue with the PHP authentication, but the issue persisted.
With the exception of some front-end things, I have no control over the ASP.NET backend, but I did create a stray .ASPX page in one folder which successfully forces authentication if a user visits it. I created this page in a plaintext editor, not in Visual Studio, so it didn't generate any code behind files. If you visit this page after visiting the PHP app, it does not report the session as having been expired.
My question is that I'm trying to track down what is causing this behavior, first, and then looking at options for correcting it. I'm sorry for the dearth of more technical detail -- as mentioned, I only have limited access to the client's app. Any help would be very appreciated, and if any more information is needed to help troubleshoot, I'll gladly provide what I can.
I've had similar problems with classic ASP sites running on the same server as ASP.NET sites.
I'm usually able to fix the problem by creating 2 application pools under IIS: one for the ASP sites and one for the ASP.NET sites.
Do you have access to the server's IIS manager, or can you contact someone who does? If so, create 2 separate app pools: one for PHP sites and one for ASP.NET sites. Then move each site into the appropriate app pool. Restart IIS if you can, and then see if anything's changed.
Hope this helps!
I called in the original developer to troubleshoot this. He solved it by switching from SQL Server based session state to "In Process." That seems to have taken care of it.

Categories