HttpErrorHandler not found

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
vuongduongquoc
User
Posts: 133

HttpErrorHandler not found

Post by vuongduongquoc »

Hi all,

after upgrade to 2021.0.14 i got this error.
Corrupted loose reference file: refs/head/master
then i delete folder: c:\users\Admin\Documents\phpmaker\git
and got this error.

Fatal error: Uncaught Error: Class 'PHPMaker2021\test\HttpErrorHandler' not found in D:\xampp\htdocs\test\index.php:80 Stack trace: #0 {main} thrown in D:\xampp\htdocs\test\index.php on line 80

Please help how to fix it.


mobhar
User
Posts: 11660

Post by mobhar »

Have you already enabled Composer update and re-generated ALL the script files?


vuongduongquoc
User
Posts: 133

Post by vuongduongquoc »

Yes i did.


arbei
User
Posts: 9292

Post by arbei »

  1. Delete the vendor folder and the composer.json in the project folder.
  2. Check composer -v and make sure you have v2.0.7 or newer (latest version is v2.0.14).
  3. Generate all scripts again, make sure composer update is completed successfully.

vuongduongquoc
User
Posts: 133

Post by vuongduongquoc »

Thanks. It works after composer update


ufone
User
Posts: 51

Post by ufone »

I have same problem.
how i can update compser


arbei
User
Posts: 9292

Post by arbei »

  1. Read and understand Composer first,
  2. Click Generate tab, enable Composer update, generate and upload all scripts again.

hyperxp
User
Posts: 6

Post by hyperxp »

I have this issue on 2022.6 version after accidentally hitting update template instead of menu editor. My project worked fine before that. I have reinstalled the app and also followed any relevant threads here to try and fix it with no luck.

I'm currently evaluating it with the intention of rebuilding all of my ASP maker projects with it.

I'm using the app 'as is' because i'm not familiar with PHP or its underlying compnents yet.

PHP Fatal error: Uncaught Error: Class "PHPMaker2022\project\HttpErrorHandler" not found in D:\Web\project\index.php:83
Stack trace:
#0 {main}
thrown in D:\Web\project\index.php on line 83

this is line 83 in index.php

$errorHandler = new HttpErrorHandler($callableResolver, $ResponseFactory);

Composer is version 2.1.12 2021-11-09 16:02:04
PHP 8.0.13 (cli) (built: Nov 16 2021 21:59:04)
IIS8
MSSQL

Any ideas would be appreciated.


hyperxp
User
Posts: 6

Post by hyperxp »

Updated as I found the solution in a thread for something else. I hope this helps someone else.

viewtopic.php?t=49167

You may try:

  1. Delete composer.lock and "vendor" folder in the project folder,
  2. Generate all files (including composer.json) again,
  3. Open a command prompt or PowerShell at the project folder,
  4. Enter "composer -V" to test your composer installation, make sure there is no error message.
  5. Enter "composer update" to update. Then you should see a "vender" folder in the project file. In the "vendor" folder you should see many subfolders and an autoload.php.
  6. In the project folder, you should find a "src" folder, in which you should find the HttpErrorHandler.php.
    If the autoload.php is generated by composer correctly, your app should find the class HttpErrorHandler.

SRanade
User
Posts: 95

Post by SRanade »

Thank you hyperxp! That was a life-saver! :D

I got this error when upgrading to trial version of PHPMaker 2023.1.

Just in case others have similiar problems during upgrade:

  1. Although I had a prior version of nodejs under Anaconda3, this was not detected by PHPMaker. I had to install a standard version separately.
  2. Then it updated Composer, but the compile still gave an error. Second time it compiled fine.
  3. Page would not load asking for "intl" extension, which I had to enable within AMPSS.
  4. Finally it gave this error "HttpErrorHandler not found" which was resolved by the above process described by hyperxp.

Now all is ok!


Post Reply