CarlosEduardo2409 Posted May 17, 2020 Report Posted May 17, 2020 (edited) Is there a way to install phpVMS 7 on localhost (XAMPP)? Or is it not possible? I'm trying to install it several times, but it never works. The page that says "phpVMS not installed" (https://prnt.sc/siiqrn) loads normally, however when I press the "Head on to the installer>" button, it redirects me to the XAMPP dashboard (localhost/dashboard - https://prnt.sc/siiqz3) and not to the installation page. In the structure files looks like this (https://prnt.sc/siiq6o😞 htdocs/ ├── phpvms And in the phpVMS index.php it looks like this (https://prnt.sc/sije6o😞 $path_to_phpvms_folder = __DIR__.'/../phpvms'; phpVMS version: 7.0.0-beta.4 php version: 7.4.5 EDITED For users who are experiencing this problem when installing phpVMS on XAMPP, do the following: Solution 1: by @Laurent Go to your XAMPP control panel; And in "Config" button of Apache, select the file httpd.conf; Search for this line: DocumentRoot "C:/xampp/htdocs/" and change to DocumentRoot "C:/xampp/htdocs/phpvms" Close XAMPP completely and open it again. Solution 2 (Without moving files from the public folder): by @Nabeel Move phpvms files to your htdocs folder as normal, but WITHOUT moving files from the public folder to the phpVMS folder; Go to your XAMPP control panel; And in "Config" button of Apache, select the file httpd.conf; Search for this line: DocumentRoot "C:/xampp/htdocs/" and change to DocumentRoot "C:/xampp/htdocs/phpvms/public" Close XAMPP completely and open it again. NOTE: In both solutions, the link to phpvms will be "http://localhost", this means that other projects that are in the htdocs folder will NOT work. If you want to go back to normal (other projects working), you will have to go to httpd.conf again, and change the DocumentRoot to the default (DocumentRoot "C:/xampp/htdocs/"). Solution by @Laurent and @Nabeel (Thank you so much again!) Edited May 18, 2020 by CarlosEduardo2409 1 Quote
Administrators Nabeel Posted May 18, 2020 Administrators Report Posted May 18, 2020 This sounds good. I actually would change the DocumentRoot to the public folder, so in your case, DocumentRoot "C:/xampp/htdocs/phpvms/public". URLs will work without having the public in the path Quote
CarlosEduardo2409 Posted May 18, 2020 Author Report Posted May 18, 2020 15 minutes ago, Nabeel said: This sounds good. I actually would change the DocumentRoot to the public folder, so in your case, DocumentRoot "C:/xampp/htdocs/phpvms/public". URLs will work without having the public in the path Okay, I put DocumentRoot in the "public" folder (DocumentRoot "C:/xampp/htdocs/phpvms/public"). However, should I transfer the files from "public" to the "phpvms" folder? And how should I leave it in phpvms/index.php and phpvms/public/index.php? Excuse me for the question, I'm really still trying to understand the whole new phpVMS system haha And thanks for the answer. Quote
Administrators Nabeel Posted May 18, 2020 Administrators Report Posted May 18, 2020 Don't transfer the files, everything needed is already in the public folder. The htaccess in the root actually tries to redirect to public. In short - using the public folder hides all of the files like storage/resources, etc, so they're not exposed to the outside. It's a security thing. Here's a good explanation of the public folder: https://devdojo.com/articles/explaining-the-laravel-public-folder Quote
CarlosEduardo2409 Posted May 18, 2020 Author Report Posted May 18, 2020 16 minutes ago, Nabeel said: Don't transfer the files, everything needed is already in the public folder. The htaccess in the root actually tries to redirect to public. In short - using the public folder hides all of the files like storage/resources, etc, so they're not exposed to the outside. It's a security thing. Here's a good explanation of the public folder: https://devdojo.com/articles/explaining-the-laravel-public-folder Okay, so I: I uploaded the phpVMS files normally to htdocs (Without transferring files from public to root). I changed the DocumentRoot in httpd.conf to DocumentRoot "C:/xampp/htdocs/phpvms/public" I entered the link normally and working perfectly. Unfortunately, the link phpVMS will be in will be: "https://localhost", so other projects will not work unless you change DocumentRoot to default (DocumentRoot "C:/xampp/htdocs/"). But these are things we have to sacrifice to get what we want... I don't know if that was your last message Nabeel, but already thanking you for the great work you are having and always had with phpVMS, it is not flattering and nothing, I am just saying this because we have to really thank you for this incredible project, because we have this opportunity, for being a free project, for the work you had and much more. Not only this project, but all other projects as well. This is not the opportunity we have every day. So, thank you again! Quote
Administrators Nabeel Posted May 18, 2020 Administrators Report Posted May 18, 2020 Yes, I just mean if you're changing the DocumentRoot to phpvms, it should point to the public folder. Same thing for the webserver/vhost if you're running your own. Can I use your instructions on docs.phpvms.net? I'll add a section for xampp and link to this thread. Running Laravel in a subfolder is also usually problematic, so I don't recommend it. And thanks! I enjoy it and it's a fun project. Thanks for helping test and documenting/playing with some of this stuff.. There's a lot of edge cases I can't cover myself. Quote
CarlosEduardo2409 Posted May 18, 2020 Author Report Posted May 18, 2020 46 minutes ago, Nabeel said: Yes, I just mean if you're changing the DocumentRoot to phpvms, it should point to the public folder. Same thing for the webserver/vhost if you're running your own. Can I use your instructions on docs.phpvms.net? I'll add a section for xampp and link to this thread. Running Laravel in a subfolder is also usually problematic, so I don't recommend it. And thanks! I enjoy it and it's a fun project. Thanks for helping test and documenting/playing with some of this stuff.. There's a lot of edge cases I can't cover myself. No problem at all! You can put it in the docs without any problems! Thanks again, it is a really incredible project, especially for virtual aviation. Quote
CarlosEduardo2409 Posted May 18, 2020 Author Report Posted May 18, 2020 (edited) @Nabeel, can you also take another doubt? In phpVMS 5.5, for example, we have the "core/modules/PIREPS/PIREPS.php", which says in a "wrong" way, it is possible to see the subpages, the functions it has, among others. Where would I find something like this in phpVMS 7? For example, "flights"? I saw that you get some simbrief files in "flights" folder at default skin (resources/views/layouts/default/flights/simbrief_briefing.blade.php), but I don't know which domain Its located (like "http://localhost/flights/simbrief"), I was trying to find it just like in the phpVMS 5.5 looking at the modules folder. I looked at the entire doc, but I didn't find it. I found a related one ("http/controllers/web.php"), but from what I understand it is only for "own" modules. Edited May 18, 2020 by CarlosEduardo2409 Quote
Administrators Nabeel Posted May 18, 2020 Administrators Report Posted May 18, 2020 Everything follows the Laravel way of doing things, so it uses routes and controllers. https://laravel.com/docs/7.x/controllers Routes all all defined in what are called Service Providers. The RoutesServiceProvider is here: https://github.com/nabeelio/phpvms/blob/dev/app/Providers/RouteServiceProvider.php Controllers are all located in this folder: https://github.com/nabeelio/phpvms/tree/dev/app/Http/Controllers You can lookup the route and see exactly which controller and method it maps to. I believe in that case, it maps to For SimBrief, the definitions are here: https://github.com/nabeelio/phpvms/blob/dev/app/Providers/RouteServiceProvider.php#L78 Which are all map to these methods: https://github.com/nabeelio/phpvms/blob/dev/app/Http/Controllers/Frontend/SimBriefController.php Quote
CarlosEduardo2409 Posted May 18, 2020 Author Report Posted May 18, 2020 22 minutes ago, Nabeel said: Everything follows the Laravel way of doing things, so it uses routes and controllers. https://laravel.com/docs/7.x/controllers Routes all all defined in what are called Service Providers. The RoutesServiceProvider is here: https://github.com/nabeelio/phpvms/blob/dev/app/Providers/RouteServiceProvider.php Controllers are all located in this folder: https://github.com/nabeelio/phpvms/tree/dev/app/Http/Controllers You can lookup the route and see exactly which controller and method it maps to. I believe in that case, it maps to For SimBrief, the definitions are here: https://github.com/nabeelio/phpvms/blob/dev/app/Providers/RouteServiceProvider.php#L78 Which are all map to these methods: https://github.com/nabeelio/phpvms/blob/dev/app/Http/Controllers/Frontend/SimBriefController.php God! You are the man! One more time, thank you so much!! 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.