# Local PHP docs with search facility

- Thread: https://externals.io/message/52803
- Original archive: https://news-web.php.net/php.internals/52803
- Started by Richard Riley on 2011-06-02T19:03:29+00:00
- Messages: 13
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #52803 — Richard Riley — 2011-06-02T19:03:29+00:00

URL: https://externals.io/message/52803#52803

Could some kind soul advise me on how to install php docs localy and
have the excellent patterns search work based on an sqllite database?

I have a local install but only full function names match but something
like 

http://localhost/phpman/manual-lookup.php?pattern=str

does not. A quick google hasn't helped but any refinements greatfully
received!

regards

r.

---

## #52818 — Hannes Magnusson — 2011-06-02T21:32:56+00:00

URL: https://externals.io/message/52803#52818 · In reply to: #52803

>
> Could some kind soul advise me on how to install php docs localy and
> have the excellent patterns search work based on an sqllite database?


https://wiki.php.net/doc/phd/view

Please ask any followup questions on the proper mailinglist,
phpdoc@lists.php.net for questions about the docs, or
php-webmaster@lists.php.net for questions about the website.

-Hannes

---

## #52819 — Richard Riley — 2011-06-02T21:46:13+00:00

URL: https://externals.io/message/52803#52819 · In reply to: #52818

Hannes Magnusson <hannes.magnusson@gmail.com> writes:

> 
> > […]
>
> https://wiki.php.net/doc/phd/view
>
> Please ask any followup questions on the proper mailinglist,
> phpdoc@lists.php.net for questions about the docs, or
> php-webmaster@lists.php.net for questions about the website.
>

Yes, please excuse the wrong group. I realised that after posting.

---

## #52820 — Philip Olson — 2011-06-02T22:01:54+00:00

URL: https://externals.io/message/52803#52820 · In reply to: #52819

> Hannes Magnusson <hannes.magnusson@gmail.com> writes:
> 
> > […]
> 
> Yes, please excuse the wrong group. I realised that after posting.

But while we're here, pman is another option:

  $ pear install phpdocs/pman
  $ pman mysql_connect

That'll show the mysql_connect() documentation as a local man page.

Regards,
Philip

---

## #52821 — Nathan Nobbe — 2011-06-02T22:12:18+00:00

URL: https://externals.io/message/52803#52821 · In reply to: #52820

>
> 
>
> > […]
> wrote:
> > […]
>
> But while we're here, pman is another option:
>
>  $ pear install phpdocs/pman
>  $ pman mysql_connect
>
> That'll show the mysql_connect() documentation as a local man page.
>

not to shabby ;)

and to Richard's question about search the -K option may be just the ticket.

-nathan

---

## #52823 — Richard Riley — 2011-06-02T22:41:32+00:00

URL: https://externals.io/message/52803#52823 · In reply to: #52821

Nathan Nobbe <quickshiftin@gmail.com> writes:

> 
>
> > […]
>
> not to shabby ;)
>
> and to Richard's question about search the -K option may be just the ticket.
>
> -nathan

All very nice - thanks for the info. And if anyone has an emacs
interface to this please drop me a line .

---

## #52832 — Richard Riley — 2011-06-03T04:41:13+00:00

URL: https://externals.io/message/52803#52832 · In reply to: #52818

Hannes Magnusson <hannes.magnusson@gmail.com> writes:

> 
> > […]
>
> https://wiki.php.net/doc/phd/view
>

Just as a side note on this informative thread (and to anyone else that
comes across it in google), the instructions there dont actually install
any of the manual so no look ups / function searches work at all. I'll
look into it in more detail later. I'll head over to

> phpdoc@lists.php.net

for further info if thats the correct place.

---

## #52851 — Hannes Magnusson — 2011-06-03T10:02:27+00:00

URL: https://externals.io/message/52803#52851 · In reply to: #52823

> Nathan Nobbe <quickshiftin@gmail.com> writes:
>
> > […]
>
> All very nice - thanks for the info. And if anyone has an emacs
> interface to this please drop me a line .

(setq manual-program "./pman")
(global-set-key [(f1)] (lambda () (interactive) (manual-entry (current-word))))

That will map F1 to the man page under the current word (thanks to cweiske@).

For vi:
set keywordprg=pman

