Category Archives: Tips

Drupal: Increase PHP memory limit without access to php.ini

This is the recommended approach if you have access to the server’s php.ini. This will not be possible in some shared hosting environments, though your host may be able to adjust it for you. Note that this change will affect all websites and PHP scripts on the server.

  1. Locate the php.ini file used by your web server. You can click the “more information” link on Drupal’s status page’s PHP section. which shows the phpinfo() page. Locate the Configuration File (php.ini) Path row on that page. During installation Drupal checks the PHP Memory Limit, and if it is less than 32M (16MB for Drupal 6), an error message also provides the path to the php.ini file.
  2. Edit the memory_limit parameter in the php.ini file (usually in a section called Resource Limits)
    memory_limit = 64M  ; Maximum amount of memory a script may consume (64MB)
    If there is no section already for this, place the above line at the end of the file.
  3. Restart Apache.

php.ini in the Drupal root folder

Add the following line to a php.ini file in your Drupal root folder:
memory_limit = 64M
This will only work if PHP is running as CGI/FastCGI.

The next two solutions are more restricted in scope and, in some cases, may be more appropriate choices than affecting all sites.


Edit the .htaccess file in the Drupal root directory. Look for the section:

# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.

and immediately after this add the following line:
php_value memory_limit 64M

This method will only work if PHP is running as an Apache module.


If Drupal is already installed, you can edit sites/default/settings.php. This method will affect only the site using this file.
Locate the PHP settings section and add the following line at the end of that section:
ini_set('memory_limit', '64M');

Shared Hosting

In some shared hosting environments, access to the PHP memory limit setting is restricted. If you cannot make the change yourself, please ask your hosting provider to adjust it for you, or look for a new host that allows more flexibility.

For some hosts renaming php.ini to php5.ini may be necessary.

Some hosting services require the following line in .htaccess to enable a php.ini file.
suPHP_ConfigPath ~/public_html

For some hosts (CrazyDomains) you may need to add the following lines to the php.ini file (if they are not there already):

Modifying php.ini in local server environments

For MAMP see particularly the “Optional: Adjust PHP’s memory limit for scripts” section (note the difference for MAMP Pro).

If you are using XAMPP/WAMP, there may be two PHP.ini files (one under the PHP directory and the other under Apache/bin). To change your memory limit, edit the file in the XAMPP/Apache/bin directory.

Check your change has taken effect

In all cases, it pays to ensure that your change is actually working. Check Drupal’s status report to verify that your memory actually is what you want it to be. If your change doesn’t seem to be working, double-check the location of php.ini. Some systems have multiple copies of that file in different places. Only one is used and the others are red herrings.

Leave a comment

Posted by on February 22, 2013 in Tips


Tags: , ,

Fix PhP Memory Size without Accessing Php.ini

I have recently discovered that few web-hosting do not allow access to php.ini and some application do need more memory to run or even install properly, for instance Drupal 7, Drupal Commons 7 etc

To Fix this issue paste “ini_set(‘memory_limit’,’16M’);” in your install.php. please note 16M is the memory size you can set 32M , 64M or 128M to suite you needs.



Leave a comment

Posted by on February 22, 2013 in Tips


Tags: , ,

Error with TFS2012,Sharepoint 2010 and remote Analysis Services on SQL2008r2

An error has occurred during report processing. (rsProcessingAborted) Query execution failed for dataset ‘dsArea’. (rsErrorExecutingCommand)

Above stated error pops up when we getting reports from report server: it could be caused by many authentication or Instance service types.

If you are trying to get Team Foundation Server 2010 to run with MS SQL Server 2012 Analysis and Reporting services, forget it 😦 i tried didn’t get it to work no matter what.

01 "Could not load file or assembly 'Microsoft.AnalysisServices.AnalysisServices, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies"

AnalysisServices_TFS-640x502I first thought it had to do with the “Client Tools Connectivity” of SQL Server which are required on the TFS application Tier.

After some digging I finally realized, that I missed the obvious.

The SQL2010 assembly has a different version!!!

01 'Microsoft.AnalysisServices.AnalysisServices, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91'

So it will never work with SQL2012 connectivity tools at least until now with TFS SP1.


If you install SQL Server 2008R2 Client Tools Connectivity on TFS Application Tier and SQL Server 2012 Client Tools Connectivity (Backwards Compatibility) on the SQL 2012 server it seems to work!
Unfortunately I still have to solve the annoying TF255186 Error with Reporting Services on SQL2012…

Update 2:

Solved!!! Finally solved the last issue by naming the Reporting Services ReportManager URL and WebServices URL by following schema:


This of course won’t be necessary when your reporting server runs on the default instance of SQL.
Thank you MS for not pointing out that this seems to be a requirement…

Update 3:

