valet-linux-plus icon indicating copy to clipboard operation
valet-linux-plus copied to clipboard

Not Working properly on Arch Linux

Open Stephan-MC opened this issue 9 months ago • 18 comments

I have Arch Linux with php 8.3 installed

image

I installed valet properly without any errors. started the server without any errors.... i added my sites folder to be /srv/www as shown below

image

I changed my domain to 'localhost' (i prefer using .localhost over default '.test')

image

when ever i run project.localhost (the directory /srv/www/proect exists and contains a laravel 11 project) in my browser, i get this page

image

I checked the nginx error logs and got the following image

Stephan-MC avatar May 02 '24 12:05 Stephan-MC

After debugging for long period of time, i finally found the solution to my problem

it was related the to valet83.sock file. Ihad to regenerate a new one using

valet use

Stephan-MC avatar May 02 '24 13:05 Stephan-MC

@Stephan-MC I believe your issue is resolved by now, but you can always check Nginx log files to know more about this error.

Thank you!

uttamrabadiya avatar May 03 '24 07:05 uttamrabadiya

Sorry i still got back to that error after running valet install --mariadb

and now, the previous solution i used doesn't work anymore but i still get the same errors

Stephan-MC avatar May 05 '24 17:05 Stephan-MC

@Stephan-MC Could you please share output of nginx-error.log, this file must be located on ~/.valet/Log directory, also if you could attach output of nginx service status, you can check it by sudo systemctl status nginx

uttamrabadiya avatar May 06 '24 06:05 uttamrabadiya

image this is the content of my ~/.valet/Log/nginx.error.log

image here is the content of the nginx service status...

image i later fixed the errors from nginx (modifying ~/.valet/Nginx/mails.localhost) but couldn't still open any php site

Stephan-MC avatar May 06 '24 11:05 Stephan-MC

@Stephan-MC If I read it right, then your log says that php-fpm service is not available, could you please check if valet83.sock file exists in ~/.valet directory? If not then can you please run sudo systemctl restart php8.3-fpm command, if it still doesn't work then can you please share output of sudo systemctl status php8.3-fpm command

uttamrabadiya avatar May 06 '24 13:05 uttamrabadiya

my php83-fpm is working correctly. this is screenshot of sudo systemctl status php83-fpm

image

Stephan-MC avatar May 06 '24 14:05 Stephan-MC

Okay, can you please check if valet83.sock file exists in ~/.valet directory?

uttamrabadiya avatar May 06 '24 15:05 uttamrabadiya

Okay, can you please check if valet83.sock file exists in ~/.valet directory?

Yeah it's present image

Stephan-MC avatar May 06 '24 15:05 Stephan-MC

@Stephan-MC It's seems I am blind, I just re-checked your first screenshot and I notice that it you do not have posix extension installed in your system, can you please try installing it via sudo apt install php8.3-posix php8.3-common --reinstall, also could you please help me to understand what is your OS and version? I'd like to try on a fresh install

image

uttamrabadiya avatar May 06 '24 15:05 uttamrabadiya

sudo apt install php8.3-posix php8.3-common --reinstall will not help you, as you are on Arch Linux, but you may can find equivalent command.

uttamrabadiya avatar May 06 '24 15:05 uttamrabadiya

i have it installed.

image

or i may interprete things wrongly

Stephan-MC avatar May 06 '24 15:05 Stephan-MC

If it is already installed then error should be changed in nginx log file can you re-visit it and check once again?

uttamrabadiya avatar May 06 '24 16:05 uttamrabadiya

it was already installed before i got the errors i mentioned above

Stephan-MC avatar May 06 '24 16:05 Stephan-MC

Not sure if this will help but can you check if posix_getpwuid function is disabled in your system? Maybe you can do it by following: php -r 'echo ini_get("disable_functions");'

uttamrabadiya avatar May 06 '24 16:05 uttamrabadiya

shows nothing...

Stephan-MC avatar May 06 '24 17:05 Stephan-MC

@Stephan-MC It seems some edge case, but maybe we can check it on screen, please email me on [email protected], we may can have a small call to solve this issue.

uttamrabadiya avatar May 06 '24 18:05 uttamrabadiya

@Stephan-MC It seems some edge case, but maybe we can check it on screen, please email me on [email protected], we may can have a small call to solve this issue.

Check your mail. i Just emailed you...

Stephan-MC avatar May 06 '24 18:05 Stephan-MC