[pmwiki-users] Generating incorrect URLs

Rik Sarkar rik at cs.sunysb.edu
Mon Dec 4 20:40:43 CST 2006


On Mon, 4 Dec 2006, Patrick R. Michaud wrote:

> On Mon, Dec 04, 2006 at 06:30:22PM -0500, Rik Sarkar wrote:
> > > Is there a url we could look at?  And perhaps you could set
> > > $EnableDiag=1; ?
> > Sure. url : http://www.cs.sunysb.edu/~rik/pmwiki/pmwiki.php
> > I have set $EnableDiag=1; at the begininng of pmwiki.php
>
> Hmm.  The error message I'm seeing says:
>
>     Warning: mkdir() failed (File exists) in
>     /home/stufs1/rik/public_html/pmwiki/pmwiki.php on line 436.
>
> That's really weird.  So, the questions are:
>
>     - does wiki.d/ exist?

yes.

>     - what are the ownerships/permissions on wiki.d/
>     - what are the ownerships/permissions on the pmwiki/ directory

both owned by user. Initially I had a+rwx only on wiki.d/ now I think
there is rwx for everyone everywhere inside pmwiki/ subtree

>
> and, while we're at it
>
>     - what are the ownerships/permissions on local/ ?

Same.



> Pm
>
>
> > On Mon, 4 Dec 2006, Patrick R. Michaud wrote:
> >
> > > On Mon, Dec 04, 2006 at 05:47:23PM -0500, Rik Sarkar wrote:
> > > > > This sounds to me as though PmWiki isn't being run from the correct
> > > > > directory.
> > > >
> > > > That was my guess too. But even setting the $ScriptUrl directly does not
> > > > help. The URLs generated now are correct, but it still does not
> > > > find the wiki.d directory and gives the error. It seems to me that while
> > > > the things accessed through url are fine, the access to the local file
> > > > system is a problem. Any simple way to fix that ? doing system('pwd')
> > > > returns correct values, and I ran the mkdirp() function in a trial script
> > > > of my own in the same directory, and it worked fine.
> > >
> > > Is there a url we could look at?  And perhaps you could set
> > > $EnableDiag=1; ?
> > >
> > > It's very odd that "system('pwd')" works, I'm wondering if the PHP
> > > on that system has been configured to block access to the filesystem
> > > somehow.  But I guess not if mkdirp() is running.
> > >
> > > Out of curiosity, what version of PHP?
> > >
> > > Pm
> > >
> > >
> > >
> > > > On Mon, 4 Dec 2006, Patrick R. Michaud wrote:
> > > >
> > > > > On Sat, Dec 02, 2006 at 07:40:13PM -0500, Rik Sarkar wrote:
> > > > > >
> > > > > > Your guess was correct, the server is not setting HTTP_HOST, it works if
> > > > > > that is set. However, I am still stuck with it, because it does not work
> > > > > > when I set it in local/config.php. It works only when set in pmwiki.php.
> > > > > > Possibly, it is not reading the config.php.
> > > > > >
> > > > > > Also, I am getting errors from the mkdirp($dir) function saying that it
> > > > > > can't create wiki.d directory, though the directory exists with full
> > > > > > access.
> > > > >
> > > > > This sounds to me as though PmWiki isn't being run from the correct
> > > > > directory.  When the pmwiki.php script executes, it expects to be
> > > > > running in the directory that contains local/ and wiki.d/ .
> > > > > If the current directory is something else when pmwiki.php runs,
> > > > > it'll be quite confused (and try to create a new environment
> > > > > in whatever directory it happens to be in).
> > > > >
> > > > > Note that the current directory isn't necessarily the one containing
> > > > > pmwiki.php.  (For example, in farm installations, the current directory
> > > > > is the one containing the local wiki field, while the farm contains
> > > > > the pmwiki.php and other scripts.)
> > > > >
> > > > > Getting back to the original issue, I generally recommend against messing
> > > > > with HTTP_HOST or SCRIPT_NAME at all.  Simply set $ScriptUrl directly
> > > > > to whatever the url is supposed to be, rather than trying to figure
> > > > > it out (or have PmWiki figure it out) from whatever miscues are
> > > > > coming from the webserver.
> > > > >
> > > > > Pm
> > > > >
> > >
>




More information about the pmwiki-users mailing list