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):
PHPMaker: Generate all files and select Composer Update and Browse After Generation.
No errors display during generation.
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
The dropdowns work on localhost:50000/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
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
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’.