satopian / poti-kaini-EN

POTI-board EVO English ver, The OekakiBBS for PaintBBS NEO, tegaki.js, ChickenPaint, and Klecks. (PHP7.4-PHP8.3) https://paintbbs.sakura.ne.jp/poti/
https://paintbbs.sakura.ne.jp/
Other
28 stars 9 forks source link

Compile error when installing #7

Closed Yumespace closed 1 year ago

Yumespace commented 1 year ago

Hello !

I am trying to install the latest version, but I get this error:

BladeOne Error [Compiling]: Unable to save the file [/home/public/templates/mono_en/cache/db77a7254e70c7f3c660af8d75acc84b32dce07b.bladec]. Check the compile folder is defined and has the right permission

Warning: include(/home/public/templates/mono_en/cache/db77a7254e70c7f3c660af8d75acc84b32dce07b.bladec): failed to open stream: No such file or directory in /home/public/BladeOne/lib/BladeOne.php on line 1463

Warning: include(): Failed opening '/home/public/templates/mono_en/cache/db77a7254e70c7f3c660af8d75acc84b32dce07b.bladec' for inclusion (include_path='.:/usr/local/php/7.4.33-nfsn1/lib/:/usr/local/php/lib/') in /home/public/BladeOne/lib/BladeOne.php on line 1463

May I ask what I can do to solve it ?

satopian commented 1 year ago

@Yumespace templates/mono_en/cache/ Create a cache/ directory, Try setting permissions to 707. Maybe in templates/mono_en/cache/, The cache directory could not be created.

Yumespace commented 1 year ago

@satopian

I created the directory and now the site loads. Thank you so much ! However, a new issue popped up sadly. When I open the site, it says:

ERROR Unable to write to current directory.

Do I need to change the permission of another file ?

satopian commented 1 year ago

@Yumespace If it's a day later, I think I'll have time to write a reply. I don't understand why the cache directory is not created. This was because the ability to create a cache directory was removed from BladeOne, so he had to add the ability to his POTI board instead. current POTI board has the ability to create a cache directory. If it wasn't automatically generated in your environment, you may have installed a version that hasn't been released yet. Not yet released, but the latest version is v5.50.1. You can download the zip from the green button. Want to try v5.50.1? If you overwrite it, it will be the latest version. Make sure the cache directory you created has 707 permissions. Do not set 707 permissions on the potiboard5/ directory. It's 705. I'm writing this based on speculation, so please correct me if I'm wrong. Also, if possible, please attach a screenshot of the screen where the error appears. This speeds up resolution.

Yumespace commented 1 year ago

@Satopian

Yes, no problem ! I will await your reply. I followed your suggestion, installed v.5.50.1. and manually created the cache directory with 707 permission again, but it is still giving the same error message. I attached a screenshot of it for clarity.

Screenshot 2022-12-15 at 15 51 31

satopian commented 1 year ago

@Yumespace image Thanks for the details. The permissions of the directory containing potiboard.php may be write protected. Owner must be allowed to write. This example sets the permissions of the potiboard5 directory to 705. The rental server I use works fine on a 705. "Cannot write to current directory." This error prevented the BladeOne cache directory from being created. "BladeOne Error [Compiling]:" This error is caused by trying to display an error message using BladeOne even though the BladeOne cache directory could not be created. This is a bug and will be fixed.

I would like to know the current permissions of the directory containing potiboard.php so that I can identify the cause and fix the problem. For example, values such as 505, 705, 777. It works maybe with 705.

Yumespace commented 1 year ago

@satopian

Thank you for your reply ! The strange thing is that when I keep everything in the potiboard5 directory, I just get a 403 forbidden message when I try to load the site. I tried all the possible permissions (505, 705, 777, 775 etc.) too. I got my previous error only by discarding the potiboard5 directory and dropping the files directly to home/public. I wonder what the issue is in this case.

satopian commented 1 year ago

@Yumespace POTI-board structurally creates index.html later. index.php is used to smooth the installation before creation, but is quickly deleted. If there is no index in the potiboard5/ directory It becomes "403 Forbidden". If you go to potiboard5/potiboard.php it may display fine.

satopian commented 1 year ago

@Yumespace

I got my previous error only by discarding the potiboard5 directory and dropping the files directly to home/public. I wonder what the issue is in this case.

PHP's realpath() function may not be working as intended.

if possible, https://github.com/satopian/Petit_Note I would like to know if this is installed and works.

Is it possible to download v0.50.12 from the green code button and try it?

If I can find that to work, I might be able to fix the POTI-board code as well.

satopian commented 1 year ago

@Yumespace

I got my previous error only by discarding the potiboard5 directory and dropping the files directly to home

I could be wrong with this guess, but it could be that PHP's realpath() function isn't working properly. I made a version that doesn't use the realpath() function to avoid that problem. The latest version is v5.50.3.

discarding the potiboard5 directory and dropping the files directly to home

Can you please try this method again?

Yumespace commented 1 year ago

@satopian

if possible, https://github.com/satopian/Petit_Note I would like to know if this is installed and works.

Is it possible to download v0.50.12 from the green code button and try it?

I got it to sort of work by doing the following:

Screenshot 2022-12-16 at 05 08 11

Yumespace commented 1 year ago

@Yumespace

I got my previous error only by discarding the potiboard5 directory and dropping the files directly to home

I could be wrong with this guess, but it could be that PHP's realpath() function isn't working properly. I made a version that doesn't use the realpath() function to avoid that problem. The latest version is v5.50.3.

discarding the potiboard5 directory and dropping the files directly to home

Can you please try this method again?

@satopian

I also tried this like you suggested, but it still gives me the 'unable to write to directory' message only now just in one plain text sentence with no extra links/layout etc.

satopian commented 1 year ago

@Yumespace This is just a guess, but it seems to me that the css file is not being read for some reason. This is my guess, but I hypothesized that css cannot be read due to 403 prohibition. First of all, I think that it will not be solved unless the following can be done.

  1. Create a directory named test/.
  2. Upload example.jpg or example.png to a directory named test/.
  3. Navigate to http://(installed server)/test/example.jpg. Since example.jpg is "for example", the actual file name can be "abc.jpg" or whatever.
  4. Is the resulting image displayed or not? If you can't see the image here, then creating the directory on the server probably won't load anything. (e.g. 403 Forbidden) If the image is not displayed, I'm not familiar with server settings, but It may be prohibited by .htaccess file settings. Or it may be forbidden by server-specific settings. If 1, 2, 3, and 4 are not successful, the bulletin board is probably impossible to set up. Could you please check until the image is displayed in 4? If the images in the directory created here cannot be called, it will be difficult to resolve from there.

In that case, you need to change the settings of the installed web server, or if you are using a rental server, try another rental server.

message only now just in one plain text sentence with no extra links/layout etc.

This is normal. I changed it to display an error message before starting BladeOne and showing the layout. Therefore the layout is not displayed.

Yumespace commented 1 year ago

@satopian

I can't seem to navigate to the image, unfortunately. Is it impossible to to find a solution to the css file in this case ?

satopian commented 1 year ago

@Yumespace

Is it impossible to to find a solution to the css file in this case ?

It's not just a CSS problem.

image

You probably won't be able to call images from the src/ directory where the images are stored, or even the tmp/ directory. Also, you can't load JavaScript and use drawing features.
Most websites can't be built if they can't display images stored in a Directory.
If you can get support for that server, you should get help solving the problem of not being able to call and display images from the directory.
If you can't do that, I think you have no choice but to use another server.
It is also necessary to suspect the possibility that the permissions of home/public Directory are strange. Usually 755.

Yumespace commented 1 year ago

@satopian

I tried using the drawing functions and they are working. If you draw something and send it, it displays it in an entry. It is also saved to the temp directory.

satopian commented 1 year ago

@Yumespace So, is it okay that only the template css is unresolved? Could you tell me the URL of the bulletin board you are currently running? If you don't want to write it here and publish it,

Yumespace commented 1 year ago

The URL is (Thanks for letting me know Edited by @satopian) ! Please let me know what you think. Thank you again.

