Well, installed drupal without any problems. However, when I go to create the first account (or any of the other links) on the index, it takes me to a 403 error as follows...

Forbidden

You don't have permission to access /php/ on this server.
Apache/2.0.55 (Win32) Server at foamer.hopto.org Port 80

And I see that in the address bar, it is pointing to http://mydomain/php/?q=user/register etc...

My php folder is not in the root of the site, instead it is elsewhere on the server, and works great with everything else I have that uses it. How can I fix this problem? I am relatively dumb when it comes to this stuff, so any help is appreciated.

Thanks!
Jason

Comments

cog.rusty’s picture

Not sure, it could be this ScriptAlias (or not -- it just came up with googling).

http://www.securiteam.com/windowsntfocus/5ZP030U60U.html

Have you set your $base_url in Drupal's settings.php and removed the #?

Miss Essence’s picture

I'm having the same issue with the linking.

PHP was having an issue linking with mySQL. I fixed that problem.

Ran the install, but instead of going to the correct link, for example: "http://localhost:8080/drupal/drupal-5.0-rc1/index.php?q=user/1", it would go to "http://localhost:8080/drupal/drupal-5.0-rc1/?q=user/1". This throws me back to the install directory where I can see all the files and folders listed.

I'm simply running this on my own home server to play with and test as I intend to use drupal for a future project.

I tried adjusting the base url in the settings file. I changed it from not being there to "http://localhost:8080/drupal/drupal-5.0-rc1/index.php", "http://localhost:8080/drupal/drupal-5.0-rc1/" but the problem continued. Changing it makes the page lose all it's graphics probably due to incorrect urls, and changes the link to "http://localhost:8080/drupal/drupal-5.0-rc1/index.php/?q=admin".

I modified my httpd.conf file as it was like what was suggested in the previous response.
Changed the bit from
PHPIniDir "C:\PHP\"
to
PHPIniDir "C:\PHP"
and the issue still continues.

I'd love some thoughts on this for sure.

I'm using Apache 2.2.3, PHP 5, and mySQL 5.2 and running on windows.

cog.rusty’s picture

Ran the install, but instead of going to the correct link, for example: "http://localhost:8080/drupal/drupal-5.0-rc1/index.php?q=user/1", it would go to "http://localhost:8080/drupal/drupal-5.0-rc1/?q=user/1". This throws me back to the install directory where I can see all the files and folders listed.

?q=user/1 should work the same way as index.php?q=user/1 if:
- Drupal's .htaccess is there and works (your apache config has AllowOverride All)
- .htaccess contains DirectoryIndex index.php to automatically bring up index.php
- .htaccess contains Options -Indexes to disallow directory browsing

There is also an issue with specifying the port (:8080). Drupal's readme file mentions something about treating that as if it was a subdomain in the name of the directory under /sites which contains the settings.php.

That is, instead of /sites/default try to use /sites/8080.localhost.drupal.drupal-5.0-rc1 as the directory name. (Not sure if the dot you have in 5.0-rc1 is ok or not).

"Losing the graphics" almost always means that your $base_url is not correct or is not understood correctly.

Miss Essence’s picture

Alright, I deleted the DB, and started back at square one. Walked through the steps again.

Now I have "warning: mysql_query() [http://www.mysql.com/doc]: Table 'drupal.blocks' doesn't exist in C:\Apache\htdocs\8080.localhost.drupal\includes\database.mysql.inc on line 102." When I view the page for the first time.

The SQL below causes an error when I try to run it to add the DBs:

CREATE TABLE blocks (
  module varchar(64) DEFAULT '' NOT NULL,
  delta varchar(32) NOT NULL default '0',
  theme varchar(255) NOT NULL default '',
  status tinyint(2) DEFAULT '0' NOT NULL,
  weight tinyint(1) DEFAULT '0' NOT NULL,
  region varchar(64) DEFAULT 'left' NOT NULL,
  custom tinyint(2) DEFAULT '0' NOT NULL,
  throttle tinyint(1) DEFAULT '0' NOT NULL,
  visibility tinyint(1) DEFAULT '0' NOT NULL,
  pages text DEFAULT '' NOT NULL
)
DEFAULT CHARACTER SET utf8;

Error is:

mysql> use drupal
Database changed
mysql> CREATE TABLE blocks (
    ->   module varchar(64) DEFAULT '' NOT NULL,
    ->   delta varchar(32) NOT NULL default '0',
    ->   theme varchar(255) NOT NULL default '',
    ->   status tinyint(2) DEFAULT '0' NOT NULL,
    ->   weight tinyint(1) DEFAULT '0' NOT NULL,
    ->   region varchar(64) DEFAULT 'left' NOT NULL,
    ->   custom tinyint(2) DEFAULT '0' NOT NULL,
    ->   throttle tinyint(1) DEFAULT '0' NOT NULL,
    ->   visibility tinyint(1) DEFAULT '0' NOT NULL,
    ->   pages text DEFAULT '' NOT NULL
    -> )
    -> DEFAULT CHARACTER SET utf8;
ERROR 1101 (42000): BLOB/TEXT column 'pages' can't have a default value

Apache error log shows:

[Mon Jan 01 12:24:39 2007] [error] [client 127.0.0.1] File does not exist: C:/Apache/htdocs/drupal
cog.rusty’s picture

What database.mysql are you using? For Drupal 4.7.4, the ones under the '/database' directory do not contain a default value for 'pages'. Only the one for pgsql does.

Miss Essence’s picture

mySQL 5.x

Just now, I changed the SQL to:

CREATE TABLE blocks (
  module varchar(64) DEFAULT '' NOT NULL,
  delta varchar(32) NOT NULL default '0',
  theme varchar(255) NOT NULL default '',
  status tinyint(2) DEFAULT '0' NOT NULL,
  weight tinyint(1) DEFAULT '0' NOT NULL,
  region varchar(64) DEFAULT 'left' NOT NULL,
  custom tinyint(2) DEFAULT '0' NOT NULL,
  throttle tinyint(1) DEFAULT '0' NOT NULL,
  visibility tinyint(1) DEFAULT '0' NOT NULL,
  pages text NOT NULL
)
DEFAULT CHARACTER SET utf8;

And it went through, and the pages are now working. :D

Thanks for the help

cog.rusty’s picture

Nice.

There are instructions for how to do everything quickly in INSTALL.mysql.txt, section "2. LOAD THE DRUPAL DATABASE SCHEMA".

quoting:

for MySQL 4.1 or higher:
     mysql -u username -p databasename < database/database.4.1.mysql
Miss Essence’s picture

It created the admin user and pass just fine, then when you go to change the password it says:
"Access denied You are not authorized to access this page."

Or I go to admin and it also gives me the you are not authorized error as well. And on create content it says "create content You are not allowed to create content."

Seems I found something else that's being a pain for me.

cog.rusty’s picture

You are using 4.7.4, aren't you? PHP 5.2 has broken it and you need to add a line into 'session.inc'.

http://drupal.org/Troubleshooting-FAQ

Login problems on PHP 5.2
http://drupal.org/node/102114

Login doesn't work or must be done twice
http://drupal.org/node/77106

Miss Essence’s picture

I took a look at the patch, and tried to patch it using UnixUtils but for some reason it's bugging up.

Could you inform me on where in session.inc the modifications should go? Making the changes manually seems so much easier at this point.

Here's a copy of the session.inc relevant patch stuffies.

diff -urNp /tmp/drupal-4.7.4/includes/session.inc includes/session.inc
--- /tmp/drupal-4.7.4/includes/session.inc	2006-04-11 04:33:14.000000000 -0700
+++ includes/session.inc	2006-11-13 15:01:04.000000000 -0800
@@ -17,6 +17,11 @@ function sess_close() {
 function sess_read($key) {
   global $user;
 
+  // Write and Close handlers are called after destructing objects since PHP 5.0.5
+  // Thus destructors can use sessions but session handler can't use objects.
+  // So we are moving session closure before destructing objects.
+  register_shutdown_function('session_write_close');
+
   // retrieve data for a $user object
   $result = db_query("SELECT sid FROM {sessions} WHERE sid = '%s'", $key);
   if (!db_num_rows($result)) {
cog.rusty’s picture

Just add the line

register_shutdown_function('session_write_close');

near line 20, between global $user; and // retrieve data for a $user object.