Troubleshooting web applications

This article will teach you how to troubleshoot your web applications like a pro. Most of these tips are specific to PHPRunner, ASPRunner.NET and ASPRunnerPro but some of them apply to all web applications.

General troubleshooting tips

This is where you start when something doesn't work as expected.

  • Make sure that you run the latest build of the software
  • Synchronize database and project
  • Perform a full project build
  • If you test your project on remote web server make sure you upload all generated files
  • Clear browser's cache. In Chrome or Firefox press Ctrl+Shift+Del to open "Clear browsing data" dialog. Choose to delete cached images and files.

  • If above doesn't help test your app on an alternative web server. For instance, if it doesn't work on your web server you can try Demo Account or a built-in web server that comes with the software. This can help you figure out if something is wrong with the project itself or with web server configuration.
  • Just in case test it using another web browser. Normally clearing browser cache helps to fix issues like this but sometimes your issue can be browser-specific. Also some browser plugins may interfere with your web application functionality. Switching to another browser can help eliminate this possibility.
  • If you use CDN or a cloud-based service like Azure you may want to create a new project there to quickly test it. Cloud services add their own caching layer so you maybe still looking at an old copy of files even after uploading a changed project.

You done all this and nothing helps. Time to dig a bit deeper.

There is an error message

You see an error message on the page. This is good, it gives us something to work with. As a first step Google the error message. You will be surprised how often searching for an error message points you in the right direction.

Here is an example:

Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '='

Searching for this error message points us to this article on Stackoverflow. The best answer offers a few options to fix this issue, but option four is the easiest one. Altering all database tables to use the same collation is an easy fix and requires no changes in the code.

Another error message you nay encounter.

Fatal error: Uncaught Error: Class 'ZipArchive' not found in /home/groupe/public_html/dynaco/plugins/PHPExcel/Writer/Excel2007.php:226 
Stack trace: 
#0 /home/groupe/public_html/dynaco/include/export_functions_excel.php(164): PHPExcel_Writer_Excel2007->save('/home/groupe/pu...') 
#1 /home/groupe/public_html/dynaco/include/export_functions.php(125): ExportExcelSave('Localisations.x...', 'Excel2007', Object(PHPExcel)) 
#2 /home/groupe/public_html/dynaco/classes/exportpage.php(206): ExportToExcel(Object(mysqli_result), 0, Object(eventsBase), Object(RunnerCipherer), Object(ExportPage)) 
#3 /home/groupe/public_html/dynaco/classes/exportpage.php(188): ExportPage->exportTo('excel2007', Object(mysqli_result), 0) 
#4 /home/groupe/public_html/dynaco/classes/exportpage.php(65): ExportPage->exportByType() 
#5 /home/groupe/public_html/dynaco/Localisations_export.php(87): ExportPage->process() 
#6 {main} 
thrown in /home/groupe/public_html/dynaco/plugins/PHPExcel/Writer/Excel2007.php on line 226

We do not need to search for the whole error message as it refers to specific files and line numbers. Just copy the generic part of this error message.

Fatal error: Uncaught Error: Class 'ZipArchive' not found in

The very first result points to Stackoverflow article that provides an answer:

For the ZipArchive class to be present, PHP needs to have the zip extension installed.
See this page for installation instructions (both Linux and Windows).

There is no error message

This one is going to be more complicated. As a first step check if there are any Javascript errors behind the scene. This article can help.

Login and security errors

You enter correct username and password but getting 'Invalid login' message. A few things may go wrong.

  • If email account activation is turned on make sure account is activated. Usually there is a column named 'active' in login table that holds value of 1 for active users.
  • If password encryption is turned on make sure that password is encrypted. When you turn on this option existing passwords stay in plain text and this is why login may not work.
  • You use Advanced Security option 'Users can see and edit their own data only' but users can see all data. Make sure that user doesn't belong to an admin group.

Welcome/menu page issues

Login works but menu is missing some tables or is completely empty.

  • Make sure that current user has permissions assigned. If you added new table to the project make sure you assigned permissions for this table to all user groups.
  • check events like ModifyMenuItem or AfterSuccessfulLogin. Remove code from those events temporarily to see if this fixes the issue.
  • Reset welcome page in Visual Editor. This is unlikely to fix anything but we need to eliminate all possibilities

If all of above doesn't help it is time to contact support.

2 comments to Troubleshooting web applications

  • Jesse

    Another tip: if you are having trouble in Azure, go in to the web app code slot and DELETE all files. Then do a full build, and upload all files from scratch. If you can afford it, spin up a staging slot. Then you can test in a staging slot, and swap it out with your production swap once you get it running. Azure makes this all very easy.

  • good morning

    I would like to ask a question, is that when I am going to publish the project
    in a htdocs xamp, everything works fine but it does not show the graphics

    what should I review

    Thank you

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>