Page MenuHomePhabricator

"No such file or directory" due to traversing too low in directory tree
Closed, ResolvedPublic

Description

Hello.

I installed mw 1.35. I also installed titlekey extension accordingly. but when i run it i get the following error.

lavinyanet@sonbahar:~/wiki.lavinya.net$ php extensions/TitleKey/maintenance/rebuildTitleKeys.php
PHP Warning:  require_once(/var/www/vhosts/lavinya.net/wiki.lavinya.net/extensions/TitleKey/maintenance/../../maintenance/Maintenance.php): failed to open stream: No such file or directory in /var/www/vhosts/lavinya.net/wiki.lavinya.net/extensions/TitleKey/maintenance/rebuildTitleKeys.php on line 9
PHP Fatal error:  require_once(): Failed opening required '/var/www/vhosts/lavinya.net/wiki.lavinya.net/extensions/TitleKey/maintenance/../../maintenance/Maintenance.php' (include_path='.:/usr/share/php') in /var/www/vhosts/lavinya.net/wiki.lavinya.net/extensions/TitleKey/maintenance/rebuildTitleKeys.php on line 9

Thanks for your help.

Event Timeline

Esginmurat added a project: MW-1.35-release.
RazeSoldier subscribed.

This is not a releace blocker since related to titlekey extension.

@Esginmurat: Do you plan to work on fixing this task, as you increased the priority of this task? If so, then please set yourself as task assignee.

Esginmurat lowered the priority of this task from High to Lowest.

@Esginmurat: Do you plan to work on fixing this task, as you increased the priority of this task? If so, then please set yourself as task assignee.

Is it ok now?

That code says:

$IP = getenv( 'MW_INSTALL_PATH' );
if ( $IP === false ) {
	$IP = __DIR__ . '/../..';
}
require_once "$IP/maintenance/Maintenance.php";

I assume
/var/www/vhosts/lavinya.net/wiki.lavinya.net/extensions/TitleKey/maintenance/../../maintenance/Maintenance.php
should be
/var/www/vhosts/lavinya.net/wiki.lavinya.net/extensions/TitleKey/maintenance/../../../maintenance/Maintenance.php
instead. Are you sure that this is a software bug and not a misconfiguration?

@Aklapper thanks for reply. I am sure. because i am using the original mw 1.35 and original titlekey 1.35. I did a clean install. by the way, you are right, there seems to be a path error. but I doubt this is from me. Andre Klapper; by the way, thank you people for your help.

Aklapper renamed this task from Titlekey extension error to "No such file or directory" due to traversing too high in directory tree.Feb 8 2021, 8:08 PM
Aklapper renamed this task from "No such file or directory" due to traversing too high in directory tree to "No such file or directory" due to traversing too low in directory tree.
Aklapper removed Esginmurat as the assignee of this task.

Change 886172 had a related patch set uploaded (by Zabe; author: TaylanUB):

[mediawiki/extensions/TitleKey@master] Fix detecting MW installation path.

https://gerrit.wikimedia.org/r/886172

Change 886172 merged by jenkins-bot:

[mediawiki/extensions/TitleKey@master] Fix detecting MW installation path.

https://gerrit.wikimedia.org/r/886172

Change 886088 had a related patch set uploaded (by Zabe; author: TaylanUB):

[mediawiki/extensions/TitleKey@REL1_39] Fix detecting MW installation path.

https://gerrit.wikimedia.org/r/886088

Change 886089 had a related patch set uploaded (by Zabe; author: TaylanUB):

[mediawiki/extensions/TitleKey@REL1_38] Fix detecting MW installation path.

https://gerrit.wikimedia.org/r/886089

Change 886090 had a related patch set uploaded (by Zabe; author: TaylanUB):

[mediawiki/extensions/TitleKey@REL1_35] Fix detecting MW installation path.

https://gerrit.wikimedia.org/r/886090

Change 886088 merged by jenkins-bot:

[mediawiki/extensions/TitleKey@REL1_39] Fix detecting MW installation path.

https://gerrit.wikimedia.org/r/886088

Change 886089 merged by jenkins-bot:

[mediawiki/extensions/TitleKey@REL1_38] Fix detecting MW installation path.

https://gerrit.wikimedia.org/r/886089

Change 886090 merged by jenkins-bot:

[mediawiki/extensions/TitleKey@REL1_35] Fix detecting MW installation path.

https://gerrit.wikimedia.org/r/886090

Aklapper assigned this task to Taylan.

Thanks!