I'm currently using smartformer component for joomla 1.5 and have been facing a weird situation from this component. Here is the scenario:
I have created a survey form using the component as the user logs in to the site they would see the welcome page and there is a button named "Take Survey" so when they click on this button they could start answering the questions. Most of the time the form is going to show successfully, but for intermittent reasons it would fail to display. What your just going to see on your browser is really blank I tried to call this code on the file that will render the form:
ini_set('display_errors', 1);
but no errors are being displayed.
I'm very confused about this, it's very difficult to troubleshoot cause no messages are being displayed of what was actually happening.
Is there anyone who was able to encounter the same error before?
Any possible solutions would be greatly appreciated. :)
Surely your best bet here is your error logs. Through your hosting control panel (cpanel, plesk or similar) you should be able to download your server's error log. From this you should be able to see what the exact error is that the server is experiencing. Your control panel may also have a 'last 100 errors' listing - but this is less useful unless you go there directly after experiencing the error yourself.
Displaying errors in the browser on a live site isn't the best way of debugging as you basically disclose potentially harmful information to people who have no use even for the useful portion of the error message.
If you really must turn on error display in Joomla please do so through the /administrator/ area's global configuration options. But remember to quickly turn them back off again. I stress this procedure is only useful if you can reproduce the error reliably within a few clicks.
Without looking at your error logs here are my 'top 3' guesses as to the likely cause of an intermittent error:
You are probably hitting a memory limit and the server is killing the process. Raise the memory_limit in php.ini if your hosting setup allows this.
A timeout - if the page isn't finished within x seconds your server kills the script process. Generally this gives a script headers not finished message.
Some other resource limit is being hit - CPU usage, database queries.
But - in the end your error logs are your friend.
We've already identified the one that is causing the problem. The smartformer fails to fully load the whole form most especially the part that will redirect going to the survey form to which the users should be filling up so our resolution is to just create a separate custom module that will redirect to survey form. We don't really know what is really happening on the process but as I said it seldomly happens and we need a resolution more earlier than tracing the bug due to a hectic deadline, but I really appreciate those who provided me their ideas. There are really lots of things that I'm learning from you guys hope you'll keep on supporting forums like this. ;)
Thanks,
Chris
You need to increase the memory_limit in php.ini. Memory_limit must be more that 64M for Smartformer.
Related
I'm a bit of an amateur so I'm sure I've missed something.
I'm running Divi on Wordpress. When i go to update a page, I get the "Your updates couldn't be saved" error. My Wordpress site, as well as it's CPanel, also are loading unusually slowly, which I think is related to the issue. After working on this for a bit, both my site and it's CPanel will fail to load, giving me a "can't establish a secure connection to the server" error. The third symptom, which I can't make heads nor tails of, when I click "update" in the page editor, my browser will often (but not always) launch another tab/pop-up either displaying a preview of the edits or the "pages" page on the WP admin side. All of these issues are new (although I've had similar loading speed issues in the past with this site).
Thinking it may be an overload on my server (which happened due to an attack a few months ago), I let it sit for a few days with no luck. Then, thinking it may be a caching issue on my end, I changed my DNS servers, cleared my browser cache, tried private browsing, used my phone, used different wifi and cellular networks. All to no avail. I briefly had slight luck using my phone as a hotspot, but it only temporarily improved the loading speeds.
I also tried disabling plugins. I made sure everything was up to date. No help.
I went into my wp-config.php file and increased the memory limit to 128M and the WP-max memory limit to 256M. This helped briefly–I could update and save one page but when I tried to change the next, I was back to base 1. I've also increased the memory limits in my .htaccess file. I don't have access to my PHP.init file (there are often delays reaching my host so I'm trying to avoid relying on them when possible).
My last guess (which I have yet to implement) is to update my PHP. That said, I'm running 7.3.6 and had no issue updating the site a few days ago so I'm not sure that's the problem, unless divi's newest update has compatibility issues with 7.3 versions of PHP...
Any further ideas would be greatly appreciated! I'm partway through a cosmetic update (which, I know should be done on a staging site but sometimes best practices are best learnt through mistakes like this) so my site looks somewhat half-finished. That is, I'm anxious to be able to edit it again.
Many thanks in advance
Whenever you try to save something, Divi will make a request through admin-ajax.php, it often happens that a security firewall detects that as a threat (which is obviously not), thus giving you the failed save message. Can you ask you host to check the rules that are triggered and whitelist that action? It can also come from plugins like Wordfence, make sure to whitelist it there too.
You can also attach that layout as JSON here, I can test it on my own server and if I can save changes, we should be on the right path.
I have a problem, that I can't figure out.
I made an app with CakePHP that work's perfectly fine on localhost (via XAMPP), but has strange issue on live server.
There are (obviously) many controllers in my app, and the problem is - some of them are not rendering any view whatsoever! They output neither proper content, nor any error data - simply empty page (no layout either). About half of them is working fine, and the other half - not.
I have no idea what might that be, so that's why I'm here - any ideas?
This may be an old thread, but I'm replying this as a possible answer and solutions for other people who might have the same problem.
What you should do when you have this problem is to check the error log inside /app/tmp/logs. From there you can perhaps see what cause the error.
Make sure your debug is set to 2 for all error reporting to be displayed if any. The debug can be turned on in app/Config/core.php.
From the logs, you might see the error is with the maximum memory reached. For this, you'll need to fix your code and optimize it.
Please check if your URL rewriting mod_rewrite is enabled in your live server. Some server might require you to set it up yourself.
A piece of advice, always check with your error logs, it always show you what the problems are and can help you solving it easier.
We have Magento running on an eCommerce website an the last few days it seems that some really important pages are simply not loading!
Majority of the pageson the site load fine however if a user is "logged in" and they try to access the cart checkout page, by far the most important page, they receive this very nasty message shown below in the image...
As far as I know, no changes to code have been made the last few days so I do not even know where to look at this point for a solution.
A Google search shows that many people had had this problem before, mostly on WOrdPress sites but there never is a solution posted!
I am hoping someone can point us in the right direction as this is a major problem on this site right now if a user cannot checkout.
The other page that i noticed it is happening on is the page to create a new user account, once you fill the form out and hit submit, it shows the page shown in image as well.
We are running Apache on Ubuntu 12 believe. We also have Varnish Cache if that means anything.
Please help!
Also here is what I get for the same page in FireFox...
As mentioned by others, try flushing the APC Opcode cache.
You can do that by adding the following lines to your magento/index.php right at the top of the file to clear the cache
apc_clear_cache();
apc_clear_cache('user');
WARNING
As one cause of the problem can be a corrupted Opcode cache you should only use this once (add the code, then call the page) and comment it out afterwards, otherwise you won't have any performance improvements by the APC, maybe even a degrading performance as the cache will be filled with every page call.
So, add the code, call the page, then comment the code out. (if it didn't work, comment it out and search for another solution, DON'T leave the code in the index.php)
If you Google for this problem, you will find 100 different answers as it seems many different things can cause this error.
We got ours fixed now and our problem was corruption in PHP's APC Cache.
Flushing APC Cache solved all our problems, perhaps this will help someone someday, it;s another of the 100 things to check!
Clearing the APC Opcode cache resolved this error for me
I am just about to launch a fairly large website for the first time. I have turned off all error messages in my php.ini and error messages are now logged to an "error_log" file on my server.
My question is, now that the errors are logged to a file, what are the best ways that web developers keep on top of seeing when/where errors occur on the website?
At the moment, it seems like the best way would be to constantly check the error_log file everyday, however this doesn't seem like the most efficient solution. Ideally I would receive an email everytime an error occurs (with the error message). Any advice on how I can keep on top of errors would be greatly appreciated!
Extra Info
Running on Shared Server (HostMonster)
Website Authored in PHP
There are two main functions in PHP that help catching errors and exceptions. I suggest that you take a look at them :
set_exception_handler
set_error_handler
In our company, we handle all errors that occurs on our websites with those functions, defining our own errors and exceptions handling methods.
When an error occurs, an email is sent to the developers team.
The place I previously worked at used a custom extension to handle error logging. It basically INSERT DELAY the errors into a DB with some extra information. Then, a separate admin tool was written to be able to easily search, browse, sort and manually prune the log table.
I recommend that you don't write a custom extension, but that you use the set_error_handler method and just write to a DB instead. If the DB is unavailable, then write to a file as a backup. It'll be worlds easier than dealing with a huge file and a one-off format.
If you want, you can also email yourself hourly summaries, but I don't suggest you send anything more than that or you'll be hating yourself.
You can email yourself on errors, if there was no email in last N hours.
If you don't expect many errors, a "private" RSS/ATOM feed might work well... whereby you don't need to worry if you don't get anything... but if you start getting "updates" you know there are issues.
I don't know how Hostmonster handles log rotation, but generally you want to monitor the size of your error_log file. If the size jumps suddenly, there's definitely something you need to check up on so you'ld want to get an email telling you that the logfile size jumped unexpectedly.
Other than that, you can combine the error logs at the end of the week and email them to yourself and debug on the weekend. If an error is only happening a few times a week it's probably not too serious of an issue.
I have recently finished phase 1 of my Facebook game:
Rails Across Europe
It works fine on my dev system, but other people report errors and timeouts when they try to run it. Does anyone know how I would go about debugging these issues if they don't occur on my system?
Thanks.
The usual route is to use logging and error messages to pin down where the error is occuring in the code on production. Then look through it on your dev machine.
Added to this is getting as much info as you can from the people having problems, so that you can find out if it is a problem with particular client configurations.
A few things you can do
Introduce additional logging in the area that appear to related to the issue
Play the game itself, a lot ;-) from similar environments the users use in order to experience these issues first hand
Collect info about the bug reports (try and see if they have some commonality such as same browser, same OS, same time of day...)
Generally, you need to have traps in your application that record exceptions so that you have a trail to inspect when something goes wrong in the wild. You won't know what to try to repro until you have a specific exception/error.