|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-12-18 14:02 UTC] danack@php.net
-Status: Open
+Status: Duplicate
[2015-12-18 14:02 UTC] danack@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 18:00:02 2025 UTC |
Description: ------------ Affecting PHP 5.4, 5.5, 5.6 and 7.0 Functions: constructor (i.e new Imagick ()) readImage readImages writeImage writeImages All perform relative to the Apache Server Root directory and not to the current working directory. Test script: --------------- $files = glob ("*.{jpg,JPG}", GLOB_BRACE); $im = new Imagick ($files[0]); // or $im = new Imagick (); $im->readImage ($files[0]); will both fail if the image reported from the file system is not present in the Apache Server Root directory. Likewise $im->writeImage ("something.jpg"); Writes to the Apache Server Root directory and not to the current working directory. Expected result: ---------------- This behaviour is inconsistent with most other PHP functions which read from and write to files relative to the current working directory. Absolute path has to be set each time to avoid fatal errors.