'Modify PHP Settings' page is broken
jtsternberg opened this issue · comments
Clicking that link: http://b.ustin.co/15Fbe
results in: http://b.ustin.co/1iXIa
Strange, I tried it on a test site and it worked for me. Could you please paste the stack as text? It makes it easier to work with than image. Thanks!
Also, to help isolate, does this happen if you:
- create a brand new empty site (don't deploy anything)
- install the PHP Manager extension
- run it
I'll attempt your other steps in a bit.
Copying it into issue. @ZainRizvi any idea about the null ref?
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 71: <table class="setting">
Line 72:
Line 73: @foreach (var sections in @Model.GetAllDefinedSettings().OrderBy(setting => setting.Name).GroupBy(setting => setting.Section))
Line 74: {
Line 75: <tr>
Source File: d:\home\SiteExtensions\phpmanager\Views\Home\Settings.cshtml Line: 73
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
ASP._Page_Views_Home_Settings_cshtml.<Execute>b__4(PHPIniSetting setting) in d:\home\SiteExtensions\phpmanager\Views\Home\Settings.cshtml:73
System.Linq.EnumerableSorter`2.ComputeKeys(TElement[] elements, Int32 count) +88
System.Linq.EnumerableSorter`1.Sort(TElement[] elements, Int32 count) +21
System.Linq.<GetEnumerator>d__0.MoveNext() +178
System.Linq.Lookup`2.Create(IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer) +151
System.Linq.GroupedEnumerable`3.GetEnumerator() +72
ASP._Page_Views_Home_Settings_cshtml.Execute() in d:\home\SiteExtensions\phpmanager\Views\Home\Settings.cshtml:73
System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +198
System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +104
System.Web.WebPages.StartPage.RunPage() +17
System.Web.WebPages.StartPage.ExecutePageHierarchy() +64
System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +78
System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +235
System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +107
System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +291
System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +13
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +56
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +420
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +52
System.Web.Mvc.Async.<>c__DisplayClass28.<BeginInvokeAction>b__19() +173
System.Web.Mvc.Async.<>c__DisplayClass1e.<BeginInvokeAction>b__1b(IAsyncResult asyncResult) +100
System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27
System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +13
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +36
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +54
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +39
System.Web.Mvc.Controller.<BeginExecute>b__15(IAsyncResult asyncResult, Controller controller) +12
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +28
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +54
System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +29
System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__4(IAsyncResult asyncResult, ProcessRequestState innerState) +21
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +36
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +54
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +31
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9651188
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.36215
I added the extension to another azure site, and worked fine. Seems to be just one particular site (at the moment).
I think I found the bug. @jtsternberg, did you have any custom PHP settings defined in your .user.ini file? The site extension crashes if you use anything but the officially supported extensions.
I'll check in a fix for that
the .user.ini looks like:
; Maximum size of the files that can be uploaded
; value of post_max_size must be larger than upload_max_filesize
memory_limit = 512M
upload_max_filesize = 18M
post_max_size = 32M
[WinCache]
wincache.chkinterval=5
wincache.ucachesize=85
wincache.scachesize=85
[PHP]
display_errors = On
display_startup_errors = On
track_errors = On
[Session]
session.bug_compat_42 = On
session.bug_compat_warn = On
Ah, Php Manager doesn't recognize any of the wincache.* settings.
Must have missed those during development
Yes, it's easy to repro with this content.
FYI, I just checked in fixes (4c40a30) for PhpManager to recognize wincache settings and to not crash when it encounters unrecognized settings
Nice! I assume the version number needs to be bumped for the extensions updater in the portal to pick up on the update available?
Ah, thanks for that. There still needs to be a little bit more work done for this to get published in the portal. It's not automatic unfortunately.
Fyi, I just published this to the site extensions portal. Please let us know if you encounter any issues!
I confirm that new version fixes the exception above.
I confirm as well. Thanks guys!