Mason compiles the components and caches out the results for better
performance see http://www.masonhq.com/?FAQ:Caching. The directory '/
usr/local/www/mason/obj' is where Mason is trying to put the compiled
objects on your system. However, the directory /usr/local exists but /
usr/local/www does not. Mason attempts to create the directory
structure for you but the permissions on /usr/local are preventing
this from happening. To see the permissions on /usr/local type "ls -
ld /usr/local" at a command prompt. There are a couple of ways to fix
this problem:
1) Create the directory structure and apply the correct permissions.
2) Change where mason is writing the object files
3) Stop using object files
Option 1 will probably be the easiest for you. To do this open a
command prompt and type:
mkdir /usr/local/www
chown -R <apache user>:<apache group> /usr/local/www
<apache user> and <apache group> is the user/group that you are
running apache as. I don't have Ubuntu at my disposal right now so I
can't say which user it uses by default but you can check the apache
configs for a User and Group declaration or, if you can't find it, you
can try to use the ps command. "ps -ef | grep http". If you get any
errors your user may not have permission to write to /usr/local and
you either need to switch to root or try using sudo to run the
commands. Once you have the user and make and chown the www directory
Mason should be able to set up its object directories without even
restarting the apache server.
I don't recommend option 3 but if you wanted to try that or option 2
take a look as the Mason admin docs http://www.masonhq.com/docs/manual/Admin.html#performance
.
Hope this helps.
-John
On Feb 11, 2010, at 12:38 AM, Saad Murtaza khan wrote:
Hello all
i am new to mason and i wanted to use it on my ubuntu 9.10 desktop
for web application development,inspite of trying very hard to
configure
mason on ubuntu runnig apache2 with modperl 2 i am unable to
configure it even the simpler test mason programs return error
ie : <% 2 + 2 %>
returns a http 500 internal server error
moreover there are two conf files in /etc/apache2 server
directory ,one is httpd.conf and other is apache2.conf, i had tried
chnging settings in both but nothing worked.Then i found this Mason
and debian linux article on mason wiki ( http://www.masonhq.com/search/results.pl?query=MasonAndDebianLinux&areas=Wiki)
and tried to change the settings using that in mind but it still
did not work,following are the errors from error log
1)Cannot create directory '/usr/local/www/mason/obj' (mkdir /usr/
local/www: Permission denied at /usr/share/perl5/HTML/Mason/
Interp.pm line 301\n) for user 'www-data', group 'www-data'. Perhaps
you need to create or set permissions on your data_dir ('/usr/local/
www/mason'). \nStack:\n [/usr/share/perl5/HTML/Mason/Interp.pm:
318]\n [/usr/share/perl5/HTML/Mason/Interp.pm:222]\n [/usr/share/
perl5/HTML/Mason/Interp.pm:169]\n [/usr/share/perl5/HTML/Mason/
Interp.pm:155]\n [/usr/share/perl5/Class/Container.pm:329]\n [/usr/
share/perl5/Class/Container.pm:53]\n [/usr/share/perl5/HTML/Mason/
ApacheHandler.pm:638]\n [/usr/share/perl5/HTML/Mason/
ApacheHandler.pm:413]\n [(eval 1124):6]\n [-e:0]\n
2) [Thu Feb 11 10:31:59 2010] [error] [client 127.0.0.1] Cannot
create directory '/var/state/mason/obj' (mkdir /var/state:
Permission denied at /usr/share/perl5/HTML/Mason/Interp.pm line
301\n) for user 'www-data', group 'www-data'. Perhaps you need to
creaMasonAndDebianLinux
te or set permissions on your data_dir ('/var/state/mason'). \nStack:
\n [/usr/share/perl5/HTML/Mason/Interp.pm:318]\n [/usr/share/perl5/
HTML/Mason/Interp.pm:222]\n [/usr/share/perl5/HTML/Mason/Interp.pm:
169]\n [/usr/share/perl5/HTML/Mason/Interp.pm:155]\n [/usr/share/
perl5/Class/Container.pm:329]\n [/usr/share/perl5/Class/
Container.pm:53]\n [/usr/share/perl5/HTML/Mason/ApacheHandler.pm:
638]\n [/usr/share/perl5/HTML/Mason/ApacheHandler.pm:413]\n [(eval
1124):6]\n [-e:0]\n
3) [Thu Feb 11 10:54:59 2010] [error] [client 127.0.0.1] Cannot
create directory '/var/state/mason/obj' (mkdir /var/state:
Permission denied at /usr/share/perl5/HTML/Mason/Interp.pm line
301\n) for user 'www-data', group 'www-data'. Perhaps you need to
create or set permissions on your data_dir ('/var/state/mason').
\nStack:\n [/usr/share/perl5/HTML/Mason/Interp.pm:318]\n [/usr/
share/perl5/HTML/Mason/Interp.pm:222]\n [/usr/share/perl5/HTML/
Mason/Interp.pm:169]\n [/usr/share/perl5/HTML/Mason/Interp.pm:
155]\n [/usr/share/perl5/Class/Container.pm:329]\n [/usr/share/
perl5/Class/Container.pm:53]\n [/usr/share/perl5/HTML/Mason/
ApacheHandler.pm:638]\n [/usr/share/perl5/HTML/Mason/
ApacheHandler.pm:413]\n [(eval 1124):6]\n [-e:0]\n
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as
DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users