Re: Re: Building Docs
| From: | Philip Olson | Date: | Tue, 14 Jun 2011 06:49:18 +0000 |
| Subject: | Re: Re: Building Docs | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969382797@lists.php.net to get a copy of this message | ||
On Jun 5, 2011, at 1:00 PM, Richard Riley wrote:
> Richard Riley <rileyrg@googlemail.com> writes:
>
>> Hannes Magnusson <hannes.magnusson@gmail.com> writes:
>>
>>> On Sat, Jun 4, 2011 at 18:39, Richard Riley <rileyrg@googlemail.com> wrote:
>>>> Richard Riley <rileyrg@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.
>
Have you solved this? Because I'm seeing two different paths:
- /var/www/phpweb/manual/en/
- ~/common-files/www/phpweb/manual/en/
The problem you're seeing indicates that it cannot find the filename, which is why it looks
funny. A more common result would be (e.g., php.net/strstr):
/var/www/phpweb/manual/en/strstr.php: not found
/var/www/phpweb/manual/en/book.strstr.php: not found
/var/www/phpweb/manual/en/ref.strstr.php: not found
/var/www/phpweb/manual/en/function.strstr.php (FOUND and Redirected)
I think you're missing a symlink, or maybe it's a strange bug somewhere. See if the
following helps (yes another howto document, but this one includes everything and eventually will
replace several others):
- https://wiki.php.net/doc/articles/localdocsetup
But it's geared towards people who want to build the docs locally, as opposed to only setting
up a local unofficial mirror.
And lastly, do you have ext/sqlite installed? One day we'll replace that old code with
pdo_sqlite but... not today.
Regards,
Philip