April 2011 Archives

Changing base directory of drupal

| 2 Comments

This can be done in several easy steps.

1. Change the base dir in your settings.php to point to your root folder (public_html).

You can edit the file from your cPanel -> File Manager in the following way:

- Navigate to your /sites/default directory.
- Click on the letters next to the icon of settings.php
- A little box should appear on the top-right side of the page.
- Click on Edit File Contents and you should be able to edit the file.

2. Change the RewriteBase dir in your .htaccess file to be /

The contents of your .htaccess file should contain a line like the one below:

RewriteBase /


You can edit this file in the same way as you did with your settings.php file.

3. After that you should move all the Drupal files which are under your subdirectory to your root (public_html) folder. The best and easiest way to do this is using an FTP client.

Creating Drupal database for Islandora

| No Comments

x-128-101-146-59:~ birage$ mysqladmin -u root -p create agecon
Enter password:
x-128-101-146-59:~ birage$ clear

x-128-101-146-59:~ birage$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.1.51 MySQL Community Server (GPL)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| agecon |
| fedora3 |
| fedora4 |
| javatest |
| mysql |
| test |
+--------------------+
7 rows in set (0.00 sec)

mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES, CREATE TEMPORARY TABLES ON `agecon`.* TO 'root'@'localhost' IDENTIFIED BY 'fedoraAdmin'; Query OK, 0 rows affected (0.02 sec)

mysql> FLUSH PRIVILEGES
-> ;
Query OK, 0 rows affected (0.00 sec)

mysql> quit
Bye
x-128-101-146-59:~ birage$

sudo /Library/StartupItems/MySQLCOM/MySQLCOM start

Cron Job in Mac OSX Version 10.5 +

| No Comments

Source Drupal

MacOS X after 10.5 no longer seems to use cron and has replaced it by launchd. This uses plist files to register jobs to run. To access cron.php using launchd place the following file in /Users/your_account/Library/LaunchAgents/com.your_site.drupal_cron (create the directory if necessary):

com.x-128-101-146-59.drupal_cron.plist

This will then get loaded when you login and will visit the cron.php page every 300 seconds (5 minutes). To make it take affect you need to logout/login or use the terminal to run launchctl to load it immediately:

launchctl load /Users/your_account/Library/LaunchAgents/com.your_site.drupal_cron

If you need to change the plist file you can unload and reload it again with:

launchctl unload /Users/your_account/Library/LaunchAgents/com.your_site.drupal_cron
launchctl load /Users/your_account/Library/LaunchAgents/com.your_site.drupal_cron

(If you have XTools installed you can use /Developer/Applications/Utilities/Property List Editor to create plist files.)

About this Archive

This page is an archive of entries from April 2011 listed from newest to oldest.

October 2010 is the previous archive.

May 2011 is the next archive.

Find recent content on the main index or look in the archives to find all content.