Mako the Wolf (makomk) wrote in lj_dev,
Mako the Wolf

Apache2 + LJ fun

So, I decided to ignore the warnings about the LiveJournal code not working on Apache2 and try it anyway (using Apache2::compat for now). Oddly enough, some of the problems I've run into so far are mod_perl ones (I'm using 2.0.2) rather than LiveJournal ones...

  • PerlSetEnv doesn't seem to have any effect in a VirtualHost, even though the docs say it should work (this is where someone else's attempts failed). Moving it to global scope made it work. This would probably also apply if porting to mod_perl 2.0 properly.
  • Apache::LiveJournal::Interface::S2 - 'Bareword "OK" not allowed while "strict subs" in use', solved by changing the include to 'use Apache::Constants qw(NOT_FOUND OK);'. Not sure what causes this (but the change might still be necessary if porting properly)...
  • Apache2::compat "doesn't provide a complete back compatibility layer" for Apache::Constants. BAD_REQUEST is missing (it's Apache2::Const::HTTP_BAD_REQUEST in mod_perl 2). This breaks
  • Apache::Log and Apache::URI aren't provided by Apache2::compat, though their functionality is
  • Apache::compat doesn't work outside of Apache. indirectly depends on Apache::Constants. If anyone actually ports LJ, this should work properly.

  • It still doesn't work (BML docs not handled, DocumentRoot not set, etc - IOW, the httpd.conf injection doesn't seem to work), though at least Apache starts now. I wonder how much work porting it to mod_perl 2 (rather than using Apache2::compat) would be?

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded