I'm getting a lot of permissions related errors - using a WSL2 laravel project. The problem is specifically related to pdo_mysql
P粉322106755
P粉322106755 2023-08-17 14:14:36
0
1
609
<p>Some backstory -</p> <p>I have a work laptop and my projects run perfectly fine on it. I had quit my job and started to expand my business, which had now grown to a size where I could no longer hold a full-time job at the same time. So I obviously have to return my work laptop, which is a Macbook. My home computer is a Windows desktop computer. </p> <p>I have set up my development environment with WSL2 Ubuntu 22.04 and currently everything is running fine except that no images or CSS are displayed when loading the project. I've narrowed the problem down to pdo_mysql not seeming to work (although I'm technically front-end, the back-end is still confusing to me, so I could be wrong). </p> <p>I have tried reinstalling pdo_mysql and tried changing the permissions on the files. </p> <p>Also - I initially used a symlink between my local Windows and Linux servers to create my new work environment, but this caused huge delays and made it nearly unusable (I never fully finished setting it up, almost reached the same position as now). So I removed the link by deleting the link file on the Linux server, then deleting the GitHub project directly on the Linux server and re-cloning it. I don't know if this is important information. </p> <p>Although I have tried setting permissions for my Linux user for the entire project, I still get a lot of permission errors. </p> <p>When I run <code>php -i | grep extension_dir</code>, I get the following error: </p> <pre class="brush:php;toolbar:false;">fantasyroad@Louie:~$ php -i | grep extension_dir PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: /usr/lib/php/20210902/pdo_mysql (/usr/lib/php/20210902/pdo_mysql: cannot open shared object file: No such file or directory ), /usr/lib/php/20210902/pdo_mysql.so (/usr/lib/php/20210902/pdo_mysql.so: undefined symbol: pdo_parse_params)) in Unknown on line 0 extension_dir => /usr/lib/php/20210902 => /usr/lib/php/20210902</pre> <p>Edit: Just to be clear - the pdo_mysql file is located in /usr/lib/php/20210902/</p>
P粉322106755
P粉322106755

reply all(1)
P粉821231319

I solved this problem by uninstalling all php related stuff and reinstalling them manually one by one.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template