Closed abr4xas closed 8 years ago
Do you have a file called 404.md
in your content/
directory @abr4xas?
@theshka yes sir
I do not receive this error unless I delete my 404.md
from the content-sample
directory, so I'm not sure why if you have the file there that it would be throwing the exception.
Can you double-check these things:
base_url
set in config/config.php
, or is what you posted the only portion of your config you have customized?content/
directory? (i.e. 755
)404.md
file?base_url
is tma.local/pico
404.md
---
Title: Error 404
Robots: noindex,nofollow
---
Pico isn't able to find the content dir you specified. Is your config.php
located in Picos root dir or in config/config.php
?
@PhrozenByte in config/
Can you please give me the output of the page when adding
var_dump($this->config, file_exists($this->getConfig('content_dir') . '404.md')); die();
to a new line before line 354 of lib/Pico.php
? Please don't forget to remove the line afterwards.
Output:
Warning: file_get_contents(/var/www/pico/content/404.md): failed to open stream: No such file or directory in /var/www/pico/lib/Pico.php on line 649
Warning: scandir(/var/www/pico/content): failed to open dir: No such file or directory in /var/www/pico/lib/Pico.php on line 1213
Warning: scandir(): (errno 2): No such file or directory in /var/www/pico/lib/Pico.php on line 1213
Sorry:
array(11) { ["site_title"]=> string(4) "Pico" ["base_url"]=> string(22) "http://tma.local/pico/" ["rewrite_url"]=> NULL ["theme"]=> string(7) "default" ["twig_config"]=> array(3) { ["cache"]=> bool(false) ["autoescape"]=> bool(false) ["debug"]=> bool(false) } ["date_format"]=> string(5) "%D %T" ["pages_order_by"]=> string(5) "alpha" ["pages_order"]=> string(3) "asc" ["content_dir"]=> string(22) "/var/www/pico/content/" ["content_ext"]=> string(3) ".md" ["timezone"]=> string(3) "UTC" } bool(false)
The content directory /var/www/pico/content/
doesn't exist. Please check your installation directory.
The content directory exist
https://github.com/picocms/Pico/issues/279#issuecomment-157915148
PHP unmistakable states that the directory /var/www/pico/content/
either doesn't exist (scandir(/var/www/pico/content): failed to open dir: No such file or directory
- i.e. your screenshot doesn't show /var/www/pico
) or isn't visible to the PHP process.
This is a misconfiguration of your webserver. Please check your webserver configuration (this issue is completely independent of Pico) and make sure that the directory is accessible by your webserver/PHP process. Unfortunately the configuration of webservers is out of our scope. Sorry :disappointed:
thanks, folder permissions were changed.
@theshka @PhrozenByte A goot point here, we maybe should dispatch a message when the permissions are wrong but the directory exists.
Want a PR on this ?
The problem weren't wrong permissions of the content dir, but of Pico's root dir - otherwise the message would have been Permission denied
, not No such file or diectory
.
My bad. You're right.
Hi there,
I'm testing pico Version 1.0.0-beta.1 and:
My config.php