I am having trouble getting started...

I read the instructions, but apparently am doing something wrong.

I have installed Apache 2.2 on Windows and installed PHP via the windows installer. I selected the Apache 2.2 module and pointed the PHP installer to the apache config directory.

I installed drupal in "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\drupal-5.2" to match, as closely as possible, the directions on the Website.

I then made the following entries in the Windows hosts file:

127.0.0.1 testdrupal.loc
127.0.0.1 blueberry.site blueberry

I then made the following additions to the end of the http.d apache config file (Note: I'm including the part that the PHP installer put here):

# --------------------------------------------------------------------
#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir "C:/Program Files/PHP/"
LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

#
# First entry of this file should be the NameVirtualHost entry, unless it is already there
# If you want your web server to respond on a different port from the default
# replace 80 with that port number
# Available alternative port numbers are 8080 and 2222
#
NameVirtualHost *:80


DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/drupal"
ServerName testdrupal.loc
ServerAlias *.testdrupal.com

Allow from all
Options +Includes +Indexes +FollowSymLinks
AllowOverride all


DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/drupal"
ServerName blueberry.site
ServerAlias *.blueberry.site

Allow from all
Options +Includes +Indexes +FollowSymLinks
AllowOverride all

# --------------------------------------------------------------------

I restarted Apache, went to www.testdrupal.com and as many variations as I could think of for the blueberry.site.

In all cases, I got a page not found. I never got to the point where Drupal wanted to setup/configure anything.

Can anyone please help me see what I'm doing wrong?

I appreciate in advance any help or suggestions.

-- M

Comments

gonefishing’s picture

What happens when you go to:

localhost/drupal or 127.0.0.1/drupal ?

Inorder to get www.testsite. to work you need to configure BIND or, some other name server.

morkus’s picture

I enter into the browser's URL: 127.0.0.1/drupal

And, I get..

Not Found

The requested URL /drupal was not found on this server.

-------------

I was just following the directions from the "Handbooks" for Windows. These didn't say anything about "bind" or anything else. In fact, they specifically said for Windows you didn't even need to worry about DNS.

Clearly, though, something's wrong.

With the virtual hosts I've added, Apache doesn't even come up and say: "It works". If I remove the virtual hosts, then at least Apache works with localhost (but, then, of course, drupal's out of the picture).

Can you see what I need to change or add?

Thanks again.

- M

gonefishing’s picture

NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot "C:/path to drupal/"
ServerName 
<directory "path to drupal">
        AllowOverride AuthConfig FileInfo
        Order allow,deny
        Allow from all
</directory>
</VirtualHost>

URL: 127.0.0.1/drupal/

cog.rusty’s picture

Doesn't testdrupal.loc work? (or the ones you have put in the hosts?)

morkus’s picture

Nope, doesn't work...I did find one problem, but now I just get a white screen when I either go to localhost or to http://trestdrupal.loc.

(The error I had was I didn't include drupal-5.2 I just had drupal in the path.)

I've also noticed that when I try to restart Apache, I always get this error below in a Windows dialog (with debug option button, like that would do me any good...).

szAppName : httpd.exe szAppVer : 2.2.6.0 szModName : php_iisfunc.dll
szModVer : 5.2.4.4 offset : 00001087

--------

If I wait until the service closes (after this error/crash above) and just "Start" Apache 2.2 again, I get no errors.

Now, the bottom of my httpd.conf file has:

#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir "C:/Program Files/PHP/"
LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

#
# First entry of this file should be the NameVirtualHost entry, unless it is already there
# If you want your web server to respond on a different port from the default
# replace 80 with that port number
# Available alternative port numbers are 8080 and 2222
#
NameVirtualHost *:80


DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/drupal-5.2"
ServerName testdrupal.loc
ServerAlias *.testdrupal.com

Allow from all
Options +Includes +Indexes +FollowSymLinks
AllowOverride all

-----

Still not working....

Ideas?

Thanks again to all in advance.

-- M

morkus’s picture

Here are some of the errors at the end of the Apache error log.

(My drupal sites directory has "default" and "all" folders).

Do these errors help see why things aren't working?

Thanks again.

-- M

================

[Fri Sep 28 16:31:50 2007] [error] [client 127.0.0.1] File does not exist: C:/Program
Files/Apache Software Foundation/Apache2.2/htdocs/drupal-5.2/testdrupal.loc

[Fri Sep 28 16:31:50 2007] [error] [client 127.0.0.1] PHP Warning: require_once(SAM/php_sam.php) [function.require-once]: failed to open stream: No such file or directory in sam_factory on line 1

[Fri Sep 28 16:31:50 2007] [error] [client 127.0.0.1] PHP Fatal error: require_once() [function.require]: Failed opening required 'SAM/php_sam.php' (include_path='.;C:\\php5\\pear') in sam_factory on line 1

[Fri Sep 28 16:31:50 2007] [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/drupal-5.2/favicon.ico

[Fri Sep 28 16:31:50 2007] [error] [client 127.0.0.1] PHP Warning: require_once(SAM/php_sam.php) [function.require-once]: failed to open stream: No such file or directory in sam_factory on line 1

[Fri Sep 28 16:31:50 2007] [error] [client 127.0.0.1] PHP Fatal error: require_once() [function.require]: Failed opening required 'SAM/php_sam.php' (include_path='.;C:\\php5\\pear') in sam_factory on line 1

morkus’s picture

Here are the PHP errors in the Apache log file when I restart.

** The strange thing is that the files are in the directories indicated...

I'm using a default Apache 2.2 installation and executed the PHP installer for Windows and selected the Apache 2.2 module.

Hope all this extra info helps!

Thanks.

-- M

--------------------------------

[Fri Sep 28 16:44:54 2007] [notice] Apache/2.2.6 (Win32) PHP/5.2.4 configured -- resuming normal operations
[Fri Sep 28 16:44:54 2007] [notice] Server built: Sep 5 2007 08:58:56
[Fri Sep 28 16:44:54 2007] [notice] Parent: Created child process 3424
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_exif.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_oci8.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_pdo_oci.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_pdo_oci8.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_pdo_sqlite_external.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_pspell.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_sybase_ct.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_ibm_db2.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_ifx.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_ingres.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_maxdb.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_mcve.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_netools.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_oracle.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_pdo_ibm.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_pdo_informix.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_svn.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Notice: Constant XML_ELEMENT_NODE already defined in Unknown on line 0
PHP Notice: Constant XML_ATTRIBUTE_NODE already defined in Unknown on line 0
PHP Notice: Constant XML_TEXT_NODE already defined in Unknown on line 0
PHP Notice: Constant XML_CDATA_SECTION_NODE already defined in Unknown on line 0
PHP Notice: Constant XML_ENTITY_REF_NODE already defined in Unknown on line 0
PHP Notice: Constant XML_ENTITY_NODE already defined in Unknown on line 0
PHP Notice: Constant XML_PI_NODE already defined in Unknown on line 0
PHP Notice: Constant XML_COMMENT_NODE already defined in Unknown on line 0
PHP Notice: Constant XML_DOCUMENT_NODE already defined in Unknown on line 0
PHP Notice: Constant XML_DOCUMENT_TYPE_NODE already defined in Unknown on line 0
PHP Notice: Constant XML_DOCUMENT_FRAG_NODE already defined in Unknown on line 0
PHP Notice: Constant XML_NOTATION_NODE already defined in Unknown on line 0
PHP Notice: Constant XML_HTML_DOCUMENT_NODE already defined in Unknown on line 0
PHP Notice: Constant XML_DTD_NODE already defined in Unknown on line 0
PHP Notice: Constant XML_ELEMENT_DECL_NODE already defined in Unknown on line 0
PHP Notice: Constant XML_ATTRIBUTE_DECL_NODE already defined in Unknown on line 0
PHP Notice: Constant XML_ENTITY_DECL_NODE already defined in Unknown on line 0
PHP Notice: Constant XML_NAMESPACE_DECL_NODE already defined in Unknown on line 0
PHP Notice: Constant XML_LOCAL_NAMESPACE already defined in Unknown on line 0
PHP Notice: Constant XML_ATTRIBUTE_CDATA already defined in Unknown on line 0
PHP Notice: Constant XML_ATTRIBUTE_ID already defined in Unknown on line 0
PHP Notice: Constant XML_ATTRIBUTE_IDREF already defined in Unknown on line 0
PHP Notice: Constant XML_ATTRIBUTE_IDREFS already defined in Unknown on line 0
PHP Notice: Constant XML_ATTRIBUTE_ENTITY already defined in Unknown on line 0
PHP Notice: Constant XML_ATTRIBUTE_NMTOKEN already defined in Unknown on line 0
PHP Notice: Constant XML_ATTRIBUTE_NMTOKENS already defined in Unknown on line 0
PHP Notice: Constant XML_ATTRIBUTE_ENUMERATION already defined in Unknown on line 0
PHP Notice: Constant XML_ATTRIBUTE_NOTATION already defined in Unknown on line 0
[Fri Sep 28 16:44:55 2007] [notice] Child 3424: Child process is running
[Fri Sep 28 16:44:55 2007] [notice] Child 3424: Acquired the start mutex.
[Fri Sep 28 16:44:55 2007] [notice] Child 3424: Starting 250 worker threads.
[Fri Sep 28 16:44:55 2007] [notice] Child 3424: Starting thread to listen on port 80.

cog.rusty’s picture

Some of the previous errors are weird. For the first one (C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/drupal-5.2/testdrupal.loc), I can't figure out why it was looking for such a path.

I can't see the tags in your httpd.conf directives. Use <code> ... </code> tags. Was it like this?

NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/drupal-5.2"
ServerName testdrupal.loc
...
...
</VirtualHost>

Another anomaly I noticed is that the first error messages mention a "c:\php" path while the second ones are looking in "C:\Program Files\PHP"

gonefishing’s picture

DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/drupal-5.2/"

morkus’s picture

Adding the trailing slash made no difference.

:(

- M

gonefishing’s picture

The easiest method I know of to get Drupal running on a Windows machine is to use, http://www.apachefriends.org/en/xampp-windows.html