• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

i found solution for frontpage and 8.1

OK, didn't take the attachment.
I tried putting them in a zip file and it still didn't take. So here's the other one (diff for mod_frontpage.c):


59d58
< #include <stdlib.h>
66c65
< /*#include "apr_compat.h" bk: ignore */
---
> #include "apr_compat.h"
318,352d316
< static int get_random_nodev()
< {
< static int initialized = 0;
<
< if (!initialized) {
< int i;
<
< srandom(time(NULL));
< for (i = time(NULL) % 10; i > 0; i--) {
< random();
< }
< initialized = 1;
< }
<
< return random() >> (sizeof(long int) - sizeof(int));
< }
<
<
< static int get_random()
< {
< int fd;
< int result;
<
< if ((fd = open("/dev/urandom", O_RDONLY)) == -1) {
< return get_random_nodev();
< }
<
< if (read(fd, (void*)&result, sizeof(int)) < sizeof(int)) {
< close(fd);
< return get_random_nodev();
< }
<
< close(fd);
< return result;
< }
383d346
< #if 0
500d462
< #endif
502d463
< iRandom[2] = get_random();
823c784
< * Note: apr_pstrdup allocates memory, but it checks for out of memory
---
> * Note: ap_pstrdup allocates memory, but it checks for out of memory
826,827c787,788
< r->handler = apr_pstrdup(r->pool, "cgi-script");
< apr_table_set(r->notes, "alias-forced-type", r->handler);
---
> r->handler = ap_pstrdup(r->pool, "cgi-script");
> ap_table_set(r->notes, "alias-forced-type", r->handler);
829c790
< apr_table_set(r->subprocess_env, "FPEXE", apr_pstrdup(r->pool, szFpexe));
---
> ap_table_set(r->subprocess_env, "FPEXE", ap_pstrdup(r->pool, szFpexe));
831c792
< apr_table_set(r->subprocess_env, "FPUID", apr_pstrdup(r->pool, szBuf));
---
> ap_table_set(r->subprocess_env, "FPUID", ap_pstrdup(r->pool, szBuf));
833c794
< apr_table_set(r->subprocess_env, "FPGID", apr_pstrdup(r->pool, szBuf));
---
> ap_table_set(r->subprocess_env, "FPGID", ap_pstrdup(r->pool, szBuf));
835,836c796,797
< apr_table_set(r->notes,"FPexecfilename", apr_pstrcat(r->pool, FPSTUB, NULL));
< r->filename = apr_pstrcat(r->pool, r->filename, szCgi, NULL);
---
> ap_table_set(r->notes,"FPexecfilename", ap_pstrcat(r->pool, FPSTUB, NULL));
> r->filename = ap_pstrcat(r->pool, r->filename, szCgi, NULL);
878,879c839,840
< execFilename = apr_pstrcat(r->pool, FP, szDir, szBuf, szBase, NULL);
< apr_table_set(r->notes,"FPexecfilename", execFilename);
---
> execFilename = ap_pstrcat(r->pool, FP, szDir, szBuf, szBase, NULL);
> ap_table_set(r->notes,"FPexecfilename", execFilename);
981c942
< if (!apr_table_get(r->notes, "FPexecfilename"))
---
> if (!ap_table_get(r->notes, "FPexecfilename"))
985c946
< if (apr_table_get(r->notes,"FPexecfilename"))
---
> if (ap_table_get(r->notes,"FPexecfilename"))
987c948
< r->filename = (char*) apr_table_get(r->notes,"FPexecfilename");
---
> r->filename = (char*) ap_table_get(r->notes,"FPexecfilename");
 
awesome, thanks a lot. I am going to try this out sometime this week.
 
I recently created a Frontpage RPM for Plesk 8.2.1 and Centos 5.0 ( Apache 2.2 ). Many thanks go to Galaxy for get me started with the patches.

Here I will outline the steps for others who wish to create their own Frontpage RPM for Centos 5, or any other recent RPM based Linux distro.

You will need the Frontpage files provided in frontpage-5.0-72psa.centos4.2.
I am sure there are other ways to get a hold of the frontpage source files, but downloading them directly from Microsoft is not one of them. The patches I created are known to work with the Frontpage files from the frontpage-5.0-72psa.centos4.2 RPM.

The files needed from this RPM are all located in /usr/local/frontpage

Assuming you have a copy of the /usr/local/frontpage files, create an archive of the files like so:

Note: The frontpage-5.0-72psa.centos4.2 RPM provides the original source files for mod_fpcgid.c (mod_fpcgid.c.orig) and mod_frontpage.c (mod_frontpage.c.orig). The RPM spec file will expect to find the .orig versions of these two files. If they do not exist in your /usr/local/frontpage/version5.0/apache2 directory then you may need to create them by copying the original mod_fpcgid.c and mod_frontpage.c to mod_fpcgid.c.orig and mod_frontpage.c.orig before creating the below archive.

Code:
mkdir frontpage-5.0
cp -a /usr/local/frontpage ./frontpage-5.0
tar -czf frontpage-5.0.tgz ./frontpage-5.0


Once you have your frontpage-5.0.tgz file, copy it to the /usr/src/redhat/SOURCES directory on the server you wish to create the RPM on.

Note: if /usr/src/redhat/SOURCES does not exist, make sure you have the
rpm-build package installed.


Download the frontpage-ce5-spec+patches.tgz file ( frontpage-ce5-spec+patches.tgz) and copy it to /usr/src/redhat

extract frontpage-ce5-spec+patches.tgz

Code:
tar -xzvf frontpage-ce5-spec+patches.tgz

That file will extract the frontpage.spec to the SPECS directory and 2 patches to SOURCES directory.

once all your files are in place, it is just a matter of building the RPM:

Code:
cd /usr/src/redhat
rpmbuild -bb SPECS/frontpage.spec

The RPM will be located at:
/usr/src/redhat/RPMS/i386/frontpage-5.0-72psa.be.4.centos5.0.i386.rpm

Install this RPM, restart apache and you should then be able to useFrontpage with Plesk 8.1+

Edit: Attachments still not working, Here is a URL for frontpage-ce5-spec+patches.tgz
frontpage-ce5-spec+patches.tgz
 
Thanks very much for your time on this crash, it is certainly appreciated. However I have followed your steps and have run into the following:

Code:
[root@office redhat]# rpmbuild -bb SPECS/frontpage.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.62095
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd /usr/src/redhat/BUILD
+ rm -rf frontpage-5.0
+ /bin/gzip -dc /usr/src/redhat/SOURCES/frontpage-5.0.tgz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd frontpage-5.0
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chown -Rhf root .
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ cp frontpage/version5.0/apache2/mod_fpcgid.c.orig frontpage/version5.0/apache2/mod_fpcgid.c
+ cp frontpage/version5.0/apache2/mod_frontpage.c.orig frontpage/version5.0/apache2/mod_frontpage.c
+ echo 'Patch #1 (mod_fpcgid_ap22.patch):'
Patch #1 (mod_fpcgid_ap22.patch):
+ patch -p1 -s
+ echo 'Patch #2 (mod_frontpage_ap22.patch):'
Patch #2 (mod_frontpage_ap22.patch):
+ patch -p1 -s
+ mkdir -p /var/tmp/frontpage-buildroot/usr/local/frontpage
+ mkdir -p /var/tmp/frontpage-buildroot/usr/lib/httpd/modules
+ mkdir -p /var/tmp/frontpage-buildroot/etc/httpd/conf.d
+ echo 'LoadModule frontpage_module modules/mod_frontpage.so
<LocationMatch "^/_vti_bin/.*.exe>
        ForceType text/html
</LocationMatch> '
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.48230
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd frontpage-5.0
+ cd frontpage/version5.0/apache2/
+ /usr/sbin/apxs -c mod_frontpage.c mod_fpcgid.c
gcc -DHARD_SERVER_LIMIT=512 -DDEFAULT_PATH="/usr/local/psa/admin/bin:/bin:/usr/bin" -DLINUX=22 -DTARGET="httpsd" -DHAVE_SET_DUMPABLE -DNO_DBM_REWRITEMAP -DMOD_SSL=208122 -DEAPI -O -pipe  -I/usr/include -O3 -fexpensive-optimizations -fstrength-reduce -pipe -DPLESK_Linux -I/home/builder/autobuilder/psa_aiconfig_8.2.1/src/plesk/lib/dist/include/libxml2 -W -Wall -DPLESK_Linux -I/home/builder/autobuilder/psa_aiconfig_8.2.1/src/plesk/plesk-utils/include -DBSG_CR -DBSG_MSG -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAS_RPM -DUSE_SLEEP_ON_IDLE -Wno-unused-parameter -fpic -DSHARED_MODULE -I/usr/local/psa/admin/include  -c mod_frontpage.c
In file included from mod_frontpage.c:55:
mod_frontpage.h:34: error: expected â)â before â*â token
mod_frontpage.h:35: error: expected â)â before â*â token
In file included from mod_frontpage.c:56:
mod_fpcgid.h:28: error: expected â)â before â*â token
mod_fpcgid.h:31: error: expected â)â before â*â token
mod_fpcgid.h:32: error: expected â)â before â*â token
mod_frontpage.c:67:26: error: apr_strings.h: No such file or directory
mod_frontpage.c:150: error: expected â)â before â*â token
mod_frontpage.c: In function âLogFrontPageErrorâ:
mod_frontpage.c:176: warning: passing argument 4 of âap_log_errorâ makes pointer from integer without a cast
mod_frontpage.c:176: warning: passing argument 5 of âap_log_errorâ from incompatible pointer type
mod_frontpage.c: In function âget_randomâ:
mod_frontpage.c:345: warning: comparison between signed and unsigned
mod_frontpage.c: At top level:
mod_frontpage.c:359: error: expected â)â before â*â token
mod_frontpage.c: In function âfrontpage_makePipeâ:
mod_frontpage.c:696: warning: implicit declaration of function âapr_pallocâ
mod_frontpage.c:696: warning: assignment makes pointer from integer without a cast
mod_frontpage.c: At top level:
mod_frontpage.c:718: error: expected â)â before â*â token
mod_frontpage.c: In function âFrontPageCheckWebRootâ:
mod_frontpage.c:740: warning: implicit declaration of function âap_run_translate_nameâ
mod_frontpage.c: In function âFrontPageAliasâ:
mod_frontpage.c:828: warning: implicit declaration of function âapr_pstrdupâ
mod_frontpage.c:828: warning: assignment makes pointer from integer without a cast
mod_frontpage.c:829: warning: implicit declaration of function âapr_table_setâ
mod_frontpage.c:837: warning: implicit declaration of function âapr_pstrcatâ
mod_frontpage.c:837: warning: assignment makes pointer from integer without a cast
mod_frontpage.c: In function âFrontPageStaticAliasâ:
mod_frontpage.c:880: warning: assignment makes pointer from integer without a cast
mod_frontpage.c:886: warning: implicit declaration of function âapr_statâ
mod_frontpage.c:886: error: âAPR_FINFO_MINâ undeclared (first use in this function)
mod_frontpage.c:886: error: (Each undeclared identifier is reported only once
mod_frontpage.c:886: error: for each function it appears in.)
mod_frontpage.c: In function âFrontPageXlateâ:
mod_frontpage.c:952: warning: comparison between signed and unsigned
mod_frontpage.c:958: warning: comparison between signed and unsigned
mod_frontpage.c:968: warning: comparison between signed and unsigned
mod_frontpage.c: In function âFrontPageFixupâ:
mod_frontpage.c:983: warning: implicit declaration of function âapr_table_getâ
mod_frontpage.c:990: error: âAPR_FINFO_MINâ undeclared (first use in this function)
mod_frontpage.c: At top level:
mod_frontpage.c:997: error: expected â)â before â*â token
apxs:Break: Command failed with rc=1
error: Bad exit status from /var/tmp/rpm-tmp.48230 (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.48230 (%build)
[root@office redhat]#

Any ideas on what this is about?

Luke
 
By the way - I am attempting this on a CentOS 5.0 box with all updates (include ARTs) and a 1-domain test license of Plesk 8.2.1.

I had to install 'yum install rpm-build' as well as create a symlink to apxs in '/usr/sbin/' as it was not in there, but in '/usr/local/psa/admin/bin/apxs'.

Luke
 
Alright I decided to try this on another box which is running CentOS 4.5 and received similar, but different errors:

Code:
[root@server redhat]# rpmbuild -bb SPECS/frontpage.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.38541
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd /usr/src/redhat/BUILD
+ rm -rf frontpage-5.0
+ /bin/gzip -dc /usr/src/redhat/SOURCES/frontpage-5.0.tgz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd frontpage-5.0
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chown -Rhf root .
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ cp frontpage/version5.0/apache2/mod_fpcgid.c.orig frontpage/version5.0/apache2/mod_fpcgid.c
+ cp frontpage/version5.0/apache2/mod_frontpage.c.orig frontpage/version5.0/apache2/mod_frontpage.c
+ echo 'Patch #1 (mod_fpcgid_ap22.patch):'
Patch #1 (mod_fpcgid_ap22.patch):
+ patch -p1 -s
+ echo 'Patch #2 (mod_frontpage_ap22.patch):'
Patch #2 (mod_frontpage_ap22.patch):
+ patch -p1 -s
+ mkdir -p /var/tmp/frontpage-buildroot/usr/local/frontpage
+ mkdir -p /var/tmp/frontpage-buildroot/usr/lib/httpd/modules
+ mkdir -p /var/tmp/frontpage-buildroot/etc/httpd/conf.d
+ echo 'LoadModule frontpage_module modules/mod_frontpage.so
<LocationMatch "^/_vti_bin/.*.exe>
        ForceType text/html
</LocationMatch> '
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.26759
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd frontpage-5.0
+ cd frontpage/version5.0/apache2/
+ /usr/sbin/apxs -c mod_frontpage.c mod_fpcgid.c
gcc -DHARD_SERVER_LIMIT=512 -DDEFAULT_PATH="/usr/local/psa/admin/bin:/bin:/usr/bin" -DLINUX=22 -DTARGET="httpsd" -DHAVE_SET_DUMPABLE -DNO_DBM_REWRITEMAP -DMOD_SSL=208122 -DEAPI -O -pipe  -I/usr/include -O3 -fexpensive-optimizations -fstrength-reduce -pipe -DPLESK_Linux -I/home/builder/autobuilder/psa_aiconfig_8.2.1/src/plesk/lib/dist/include/libxml2 -W -Wall -DPLESK_Linux -I/home/builder/autobuilder/psa_aiconfig_8.2.1/src/plesk/plesk-utils/include -DBSG_CR -DBSG_MSG -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAS_RPM -DUSE_SLEEP_ON_IDLE -Wno-unused-parameter -fpic -DSHARED_MODULE -I/usr/local/psa/admin/include  -c mod_frontpage.c
In file included from mod_frontpage.c:55:
mod_frontpage.h:34: error: syntax error before '*' token
mod_frontpage.h:35: error: syntax error before '*' token
In file included from mod_frontpage.c:56:
mod_fpcgid.h:28: error: syntax error before '*' token
mod_fpcgid.h:31: error: syntax error before '*' token
mod_fpcgid.h:32: error: syntax error before '*' token
mod_frontpage.c:67:26: apr_strings.h: No such file or directory
mod_frontpage.c:150: error: syntax error before '*' token
mod_frontpage.c: In function `LogFrontPageError':
mod_frontpage.c:176: warning: passing arg 4 of `ap_log_error' makes pointer from integer without a cast
mod_frontpage.c:176: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_frontpage.c: In function `get_random':
mod_frontpage.c:345: warning: comparison between signed and unsigned
mod_frontpage.c: At top level:
mod_frontpage.c:359: error: syntax error before '*' token
mod_frontpage.c: In function `frontpage_validate_init':
mod_frontpage.c:378: error: `s' undeclared (first use in this function)
mod_frontpage.c:378: error: (Each undeclared identifier is reported only once
mod_frontpage.c:378: error: for each function it appears in.)
mod_frontpage.c:630: error: `p' undeclared (first use in this function)
mod_frontpage.c:630: error: too many arguments to function `ap_add_version_component'
mod_frontpage.c: In function `frontpage_makePipe':
mod_frontpage.c:696: warning: implicit declaration of function `apr_palloc'
mod_frontpage.c:696: warning: assignment makes pointer from integer without a cast
mod_frontpage.c: At top level:
mod_frontpage.c:718: error: syntax error before '*' token
mod_frontpage.c: In function `frontpage_init':
mod_frontpage.c:723: error: `p' undeclared (first use in this function)
mod_frontpage.c:723: error: `plog' undeclared (first use in this function)
mod_frontpage.c:723: error: `ptemp' undeclared (first use in this function)
mod_frontpage.c:723: error: `main_server' undeclared (first use in this function)
mod_frontpage.c: In function `FrontPageCheckWebRoot':
mod_frontpage.c:740: warning: implicit declaration of function `ap_run_translate_name'
mod_frontpage.c: In function `FrontPageAlias':
mod_frontpage.c:828: warning: implicit declaration of function `apr_pstrdup'
mod_frontpage.c:828: warning: assignment makes pointer from integer without a cast
mod_frontpage.c:829: warning: implicit declaration of function `apr_table_set'
mod_frontpage.c:837: warning: implicit declaration of function `apr_pstrcat'
mod_frontpage.c:837: warning: assignment makes pointer from integer without a cast
mod_frontpage.c: In function `FrontPageStaticAlias':
mod_frontpage.c:880: warning: assignment makes pointer from integer without a cast
mod_frontpage.c:886: warning: implicit declaration of function `apr_stat'
mod_frontpage.c:886: error: `APR_FINFO_MIN' undeclared (first use in this function)
mod_frontpage.c: In function `FrontPageXlate':
mod_frontpage.c:952: warning: comparison between signed and unsigned
mod_frontpage.c:958: warning: comparison between signed and unsigned
mod_frontpage.c:968: warning: comparison between signed and unsigned
mod_frontpage.c: In function `FrontPageFixup':
mod_frontpage.c:983: warning: implicit declaration of function `apr_table_get'
mod_frontpage.c:990: error: `APR_FINFO_MIN' undeclared (first use in this function)
mod_frontpage.c: At top level:
mod_frontpage.c:997: error: syntax error before '*' token
mod_frontpage.c: In function `frontpage_register_hook':
mod_frontpage.c:1000: warning: implicit declaration of function `ap_log_perror'
mod_frontpage.c:1000: error: `p' undeclared (first use in this function)
mod_frontpage.c:1002: warning: implicit declaration of function `ap_hook_post_config'
mod_frontpage.c:1002: error: `APR_HOOK_MIDDLE' undeclared (first use in this function)
mod_frontpage.c:1003: warning: implicit declaration of function `ap_hook_handler'
mod_frontpage.c:1003: error: `APR_HOOK_FIRST' undeclared (first use in this function)
mod_frontpage.c:1004: warning: implicit declaration of function `ap_hook_translate_name'
mod_frontpage.c:1005: warning: implicit declaration of function `ap_hook_fixups'
mod_frontpage.c:1005: error: `APR_HOOK_LAST' undeclared (first use in this function)
apxs:Break: Command failed with rc=1
error: Bad exit status from /var/tmp/rpm-tmp.26759 (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.26759 (%build)
[root@server redhat]#
 
Looking at your post above, remove that link to axps, and install the httpd-devel package (this is what contains axps). No guarantee that this will fix it, but that is definitely the wrong axps.

Also for future developers, there is nothing in the /usr/local/psa tree you will ever use in reference to building.
 
Perhaps, yes ... I'm trying to find out where the paths would be. This is certainly over my comfort level.

Luke
 
Thanks ... I'll check that now - but I don't think that is the problem.

When I turn FP off I get a "404 File Not Found" error, but when I turn FP on I get a "403 Forbidden" error.

Is it safe to assume that the site is finding the file but just does not have access to it?

If so - how do I go about checking the access to the file?

I've compared all the directory permissions/owners/groups in the /usr/local/frontpage/* directories to that of my old server (FP was working on it) and have set them all exactly the same.

Hrmm ...

Luke
 
Actually, yes ... I looked before but forgot about it. Long day.

Code:
[Sat Nov 24 17:56:59 2007] [error] [client xxx.xxx.xxx.xxx] attempt to invoke directory as script: /usr/local/frontpage/version5.0H\x0f\xc9\xbf2523, referer: [url]http://www.mydomain.com/contact.htm[/url]

Any thoughts on this?

Luke
 
Path problem, my guess is that this app needs the path to a binary, and right now it just has a path to a directory in that field.
 
Funny thing is it was working just fine on the CentOS 4.5/Plesk 8.2.1 box. Or are you referring to FP needing a path to the executable?

Any chance I can just hire you to diagnose/fix this? =\

Luke
 
I was receiving similar path related errors on sites that were migrated from a Centos 4.x plesk server.

The fix for me was to disable frontpage for the site, ( backup, then..) delete all the _vti_* directories from the sites httpdocs directory, then Re-enable Frontpage for the site.


Make sure to backup the _vti_* directories first in case removing the extensions some how breaks the site.
 
I have tried that multiple times with no luck. I have also simply tried creating a whole new domain with FP extensions and the admin link in Plesk wouldn't work then either.

I am at a loss here... :(

I've contacted Scott and will have him take a look around.

Luke
 
Hi

can anyone tell where i can find or downlaod the frontpage-5.0-72psa.centos4.2.rpm file?

there´s no file like that on swsoft servers.

THX and regards
ACID25
 
Back
Top