server error on posting new changes to an existing tutorial

91 views
Skip to first unread message

arin...@gmail.com

unread,
Jan 13, 2015, 2:50:59 PM1/13/15
to gots-d...@googlegroups.com
Hi.

Other than not being able to figure out why gots still can't send mail, our installation has worked pretty well. But now, one of our librarians is suddenly getting a server error in the browser when she tries to edit an existing guide. The edit feature used to work just fine. In fact, it works now, it just throws an error even though the data changes are being saved. The server logs show:

[Tue Jan 13 13:12:49 2015] [error] [client IP_hidden] PHP Warning:  file_put_contents(/var/www/guide_on_the_side/app/tmp/logs/error.log) [http://php.net/function.file-put-contents]: failed to open stream: Permission denied in /var/www/guide_on_the_side/lib/Cake/Log/Engine/FileLog.php on line 144, referer: http://www.lib.siu.edu/guide_on_the_side/tutorials/edit_content/17

My first attempt was to give universal access to debug.log and error.log and try the changes again. I looked in debug.log afterwards. The only entries in debug.log (there are many) are all variants of this:

2015-01-13 13:39:07 Notice: Notice (8): Undefined index: Role in [/var/www/guide_on_the_side/app/Controller/AppController.php, line 39]
Trace:
AppController::beforeFilter() - APP/Controller/AppController.php, line 39
TutorialsController::beforeFilter() - APP/Controller/TutorialsController.php, line 25
call_user_func - [internal], line ??
CakeEventManager::dispatch() - CORE/Cake/Event/CakeEventManager.php, line 248
Controller::startupProcess() - CORE/Cake/Controller/Controller.php, line 674
Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 184
Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 162
[main] - APP/webroot/index.php, line 98

The last entry in error.log is:

2015-01-13 13:35:50 Error: [Zend_Search_Lucene_Exception] fopen(/var/www/guide_on_the_side/app/tmp/lucene/_rx.fdx) [http://php.net/function.fopen]: failed to open stream: Permission denied
Request URL: /guide_on_the_side/tutorials/edit_content/17
Stack Trace:
#0 /var/www/guide_on_the_side/app/Vendor/Zend/Search/Lucene/Storage/Directory/Filesystem.php(184): Zend_Search_Lucene_Storage_File_Filesystem->__construct('/var/www/guide_...', 'w+b')
#1 /var/www/guide_on_the_side/app/Vendor/Zend/Search/Lucene/Index/SegmentWriter.php(229): Zend_Search_Lucene_Storage_Directory_Filesystem->createFile('_rx.fdx')
#2 /var/www/guide_on_the_side/app/Vendor/Zend/Search/Lucene/Index/SegmentWriter/DocumentWriter.php(180): Zend_Search_Lucene_Index_SegmentWriter->addStoredFields(Array)
#3 /var/www/guide_on_the_side/app/Vendor/Zend/Search/Lucene/Index/Writer.php(244): Zend_Search_Lucene_Index_SegmentWriter_DocumentWriter->addDocument(Object(Zend_Search_Lucene_Document))
#4 /var/www/guide_on_the_side/app/Vendor/Zend/Search/Lucene.php(1410): Zend_Search_Lucene_Index_Writer->addDocument(Object(Zend_Search_Lucene_Document))
#5 /var/www/guide_on_the_side/app/Vendor/Zend/Search/Lucene/Proxy.php(500): Zend_Search_Lucene->addDocument(Object(Zend_Search_Lucene_Document))
#6 /var/www/guide_on_the_side/app/Plugin/LuceneSource/Model/Datasource/ZendSearchLuceneSource.php(95): Zend_Search_Lucene_Proxy->addDocument(Object(Zend_Search_Lucene_Document))
#7 /var/www/guide_on_the_side/lib/Cake/Model/Model.php(1827): ZendSearchLuceneSource->create(Object(SearchIndex), Array, Array)
#8 /var/www/guide_on_the_side/app/Model/Tutorial.php(552): Model->save(Array)
#9 [internal function]: Tutorial->afterSave(false, Array)
#10 /var/www/guide_on_the_side/lib/Cake/Event/CakeEventManager.php(246): call_user_func_array(Array, Array)
#11 /var/www/guide_on_the_side/lib/Cake/Model/Model.php(1856): CakeEventManager->dispatch(Object(CakeEvent))
#12 /var/www/guide_on_the_side/app/Controller/TutorialsController.php(618): Model->save(Array)
#13 [internal function]: TutorialsController->edit_content('17')
#14 /var/www/guide_on_the_side/lib/Cake/Controller/Controller.php(490): ReflectionMethod->invokeArgs(Object(TutorialsController), Array)
#15 /var/www/guide_on_the_side/lib/Cake/Routing/Dispatcher.php(187): Controller->invokeAction(Object(CakeRequest))
#16 /var/www/guide_on_the_side/lib/Cake/Routing/Dispatcher.php(162): Dispatcher->_invoke(Object(TutorialsController), Object(CakeRequest), Object(CakeResponse))
#17 /var/www/guide_on_the_side/app/webroot/index.php(98): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#18 {main}


Server configs have not changed, file permissions are the same as they were when it worked, and server has no disk space or other operational issues that I know of.

Any ideas on things I should check? Happy to send any logs or configs which will help!

Since I'm posting anyway, I may as well repost a snippet of our config.yml - re: no email being sent (even though other server apps send mail just fine)

application_title: Guide on the Side
theme: GuideOnTheSide

database:
  datasource: Database/Mysql
  host: localhost
  login: gotsuser
  password: removedforposting
  database: guide_on_the_side

email:
send_from: dsim...@spam.lib.siu.edu
send_all_feedback_to: dsim...@spam.lib.siu.edu

Thanks for any help offered,

Doug Simmons
Morris Library Systems
SIUC

Mike Hagedon

unread,
Feb 2, 2015, 7:50:58 PM2/2/15
to gots-d...@googlegroups.com
Hi Doug, 
Sorry for the delay, but it looks like you need to run

chmod -R 777 app/tmp 

See the README for more info.

Mike

arin...@gmail.com

unread,
Feb 3, 2015, 11:29:44 AM2/3/15
to gots-d...@googlegroups.com
Thank you, yes I had done that, but the error persists. A blank frame and error logs, but the submitted data is being stored.

Doug Simmons

William Simpson

unread,
Feb 10, 2015, 6:43:53 PM2/10/15
to gots-d...@googlegroups.com
Doug,

Who owns the files in the tmp directory?  Could you power the results of `ls -alR` in /app/tmp along with the username of the account that runs your webserver?  I think this could be an issue where the ownership of the files is messed up.

-Will

Doug Simmons

unread,
Feb 11, 2015, 1:27:24 PM2/11/15
to gots-d...@googlegroups.com
I issued chmod -R 777 tmp and this time whatever I missed must have
gotten changed and resolved the error. The content manager confirms
that she no longer gets a blank screen when submitting changes. Thank
you!

Doug Simmons
Morris Library Systems
SIUC


> --
> You received this message because you are subscribed to the Google Groups
> "Guide on the Side discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to gots-discuss...@googlegroups.com.
> To post to this group, send email to gots-d...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/gots-discuss/ed4a751a-81f5-4885-815f-9cb8c1045fee%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages