3
votes

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. :)

3
Have you tried to increase the memory limit or the php execution time?Kristian Hildebrandt
well not yet but I think it's worth to try. ;)Christopher Pelayo

3 Answers

3
votes

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:

  1. 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.

  2. 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.

  3. Some other resource limit is being hit - CPU usage, database queries.

But - in the end your error logs are your friend.

1
votes

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

0
votes

You need to increase the memory_limit in php.ini. Memory_limit must be more that 64M for Smartformer.