[pmwiki-users] Path info and GD Graphics Library not found

Petko Yotov 5ko at 5ko.fr
Sat Jan 7 11:59:59 PST 2023


Can you upload files via PmWiki's ?action=upload?

In a wiki page, can you link to an attached file or picture with 
Attach:file.ext and download it with your browser?

Do you see "Mini: PHP-GD image library not found. Exiting."?

Mini aborts when the PHP-GD function imagecreate() is missing, and shows 
the above message. If you don't see this message, what do you see? It 
may be a filesystem permissions issue, or a missing uploads directory.

If PmWiki displays fine with /web/Main/HomePage, there should be a PHP 
interpreter, but it might be a different version than the other one, 
with different extensions enabled.

Set in config.php $EnableDiag = 1; and see the output of 
/web/Main/HomePage?action=phpinfo, and search for

    '--enable-gd' (near the top)

and a section "GD" downwards which contains:

    GD Support: enabled

See also the difference from the phpinfo output with the other wiki that 
works.

If there are differences, try setting a different handler with the 
version appended, like:

   application/x-httpd-php72

Then try again ?action=phpinfo.

If there are differences in the 3 phpinfo outputs, show them to the 
hosting tech support. They may be able to help.

I haven't used LightSpeed, and I wouldn't know if the configuration is 
correct. If it supports URL rewriting in some way, like Apache, Nginx 
and IIS, you may be able to configure it this way.

Petko

On 07/01/2023 19:35, Hans wrote:
> after moving some wiki sites onto a new server (UK provider of shared
> hosting) I have run into this problem:
> I am using the Mini gallery for some photo galleries. Mini is using
> the PHP GD Graphics Library, and aborts if it cannot find it. After
> testing and some enquiries with the tech staff I am assured and
> confident that the GD library is indeed installed and available.
> 
> But it shows as available only on one wiki, where the Gallery page is
> called with URL  https://example.com/wiki/index.php/Gallery/Gallery
> I am using $EnablePathInfo = 1; and index.php simply includes
> pmwiki.php, which is located in a wiki farm direcory elsewhere. Note
> this works fine, Mini displays thumb images etc.
> 
> But in another wiki, built very similar, it does not work, GD library
> is not found. The only difference is the URL,
> https://example.com/web/Gallery/Gallery. Here "web" is a file in the
> site's root, and it includes pmwiki.php in similar way as the
> index.php in above example.
> In an .htaccess file I got it configured, that the file "web" is
> treated as a PHP file, with these lines:
> 
> #SetHandler
> <FilesMatch "^(web)$">
> SetHandler application/x-httpd-php
> </FilesMatch>
> 
> The wiki displays fine, works fine, but the GD library is not found,
> and Mini aborts.
> 
> I asked the tech staff from the hosting provider for help, but they
> just say that the GD library is included, and this is a coding problem
> they cannot or are not willing to address. I thought that I perhaps
> need to change something in the .htaccess file, but I have no idea.
> 
> It may be important to note that the server is not Apache, but
> LightSpeed (with a Plesk control panel), and I am told it behaves like
> Apache in the way it interpretes .htacess files.
> 
> Has anyone any ideas what I can do to configure the setup, so that a
> file without php extension can act fully as a php file, including
> calls to GD library?
> 



More information about the pmwiki-users mailing list