satopian commented 1 year ago

@Yumespace /app/ /lib/ These two directories are working. but, /template/ Directory is CGI error number 500. If my guess is correct, Incorrect permissions on the template directory.

/app/
/lib/
/template/

Can you tell me the permissions for each? If the yume.space/app directory permissions are 705, Set /template/ directory to 705 in the same way.

satopian commented 1 year ago

@Yumespace The .htaccess file in the template directory may be malfunctioning. I specified .htaccess as the file type to HTML files, but it seems that non-HTML files are also prohibited. Deleting the .htaccess files in the template directory may work. image I investigated further. This image is from Windows Explorer, but connect to the hosting server with ftp etc., open the template directory on the server, and delete the .htaccess file there. It's all speculation, but I hope it works.

satopian commented 1 year ago

@Yumespace Since then I have investigated further. The first potiboard5/ directory got 403 forbidden. And even Petit Note didn't load the css file. The presumed cause is I think it's because the .htaccess file that controls call banning unintentionally bans all contents of the directory. I think that this .htaccess did not work as intended on the rental server you rented and affected the entire operation. Removing these .htaccess files from your server may help. the problem now is be a template/directory It's a file called template/.htaccess. First let me know what happens if I remove this template/.htaccess file. It will most likely solve your css not loading issue. I should have noticed this problem sooner. Also ChickenPaint and klecks seem to be unable to get the hostname and throw an error. After waiting for the css not loading issue to be resolved, I will push an update file to GitHub to resolve the issue.

Yumespace commented 1 year ago

@satopian Oh my god, I think you solved it ! I deleted the .htaccess file and now the css file is being properly read. I'm so happy. Thank you so much for all the troubleshooting !!

satopian commented 1 year ago

@Yumespace As far as I have tried, the rental server you are using could not: The drawing tool uses "ChickenPaint" or "klecks". Send and post. A pop-up alert will open informing you that the submission failed. This is because the hostname retrieval process failed. I just fixed it so that it doesn't fail to get the hostname. Please use the latest fixed version.

For POTI-boards:

Download from https://github.com/satopian/poti-kaini-EN

potiboard5/.htaccess potiboard5/templates/.htaccess These two .htaccess should be removed. Updating will overwrite everything else. But make sure to change the admin password in config.php.

For petit notes:

Download from https://github.com/satopian/Petit_Note petitnote/.htaccess petitnote/template/.htaccess These two .htaccess should be removed. Updating will overwrite everything else. But make sure to change the admin password in config.php.

Make sure you can draw with ChickenPaint and klecks and post fine.

Please post if the problem persists. If it is resolved, you can close the issue with the close button.

Yumespace commented 1 year ago

@satopian Hi, I tried installing the new Petit Note version and I also deleted both .htaccess files, but I'm getting a 403 forbidden again.

Yumespace commented 1 year ago

@satopian Oh wait, I fixed it with the old method ! I deleted the petitnote directory and had to manually make the src, temo, log and thumbnail directories with the correct permissions again. But now ChickenPaint and klecks are also working ! :)

satopian commented 1 year ago

@Yumespace satopian/Petit_Note_EN: PHP script for PaintBBS,ChickenPaint, and Klecks https://paintbbs.sakura.ne.jp/ I created Petit Note English version.

The config.php description has been translated to English. Fixed bugs in index.php and function.php. This avoids errors trying to get the hostname when an IP address could not be obtained. I noticed that the rental server you were using had a E-Warning level error, so I fixed it.

Download

satopian/Petit_Note_EN: PHP script for PaintBBS,ChickenPaint, and Klecks https://paintbbs.sakura.ne.jp/

Download the new version from here. Take out English translation version of config.php. Take out index.php and function.php. Change admin password in config.php. Overwrite and update config.php index.php and function.php a total of 3 files.

does this work for you?

Yumespace commented 1 year ago

@satopian Yes, it works !! Thank you so much for all the help ! :)

satopian commented 1 year ago

@Yumespace Thank you very much. Since it seems to have been resolved, this issue is closed. If you need it again, please open another issue.