Saturday, October 26, 2013

Error while installing Drupal 7.23

I've encountered the following error while trying to install Drupal 7.23 on a shared linux web server.

" Fatal error: Call to undefined function field_attach_load() in / .. /includes/entity.inc on line 316 "


When you refresh this page, by default your URL home page loads and shows as " page not found at /your site url / "
According to this post, this is a bug in Drupal and considered to be major one. There is no fixed solution for this and different options works on different systems.


My case is that the database already contains some tables and I am trying to write onto the same tables again.

FIX 1:

  1. Drop previous tables from database
  2. Delete your settings.php file in /sites/default/
  3. Start installation by typing " yoursiteurl/install.php "
FIX 2 :

    1. Delete your settings.php file in /sites/default/
    2. Copy the default.settings.php as settings.php
    3. Start installation by typing yoursiteurl/settings.php
    4. When asked for database details, goto Advanced options --> table prefix.
    5. Give a prefix like " mysitename_ " without quotes.
    I applied second fix as I don't have access to cpanel of the web server.

    NOTE : If you are stuck anywhere, comment and I'll try to reply.


    If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

    What to do if some error occurs in installation ?

    What to do if some error occurs in installation of drupal ? Should we delete the whole folder and upload fresh one again ?

    The answer is certainly NO. We just update settings.php file in /sites/default/ and the files in folder named 'files' in the same location as settings.php i.e., /sites/default/ while installing Drupal.

    So, you already got the answer. :)

    1. Just delete the settings.php file and remove if there are any files in the 'files' folder.
    2. Copy default.settings.php to same location as settings.php
    3. Open your URL.
    4. Voila ! You will find your installation from start and its fresh too. 





    If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

    Mac file browser for Ubuntu


    I know that many are fans of default file browser in Mac OS. The same is not available for Linux distros. But we have an experimental one. Here is how you install it.

    1. sudo add-apt-repository ppa:marlin-devs/marlin-daily
    2. sudo apt-get update
    3. sudo apt-get install marlin




    If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

    Sunday, October 20, 2013

    Forbidden error before installing drupal

    Before starting Drupal installation, if we type http://localhost/sitename in the adress bar and hit enter, sometimes we may get Forbidden error. This happens mostly on Linux boxes.

    Cause    : Permissions
    Solution : 

    1. sudo chmod -R 777 /var/www/
    2. sudo chmod 777 /var/www/sitename/sites/default/files






    If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

    [How to] Configure Apache for clean URLs


    In Ubuntu, after installing apache2


    1. Open terminal and type a2enmod rewrite hit enter
    2. Type /etc/init.d/apache2 restart  and hit enter.
    3. Type chmod -R 777 /var/www and hit enter






    If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

    Time zone error in drupal

    While installing drupal theme, I encountered an error saying " We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone " . It also suggested me to change the demo_profile.profile file in the Drupal installation folder.

    Error Cause :  No timezone available in server system( it can be your personal PC on which Drupal site is hosted ).

    Solution :
    1. Open /etc/php5/apache2/php.ini in a text editor like gedit.
    2. Search for the line " date.timezone ". # Mostly it will be in commented state
    3. Change it to " date.timezone = Your Zone " For ex: date.timezone = Asia/Kolkata 
    4. If you are unsure about what to put in place of time zone, goto this link. Search for the region and copy paste the relevant. 
    5. If you are on a hosting server, please ask your administrator to do this for you.


    NOTE : This solution is for Drupal installation on a Linux platform.



    If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

    No snapshot displayed in drupal

    While installing sample data of a specific theme, you may want to select the snapshot and click on Restore button. Sometimes, it may not display any options in the field of snapshot even though it asks   " Which snapshot would you like to restore? " and if you click on restore, you will get an error message " Snapshot field is required ".

    The root cause of this error is permissions. It mostly happens in Linux platforms. The solution is nothing but giving full rights.

    Just check the permissions on the folder sites/default/private and it's sub folders. Assign 777 i.e.,

    Type  sudo chmod 777 /var/www/sitename/sites/default/private/  and hit enter in your terminal.





    If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged