Jeremy Stein - Brain

« »

Cacti portlet

Cacti doesn’t like to be run as a portlet. In order to get it to work with HP OpenView Dashboard, I had to modify include/auth.php to add the following near the top of the file:

header("P3P: CP=\"IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA\"");

And then I created an autologin page to support single sign-on integration:

<?php
include("./include/global.php");
header("P3P: CP=\"IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA\"");
setcookie(session_name(),"",time() - 3600,"/");
?>
<html>
  <body>
    <form id="loginForm" method="post" action="/index.php">
      <input type="hidden" name="login_username" value="<?php echo $_REQUEST["login_username"]?>">
      <input type="hidden" name="login_password" value="<?php echo $_REQUEST["login_password"]?>">
      <input type="hidden" name="action" value="login">
    </form>
    <script type="text/javascript">
      document.getElementById("loginForm").submit();
    </script>
  </body>
</html>

September 24, 2008 No Comments.

No Comments

Be the first to comment!

Leave a Reply

Your email address will not be published. Required fields are marked *

Why ask?

« »