Richard Riley <rile...@googlemail.com> writes:

> Hannes Magnusson <hannes.magnus...@gmail.com> writes:
>
>> On Sat, Jun 4, 2011 at 18:39, Richard Riley <rile...@googlemail.com> wrote:
>>> Richard Riley <rile...@googlemail.com> writes:
>>>
>>>>
>>>> Let me get back to you after using the rsync at php.net/mirroring : I
>>>> suspect after the faffing aruond with phd, this mirror rsync should just
>>>> work. Copying as we speak.
>>>>
>>>
>>> ok, I mirrored according to the instructions here:
>>>
>>> http://php.net/mirroring.php
>>>
>>> vhost file copied and modified to reflect my local system.
>>>
>>> http://i.imgur.com/4K4va.png
>>
>> What is in your /manual/en/ folder?
>> There should be ~10.000 files and 2 folder iirc
>>
>> -Hannes
>
> Where the rsync put it. The rsync on the mirroring page that includes
> manual/en..
>
> http://php.net/mirroring.php
>
> ,----
> | rsync -avzC --timeout=600 --delete --delete-after \
> |       --include='distributions/*.exe' \
> |       rsync.php.net::phpweb /your/local/path 
> | Setting up an unofficial mirror, and want to only mirror one language of 
> the manual? Add:
> | 
> |     --include='manual/en/' --include='manual/en/**'
> |       --exclude='manual/**' --exclude='distributions/manual/**'
> `----
>
> Its there and its populated (webroot/manual/en).
>

Just a fyi in case this triggers a suggestion that will get this
working. ps has anyone here *recently* rsynced a local mirror and set up
a local vhost where the manual look ups work?

,----
| [2150]shamrock@development:~/common-files/www/phpweb/manual/en$ ls -l *strstr*
| -rw-r--r-- 1 shamrock shamrock 6743 Jun  3 12:15 function.grapheme-strstr.php
| -rw-r--r-- 1 shamrock shamrock 4848 Jun  3 12:15 function.mb-strstr.php
| -rw-r--r-- 1 shamrock shamrock 7733 Jun  3 12:18 function.strstr.php
`----

In find_manual_page :-

,----
|         $q = @sqlite_query($s, str_replace('LANG_HERE', $lang, $SQL));
|         
|         // Successful query
|         if ($q) {
|             $r = sqlite_fetch_array($q, SQLITE_NUM);
|             if (isset($r[0])) {
`----

The fetch fails.

It now heads off to find_manual_page_slow which calls tryprefix: I added
some debug logging:-

e.g

,----
|     // Drop out spaces, and try that keyword (if different)
|     $nosp = str_replace(" ", "", $keyword);
|     if ($nosp != $keyword) {
|         $try = "/manual/${lang}/${prefix}${nosp}.php";
|         if (@file_exists($_SERVER['DOCUMENT_ROOT'] . $try)) { return $try; }
|       echo $_SERVER['DOCUMENT_ROOT'] . $try . ": not found<br>";
|     }
`----

resulting in the somewhat surprising:

,----
| /var/www/phpweb/manual/en/manual/en/function.strstr.php.php: not found
| /var/www/phpweb/manual/en/book.manual/en/function.strstr.php.php: not found
| /var/www/phpweb/manual/en/ref.manual/en/function.strstr.php.php: not found
| /var/www/phpweb/manual/en/function.manual/en/function.strstr.php.php: not 
found
| /var/www/phpweb/manual/en/class.manual/en/function.strstr.php.php: not found
| /var/www/phpweb/manual/en/features.manual/en/function.strstr.php.php: not 
found
| 
/var/www/phpweb/manual/en/control-structures.manual/en/function.strstr.php.php: 
not found
| /var/www/phpweb/manual/en/language.manual/en/function.strstr.php.php: not 
found
| /var/www/phpweb/manual/en/about.manual/en/function.strstr.php.php: not found
| /var/www/phpweb/manual/en/faq.manual/en/function.strstr.php.php: not found
`----

(Some better filtered tests could surely reduce server load here : the
doubling up of the manual/en part suggests to me a bug or something that
might need addressing).

I'll try again later when I have some more time.

Reply via email to