Issues with XAMPP: Could not open ROS Translation Tool page

Discuss translation of both ReactOS and the website here.

Moderators: Moderator Team, Web Team

Post Reply
Fraizeraust
Posts: 228
Joined: Thu Jan 05, 2017 11:46 am
Location: Italy
Contact:

Issues with XAMPP: Could not open ROS Translation Tool page

Post by Fraizeraust » Sat Feb 24, 2018 6:35 pm

As the title says it all, I have a successfully installed XAMPP stack under my Linux system but no luck on getting the ReactOS Translation Tool working. I did create a symbolic link of ros-tool folder (the directory whose the contents of ROS translation tool reside) to /opt/lampp/htdocs but Apache2 complains the contents of the selected page object is whether read-protected or not readable by the server (as per the image below):
Image
I granted access to all but yet no results on this. If someone has an idea how to tackle the problem it'd be very appreciated!

Here's some of my rig information (+ XAMPP version) in case you're asking me for this:
XAMPP Version: 7.2.2-0
OS: Linux Mint 18.3 "Sylvia" 64-bit
Apache Version: 2.4.29

Fraizeraust
Posts: 228
Joined: Thu Jan 05, 2017 11:46 am
Location: Italy
Contact:

Re: Issues with XAMPP: Could not open ROS Translation Tool p

Post by Fraizeraust » Sat Feb 24, 2018 10:22 pm

Fortunately I could be able to fix the issue by myself after all the frustration. Had just to chmod the htdocs folder of XAMPP with 755 recursively and clone the ros translation tool repo onto that folder (for some reason it can't read my symbolic link, wonder why...). However now I run into another problem.

The ReactOS translation tool now complains the ReactOS source code path is not existent which in reality I do have the source code folder of it. Anybody knows what could be the cause?

oldman
Posts: 1072
Joined: Sun Dec 20, 2009 1:23 pm

Re: Issues with XAMPP: Could not open ROS Translation Tool p

Post by oldman » Sun Feb 25, 2018 3:18 pm

Fraizeraust wrote:Fortunately I could be able to fix the issue by myself after all the frustration. Had just to chmod the htdocs folder of XAMPP with 755 recursively and clone the ros translation tool repo onto that folder (for some reason it can't read my symbolic link, wonder why...). However now I run into another problem.

The ReactOS translation tool now complains the ReactOS source code path is not existent which in reality I do have the source code folder of it. Anybody knows what could be the cause?
Quoted from: https://github.com/Saibamen/ReactOS-Tra ... 0512e0a641
"ReactOS Translation Tool
Installation
Upload files to a web accessible directory on your server or hosting account
Change the ReactOS source dir ($ROSDir) in config.php - must contain the base and dll directories"

Could your problem be, that you have over-looked setting your PATH in the config file? Sorry I can't help you further.

Edit:
I have just down loaded the files, navigated to the folder in my browser and came across the same error. I then opened config.php and entered the path to the source directory and it went through to "Search missing RC files" page.

This is the relevent code snippit:

Code: Select all

<?php
// ReactOS Source directory - must contain the base and dll directories
$ROSDir = 'C:\ReactOS_Development\Source\reactos';
Hope that helps.

Second edit:
I am not using xampp or any Apache webserver. The OS is Windows XP running ZazouMiniWebserver.
Please keep the Windows classic (9x/2000) look and feel.
The layman's guides to - debugging - bug reporting - compiling - with some complementary scripts.
They may help you with a problem, so do have a look at them.

ThFabba
Developer
Posts: 274
Joined: Sun Jul 11, 2010 11:39 am

Re: Issues with XAMPP: Could not open ROS Translation Tool p

Post by ThFabba » Sun Feb 25, 2018 5:18 pm

To correctly set your permissions, understand two things:
* symlinks basically just say "look here instead", they don't assign any permissions. That means it's not enough to place the symlink in a place accessible by your apache user -- the target also needs to be accessible
* in order to read a file or folder you not only need read permission on that particular file, you also need "traverse" (execute) permission on every folder above it.

So if /var/www/htdocs/MyTool is a symlink to the /home/someuser/MyTool/ folder, you need the following permission bits to be able to access it and its contents:
* +x on /, /var, /var/www, /var/www/htdocs
* +x on /, /home, /home/someuser, /home/someuser/MyTool
* +r on /home/someuser/MyTool if you need to list the folder's contents
* +r on any file inside /home/someuser/MyTool that you want to read
* +x on any subfolder inside /home/someuser/MyTool that you want to access files in, and +r if you want to list the folder's contents

I don't know if that's the cause of your source code path problem as well, but of course you'd need permissions there, too.

Fraizeraust
Posts: 228
Joined: Thu Jan 05, 2017 11:46 am
Location: Italy
Contact:

Re: Issues with XAMPP: Could not open ROS Translation Tool p

Post by Fraizeraust » Sun Feb 25, 2018 6:05 pm

@ThFabba: I already assigned the required permissions both for the ros-tool folder and the source code, yet nothing seems to fix it. I reported it to Issues section (link), hopefully Saibamen will provide a fix as soon as possible. This has to be the most weirdest bug ever.

ThFabba
Developer
Posts: 274
Joined: Sun Jul 11, 2010 11:39 am

Re: Issues with XAMPP: Could not open ROS Translation Tool p

Post by ThFabba » Sun Feb 25, 2018 7:06 pm

file_exists returning false still very much sounds like a permission issue. If your home folder (or the ReactOS or Source folder inside it) doesn't have +x for apache, that's exactly what you'd get

Fraizeraust
Posts: 228
Joined: Thu Jan 05, 2017 11:46 am
Location: Italy
Contact:

Re: Issues with XAMPP: Could not open ROS Translation Tool p

Post by Fraizeraust » Sun Feb 25, 2018 8:06 pm

ls -l output of ReactOS folder:

Code: Select all

borealis@borealis-kappa0192 ~ $ ls -l ReactOS
total 12
drwxrwxr-x 2 borealis borealis 4096 Feb 25 14:06 Compiled
drwxrwxr-x 2 borealis borealis 4096 Feb 25 14:06 RosBE
drwxrwxr-x 3 borealis borealis 4096 Feb 25 14:07 Source
--------------------------------
borealis@borealis-kappa0192 ~/ReactOS/Source $ ls -l
total 4
drwxr-xr-x 15 borealis borealis 4096 Feb 25 14:13 reactos <<-- The source code is here
And the output of ros-tool folder (ReactOS Translation Tool):

Code: Select all

borealis@borealis-kappa0192 /opt/lampp/htdocs $ ls -l
total 60
-rwxr-xr-x  1 root   root    3607 Feb 27  2017 applications.html
-rwxr-xr-x  1 root   root     177 Feb 27  2017 bitnami.css
drwxr-xr-x 20 root   root    4096 Feb 24 17:04 dashboard
-rwxr-xr-x  1 root   root   30894 May 11  2007 favicon.ico
drwxr-xr-x  2 root   root    4096 Feb 24 17:04 img
-rwxr-xr-x  1 root   root     260 Jul  9  2015 index.php
drwxr-xr-x  6 root   root    4096 Feb 25 16:40 ros-tool <<-- The tool source code is here
drwxr-xr-x  2 daemon daemon  4096 Feb 24 17:03 webalizer
From my understanding, rwxr-xr-x translates to 755 in terms of file/directory permissions if I'm not mistaken. Probably amending 755 both for ReactOS source code and the tool isn't enough?

ThFabba
Developer
Posts: 274
Joined: Sun Jul 11, 2010 11:39 am

Re: Issues with XAMPP: Could not open ROS Translation Tool p

Post by ThFabba » Sun Feb 25, 2018 8:22 pm

Yes, those look good. As per my first post, make sure all folders above have +x, though.

Fraizeraust
Posts: 228
Joined: Thu Jan 05, 2017 11:46 am
Location: Italy
Contact:

Re: Issues with XAMPP: Could not open ROS Translation Tool p

Post by Fraizeraust » Sun Feb 25, 2018 9:04 pm

Output of /Source/reactos (subfolders):

Code: Select all

borealis@borealis-kappa0192 ~/ReactOS/Source/reactos $ ls -l
total 472
-rwxr-xr-x  1 borealis borealis   1129 Feb 25 14:13 apistatus.lst
-rwxr-xr-x  1 borealis borealis   1042 Feb 25 14:13 appveyor.yml
drwxr-xr-x  7 borealis borealis   4096 Feb 25 14:13 base
drwxr-xr-x  8 borealis borealis   4096 Feb 25 14:13 boot
-rwxr-xr-x  1 borealis borealis   8699 Feb 25 14:13 CMakeLists.txt
-rwxr-xr-x  1 borealis borealis  11671 Feb 25 14:13 configure.cmd
-rwxr-xr-x  1 borealis borealis   1657 Feb 25 14:13 configure.sh
-rwxr-xr-x  1 borealis borealis   8577 Feb 25 14:13 CONTRIBUTING.md
-rwxr-xr-x  1 borealis borealis  18556 Feb 25 14:13 COPYING
-rwxr-xr-x  1 borealis borealis  35147 Feb 25 14:13 COPYING3
-rwxr-xr-x  1 borealis borealis   7651 Feb 25 14:13 COPYING3.LIB
-rwxr-xr-x  1 borealis borealis   1543 Feb 25 14:13 COPYING.ARM
-rwxr-xr-x  1 borealis borealis  26523 Feb 25 14:13 COPYING.LIB
-rwxr-xr-x  1 borealis borealis   2751 Feb 25 14:13 CREDITS
drwxr-xr-x 13 borealis borealis   4096 Feb 25 14:13 dll
-rwxr-xr-x  1 borealis borealis 100335 Feb 25 14:13 Doxyfile
drwxr-xr-x 23 borealis borealis   4096 Feb 25 14:13 drivers
drwxr-xr-x  5 borealis borealis   4096 Feb 25 14:13 hal
-rwxr-xr-x  1 borealis borealis   3141 Feb 25 14:13 INSTALL
drwxr-xr-x 12 borealis borealis   4096 Feb 25 14:13 media
drwxr-xr-x  5 borealis borealis   4096 Feb 25 14:13 modules
drwxr-xr-x 28 borealis borealis   4096 Feb 25 14:13 ntoskrnl
-rwxr-xr-x  1 borealis borealis    323 Feb 25 14:13 PreLoad.cmake
-rwxr-xr-x  1 borealis borealis   6615 Feb 25 14:13 README.md
drwxr-xr-x  6 borealis borealis   4096 Feb 25 14:13 sdk
drwxr-xr-x  5 borealis borealis   4096 Feb 25 14:13 subsystems
-rwxr-xr-x  1 borealis borealis   2262 Feb 25 14:13 toolchain-clang.cmake
-rwxr-xr-x  1 borealis borealis   2696 Feb 25 14:13 toolchain-gcc.cmake
-rwxr-xr-x  1 borealis borealis   1512 Feb 25 14:13 toolchain-msvc.cmake
drwxr-xr-x  8 borealis borealis   4096 Feb 25 14:13 win32ss
And now the output of ros-tool contents and its subfolders:

Code: Select all

borealis@borealis-kappa0192 /opt/lampp/htdocs $ cd ros-tool
borealis@borealis-kappa0192 /opt/lampp/htdocs/ros-tool $ ls -l
total 108
-rwxr-xr-x 1 root root   888 Feb 25 16:40 config.php
drwxr-xr-x 2 root root  4096 Feb 25 16:37 css
-rwxr-xr-x 1 root root  8535 Feb 25 16:37 diff.php
-rwxr-xr-x 1 root root  5965 Feb 25 16:37 encoding.php
-rwxr-xr-x 1 root root 25214 Feb 25 16:37 favicon.ico
drwxr-xr-x 2 root root  4096 Feb 25 16:37 fonts
-rwxr-xr-x 1 root root   180 Feb 25 16:37 footer.php
-rwxr-xr-x 1 root root  2896 Feb 25 16:37 header.php
-rwxr-xr-x 1 root root  4065 Feb 25 16:37 index.php
drwxr-xr-x 2 root root  4096 Feb 25 16:37 js
-rwxr-xr-x 1 root root 18047 Feb 25 16:37 LICENSE
-rwxr-xr-x 1 root root  1112 Feb 25 16:37 ReactOS.spell
-rwxr-xr-x 1 root root   607 Feb 25 16:37 README.md
-rwxr-xr-x 1 root root  1648 Feb 25 16:37 Wine.spell
According to this information, the permissions of subfolders do seem alright. Based upon my assumption, these are the correct set of minimum permissions for ReactOS source code folder and the tool to read the contents inside it. But to be sure, I also did check the permissions for / root folder and /home.

Output of/ folder:

Code: Select all

borealis@borealis-kappa0192 ~ $ ls -l /
total 96
drwxr-xr-x   2 root root  4096 Feb 23 19:09 bin
drwxr-xr-x   4 root root  4096 Feb 22 19:00 boot
drwxr-xr-x   2 root root  4096 Feb 18 19:38 cdrom
drwxr-xr-x  21 root root  4240 Feb 25 18:46 dev
drwxr-xr-x 151 root root 12288 Feb 25 13:20 etc
drwxr-xr-x   4 root root  4096 Feb 18 19:39 home
lrwxrwxrwx   1 root root    33 Feb 22 18:54 initrd.img -> boot/initrd.img-4.13.0-36-generic
drwxr-xr-x  26 root root  4096 Feb 21 19:33 lib
drwxr-xr-x   2 root root  4096 Feb 18 20:02 lib64
drwx------   2 root root 16384 Feb 18 19:33 lost+found
drwxr-xr-x   3 root root  4096 Feb 18 20:45 media
drwxr-xr-x   2 root root  4096 Dec 13 12:02 mnt
drwxr-xr-x   5 root root  4096 Feb 24 17:03 opt
dr-xr-xr-x 212 root root     0 Feb 25 18:45 proc
drwx------   5 root root  4096 Feb 18 19:49 root
drwxr-xr-x  32 root root   980 Feb 25 18:46 run
drwxr-xr-x   2 root root 12288 Feb 21 19:30 sbin
drwxr-xr-x   2 root root  4096 Dec 13 12:02 srv
dr-xr-xr-x  13 root root     0 Feb 25 18:49 sys
drwxrwxrwt  13 root root  4096 Feb 25 19:41 tmp
drwxr-xr-x  10 root root  4096 Dec 13 12:02 usr
drwxr-xr-x  12 root root  4096 Feb 24 16:22 var
lrwxrwxrwx   1 root root    30 Feb 22 18:54 vmlinuz -> boot/vmlinuz-4.13.0-36-generic
Output of /home:

Code: Select all

borealis@borealis-kappa0192 ~ $ ls -l /home/borealis
total 40
drwxr-xr-x 2 borealis borealis 4096 Feb 25 13:20 Desktop
drwxr-xr-x 2 borealis borealis 4096 Feb 18 19:46 Documents
drwxr-xr-x 2 borealis borealis 4096 Feb 25 17:25 Downloads
drwxr-xr-x 2 borealis borealis 4096 Feb 18 19:46 Music
drwxr-xr-x 2 borealis borealis 4096 Feb 25 14:21 Pictures
drwxr-xr-x 2 borealis borealis 4096 Feb 18 19:46 Public
drwxrwxr-x 5 borealis borealis 4096 Feb 25 14:06 ReactOS
drwxr-xr-x 2 borealis borealis 4096 Feb 18 19:46 Templates
drwxr-xr-x 2 borealis borealis 4096 Feb 18 19:46 Videos
drwxrwxr-x 3 borealis borealis 4096 Feb 24 20:26 VirtualBox VMs
The tool doesn't reside to /var/www/htdocs/MyTool but on /opt/lampp/htdocs/ros-tool and the permissions of it are good as well. Note that ros-tool isn't a symbolic link but an ordinary folder which contains the ROS translation tool source code (I decided to not use a symbolic link for that). htdocs also has the right permissions.

ThFabba
Developer
Posts: 274
Joined: Sun Jul 11, 2010 11:39 am

Re: Issues with XAMPP: Could not open ROS Translation Tool p

Post by ThFabba » Sun Feb 25, 2018 9:33 pm

Yes, those look good as well. You haven't shown the permissions of /home/borealis yet, which also needs a +x.
A simple test to check for a permission issue would be to try to list these files as the other user (apache?). "sudo su - apache" or some such should let you switch to that user (you may have to change its shell in case it's /bin/false).

Fraizeraust
Posts: 228
Joined: Thu Jan 05, 2017 11:46 am
Location: Italy
Contact:

Re: Issues with XAMPP: Could not open ROS Translation Tool p

Post by Fraizeraust » Mon Feb 26, 2018 9:09 pm

ThFabba wrote:A simple test to check for a permission issue would be to try to list these files as the other user (apache?). "sudo su - apache" or some such should let you switch to that user (you may have to change its shell in case it's /bin/false).
I checked through /etc/passwd for apache user and nothing found. Don't take me wrong, XAMPP does include Apache stack and its libs however there's no such user like apache created. Maybe creating one manually would change something?

ThFabba
Developer
Posts: 274
Joined: Sun Jul 11, 2010 11:39 am

Re: Issues with XAMPP: Could not open ROS Translation Tool p

Post by ThFabba » Tue Feb 27, 2018 2:34 pm

Yeah the user may not necessarily be called apache. It could be httpd for example, or for some reason if might not run as its own user at all. It pretty much depends on how you installed apache and how you're starting it.
A quick search suggests that the default for xampp may be to run as 'nobody', and that that can be changed in /opt/lampp/etc/httpd.conf -- https://askubuntu.com/questions/64095/c ... nother-one

Fraizeraust
Posts: 228
Joined: Thu Jan 05, 2017 11:46 am
Location: Italy
Contact:

Re: Issues with XAMPP: Could not open ROS Translation Tool p

Post by Fraizeraust » Tue Feb 27, 2018 9:17 pm

ThFabba wrote:A quick search suggests that the default for xampp may be to run as 'nobody', and that that can be changed in /opt/lampp/etc/httpd.conf -- https://askubuntu.com/questions/64095/c ... nother-one
Holy Jesus, that worked for me. Thank you very much Thomas Faber! :mrgreen:

Changing both the usergroup and username to mine quickly solved the problem. I'll shall close the issue ticket on GitHub informing Saibamen the problem has been fixed.

vazonov44
Posts: 1
Joined: Thu Apr 26, 2018 9:07 am
Location: Санкт-Петербург
Contact:

Re: Issues with XAMPP: Could not open ROS Translation Tool p

Post by vazonov44 » Thu Apr 26, 2018 2:59 pm

A good way to solve the problem.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest