From: Teemu A. <te...@io...> - 2003-12-29 14:22:27
|
Hi, I'm using OpenInteract 1.60. I noticed a problem with Stash class. I might be wrong but my understanding is that the Stash class makes sure you can run several different OpenInteract websites on one Apache mod_perl server without any problems. I have a mod_perl server with two different OpenInteract websites running on different virtual hosts, both configured with their own httpd_modperl_solo.conf with virtualhost configurations and with different databases. Both have different OIStashClass and startup.pl. Lets say that on website #1 (configuration Included first in my apache.conf) I have the following additional SPOPS objects installed: course student Which both I can access through $R->[object] without problems. On website #2 however (configuration included second in apache.conf) I have the following SPOPS objects installed: course teacher I can access course without problems through $R. But $R->teacher->fetch_group() however results in the following error: Can't locate object method "teacher" via package "OpenInteract::Request". Strangely, I'm able to access $R->student from website #2, which is not installed on website #2! (but it doesn't work as it should, because I don't have such a table in the database of website #2). If I disable website #1 on my webserver, website #2 works as it should. $R->teacher works as it should. I also noticed that on website #2, defining new object classes for $R in system_alias configuration in server.ini doesn't work. Seems like website #2 accesses the object class aliases from website #1, which is loaded first into our Apache. It seems like everything in this Stash works (actions, own database connections, other configuration options...) expect object class aliases for $R. Just to let you know, oi_manage list_objects for website #2 returns the correct list of installed objects and there is no sign of student there, but the site still works the other way around. I know the Stash implementation is a little bit of a hack, but this hack obviously does something wrong at the moment. Currently I have to work-around this problem by running separate apaches on one server, which is maybe more clever anyway. - Teemu Arina |