[pmwiki-users] Index.php include

Patrick R. Michaud pmichaud at pobox.com
Tue Apr 8 07:37:55 CDT 2008


On Mon, Apr 07, 2008 at 10:03:10PM -0600, Steven Benmosh wrote:
>    I have a root directory, and in it a pmwiki directory that includes
>    pmwiki.php and index.php with the line <?php include('pmwiki.php'); in it.
>    It works fine, and/but wiki pages have the url of
>    www.mysite.com/pmwiki/... In other words, I have a fully functional pmwiki
>    installation running fine as it is.
> 
>    So I thought I would get smart, and in the root directory's include an
>    index.php page with the following:
>    <?php include('/home/words2u/pmwiki/pmwiki.php');
>    or
>    <?php include('pmwiki/pmwiki.php');
> 
>    Now I get the following error:
> 
>    Warning: mkdir() [function.mkdir]: Permission denied in
>    /home/words2u/pmwiki/pmwiki.php on line 435

This is because the system is attempting to run PmWiki from the
root directory, and the needed files aren't present.  Try the
following in your root's index.php:

    <?php chdir('pmwiki'); include('pmwiki.php');

If that doesn't work, then take a look at
http://www.pmwiki.org/wiki/Cookbook/CleanUrls for some other
approaches to removing the "pmwiki" from the url.

Pm





More information about the pmwiki-users mailing list