mod_perl hacks PHP
Upcoming SlideShare
Loading in...5
×
 

mod_perl hacks PHP

on

  • 2,337 views

 

Statistics

Views

Total Views
2,337
Views on SlideShare
2,319
Embed Views
18

Actions

Likes
1
Downloads
4
Comments
0

3 Embeds 18

http://a0.twimg.com 9
http://paper.li 8
http://us-w1.rockmelt.com 1

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

mod_perl hacks PHP mod_perl hacks PHP Presentation Transcript

  • mod_perl hacks PHP fonfun (OGATA Tetsuji) Twitter: @xtetsuji 2011/12/10
  • • (OGATA Tetsuji)• Twitter: @xtetsuji• Blog: http://post.tetsuji.jp/• ( )•
  • • Hokkaido.pm#5 mod_perl• 3• Perl 30• :
  • • fonfun( ) http://www.fonfun.co.jp/ • http://rmail.jp/• g15 http://g15.jp/
  • • fonfun( : ) • 1999 ( : ) • 2003 4 (Perl + Apache/ mod_perl + Oracle + Postfix) •
  • Hokkaido.pm++• ( )•
  • Agenda
  • Agenda• mod_perl• PHP• mod_perl Hacks PHP • Authen/Authz Hacks • Output Filter Hacks
  • Agenda• • 20 90 →•• mod_perl
  • mod_perl
  • mod_perl• mod_perl Perl CGI• mod_perl Apache Perl• (#5) mod_perl Slideshare
  • mod_perl• mod_perl2• mod_perl1(Apache1.x) …•
  • PHP
  • PHPhttp://ja.wikipedia.org/wiki/PHP:_Hypertext_Preprocessor
  • PHP• IT• Perl Monger!! Hokkaido.pm!!• PHP
  • PHP• PHP•• Perl Monger• PHP (ry
  • PHP•※ ( )
  • PHP•※
  • • PHP dis•
  • PHP
  • • PHP …• PHP• Perl• …
  • mod_perl hacks PHP
  • mod_perl hacks PHP• PHP mod_perl • PHP • PHP …
  • :mod_perl2 PerlChildInitHandler PerlPostReadRequestHandler PerlInitHandler PerlTransHandler PerlMapToStorageHandler PerlHeaderParserHandler PerlAccessHandler PerlAuthenHandler PerlAuthzHandler PerlTypeHandler PerlFixupHandler PerlFixupHandler PerlResponseHandler PerlLogHandler PerlCleanupHandler PerlChildExitHandler※Apache2 /※ http://perl.apache.org/docs/2.0/user/config/config.html
  • Apache2 / mod_perl2 ※ Practical mod_perl
  • Apache2 / mod_perl2
  • • Q: PHP PerlResponseHandler Apache2• A: ( ) • PHP ※
  • …• Apache LL … … • Tomcat • FastCGI / mod_{ } • PHP
  • Authen/Authz Hacks
  • Authen/Authz Hacks• PHP • php.ini • PHP session_start()•
  • Authen/Authz Hacks• php.ini session_*() …• Perl … • →PHP (SSO)
  • Cookie
  • Cookie• sub handler { my $r = shift; ... }• Raw Cookie HTTP::Cookies• Apache2 (libapreq) Apache2::Cookie APR::Request::Cookie
  • AAA••3 • PerlAccessHandler • PerlAuthenHandler • PerlAuthzHandler
  • CPAN Module ofApache2::AuthCookie*
  • CPAN Module ofApache2::AuthCookie*• Apache2::AuthCookie• Apache2::AuthCookie•
  • Output Filter Hacks
  • Output Filter Hacks• PHP• Apache PHP ob_*
  • Output Filter Hacks• • PHP Perl • i-mode Softbank (Perl )
  • Output Filter• Filter sub handler { ... } $r (Request Object) $f (Filter Object)• PerlOutputFilterHandler
  • Output Filter<VirtualHost *:80> <FilesMatch “.*(html?|php)$”> PerlOutputFilterHandler MyApache2::FilterObfuscate </FilesMatch></VirtualHost>
  • Output Filter
  • DEMO
  • Filter• pipe Apache2.1 mod_filter• ”*.html” pipe w3m text/plain
  • Filter
  • • Apache PHP mod_perl• PHP mod_perl
  • • Web mod_perl• mod_perl2 • APR:: Apache2:: ModPerl::• LL Perl
  • Perl• Perl Perl
  • Perlhttp://d.hatena.ne.jp/syohex/20111110/1320938963
  • Perl• WAF Apache•• mod_perl
  • Perl• mod_perl• mod_perl(1 and 2)•• Twitter
  • • mod_perl2 User’s Guide (Onyx Neon 2007; http://modperl2book.org/)