After the installation, I realized, that although everything was setup fine and all databases per created, I still had no access to the reports

Reporting Services answered with

01 An error has occurred during report processing. (rsProcessingAborted)
02 Query execution failed for dataset 'dsArea'. (rsErrorExecutingCommand)
03 For more information about this error navigate to the report server on the local server machine, or enable remote errors

If you look into the SSRS logfile located in C:\Program Files\Microsoft SQL Server\MSRS11.<your instance name>\Reporting Services\LogFiles

I found the error

01 TF221122: An error occurred running job Incremental Analysis Database Sync for team project collection or Team Foundation server TEAM FOUNDATION.


01 Errors in the back-end database access module. The provider 'SQLNCLI10.1' is not registered.

As SQL Server 2012 has the SQL Native Client 11.1 (SQLNCLI11.1) I tried to edit the analysis services datasource to use that provider instead. Unfortunately also that didn’t work.

So I installed the the SQLNCLI10.1 which can be downloaded here also on the DATATIER×409

pocessed the cube again on the APPTIER by calling the webservice


with the Processing Type: Full

After a while I checked the status of the warehouse by invoking the webservice


The error about the wrong provider was gone, but now I have the error

01 OLE DB error: OLE DB or ODBC error: A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.; 08001; Client unable to establish connection; 08001; Encryption not supported on the client.; 08001.

Stay posted… 😉

Update 4:


you have to check out the permissions of xp_cmdshell in SQL Server Books Online. and enable it if its disabled. by executing following Query in Sql server.

---- To allow advanced options to be changed.

EXEC sp_configure ‘show advanced options’, 1


—- To update the currently configured value for advanced options.



—- To enable the feature.

EXEC sp_configure ‘xp_cmdshell’, 1


—- To update the currently configured value for this feature.



restart the services and done. all reports do not report any dsArea’. (rsErrorExecutingCommand) error.

Enjoy 🙂

Leave a comment

Posted by on December 21, 2012 in MSSQL, Tips


Tags: , ,

Cannot set a credential for principal ‘sa’. (Microsoft SQL Server, Error:15535)

In this Quick and dirty post, let’s see a simple fix for one of the annoying error messages you’ll see in SQL Server 2005. Basically, You’ll see below mentioned error in few cases when you try to change the sa password using SSMS.

The Simple trick is to check the box “Map to credential” as shown below after providing a new password and click Okay.

This should work…Hope this helps!

  • Microsoft SQL Server 2008 Express
  • Microsoft SQL Server 2008 Express with Advanced Services
  • Microsoft SQL Server 2008 Standard
  • Microsoft SQL Server 2008 Standard Edition for Small Business
  • Microsoft SQL Server 2008 Developer
  • Microsoft SQL Server 2008 Enterprise
  • Microsoft SQL Server 2008 Web
  • Microsoft SQL Server 2008 Workgroup
  • Microsoft SQL Server 2008 R2 Datacenter
  • Microsoft SQL Server 2008 R2 Developer
  • Microsoft SQL Server 2008 R2 Enterprise
  • Microsoft SQL Server 2008 R2 Express
  • Microsoft SQL Server 2008 R2 Express with Advanced Services
  • Microsoft SQL Server 2008 R2 Standard
  • Microsoft SQL Server 2008 R2 Standard Edition for Small Business
  • Microsoft SQL Server 2008 R2 Web
  • Microsoft SQL Server 2008 R2 Workgroup

Posted by on December 11, 2012 in MSSQL, Tips


Tags: , , ,

SQL SERVER – ERROR: FIX – Database diagram support objects cannot be installed because this database does not have a valid owner

Recently one of my friend sent me email that he is having some problem with his very small database. We talked for few minutes and we agreed that to further investigation I will need access to the whole database. As the database was very big he dropped it in common location (you can use livemesh or dropbox  or any other similar product) and I picked up from the location.

I was able to install the database successful. He informed me that he has created database diagram so I can easily understand his database tables. As soon as I tried to open the database diagram I faced following error. For a while I could not figure out how to resolve the error.

Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects.

Workaround / Fix / Solution :

Well for a while I attempted few things and nothing worked. After that I carefully read the error and I realized that solution was proposed in the error only. I just have to read it carefully. Here are the steps I did to make this work.

-- Replace YourDatabaseName in following script

  • Select your database >> Right Click >> Select Properties
  • Select FILE in left side of page
  • In the OWNER box, select button which has three dots (…) in it
  • Now select user ‘sa’ or NT AUTHORITY\SYSTEM and click OK.

This should solve your problem.

Please note, I suggest you check your security policies before changing authorization. I did this to quickly solve my problem on my development server. If you are on production server, you may open yourself to potential security compromise.

