Basically we need to tap into our Drupal's user database table. We also need to use Drupal's $_SESSION, but Drupal stores its sessions in the database by default, and the $_SESSION superglobal remains empty. Instead, we need to use the global $user variable.
Taking this one step further, why not synchronize the logins? By synchronize I mean if we log in into Drupal, we get logged automatically into the application, and vice-versa, when we log in the application, we get logged into the Drupal site automatically . That way, if we navigate from app to Drupal, we don't have to relogin.
- admin's blog
- Login or register to post comments
- Read more
- admin's blog
- Login or register to post comments
- Read more
- install JasperServer - bundles java based applications (tomcat, ant) but also mySQL and iReports (don't need to install those on the server)
- to work with the reports, you'll need to install it locally as well
- to generate scheduled reports from php, enable SOAP extension for php (php.ini)
- install SOAP and Net_Dime PEAR libraries for php
- open IReports: add/create the SQL query, design & build the report
- start jasper server (tomcat)
- open jasper
If you host your site on a VPS or dedicated server, then you are able to tweak your server and make your site load significantly faster. The fallowing considers a LAMP platform but some parts might be useful for other platforms as well.
The first thing to consider is a PHP accelerator. I recommended eAccelerator. It will not make your site go significantly faster, but is one of those things that you have to have.
Second thing to do is a little database optimization.
- admin's blog
- Login or register to post comments
- Read more
This is a solution when http authentication is not an option or if you want to restrict access to a single php script file.
It emulates regular http authentication with all the power & flexibility you get from php.
<?php
$username = 'admin';
$password = 'pass';
if ( !isset($_SERVER['PHP_AUTH_USER'])
|| !isset($_SERVER['PHP_AUTH_PW'])
|| $_SERVER['PHP_AUTH_USER'] != $username
|| $_SERVER['PHP_AUTH_PW'] != $password ) {
Header("WWW-Authenticate: Basic realm=\"My Protected Page\"");
Header("HTTP/1.0 401 Unauthorized");
echo '<html><body>
<h1>Rejected!</h1>
<big>Wrong Username or Password!</big>
</body></html>';
exit;
}
?>
- admin's blog
- Login or register to post comments
So, Drupal 7.0 Alpha 3 has been released on 21 Mar 2010. That's very close to a Beta and a stable release.
That's very exciting news indeed.
Besides CCK, Views and a number of well established modules as a part of the core, it has a large number of improvements in terms of usability, security and performance. Unfortunately, looks like Panels, a very cool module that for basically doing complex visual layouts won't be a part of D7. Hopefully, a release for D7 as a standalone module will be available soon.
- admin's blog
- Login or register to post comments
- Read more

