Wordpress now working on OpenVMS

Probably the best blogging package out there, http://www.wordpress.org
Post Reply
Message
Author
User avatar
issinoho
Site Admin
Posts: 202
Joined: Tue Feb 01, 2005 12:53 am
Location: Scotland
Contact:

Wordpress now working on OpenVMS

#1 Post by issinoho »

I've now installed Wordpress (v1.5.1.3 ?Strayhorn?) on my VAMP server.

It was *nearly* painless, with just 2 issues.

(i) I needed to upgrade my MySQL server to v4.1.12 (from v4.1.8) otherwise it choked on some Group By clauses.

(ii) I had to edit one file <b>classes.php</b> as follows,
<i>
************
File WEBROOT:[WORDPRESS.WP-INCLUDES]classes.php;2
501 $where .= " AND (post_status = 'static')";
502 } elseif ($this->is_single) {
503 $where .= " AND (post_status != 'static')";
504 } else {
505 $where .= " AND (post_status = 'publish'";
506
******
File WEBROOT:[WORDPRESS.WP-INCLUDES]classes.php;1
501 $where .= ' AND (post_status = "static")';
502 } elseif ($this->is_single) {
503 $where .= ' AND (post_status != "static")';
504 } else {
505 $where .= ' AND (post_status = "publish"';
506
************
</i>

The quotes being reversed with double quotes seems to affect the PHP parser on VMS, but not on either Linux or Windows.

I intend on feeding this last discovery back to the Wordpress developers.

I'm going to make the blog public soon so watch this space.

User avatar
WillemGrooters
VMS Guru
Posts: 59
Joined: Wed Jul 20, 2005 10:17 am
Location: Netherlands
Contact:

Reverse for 2.0.2!

#2 Post by WillemGrooters »

:evil: Well, these changes are incorporated in 2.0.2, but they don't work:
  • WordPress database error: [Unknown column 'publish' in 'where clause']
    SELECT DISTINCT * FROM wp_posts WHERE 1=1 AND post_date_gmt <= '2006-03-28 17:27:59' AND (post_status = "publish") AND post_status != "attachment" GROUP BY wp_posts.ID ORDER BY post_date DESC LIMIT 0, 10
Reversing to (from line 595)

Code: Select all

                if &#40; $this->is_attachment &#41; &#123;
                        $where .= " AND &#40;post_status = 'attachment'&#41;";
                &#125; elseif &#40;$this->is_page&#41; &#123;
                        $where .= " AND &#40;post_status = 'static'&#41;";
                &#125; elseif &#40;$this->is_single&#41; &#123;
                        $where .= " AND &#40;post_status != 'static'&#41;";
                &#125; else &#123;
                        $where .= " AND &#40;post_status = 'publish'";

                        if &#40;isset&#40;$user_ID&#41; && &#40;'' != intval&#40;$user_ID&#41;&#41;&#41;
                                $where .= " OR post_author = $user_ID AND
                                                       post__status != 'draft' AND
                                                       post_status != 'static'&#41;"; 
                        else
                                $where .= '&#41;';
                &#125;

                if &#40;! $this->is_attachment &#41;
                        $where .= " AND post_status != 'attachment'";
solved at least THIS problem! :D

User avatar
WillemGrooters
VMS Guru
Posts: 59
Joined: Wed Jul 20, 2005 10:17 am
Location: Netherlands
Contact:

Some other things to solve

#3 Post by WillemGrooters »

One thing that doesn't work properly ijn 2.0.2 - without changes - is altering the theme. Although I downloaded themes in the proper locations, they are never shown in the "Presentation" panel.
Changing theme using direct changes in the database is a possibility, I thought, but that didn't help either.

I found it was caused by the fact that in [.wp-includes]functions.php there is a check a file exists as a directory: procedure get_template (line 1692):

Code: Select all

if &#40;!file_exists&#40;get_theme_root&#40;&#41; . "/$template"&#41;&#41; &#123; //works for dirs too
(no, it doesn't.....Not on VMS, anyway).
It should read:

Code: Select all

if &#40;!file_exists&#40;get_theme_root&#40;&#41; . "/$template" . ".DIR"&#41;&#41; &#123; //works for dirs too
and get_themes needs a similar change: (line 1759):

Code: Select all

if &#40; is_dir&#40;$theme_root . '/' . $theme_dir&#41; && is_readable&#40;$theme_root . '/' . $theme_dir&#41; &#41; &#123;
would nead to read:

Code: Select all

if &#40; is_dir&#40;$theme_root . '/' . $theme_dir . ".DIR"&#41; && is_readable&#40;$theme_root . '/' . $theme_dir . ".DIR"&#41; &#41; &#123;
In that case, changes directly into the database did change the theme. Howver, to show them in the presentations panel, similar changes may be required elesewhere (function get_page_template(), perhaps? I tried that but it didn't make a difference)

(The required changes are, with phpmyadmin:

Code: Select all

UPDATE `wp_options` SET `option_value` = 'industrial' WHERE `option_id` =49 AND `blog_id` =0 AND CONVERT&#40; `option_name` USING utf8 &#41; = 'template' LIMIT 1 ;
but that did not do it all. It seems the stylesheet record needs to be done as well:

Code: Select all

UPDATE `wp_options` SET `option_value` = 'industrial' WHERE `option_id` =50 AND `blog_id` =0 AND CONVERT&#40; `option_name` USING utf8 &#41; = 'stylesheet' LIMIT 1 ;
that did change the theme - and cause loss of some selections I could have without: login, for instance.

I tried another downloaded theme (but that didn't show ANYTHING at all).

User avatar
WillemGrooters
VMS Guru
Posts: 59
Joined: Wed Jul 20, 2005 10:17 am
Location: Netherlands
Contact:

Update

#4 Post by WillemGrooters »

I mentioned the changes in wp-config.php to the wordpress team and they admitted it to be a plain bug. It has been fixed in 2.1. :D

I'm now on 2.2.3 - and it runs out-of-the-box. All files have been replaced except for the configuration file and uploaded images.

The latest version (2.3.1) runs as well - again: out-of-the-box - but I'm still checking wehther the themes work with it. There have been significant changes that break som, and the ones I use are not yet known to work for this version.

Post Reply