[Midas] error message

Mona Wong mona at sdsc.edu
Wed Aug 22 19:57:41 EDT 2012


	It turns out there is something wrong with my code before the testAction() function...I commented out all my other code and testAction() worked to produce the debug file in /tmp/...now I need to figure out what's wrong my other code (;

	Thanks Michael for your ideas.

cheers,
Mona


On Aug 21, 2012, at 2:14 PM, Michael Grauer wrote:

> Hi Mona,
> 
> Anything in the logs or your Apache logs?
> 
> It makes sense that you are getting a blank page since you disabled your layout and view.  If you want to put some debug statements in as you work through this, you can comment out those lines, then add them back once you get the problem resolved.  My initial guess here is that it is related to a permissions issue.  You are trying to create a file in /tmp, which on my system is owned by root, but using the apache user (www-data on my system), who wouldn't have permissions there.
> 
> Can you try creating a path based on $this->getTempDirectory() in your controller (this method is inherited from the GlobalController) and see if that works?  Your apache user should have the right perms there.  BTW, perms are what people who are too lazy to write permissions write.
> 
> -Mike
> 
> 
> 
> 
> On Tue, Aug 21, 2012 at 4:46 PM, Mona Wong <mona at sdsc.edu> wrote:
> 
>         Sorry I forgot to post to the mailing list...
> 
>         Ok, I didn't click on the "Save configuration" button after I made the change to Development.  I just did that and now I don't get the error message, just a blank page (which might be ok), but it seems my function is not being executed.  Here is my code:
> 
> class Annio2_GetController extends Annio2_AppController
> {
>     public $_models = array ( "Item", "Folder" );
> 
>     [other functions]
> 
>     public function testAction()
>     {
>         $this->disableLayout();
>         $this->disableView();
> 
>         $debug = fopen ( "/tmp/midas.get.mona", "a" );
>         fwrite ( $debug, "testAction!\n" );
>         fclose ( $debug );
>     }
> }
> 
>         And I went to http://ourserver.edu/annio2/get/test and no /tmp/midas.get.mona was generated...
> 
>         What am I doing wrong?
> 
> Mona
> 
> 
> 
> -- 
> Thanks,
> Michael Grauer
> R & D Engineer
> Kitware, Inc.
> 919 969 6990 x322
> 
> 
> 

*********************************************
    Mona Wong
    Web & iPad Application Developer
    San Diego Supercomputer Center

    Believing we are in control is an
    illusion that brings suffering.
*********************************************





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/midas/attachments/20120822/cfe0d242/attachment.html>


More information about the Midas mailing list