# WordPress

## lorenb

I'm trying to setup WordPress but I'm not having much luck.  I created a virtualhost in apache:

```

<VirtualHost *:443>

        DocumentRoot /var/www/localhost/htdocs/wordpress

        ServerName wordpress.example.org

        <Directory />

                php_flag register_globals off

                Options Indexes FollowSymLinks

                <IfModule mod_dir.c>

                        DirectoryIndex index.php

                </IfModule>

        </Directory>

</VirtualHost>

```

I then used wp-config-sample.php to create wp-config.php.  I tested the MySQL credentials and they worked fine.

So I then tried to go to:

http://wordpress.example.org/wp-admin/wp-install.php

All I get back from that is:

```

<html><body></body></html>

```

I've got a similar config for SquirrelMail and that works fine.  Now sure what the problem is.

Any WordPress users out there that might know what I'm doing wrong?

----------

## hadfield

 *Quote:*   

> <VirtualHost *:443>

 

Are you installing it using ssl? Did you use https (instead of http) to test the site?

----------

## lorenb

 *hadfield wrote:*   

>  *Quote:*   <VirtualHost *:443> 
> 
> Are you installing it using ssl? Did you use https (instead of http) to test the site?

 

Yeah that was just a cut/paste error.  I ended up changing it to *:80.  Either way though (http/https), the output is always blank HTML.

If my SquirrelMail didn't work, I'd know for sure it was an apache or PHP issue.  I don't know, it's really weird.

----------

## lorenb

I found the problem I was having and that was that PHP didn't have MySQL support compiled into it so WordPress failed silently.  I was able to then complete the install with no errors.  However when I can't login as 'admin'.  When I try I get the message from Firefox:

 *Quote:*   

> 
> 
> Redirection limit for this URL exceeded.  Unable to load the requested page.  This may be caused by cookies that are blocked.
> 
> 

 

I'm not blocking cookies so I know it's not that.  Anyone got any ideas?

----------

## lorenb

Found the problem, it seemed to be a patch applied to the WordPress source.   I just commented out this line in src_unpack:

```

epatch ${FILESDIR}/${PV}/login-patch.diff

```

I can login and everything works fine now.

----------

## hadfield

You should submit a bug about this at https://bugs.gentoo.org. I believe the wordpress ebuild is relatively new.

----------

## hadfield

Ok, so I've just installed wordpress and ran into this same problem.

This bug https://bugs.gentoo.org/show_bug.cgi?id=53563 says that you need to install wordpress with webapp-config because it needs a patch that webapp config will apply to it.

I didn't use webapp-config to install it though. So I'm not sure if my fix will break anything else. But if you want modify line 257 in wp-login.php

from: } else {

to: } elseif (False) {

This just basically blocks the code that executes the redirection. I'll post again if I find that it breaks anything.

----------

## [sinz]

I'm trying to use wordpress 1.2.1, used webapp-config to install it but am having the same results.  It seems that in 1.2.1 the wp-login.php isn't the same as previous versions as my lines don't match anything close to yours.  Has anyone else found a fix for this yet  :Question: 

----------

## CapnBuckle

 :Wink: 

I posted about this in https://forums.gentoo.org/viewtopic.php?p=1711368#1711368

This is the change I found necessary for the redirect problem:

```
diff -P -r -u -x '*~' ebuild/htdocs/wp-admin/auth.php tarball/htdocs/wp-admin/auth.php

--- ebuild/htdocs/wp-admin/auth.php      2004-10-10 23:45:52.000000000 -0500

+++ tarball/htdocs/wp-admin/auth.php    2004-05-18 21:05:40.000000000 -0500

@@ -25,7 +25,7 @@

                return false;

        } else {

-               if ($login->user_login == $user_login && $login->user_pass == $user_pass_md5) {

+               if ($login->user_login == $user_login && md5($login->user_pass) == $user_pass_md5) {

                        return true;

                } else {

                        return false;
```

This is actually how it is in the tarball from wordpress.org.  Apparently, the souce used in the ebuild needs to be updated.

----------