Reference: Pinal Dave (

Leave a comment

Posted by on December 2, 2012 in MSSQL, Tips


Get to Know the New Shortcut Keys in Windows 8

You’ve probably already been using hotkeys in Windows 7 and previous versions, so now that Windows 8 is out, all you need to learn are the new shortcut keys. Here are the important new keys in a short list that you can easily learn.

New Windows 8 Shortcut Keys

There might be a couple of new keys that aren’t included in this list, but as far as we know, these are the most important ones.

  • Windows key – brings up the Metro start screen. You can start typing to search for an app, just like the Win7 start menu.
  • Win + D – brings up the old Windows desktop.
  • Win + C – brings up the Charms menu, where you can search, share, and change settings.
  • Win + I – opens the Settings panel, where you can change settings for the current app, change volume, wireless networks, shut down, or adjust the brightness.
  • Win + Z – opens the App Bar for the current Metro application.
  • Win + H – opens the Metro Share panel.
  • Win + Q – brings up the Metro App Search screen.
  • Win + W – brings up the Metro Settings search screen.
  • Win + F – brings up the Metro File search screen.
  • Win + K – opens the Devices panel (for connecting to a projector or some other device)
  • Win + ,  (comma) – Aero Peek at the desktop.
  • Win + .  (period) – Snaps the current Metro application to one side of the screen. (Right side)
  • Win + Shift + . (period)  – Snaps the current Metro application to the other side of the screen. (Left side)
  • Win + J – switches focus between snapped Metro applications.
  • Win + Page Up / Down – moves the current app to the other monitor.
  • Win + Tab – opens the Metro application switcher menu, switches between applications.

You might notice that we didn’t show screenshots of how all these shortcut keys work, and there’s a reason for that: you need to test them out for yourself to really learn how they work.

If there’s any other shortcut keys that are new to Windows 8 and we haven’t featured them, be sure to let us know in the comments.

Leave a comment

Posted by on November 27, 2012 in Tips, Windows8


Tags: , ,

WordPress sites not indexed by search engines

Recently, I have noticed something strange. It turns out that some WordPress Sites are not being indexed by search engines. This applies only to recently launched websites running the latest stable WordPress release – 3.4.2.

As it turns out, WordPress 3.4.2, by default, asks search engines not to index your website. To change this, log in to the WordPress admin area, go to Settings -> Privacy, select “Allow search engines to index this site” and click the Save Changes button. After this, your website will be visible to search engines.

Again, this concerns only websites running the most recent WordPress version – 3.4.2. If you have updated from an older version, you will not have this problem, since the “Allow search engines to index this site” option is enabled by default in the previous WordPress versions.

Leave a comment

Posted by on November 25, 2012 in Tips


Tags: , ,

How to Allow MySQL Client to Connect to Remote MySQL server

By default, MySQL does not allow remote clients to connect to the MySQL database.

If you try to connect to a remote MySQL database from your client system, you will get “ERROR 1130: Host is not allowed to connect to this MySQL server” message as shown below.

$ mysql -h -u root -p
Enter password:
ERROR 1130: Host '' is not allowed to connect to this MySQL server

You can also validate this by doing telnet to 3306 mysql port as shown below, which will also give the same “host is not allowed to connect to this mysql server” error message as shown below.

$ telnet 3306
host is not allowed to connect to this mysql server

If you want to allow a specific client ip-address (for example: to access the mysql database running on a server, you should execute the following command on the server that is running the mysql database.

$ mysql -u root -p
Enter password:

mysql> use mysql

mysql> GRANT ALL ON *.* to root@'' IDENTIFIED BY 'your-root-password'; 


Also, update firewall rules to make sure port# 3306 is open on the server that is running the mysql database.

After the above changes, when you try to connect to the mysql database from a remote client, you’ll not get the “Host is not allowed to connect to this MySQL server” error message anymore.

Leave a comment

Posted by on November 20, 2012 in Tips


Tags: , ,

Visual studio 2012 windows 8, Metroapp and javascript template missing

Win8 development is only supported on Win8. VS installs on any Windows OS from Vista onwards to support classic app development, but as you see you won’t have access to the Win8 app styles.

Since Win8 rc is available for free, you can download it and install it on a virtual machine and code on that for a low cost workaround. You don’t need to have it be your primary OS. Developing in a VM has a ton of benefits.

Leave a comment

Posted by on November 17, 2012 in Tips


Tags: ,

OrangeHRM: Installation error symfony/cache symfony/log Not Writeable

Recently i was deploying orangeHRM and ran into ymfony/cache  and symfony/log Not Writeable error during installation, tried many things regarding write permissions chmod in liux and security user add in windows. etc etc.

but still the following  Error was there on re-check:

Finally i browsed to the folder symfony located in OrageHRM and found that cache and log folders were created by default. just created those folders and bingo it worked


Posted by on November 16, 2012 in Tips


Tags: , , ,

%d bloggers like this: