Permalink
Browse files

The proper way (at least for the pearweb box) to understand the xmlrp…

…c = gone part

git-svn-id: http://svn.php.net/repository/pear/pearweb/trunk@254653 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent 46d1310 commit 5c9da73b0fe2d824e3747f8c5ef216c6e6e67cf4 @helgi helgi committed Mar 9, 2008
Showing with 12 additions and 10 deletions.
  1. +3 −3 doc/apache-setup.txt
  2. +9 −7 pearweb.php
View
@@ -40,6 +40,9 @@ installed in /usr/share/pear):
RedirectPermanent /faq.php http://pear.php.net/manual/en.faq.php
RedirectPermanent /doc/index.php http://pear.php.net/manual/en/
+ # xmlrpc.php was removed 1 Jan 2008 and won't come back
+ Redirect gone /xmlrpc.php
+
RewriteEngine On
#
@@ -68,9 +71,6 @@ installed in /usr/share/pear):
#
RewriteRule /manual/[a-z]{2}/pecl.([a-zA-Z0-9_-]+)\.php$ http://www.php.net/$1 [R=301]
- # xmlrpc.php was removed 1 Jan 2008 and won't come back
- RewriteRule /xmlrpc.php / [R=410]
-
SetEnvIf User-Agent "MS Search 4\.0 Robot\)$" badrobot
<Directory />
View
@@ -187,7 +187,7 @@ function initializeDatabase($answers)
*/
function setupHttpdconf($answers)
{
- $eol = defined('PHP_EOL') ? PHP_EOL : (OS_WINDOWS ? "\r\n" : "\n");
+ $eol = PHP_EOL;
if (!realpath($answers['path']) || !file_exists($answers['path'])) {
$this->_ui->outputData('No such file: "' . $answers['path'] . '"');
return false;
@@ -234,6 +234,7 @@ function setupHttpdconf($answers)
$one = $httpdconf;
$two = array();
}
+
// here we go...
$middle = array();
$middle[] = $eol;
@@ -281,6 +282,12 @@ function setupHttpdconf($answers)
$middle[] = ' RedirectPermanent /doc/index.php http://'
. $answers['pear'] . '/manual/en/' . $eol;
$middle[] = $eol;
+ $middle[] = ' #' . $eol;
+ $middle[] = ' # xmlrpc.php was removed 1 Jan 2008 and won\'t come back' . $eol;
+ $middle[] = ' #' . $eol;
+ $middle[] = $eol;
+ $middle[] = ' Redirect gone /xmlrpc.php' . $eol;
+ $middle[] = $eol;
$middle[] = ' RewriteEngine On' . $eol;
$middle[] = $eol;
$middle[] = ' #' . $eol;
@@ -309,12 +316,6 @@ function setupHttpdconf($answers)
$middle[] = $eol;
$middle[] = ' RewriteRule /manual/[a-z]{2}/pecl.([a-zA-Z0-9_-]+)\.php$ http://www.php.net/$1 [R=301]' . $eol;
$middle[] = $eol;
- $middle[] = ' #' . $eol;
- $middle[] = ' # xmlrpc.php was removed 1 Jan 2008 and won\'t come back' . $eol;
- $middle[] = ' #' . $eol;
- $middle[] = $eol;
- $middle[] = ' RewriteRule /xmlrpc.php / [R=410]' . $eol;
- $middle[] = $eol;
$middle[] = ' SetEnvIf User-Agent "MS Search 4\.0 Robot\)$" badrobot' . $eol;
$middle[] = $eol;
$middle[] = ' <Directory />' . $eol;
@@ -342,6 +343,7 @@ function setupHttpdconf($answers)
$middle[] = $eol;
$middle[] = '</VirtualHost>' . $eol;
$middle[] = '# inserted by pearweb #### (do not remove) end' . $eol;
+
$one = array_merge($one, $middle);
$httpdconf = array_merge($one, $two);
$this->_ui->outputData('opening ' . $answers['path'] . ' for writing');

0 comments on commit 5c9da73

Please sign in to comment.