Hi everyone, need some help
I am working on Yii 2 advanced app that I cloned from GitHub
Problem is that is not autogenerating assets. I have browser console full of missing assets errors and directory backend/web/assets is empty.
I try almost everything that is AI (ChatGPT, Bard) proposing. I am using windows 11 operating system.
Did anyone had similar problem or know the solution to this? Thanks in advance.
Hi. I bet for permissions. Test it and prove it for yourself. Write simple few lines php script which will try to make directory in your “web” directory then make any files in it.
<?php
$webDirectory = '/var/www/html'; // Change this to the path of your web directory
$testDirectoryName = 'test_directory';
$testFilePath = $webDirectory . '/' . $testDirectoryName . '/test_file.txt';
if (is_writable($webDirectory)) {
// Create a test directory
if (!file_exists($webDirectory . '/' . $testDirectoryName)) {
if (mkdir($webDirectory . '/' . $testDirectoryName)) {
echo "Directory '$testDirectoryName' created successfully.<br>";
// Create a test file within the directory
if (file_put_contents($testFilePath, 'This is a test file content.')) {
echo "Test file '$testFilePath' created successfully.<br>";
// Check if the test file is writable
if (is_writable($testFilePath)) {
echo "The test file is writable by the server process.<br>";
} else {
echo "The test file is not writable by the server process.<br>";
}
} else {
echo "Failed to create the test file.<br>";
}
} else {
echo "Failed to create the test directory.<br>";
}
} else {
echo "Directory '$testDirectoryName' already exists.<br>";
}
} else {
echo "Apache's web directory is not writable by the server process.<br>";
}
?>
When I delete assets folder and reload I get error of missing folder, so the framework is not creating one. As for capital letters in path, Web-Backend is folder I get from cloning app from github, do you mean something else?