Class 'HTMLPurifier_Config' not found

I am new to phpmaker, I built a project on my local machine and copied it up to the server. The lookup values do not work on the server. The PHP logs showed: PHP Fatal error: Uncaught Error: Class ‘HTMLPurifier_Config’ not found.I searched this forum and found a few topics on it and followed the solutions but have yet to be able to resolve it. This is what I have done.

  • Installed composer on the webserver before phpmaker.
  • Installed phpmaker on the webserver.
  • Generated ALL files with the composer update box checked.
  • No errors during file generation.
  • composer -V shows: Composer version 1.8.6 2019-06-11 15:03:05
  • the Vendor subfolder is there and the class HTMLPurifier_Config is in C:\inetpub\vhosts\domainname.com\httpdocs\admin\vendor\ezyang\htmlpurifier\library\HTMLPurifier\Config.php.
  • the application root folder is: C:\inetpub\vhosts\domainname.com\httpdocs\ (did try changing this to C:\inetpub\vhosts\domainname.com\httpdocs\admin)
  • the destination folder is: C:\inetpub\vhosts\domainname.com\httpdocs\admin\
  • at a command prompt I changed to the project’s destination folder C:\inetpub\vhosts\domainname.com\httpdocs\admin\ and manually ran: composer update.This is where it gets odd.

If I select Browse After Generation, the lookups work fine using localhost. However, they still do not work and throw the above error when hitting the actual domain name (not using local host).When selecting Browse After Generation the path that is displayed in the php.exe window is correct and files are generated there:
Listening on localhost:50000
Document root is C:\inetpub\vhosts\domainname.com\httpdocsWorks: localhost:50000/admin/
Fails: domain.com/adminAny and all help is greatly appreciated.Thank you.

You may not have write permission to the C:\inetpub\vhosts\domainname.com\httpdocs\admin\ so that Composer cannot write the autuload files. You may try to grant permissions or you can use some other folder that you have write permissions (e.g. your own Documents folder) as destination folder.

Thanks for the advice.I double checked and that folder does have write permissions.The key here is when I say on the localhost and at the domain, both of those are on the web server.

I have a dedicated IIS server using Plesk so I have full access to it. Not shared hosting.The localhost works on the webserver, the domain does not.

Steps to repeat all ON the webserver (http is removed in the urls below):

  1. PHPMaker: Generate all files and select Composer Update and Browse After Generation.
  2. No errors display during generation.
  3. The CMD window:
    PHP 7.2.19 Development Server started at Thu Jun 13 07:12:53 2019
    Listening on localhost:50000
    Document root is C:\inetpub\vhosts\domainname.com\httpdocs
  4. The dropdowns work on localhost:50000/admin/earningsadd.php?showmaster=show_dates&fk_show_id=1838
  5. The dropdowns do not work on domainname.com/admin/earningsadd.php?showmaster=show_dates&fk_show_id=1838

I checked and the extensions below are all enabled.
extension_dir =“C:\Program Files (x86)\Plesk\Additional\PleskPHP72\ext” and I verified that is the correct location.
extension=curl
extension=openssl
extension=gd2
extension=mbstring

Thank you for any more advice in advance.

tbruch wrote:
extension_dir =“C:\Program Files (x86)\Plesk\Additional\PleskPHP72\ext” and I verified that is the correct location.So you use Windows server, but you have:
extension=curl
extension=openssl
extension=gd2
extension=mbstring

The extensions for Windows should be named like php_xxx.dll, for example, from https://www.php.net/manual/en/image.installation.php:
In Windows, you’ll include the GD2 DLL php_gd2.dll as an extension in php.ini.

Yep, looked into that, but in the In the 7.2 php.ini is this statement:; Note : The syntax used in previous PHP versions (‘extension=.so’ and
; 'extension=‘php_.dll’) is supported for legacy reasons and may be
; deprecated in a future PHP major version. So, when it is possible, please
; move to the new ('extension=) syntax.Based on that, ‘extension=php_curl.dll’ should be the same as ‘extension=curl’.

I’m having the same problem in a different area.

But, one thing you can do is make sure you’re using PHP 7.4 since all the composer pieces are looking
for it.