Frontend crashes after creating more than one category

Please report bugs here!

Moderator: Thorsten

melpheos
Posts: 15
Joined: Thu Feb 27, 2014 3:07 pm

Re: Frontend crashes after creating more than one category

Post by melpheos »

This is the result

#0 PMF_DB_Mysqli->fetchArray() called at [/var/www/inc/PMF/Category.php:226] #1 PMF_Category->getOrderedCategories(1) called at [/var/www/inc/PMF/Category.php:141] #2 PMF_Category->__construct(PMF_Configuration Object ([] => faqconfig,[config] => Array ([core.database] => PMF_DB_Mysqli Object ([] => mysqli Object ([affected_rows] => ,[client_info] => ,[client_version] => ,[connect_errno] => ,[connect_error] => ,[errno] => ,[error] => ,[field_count] => ,[host_info] => ,[info] => ,[insert_id] => ,[server_info] => ,[server_version] => ,[stat] => ,[sqlstate] => ,[protocol_version] => ,[thread_id] => ,[warning_count] => ),[] => /var/www/inc/Bootstrap.php:
PMF_Configuration->getAll() in line 139: SELECT config_name, config_value FROM faqconfig
/var/www/index.php:
PMF_Session->checkSessionId() in line 224: SELECT sid FROM faqsessions WHERE sid = 1 AND ip = '10.22.1.194' AND time > 1394121577
/var/www/index.php:
PMF_Session->checkSessionId() in line 224: UPDATE faqsessions SET time = 1394207977, user_id = -1 WHERE sid = 1 AND ip = '10.22.1.194'
/var/www/inc/PMF/Category.php:
PMF_Category->getOrderedCategories() in line 141: SELECT fc.id AS id, fc.lang AS lang, fc.parent_id AS parent_id, fc.name AS name, fc.description AS description, fc.user_id AS user_id FROM faqcategories fc LEFT JOIN faqcategory_group fg ON fc.id = fg.category_id LEFT JOIN faqcategory_user fu ON fc.id = fu.category_id WHERE ( fg.group_id IN (-1) OR (fu.user_id = -1 AND fg.group_id IN (-1))) AND fc.lang = 'fr' GROUP BY fc.id, fc.lang, fc.parent_id, fc.name, fc.description, fc.user_id ORDER BY fc.id
Can't create/write to file '/tmp/#sql_3a8_0.MYI' (Errcode: 13),[tableNames] => Array ()),[cache.varnishEnable] => false,[cache.varnishHost] => 127.0.0.1,[cache.varnishPort] => 2000,[cache.varnishSecret] => ,[cache.varnishTimeout] => 500,[main.administrationMail] => support@email.com,[main.contactInformations] => ,[main.currentApiVersion] => 1,[main.currentVersion] => 2.8.7,[main.dateFormat] => Y-m-d H:i,[main.enableAdminLog] => true,[main.enableGravatarSupport] => false,[main.enableRewriteRules] => false,[main.enableUserTracking] => true,[main.enableWysiwygEditor] => true,[main.enableWysiwygEditorFrontend] => false,[main.language] => language_en.php,[main.languageDetection] => true,[main.maintenanceMode] => false,[main.metaDescription] => phpMyFAQ should be the answer for all questions in life,[main.metaKeywords] => ,[main.metaPublisher] => it,[main.optionalMailAddress] => false,[main.phpMyFAQToken] => de195b2a94332299c29338d296bac2a0,[main.referenceURL] => http://10.92.3.236,[main.send2friendText] => ,[main.templateSet] => default,[main.titleFAQ] => phpMyFAQ Codename Perdita,[main.urlValidateInterval] => 86400,[records.attachmentsPath] => attachments,[records.attachmentsStorageType] => 0,[records.autosaveActive] => false,[records.autosaveSecs] => 180,[records.defaultActivation] => false,[records.defaultAllowComments] => false,[records.defaultAttachmentEncKey] => ,[records.disableAttachments] => true,[records.enableAttachmentEncryption] => false,[records.enableCloseQuestion] => false,[records.enableDeleteQuestion] => false,[records.enableVisibilityQuestions] => false,[records.maxAttachmentSize] => 100000,[records.numberOfRecordsPerPage] => 10,[records.numberOfRelatedArticles] => 5,[records.numberOfShownNewsEntries] => 3,[records.orderby] => id,[records.orderingPopularFaqs] => visits,[records.randomSort] => false,[records.sortby] => DESC,[search.enableRelevance] => false,[search.numberSearchTerms] => 10,[search.relevance] => thema,content,keywords,[search.useAjaxSearchOnStartpage] => false,[security.bannedIPs] => ,[security.enableLoginOnly] => false,[security.forcePasswordUpdate] => false,[security.ipCheck] => false,[security.ldapSupport] => false,[security.permLevel] => basic,[security.salt] => 4061e59c5375a73884fd0439dc7c7932,[security.ssoLogoutRedirect] => ,[security.ssoSupport] => false,[security.useSslForLogins] => false,[security.useSslOnly] => false,[socialnetworks.enableFacebookSupport] => false,[socialnetworks.enableTwitterSupport] => false,[socialnetworks.twitterAccessTokenKey] => ,[socialnetworks.twitterAccessTokenSecret] => ,[socialnetworks.twitterConsumerKey] => ,[socialnetworks.twitterConsumerSecret] => ,[spam.checkBannedWords] => true,[spam.enableCaptchaCode] => true,[spam.enableSafeEmail] => true,[core.language] => PMF_Language Object ([acceptedLanguage] => fr,[] => PMF_Configuration Object ( *RECURSION*))), Array ([0] => -1), 1) called at [/var/www/index.php:275] Fatal error: Call to a member function fetch_assoc() on a non-object in /var/www/inc/PMF/DB/Mysqli.php on line 158

The 10.22.1.194 is the ip i'm sshing from

Also it does the same thing on ubuntu LTS
Last edited by melpheos on Mon Mar 10, 2014 4:40 pm, edited 1 time in total.
bavade
Posts: 10
Joined: Fri Feb 28, 2014 5:48 pm

Re: Frontend crashes after creating more than one category

Post by bavade »

Hi Thorsten, Hi melpheos,

I got EXACTLY the same error (I just noticed that). I put my output in my thread, but maybe we can continue all this in only one thread :)
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Frontend crashes after creating more than one category

Post by Thorsten »

Hi,

awesome! I will work on it!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
melpheos
Posts: 15
Joined: Thu Feb 27, 2014 3:07 pm

Re: Frontend crashes after creating more than one category

Post by melpheos »

Thanks for looking this up :)
I think something has changed in the code as i have the same error in every linux version i have tried so far (Debian6, Debian7, UbuntuLTS, Centos6) but i had an old version running on a Centos5.9 with phpmyfaq 2.7.9 but after a yum update/upgrade i lost categories.
Hope that will help
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Frontend crashes after creating more than one category

Post by Thorsten »

Hi,

sure, you cannot compare 2.7 with 2.8 from the code base, we always do a lot of refactoring between major versions.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
bavade
Posts: 10
Joined: Fri Feb 28, 2014 5:48 pm

Re: Frontend crashes after creating more than one category

Post by bavade »

Hi,

By the way, I got the same errors with phpMyFaq 2.8.5 and above (didn't try with lower versions)
melpheos
Posts: 15
Joined: Thu Feb 27, 2014 3:07 pm

Re: Frontend crashes after creating more than one category

Post by melpheos »

I have just tried 2.8.8 and got the same result sadly :(

BTW, on which OS are you running without trouble ? (demo page of PhpMyFAQ is running fine) ?
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Frontend crashes after creating more than one category

Post by Thorsten »

Hi,

please try this fix: viewtopic.php?f=3&t=15280&start=15#p43713

It's an Apache issue.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
bavade
Posts: 10
Joined: Fri Feb 28, 2014 5:48 pm

Re: Frontend crashes after creating more than one category

Post by bavade »

Hi Thorsten,

As I'm running Apache on a CentOS, here what I changed on httpd.Conf (using MPM worker) :

Code: Select all

<IfModule worker.c>
ServerLimit			40
StartServers         2
MaxClients         960
MinSpareThreads     25
MaxSpareThreads     750
ThreadsPerChild     64
MaxRequestsPerChild  100
</IfModule>
Same issue :(
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Frontend crashes after creating more than one category

Post by Thorsten »

Hi,

ah, you're using CentOS. The quoted fix is for Windows. What memory_limit do you use? On demo.phpmyfaq.de we're using Ubuntu 12.04 LTS

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
bavade
Posts: 10
Joined: Fri Feb 28, 2014 5:48 pm

Re: Frontend crashes after creating more than one category

Post by bavade »

Hi Thorsten,

I have 64M as memory_limit. Tried 128M but the issue still occurs :(
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Frontend crashes after creating more than one category

Post by Thorsten »

Hi,

should be enough.

I re-read your stacktrace and I found this one:
Can't create/write to file '/tmp/#sql_3a8_0.MYI'
Looks like MySQL cannot write a temp table to /tmp

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
melpheos
Posts: 15
Joined: Thu Feb 27, 2014 3:07 pm

Re: Frontend crashes after creating more than one category

Post by melpheos »

Oh crap, you are right.
I did not spot that :(
I feel like an idiot now

Sorry to have wasted your time on a non issue.

For some reason the /tmp folder was owned by 501:games...

I think i saw this on another centos server as well. I have no idea where this comes from but it does indeed mess up mysql.
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Frontend crashes after creating more than one category

Post by Thorsten »

Hi,

is it working now?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
bavadee
Posts: 1
Joined: Thu Mar 27, 2014 10:18 pm

Re: Frontend crashes after creating more than one category

Post by bavadee »

YES !

Did a "chmod 0777 /tmp/" and it fixed it !!!!

Many thanks for your help Thorsten !

Have a great evening
Post Reply