Jump to content

[SOLVED] phpVMS 7 on localhost (XAMPP)


CarlosEduardo2409

Recommended Posts

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

  1. Go to your XAMPP control panel;
  2. And in "Config" button of Apache, select the file httpd.conf;
  3. Search for this line: DocumentRoot "C:/xampp/htdocs/" and change to DocumentRoot "C:/xampp/htdocs/phpvms"
  4. Close XAMPP completely and open it again.

Solution 2 (Without moving files from the public folder): by @Nabeel

  1. Move phpvms files to your htdocs folder as normal, but WITHOUT moving files from the public folder to the phpVMS folder;
  2. Go to your XAMPP control panel;
  3. And in "Config" button of Apache, select the file httpd.conf;
  4. Search for this line: DocumentRoot "C:/xampp/htdocs/" and change to DocumentRoot "C:/xampp/htdocs/phpvms/public"
  5. 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 by CarlosEduardo2409
  • Like 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • Administrators

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

Link to comment
Share on other sites

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:

  1. I uploaded the phpVMS files normally to htdocs (Without transferring files from public to root).
  2. I changed the DocumentRoot in httpd.conf to DocumentRoot "C:/xampp/htdocs/phpvms/public"
  3. 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!

 

Link to comment
Share on other sites

  • Administrators

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

@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 by CarlosEduardo2409
Link to comment
Share on other sites

  • Administrators

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

Link to comment
Share on other sites

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!!

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...