-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSS relative path broken with some server DOCUMENT_ROOT settings #33
Comments
Hi, Indeed, it seems that your I can't use your workaround (it seems to me that As an example, the script has to handle :
I can't either compare the strings and look for similarities without risking Unfortunately the only way I know is to rely on |
Hi,
edit: changed to use DIRECTORY_SEPARATOR system constant in comparison insteaad of hardcoded slash. |
Hi, thanks for the report. |
|
Thanks. The server is returning a valid document root, so it's a different cause. Instead of a condition on Would you make a Pull request ? |
Sure it's better, I was thinking about but led it unthouched to avoid breaking something else because confused by the constant name. Now I checked actually it's not used elsewere.
Actually not, also because i'm working on my local svn repository so I need first forking your git repo. |
and it can get worse! |
@beejay41 indeed ! Could you test the PR #43 ? Tried a generalized way to get the root. (@integratec @gs58muse too if possible) |
Hi, |
Yes, the "ROOT" solution works for me with my symlinks, and it avoids GS variable reliance. Thanks, |
@beejay41 looks like a misunderstanding, I was asking gs58muse :) Thanks anyway, I deleted your reply as requested. |
Hi Nicolas,
Great - it works for me.
The form will be displayed correctly
The RELPATH is OK (the form will call the stylesheet correctly)
Thanks
@gs58muse <https://github.com/gs58muse>
From: Nicolas Liautaud [mailto:notifications@github.com]
Sent: Wednesday, November 21, 2018 5:53 PM
To: nliautaud/p01contact <p01contact@noreply.github.com>
Cc: gs58muse <gsms50@t-online.de>; Mention <mention@noreply.github.com>
Subject: Re: [nliautaud/p01contact] CSS relative path broken with some server DOCUMENT_ROOT settings (#33)
@gs58muse <https://github.com/gs58muse> I didn't get if you tried the patch #43 <#43> SCRIPTNAME/SCRIPTPATH/ROOT solution (whitch doesn't rely on your DOCUMENT_ROOT setting) ? Could you give me the output of the constants in the debug report when using #43 <#43> ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#33 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/Aj_oDBpA74vVYl9ODkpKqUvhQKmQBr8zks5uxYUCgaJpZM4TbbYx> . <https://github.com/notifications/beacon/Aj_oDIuCpAGOjo7bGHgFzBnQpj6P_8-Bks5uxYUCgaJpZM4TbbYx.gif>
Health :
PHP version : 7.1.24
PHP mbstring (UTF-8) : OK
Constants :
Array
(
[P01C\VERSION] => 1.1.4
[P01C\SERVERNAME] => seipel.de
[P01C\SERVERPORT] => 80
[P01C\SCRIPTNAME] => /gsdev/index.php
[P01C\SCRIPTPATH] => /homepages/0/d109796559/htdocs/gsdev/index.php
[P01C\HTTPS] =>
[P01C\PORT] =>
[P01C\PROTOCOL] => http
[P01C\SERVER] => http://seipel.de
[P01C\PAGEURI] => /gsdev/index.php?id=kontakt
[P01C\PAGEURL] => http://seipel.de/gsdev/index.php?id=kontakt
[P01C\PATH] => /homepages/0/d109796559/htdocs/gsdev/plugins/p01-contact/
[P01C\ROOT] => /homepages/0/d109796559/htdocs
[P01C\RELPATH] => /gsdev/plugins/p01-contact/
[P01C\LANGSPATH] => /homepages/0/d109796559/htdocs/gsdev/plugins/p01-contact/lang/
[P01C\TPLPATH] => /homepages/0/d109796559/htdocs/gsdev/plugins/p01-contact/src/templates/
[P01C\CONFIGPATH] => /homepages/0/d109796559/htdocs/gsdev/plugins/p01-contact/config.json
[P01C\LOGPATH] => /homepages/0/d109796559/htdocs/gsdev/plugins/p01-contact/log.json
[P01C\REPOURL] => https://github.com/nliautaud/p01contact
[P01C\WIKIURL] => https://github.com/nliautaud/p01contact/wiki
[P01C\ISSUESURL] => https://github.com/nliautaud/p01contact/issues
[P01C\APILATEST] => https://api.github.com/repos/nliautaud/p01contact/releases/latest
)
|
Thanks everyone, will be shipped in the next release 👍 |
Hello Nicolas
something is going wrong on my LIVE-SYSTEM with the "RELPATH" Var.
The "style.css" is not called.
The Problem is in the Var: "$_SERVER['DOCUMENT_ROOT']"
MY XAMPP TEST-SYSTEM:
P01C\PATH: C:\xampp_5.6.24\htdocs\test\plugins\p01-contact/
DOCUMENT_ROOT: C:/xampp_5.6.24/htdocs
RELPATH: \test\plugins\p01-contact/
MY LIVE SYSTEM: (Provider 1+1 or also Profihost)
Path: /homepages/0/d109796559/htdocs/test/plugins/p01-contact/
DOCUMENT_ROOT: /kunden/homepages/0/d109796559/htdocs
RELPATH: lugins/p01-contact/
The only Workaround for me to make it run:
define('P01C\RELPATH', dirname(substr(PAGEURL, strlen(SERVER)))."/plugins/p01-contact/");
Greetings
Gerhard
The text was updated successfully, but these errors were encountered: