J4 Issue ?
avatar AlekVolsk
AlekVolsk
9 Mar 2019

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.

avatar AlekVolsk AlekVolsk - open - 9 Mar 2019
avatar joomla-cms-bot joomla-cms-bot - change - 9 Mar 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 9 Mar 2019
avatar AlekVolsk AlekVolsk - change - 9 Mar 2019
The description was changed
avatar AlekVolsk AlekVolsk - edited - 9 Mar 2019
avatar Septdir
Septdir - comment - 9 Mar 2019

OSPanel download link
https://ospanel.io/download/

avatar AlekVolsk AlekVolsk - change - 9 Mar 2019
The description was changed
avatar AlekVolsk AlekVolsk - edited - 9 Mar 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 9 Mar 2019
Status New Discussion
avatar HLeithner HLeithner - change - 9 Mar 2019
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2019-03-09 11:56:08
Closed_By HLeithner
avatar HLeithner
HLeithner - comment - 9 Mar 2019

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

avatar HLeithner HLeithner - close - 9 Mar 2019
avatar b2z
b2z - comment - 9 Mar 2019

@HLeithner so you confirm that '/' is a bug? On Windows it should be \\, right?

avatar brianteeman
brianteeman - comment - 9 Mar 2019

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?

avatar HLeithner HLeithner - change - 9 Mar 2019
Status Closed New
Closed_Date 2019-03-09 11:56:08
Closed_By HLeithner
avatar HLeithner
HLeithner - comment - 9 Mar 2019

can you give me an example component? that has this problem?

avatar HLeithner HLeithner - reopen - 9 Mar 2019
avatar brianteeman
brianteeman - comment - 9 Mar 2019

whats the point in having an api if its not going to be used?

avatar HLeithner
HLeithner - comment - 9 Mar 2019

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.

avatar roland-d
roland-d - comment - 9 Mar 2019

Long time Windows user. Never had a problem with paths like C:\\OSPanel\\domains\\j4.local\\administrator/logs

avatar HLeithner
HLeithner - comment - 9 Mar 2019

The only problem I can think of at the moment is if you try to manipulate the path, f.ex. removing parts of it.

avatar mbabker
mbabker - comment - 9 Mar 2019

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.

avatar Septdir
Septdir - comment - 9 Mar 2019

Such paths are not a bug. But you must admit, this is not the correct one.

avatar franz-wohlkoenig franz-wohlkoenig - change - 10 Mar 2019
Status New Discussion
avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Mar 2019
Category com_config
avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2019
Labels Added: J4 Issue
avatar franz-wohlkoenig franz-wohlkoenig - labeled - 4 Apr 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 19 Apr 2019
Title
[3.9][4.0] Paths in configuration.php
[4.0] Paths in configuration.php
avatar franz-wohlkoenig franz-wohlkoenig - edited - 19 Apr 2019
avatar joomla-cms-bot joomla-cms-bot - close - 17 Apr 2020
avatar jwaisner jwaisner - change - 17 Apr 2020
Status Discussion Expected Behaviour
Closed_Date 0000-00-00 00:00:00 2020-04-17 14:56:08
Closed_By jwaisner
avatar joomla-cms-bot joomla-cms-bot - change - 17 Apr 2020
Status Expected Behaviour Closed
Closed_By jwaisner joomla-cms-bot
avatar joomla-cms-bot
joomla-cms-bot - comment - 17 Apr 2020

Set to "closed" on behalf of @jwaisner by The JTracker Application at issues.joomla.org/joomla-cms/24139

avatar jwaisner
jwaisner - comment - 17 Apr 2020

Closing as it is expected behavior and does not effect operation of the CMS outside of what is expected.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/24139.

Add a Comment

Login with GitHub to post a comment