Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.10: Removal of support for multiple paths #17

Open
electronfriends opened this issue Jan 13, 2025 · 3 comments
Open

v0.10: Removal of support for multiple paths #17

electronfriends opened this issue Jan 13, 2025 · 3 comments
Labels
question Further information is requested

Comments

@electronfriends
Copy link
Owner

electronfriends commented Jan 13, 2025

A new major update for Wemp is planned, in which the code base will change a little again.

I am currently asking myself whether it makes sense to offer the option of multiple paths in Wemp. The installation path should of course be selectable, but it makes little sense to use multiple paths in Wemp, as the versions of PHP etc. are always the same anyway.

To change an existing installation then you have to close Wemp, rename the folder and Wemp will ask for the new path on startup. No more “Set Services Path” in the menu.

If anyone sees this, give it a thumbs up or down and let me know your feedback.

@electronfriends electronfriends added the question Further information is requested label Jan 13, 2025
@electronfriends electronfriends pinned this issue Jan 13, 2025
@electronfriends electronfriends changed the title v0.10.0: Removal of support for multiple paths v0.10: Removal of support for multiple paths Jan 17, 2025
@OfficialAudite
Copy link

Why would you need multiple paths? Manage it by giving a selection of which php version you select and get them from API. Then continue using the ngnix as it is. THO it would be nice if you included a start config for sites-available since most people work on several projects.

Image

Image

The main config adjusted to this:

# Nginx main configuration file
# For detailed guidance, see: https://nginx.org/en/docs/

worker_processes  1;

error_log  logs/error.log;

#error_log logs/error.log debug;

#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    include       C:/Wemp/nginx/sites-available/*.conf;
    default_type  application/octet-stream;

    # Enable directory listing
    autoindex on;

    # Enable efficient file transfers
    sendfile on;

    # Set connection keep-alive timeout
    keepalive_timeout  65;

    server_names_hash_bucket_size 64;

    # Default server block for unmatched requests
    server {
        listen       80 default_server;
        server_name  localhost;
        root         html;

        index  index.html index.htm index.php;

        # Custom error pages
        error_page  500 502 503 504  /50x.html;

        # PHP-FPM handling
        location ~ \.php$ {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include        fastcgi_params;
        }

        # PhpMyAdmin access
        location /phpmyadmin {
            alias C:/Wemp/phpmyadmin;

            location ~ \.php$ {
                include        fastcgi.conf;
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_param  SCRIPT_FILENAME $request_filename;
            }
        }
    }
}

@electronfriends
Copy link
Owner Author

@OfficialAudite Yes, I think hardly anyone (if at all) uses Wemp with more than one path. Regarding different PHP versions: I could imagine adding a list of supported versions for PHP, maybe with the corresponding port after it, e.g. PHP 8.3 (port: 9000), PHP 8.2 (port: 9001), etc. where you then select which ones you need.

Or you add the version you want yourself and Wemp only provides the latest one? We could display a dialog where you enter the version and Wemp downloads and starts it.

There would only be the problem with maintaining multiple php.ini files. And which of these should Wemp open?

I have all my sites in nginx.conf, so sites-available would be a good point to tidy things up.

@OfficialAudite
Copy link

You could make a version selector based on 7+ from here: https://windows.php.net/downloads/releases/archives/
Then create different php7.0, php7.4 folders where if you select other versions the current version will shutdown and new one will start and if the files are missing it would download them from the archives and unzip them into specific folder. That should be doable without need of running multiple php servers and all could live on the same port which would make it easy to swap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants