Windows server
Multidirectional slashes in the paths in configuration.php
public $log_path = 'C:\\OSPanel\\domains\\j4.local\\administrator/logs';
public $tmp_path = 'C:\\OSPanel\\domains\\j4.local/tmp';
The same goes for global JPATH_*
constants.
Either use DIRECTORY_SEPARATOR constant or write /
everywhere.
Labels |
Added:
?
|
Status | New | ⇒ | Discussion |
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-03-09 11:56:08 |
Closed_By | ⇒ | HLeithner |
Php handles this correct so not a problem?
On windows the php api gives us \ as seperator and we add /tmp to this so it's a simple concat. The rest is done by php so no chance requiered.
But if you like to write a PR to rewrite \ to / it will be considered.
I closing this but you can always reopen it
@HLeithner so you confirm that '/' is a bug? On Windows it should be \\
, right?
My development system is windows
The paths on this system are written
public $log_path = 'C:\\htdocs\\joomla-cms\\administrator/logs';
Windows happily writes the logs into that directory.
So what is the problem that needs to be solved?
Status | Closed | ⇒ | New |
Closed_Date | 2019-03-09 11:56:08 | ⇒ | |
Closed_By | HLeithner | ⇒ |
can you give me an example component? that has this problem?
whats the point in having an api if its not going to be used?
there could be many reasons why you don't us the Joomla API,
But I can't reproduce it:
$path = 'c:\\temp\\test';
var_dump(is_dir($path));
$path = 'c:\\temp/test';
var_dump(is_dir($path));
C:\temp>c:\php\php test.php
C:\temp\test.php:5:
bool(true)
C:\temp\test.php:9:
bool(true)
@AlekVolsk and why do you delete your comments?
Oh you edit your issue, sry didn't notice this. Please make comments.
Long time Windows user. Never had a problem with paths like C:\\OSPanel\\domains\\j4.local\\administrator/logs
The only problem I can think of at the moment is if you try to manipulate the path, f.ex. removing parts of it.
General bit of advice, any time a path is going to be shown to a user it's a good idea to run it through JPath::clean()
which standardizes the directory separator. So when saving config changes, putting these (and other configurable paths like the cache_path
or in 4.0 the session_filesystem_path
) through the API wouldn't hurt anything, but it clearly isn't something that's mandatory for PHP to work right.
Such paths are not a bug. But you must admit, this is not the correct one.
Status | New | ⇒ | Discussion |
Category | ⇒ | com_config |
Labels |
Added:
J4 Issue
|
Title |
|
Status | Discussion | ⇒ | Expected Behaviour |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-04-17 14:56:08 |
Closed_By | ⇒ | jwaisner |
Status | Expected Behaviour | ⇒ | Closed |
Closed_By | jwaisner | ⇒ | joomla-cms-bot |
Set to "closed" on behalf of @jwaisner by The JTracker Application at issues.joomla.org/joomla-cms/24139
Closing as it is expected behavior and does not effect operation of the CMS outside of what is expected.
OSPanel download link
https://ospanel.io/download/