Skip to main content

Resource errors

getResourceErrors() returns one entry per skipped image, stylesheet or font, as ['url' => …, 'reason' => …, 'detail' => …]. reason is one of the stable codes below; detail is human-readable text such as HTTP 404. See Missing images and fonts for how to use it.

ReasonMeaning
network-disabledAn http: or https: URL in a document without allowedHosts.
unsupported-schemeAny other non-file: URL.
no-base-urlA local file without a baseUrl or documentRoot.
invalid-urlA malformed URL, such as a file: URL with an encoded NUL byte.
missingThe file does not exist.
open-basedirPHP's open_basedir blocks the file.
outside-baseThe file is outside the documentRoot, or outside the baseUrl folder when there is no document root.
verification-failedA folder or the file changed between the checks and the read.
not-regular-fileA folder, FIFO, socket or device.
emptyA zero-byte file or response.
too-largeThe file or response is larger than plutobook.max_asset_size, or would take the document past plutobook.max_total_asset_size.
permission-deniedPHP can't read the file.
read-errorReading the file, or handing it to PlutoBook, failed.
host-not-allowedThe host, or a redirect's host, isn't in allowedHosts.
blocked-addressThe host resolved to an internal address.
http-errorThe final response status isn't 2xx.
redirect-errorToo many redirects, or a redirect from https to http or to another scheme.
tls-errorThe TLS handshake or certificate check failed.
timeoutThe download took longer than plutobook.http_timeout, the document used up plutobook.http_document_timeout, or PHP's time limit passed.
network-errorDNS, connection and other transfer failures, or a libcurl older than 7.68.0.

The settings named here are described in Configuration.