web:mirror

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
web:mirror [2010/06/07 01:14] – created philipweb:mirror [2023/12/05 12:17] (current) derick
Line 1: Line 1:
 +==== Setting up phpweb for local development ====
 +
 +See [[https://github.com/php/web-php/#local-development|https://github.com/php/web-php/#local-development]]
 +
 +Alternatively, the generated files can also be fetched from your nearest mirror, see the following instructions
 +
 ==== How to create a PHP.net mirror ==== ==== How to create a PHP.net mirror ====
  
-=== The SVN waybut with a hack ===+Setting up an official (or unofficial) mirror is described within [[http://php.net/mirroring.php|the official mirror page]]. Howeversetting up your own mirror via SVN is possible too and is especially helpful for those working on the PHP website.
  
-  - Checkout phpweb (svn co http://svn.php.net/repository/web/php/trunk phpweb) +=== Quick Script to Set Up PHPWeb ==
-  - Within phpweb, run this: <code php> +
-<?php +
-// Note: This is a complete hack +
-// Mirror to steal from +
-$mirror 'http://www.php.net/';+
  
-// Files phpweb needs (typically from rsync box) +Save the following shell script as ''phpweb.sh'' 
-$files = array('include/mirrors.inc''include/countries.inc''include/pregen-events.inc', 'include/pregen-news.inc', 'include/pregen-confs.inc');+Then execute ''./phpweb.sh''
  
-foreach ($files as $file) { +And wait for ca 10 minutes.
- file_put_contents($file, file_get_contents($mirror $file)); +
-}+
  
-// Another required file, let's create it ourselves +<code shell> 
-file_put_contents('include/last_updated.inc', '<?php $LAST_UPDATED=' time() . '; ?>'); +#!/bin/sh 
-?> +mkdir ~/php.net 
-</code> +cd ~/php.net
-  - Make a virtual host, see [[http://php.net/mirroring.php|The official mirror page]] +
-  - If wanting the PHP Manual too, either: +
-    * [[doc:howto|Build it]] +
-    * Rsync it +
-    * Download it+
  
-=== Orsimply rsync it === +# Checkout the manual base sources 
-   * As per [[http://php.net/mirroring.php|the official mirror page]]+git clone https://github.com/php/doc-base.git 
 +# Checkout the english manual sources 
 +git clone https://github.com/php/doc-en.git en 
 +# Checkout PHD to build documentation 
 +git clone https://github.com/php/phd.git phd 
 +# Checkout the actual website (does not include /distributionthats a gigantic separate repo) 
 +git clone https://github.com/php/web-php.git phpweb 
 +cd phpweb 
 + 
 +# Some files are pre-generated on master.php.net for various reasons 
 +(cd include && for i in countries.inc last_updated.inc mirrors.inc pregen-confs.inc pregen-events.inc pregen-news.inc; do wget "http://www.php.net/include/$i" -O $i; done;) 
 +(cd backend && for i in ip-to-country.db ip-to-country.idx; do wget "http://www.php.net/backend/$i" -O $i; done;) 
 +cd .. 
 + 
 + 
 +# Install PhD and build the manual 
 +php doc-base/configure.php 
 +php -dmemory_limit=2G phd/render.php --docbook doc-base/.manual.xml -P PHP -f php 
 + 
 +cd phpweb 
 +# Symlink the generated english documentations from our PhD build dir 
 +rm -rf manual/en 
 +(cd manual && ln -s `pwd`/../../output/php-web en) 
 + 
 +php -S localhost:8080 .router.php 
 +</code>
  
web/mirror.1275873247.txt.gz · Last modified: 2017/09/22 13:28 (external edit)