Required: PHP version 4.4.0 or higher for Drupal 5 and Drupal 6, PHP 5.2.5 or higher for Drupal 7
Drupal 7 will only support MySQL 5.0.15 or higher, and requires the PDO database extension for PHP .
Enable PDO IN PHP ini file
Drupal has been deployed successfully on both Apache and IIS.
Apache (Recommended)
Drupal will work on Apache 1.3 or Apache 2.x hosted on UNIX/Linux, OS X, or Windows. The majority of Drupal development and deployment is done on Apache, so there is more community experience and testing performed on Apache than on other web servers.
You can use the Apache 'mod_rewrite' extension to allow for clean URLs.
Microsoft IIS
Drupal core will work using IIS 5, IIS 6, or IIS 7 if PHP is configured correctly.
To achieve clean URLs you may need to use a third party product. For IIS7 you can use the Microsoft URL Rewrite Module or a third party solution.
When using Drupal on IIS 7 with fastcgi you must install Hotfix kb954946, or wait until the hotfix appears in a package update (recommended). KB954946 was included in Windows 2008 Server SP2
Drupal is being developed to be web server independent, but we have limited or no reports of successful use on web servers not listed here.
The total file size of your Drupal installation will depend on what you add to your site, but Drupal core files alone will take up approximately 2 to 3 MB uncompressed. The exact size depends on the version of Drupal you have installed.
Please follow this blog if u feel the blog content is useful to you
Friday, December 31, 2010
Sunday, December 12, 2010
Get the row count in Drupal 7
<?php
$querystring = db_select('table1')
->fields('users')
->execute()
->rowCount();
?>
$querystring = db_select('table1')
->fields('users')
->execute()
->rowCount();
?>
Print query in Drupal 7 or Display query in drupal7
<?php
$querystring = db_select('table1')
->fields('table1')
->execute()
->getQueryString();
echo $querystring;
Or
$querystring = db_select('table1')
->fields('table1');
echo $querystring;
$querystring = db_select('table1')
->fields('table1')
->execute()
->getQueryString();
echo $querystring;
Or
$querystring = db_select('table1')
->fields('table1');
echo $querystring;
?>
Transaction & rollback query in Drupal 7
<?php
$transaction = db_transaction();
try{
//operation on a multiple table
//blah blah
}catch (Exception $e) {
$transaction->rollback('testtable', $e->getMessage(), array(), WATCHDOG_ERROR);
}
?>
Standardized Query to delete an record in Drupal 7
db_delete('table1')
->condition('uid', 1)
->execute();
?>
Standardized Query to update an record in Drupal 7
db_update('table1')
->fields(array(
'status' => 1,
'weight' => 1,
'region' => 'left',
))
->condition('module', 'table1')
->condition('delta', 1)
->condition('theme', 'Garland')
->execute(
->fields(array(
'status' => 1,
'weight' => 1,
'region' => 'left',
))
->condition('module', 'table1')
->condition('delta', 1)
->condition('theme', 'Garland')
->execute(
Standardized Query to insert an record in Drupal 7
db_insert('tablename')
->fields(array(
'field1' => 'mystring',
'field2' => 5,
))
->execute();
?>
->fields(array(
'field1' => 'mystring',
'field2' => 5,
))
->execute();
?>
Subscribe to:
Posts (Atom)