web:mirror

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
web:mirror [2010/12/26 23:43] – Add a script to initialize a fully functional phpweb environment bjoriweb:mirror [2021/03/29 11:13] – Changed git.php.net to GitHub sergey
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 ====
  
Line 6: Line 13:
 Save the following shell script as IcanHazPHPWeb.sh Save the following shell script as IcanHazPHPWeb.sh
 Then execute sh ./IcanHazPHPWeb.sh Then execute sh ./IcanHazPHPWeb.sh
-And wait for ca 10 minutes.+And wait for ca 10 minutes. (took 7m30.871s on my box)
  
 <code shell> <code shell>
Line 14: Line 21:
  
 # Checkout the english manual sources # Checkout the english manual sources
-svn co https://svn.php.net/repository/phpdoc/modules/doc-en +git clone https://github.com/php/doc-en.git 
-# Checkout the actual website, except for the distribution/ and extra/ dirs (huge binary filestakes days to download+# Checkout the actual website (does not include /distribution, thats a gigantic separate repo
-svn co --depth immediates https://svn.php.net/repository/web/php/trunk phpweb+git clone https://github.com/php/web-php.git phpweb
 cd phpweb cd phpweb
-svn up --set-depth infinity ./styles ./security ./images ./reST ./manual ./backend ./stats ./bin ./releases ./conferences ./pear ./license ./js ./ie6update ./archive  ./include 
  
 # Some files are pre-generated on master.php.net for various reasons # Some files are pre-generated on master.php.net for various reasons
Line 33: Line 39:
 cd .. cd ..
  
 +cd phpweb
 # Symlink the generated english documentations from our PhD build dir # Symlink the generated english documentations from our PhD build dir
-(cd manual && ln -s ~/doc-en/output/php-web en)+(cd manual && ln -s ~/php.net/doc-en/output/php-web en)
  
 echo "Now copy&paste the VirtualHost config from http://php.net/mirroring.php#settings" echo "Now copy&paste the VirtualHost config from http://php.net/mirroring.php#settings"
 echo "Fill out the 'template' and restart apache" echo "Fill out the 'template' and restart apache"
- 
 </code> </code>
  
 +Note: To see the "new look", add ?beta=1 after the url, or enable the cookie from /my.php
  
-=== The SVN way, but with a hack === 
  
-  - Checkout phpweb (svn co http://svn.php.net/repository/web/php/trunk 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) 
-$files = array('include/mirrors.inc', 'include/countries.inc', 'include/pregen-events.inc', 'include/pregen-news.inc', 'include/pregen-confs.inc'); 
- 
-foreach ($files as $file) { 
- file_put_contents($file, file_get_contents($mirror . $file)); 
-} 
- 
-// Another required file, let's create it ourselves 
-file_put_contents('include/last_updated.inc', '<?php $LAST_UPDATED=' . time() . '; ?>'); 
-?> 
-</code> 
   - Make a virtual host, see [[http://php.net/mirroring.php|The official mirror page]]   - Make a virtual host, see [[http://php.net/mirroring.php|The official mirror page]]
   - If wanting the PHP Manual too, either:   - If wanting the PHP Manual too, either:
Line 67: Line 55:
     * Rsync it     * Rsync it
     * Download it     * Download it
- 
web/mirror.txt · Last modified: 2023/12/05 12:17 by derick