Installing Drupal 4.6.6
Posted by Quinn at April 29th, 2006 4:58pm under web 0 Comments Permalink
I encountered some problems while installing latest stable version of Drupal to my web server. Well, I could hope this happens only to me, but I found many says getting "blank page" after installation and stuff over places. Since I was able to manage to finish the installation with some tweeking, I thought I should put them together in one place, and sharing my experince probably would help some other people.
Server Environment:
- FreeBSD 6.0
- Apache 2.0.55
- MySQL 5.1.7
- PHP 5.1.2
PHP5-dom, PHP5-gd, PHP5-gettext, PHP5-mbstring, PHP5-mhash, PHP5-mysql, PHP5-openssl, PHP5-pcre, PHP5-pgsql, PHP5-session, PHP5-sqlite, PHP5-xml
Some situations I encountered is probably due to the version of PHP and MySQL. So, if you are here with the similar situations, you might be at the right place!
- /usr/local/etc/php.ini
- /usr/local/etc/php.ini-dist
- /usr/local/etc/php.ini-recommended
I installed all my application using FreeBSD Ports. I had php.ini-dist and php.in-recommended in the direcotry shown above. I started with copying php.ini-recommended to php.ini in the same directory. After installing drupal just like the INSTALLATION says, all I get was a blank page.
Looking at http-error.log, I found a whole bunch of errors like this:
PHP Warning: include_once(sites/default/settings.php) [function.include-once]: failed to open stream: No such file or directory in /path/to/your/drupal/includes/bootstrap.inc on line 636
So, it was some "include path" problem.
In the both default php.ini files ( php.ini-dist and php.ini-recommended ), the line for include_path is commented out, so I enabled this line by deleting ";" at the beginning of the line.
;include_path=".:/php/includes"
to
include_path=".:/php/includes"
but I think you probably just need this
include_path="."
BTW, ":" in the ".:/php/includes" just means separation of the two values.
The way I created MySQL database administer is like the below, which sintax are easier for me to understand than what the instruction says.
mysql
( entering mysql as root )
create user drupal_database_administer;
grant all privileges on drupal_database.* TO 'drupal_database_administer'@'localhost';
set password for 'drupal_database_administer'@'localhost' = old_password('your_password');
flush privileges;
( exit from mysql then reenter mysql with a new database administer )
mysql -u drupal_database_administer -p create database drupal_database;
( exit from mysql )
mysql -u drupal_database_administer -p drupal_database < database/database.mysql
But, I got an error right here.
I had to edit database/database.mysql,
simply replaced
TYPE=MyISAM to ENGINE=MyISAM
Then, it was fine. I think this is because of the version of MySQL. I am not sure that many people are using this version of MySQL, so this may be a small problem for now.
I am not sure you have to use old_password('your_password') method. I previousely had a probem with using regular method, since then, I use this method and it works fine this time as well (for me).
Lastly, you have to edit /sites/default/settings.php to the right values.
$db_url = "mysql://drupal_database_administer:password@localhost/drupald_database"; $base_url = "http://website_address";
Then you should be able to access the web. However, I only got {Head} and similar stuff on the start page. This seems to be because the default theme is not working well with PHP5. I was still able to see a link text to create the first user, so I did that. Then, I changed the default theme to friendselectric. Finally, it looked like a normal drupal site!
The biggest issue here is probably "blank page" without configuring include_path="." in php.ini, since this is disabled in default installation of PHP. I can imagine that this would intimidate the beginners in numbers. Also, if you don't have access to edit your own php.ini. You still have to find a way to put a line like ini_set("include_path","."); or some other alternatives. Otherwise, there are relatively small stuff to entrap while installation. I have plan to use drupal to develop some web projects coming in, so I will definitely dig into this nice tool more and more.