and then hit shift+k over a function.

-Hannes

---

## #52852 — Hannes Magnusson — 2011-06-03T10:04:17+00:00

URL: https://externals.io/message/52803#52852 · In reply to: #52832

> Hannes Magnusson <hannes.magnusson@gmail.com> writes:
>
> > […]
>
> Just as a side note on this informative thread (and to anyone else that
> comes across it in google), the instructions there dont actually install
> any of the manual so no look ups / function searches work at all. I'll
> look into it in more detail later. I'll head over to

Sure it will. You just need to read the page, which has a very clear
requirement.

If you can't follow it then http://php.net/mirroring could be a
simpler approach for you.


-Hannes

---

## #52853 — Richard Riley — 2011-06-03T10:39:27+00:00

URL: https://externals.io/message/52803#52853 · In reply to: #52852

Hannes Magnusson <hannes.magnusson@gmail.com> writes:

> 
> > […]
>
> Sure it will. You just need to read the page, which has a very clear
> requirement.
>
> If you can't follow it then http://php.net/mirroring could be a
> simpler approach for you.
>
> -Hannes

I'm not sure it will at all, since they dont show you how to install the
phd_php part or inform you that you need to. For a beginner thats a
hurdle enough. You are probably too familiar with it to notice
this. Result:

,----
| phd -d doc-base/.manual.xml -o output_dir -f php -P PHP
`----

falls over.

Fortunately that was correctly documented elsewhere and was pointed out
to me in the php.docs list you recommended.

https://doc.php.net/phd/docs/ : installation via pear.

Also, I *think*, the instructions there are in addition to mirroring
since the mirroring line doesnt include the manual subdir : so both sets
are required and you symbolically link to your phpdoc configuration (or
so it seems from the instructions).

IMO, and with the benefit of being totally new to this and trying to use
the docs, It's not clear from the pages if this phpdoc config is in
addition to or superceded by the mirroring rsync line.

cheers

r.

---

## #52854 — Hannes Magnusson — 2011-06-03T10:48:27+00:00

URL: https://externals.io/message/52803#52854 · In reply to: #52853

> Hannes Magnusson <hannes.magnusson@gmail.com> writes:
>
> > […]
>
> I'm not sure it will at all, since they dont show you how to install the
> phd_php part or inform you that you need to. For a beginner thats a
> hurdle enough. You are probably too familiar with it to notice
> this. Result:
>
> ,----
> | phd -d doc-base/.manual.xml -o output_dir -f php -P PHP
> `----
>
> falls over.
>
> Fortunately that was correctly documented elsewhere and was pointed out
> to me in the php.docs list you recommended.
>
> https://doc.php.net/phd/docs/ : installation via pear.
>
> Also, I *think*, the instructions there are in addition to mirroring
> since the mirroring line doesnt include the manual subdir : so both sets
> are required and you symbolically link to your phpdoc configuration (or
> so it seems from the instructions).
>
> IMO, and with the benefit of being totally new to this and trying to use
> the docs, It's not clear from the pages if this phpdoc config is in
> addition to or superceded by the mirroring rsync line.


I'd appreciate if you could update the wiki with your experience to
help people coming after you

-Hannes

---

## #52857 — Hannes Magnusson — 2011-06-03T11:06:08+00:00

URL: https://externals.io/message/52803#52857

> Hannes Magnusson <hannes.magnusson@gmail.com> writes:
>
> > […]
>
> I would love to but dont think its a good idea until I am more familiar
> - blinded in the headlights,  a lot might be me doing the headless chicken
> routine. I will come back to it at a later date however when I have it
> working locally and I fully understand the components and the
> processes.

Doing it afterwards will ensure that you forget about it :)

Atleast write down your wtfs and todos, so someone can go after you
and answer the questions.

-Hannes

---

## #52858 — Richard Riley — 2011-06-03T11:08:37+00:00

URL: https://externals.io/message/52803#52858 · In reply to: #52857

Hannes Magnusson <hannes.magnusson@gmail.com> writes:

> 
> > […]
>
> Doing it afterwards will ensure that you forget about it :)
>
> Atleast write down your wtfs and todos, so someone can go after you
> and answer the questions.
>
> -Hannes

Yes Dad ... ;)
