How to Generate to WSL2?

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
ethanlazarus
User
Posts: 63

How to Generate to WSL2?

Post by ethanlazarus »

Hi All:

I am migrating my project fromXAMPP to WSL2 / VS Code. I got it all working finally, although failed with docker - couldn't figure out mod rewrite. Anyway, I want to generate my phpmaker files directly to the WSL directory, but am getting an error: failed to create folder /uploads/

I chmod 777 -R uploads, but can't seem to get past this error. Anybody have success generating files directly into their ubuntu wsl directory?

Thanks!


arbei
User
Posts: 9384

Post by arbei »

This is about file sharing between different OS, you may google for more info. For example, I found What’s new for WSL in Windows 10 version 1903?, you may want to try and see if setting the project folder to \\wsl$\{distro name}\ (where {distro name} is the name of a running distro) works.


ethanlazarus
User
Posts: 63

Post by ethanlazarus »

Thanks!

Maybe this will help somebody else:

I was able to get it to work as follows:

1) I mapped the parent folder holding the generated files to X drive - map network drive, \\wsl$\var\www\parent_folder
2) I adjusted permissions - chmod 777 to parent folder recursive, then in wsl, issued bash command whoami - I am ethan. Then changed ownership of directory recursively to ethan:ethan.]
3) In phpmaker project, generated files to X:\var\www\parent_folder

Working great now!


Post Reply