Page 1 of 3

Internal Server Error after wurfl upload

PostPosted: Mon Feb 28, 2011 4:37 pm
by robice
Hello.

I have successfully installed Terra-WURLF 2.1.4 and on Administration screen everthing looks fine with no errors. After clicking on link "Your local WURFL file" or "The current released WURFL" Internal Server Error always appears.

I've tryed to customize the wurfl.xml file with no success.
Searching through error log on server it shows "File does not exist" error.

Best Regards
Erik

Re: Internal Server Error after wurfl upload

PostPosted: Tue Mar 01, 2011 2:30 pm
by kamermans
It sounds like a permissions problem. Assuming you are on Linux you will need to make sure the entire data/ directory and its contents need to be readable and writable by your webserver. Did you see any errors or warnings on the install page?

Re: Internal Server Error after wurfl upload

PostPosted: Wed Mar 02, 2011 2:47 am
by robice
Hi.

Yes, installed on Lynux and hosted on Justhost.com. All permission are OK. No errors or warnings appear on install page. I've tried to set 777 permissions with no success. The "File does not exist" message is caused due to a missing 500.shtml. I've created it and now nothing is logged into error log when "Internal Server Error" appears. Tryed also with smaller wurfl.xml file with no success. Nothing is logged to wurfl.log.

Best Regards
Erik

Re: Internal Server Error after wurfl upload

PostPosted: Thu Mar 03, 2011 10:33 pm
by kamermans
Do you get the error immediately or does it take more than a second and then show the error?

Re: Internal Server Error after wurfl upload

PostPosted: Fri Mar 04, 2011 3:07 am
by icejava
Im also getting the same 500 error on updatedb.php. It seems to take about 3-4 seconds to show the error page, seems to be when $loader is being initialised.

Re: Internal Server Error after wurfl upload

PostPosted: Fri Mar 04, 2011 4:45 am
by robice
Hi.

Error appears quite quickly. I even tried to debug the execution and found that error appears when loading is executed.

Regards
Erik

Re: Internal Server Error after wurfl upload

PostPosted: Mon Mar 07, 2011 8:13 pm
by smokeysass
I am trying to get WURFL loaded to my site hosted at hostgator. After receiving the internal server error mentioned in this thread, i submitted a ticket to their system. The following is what I got back:

We straced the output from the program and it appears that the program is suffering from a segmentation fault.

/home/xxxxxxx/public_html]# vim test.txt

12258 00:04:06 read(4, "ame=\"mms_bmp\" value=\"true\"/>\n "..., 8192) = 8192
12258 00:04:06 read(4, "height\" value=\"36\"/>\n <capa"..., 8192) = 8192
12258 00:04:06 read(4, "name=\"mms_max_size\" value=\"30720"..., 8192) = 8192
12258 00:04:06 read(4, "apability name=\"columns\" value=\""..., 8192) = 8192
12258 00:04:06 read(4, "ay\">\n <capability name=\"col"..., 8192) = 8192
12258 00:04:06 read(4, "pability name=\"imelody\" value=\"t"..., 8192) = 8192
12258 00:04:06 read(4, "oup id=\"storage\">\n <capabil"..., 8192) = 8192
12258 00:04:06 read(4, "\"true\"/>\n <capability name="..., 8192) = 8192
12258 00:04:06 read(4, " <group id=\"playback\">\n <"..., 8192) = 8192
12258 00:04:06 read(4, " fall_back=\"mot_sap8a_ver1\"/>\n "..., 8192) = 8192
12258 00:04:06 read(4, "720g_ver1\" user_agent=\"MOT-T720/"..., 8192) = 8192
12258 00:04:06 read(4, "\"110\"/>\n <capability name=\""..., 8192) = 8192
12258 00:04:06 brk(0xae10000) = 0xae10000
12258 00:04:06 --- SIGSEGV (Segmentation fault) @ 0 (0) ---

This indicates that there is an error with the way that the program is managing memory. To resolve this issue, you will need to contact the developer of the software that is being run on the site and inform them about this issue. They will be able to assist you further with this issue since they will have the experience with the code necessary to properly debug this segfault.

I realize that memory is an issue and am wondering if anyone that has installed WURFL can export the sql statements for MySQL?

Re: Internal Server Error after wurfl upload

PostPosted: Tue Mar 08, 2011 3:35 pm
by marcguay
I resolved part of the problem by reverting the XML parser priority back to SimpleXML from XMLReader in the TeraWurflXMLParser.php file. When trying to use XMLReader $this->devices would be empty and the script would fail immediately. Now I am still receiving 500 errors when updating but at least the database gets updated properly. It seems to fail at varying parts of the $loader->load() process. The TeraWURFL logs indicate that sometimes it completes the process ("Finished loading WURFL", patches, etc), but still returns a 500 error before getting into the if ($ok) logic on line 120 of updatedb.php.

Re: Internal Server Error after wurfl upload

PostPosted: Tue Mar 08, 2011 3:41 pm
by marcguay
Problem resolved on my end by patching it to use SimpleXML. (The continued problems mentionned above were caused by other changes I had made to the release code).

Re: Internal Server Error after wurfl upload

PostPosted: Wed Mar 09, 2011 12:58 am
by kamermans
Hi guys - thanks for the info! So we've got a memory leak in SimpleXML and a segfault problem with XMLReader - man I can win! :)

What version of PHP are you guys using? How much memory does your server have and how much is available to PHP? XMLReader might segfault if it runs out of memory - I vaguely remember seeing XMLReader segfaults when I wrote that XML parser from the floor of an Iraqi Airport :P (I was a US Soldier)