[pmwiki-users] Generating incorrect URLs

Rik Sarkar rik at cs.sunysb.edu
Sat Dec 2 18:40:13 CST 2006


Hi Michael,

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. system('pwd') returns the correct value, and the error goes away if I
append the return value of system('pwd') at the beginning of $dir. After
this, it lets me modify existing pages, but I can't create new pages. When
a new page is saved, fixperms() gives an error saying 'no such file'.
The file actually gets created in the file system and has the  data,
and it shows up correctly on subsequent edit attempts, but does not get
linked in the parent page.

It looks to to me that at certain points, the script is not being able to
find the local directories like 'local' and 'wiki.d'. But I am not
entirely sure. Any suggestion would be helpful.

Thanks!

Rik.



On Sat, 2 Dec 2006, Michael Brenner wrote:

> Hi Rik,
>
> PmWiki creates linkes based on the following variable[#1]. First step is
> lookup if the HTTP_HOST-variable is set bei the server [#3]. If that's the
> problem try to set it by hand in local/config.php [#2].
>
> #1
>  $ScriptUrl = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'];
>
> #2 in local/config.php
> ...
> $ScriptUrl = 'http://www.site.edu/'.$_SERVER['SCRIPT_NAME'];
> $PubDirUrl = preg_replace('#/[^/]*$#','/pub',$ScriptUrl,1);
> ...
>
> #3
> http://de.php.net/manual/en/function.phpinfo.php
> Am Samstag, 2. Dezember 2006 06:46 schrieb Rik Sarkar:
> > Hi, I installed pmwiki on a server, the url for the script being :
> > http://www.site.edu/~user/pmwiki/pmwiki.php
> >
> > When I go to this url, it shows the startup page, but all the urls in the
> > page, insted of being complete, contain only a suffix of it, something
> > like this :
> >
> > http://~user/pmwiki/pmwiki.php     or,
> > http://~user/pmwiki/pmwiki.php?n=PmWiki.InitialSetupTasks
> >
> > I tried on internet explorer, where it gives something slightly stranger :
> > http:///~user/pmwiki/pmwiki.php    or,
> > http:///~rik/pmwiki/pmwiki.php?n=PmWiki.InitialSetupTasks
> >
> > That is, takes an extra slash after http.
> >
> > Please advise how to get around this. Can I set the site url somewhere so
> > that all the relative urls are taken with respect to that ? Or some other
> > hack ? (I do not have root, so can't do anything to the server iteself).
> >
> > Thanks,
> >
> > Rik.
> >
> >
> > _______________________________________________
> > pmwiki-users mailing list
> > pmwiki-users at pmichaud.com
> > http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>




More information about the pmwiki-users mailing list