*

rooman

  • ****
  • 231 posts
Error when posting an OSCLASS 8.1.1 php 8.1
« on: February 21, 2023, 02:15:42 PM »
Error when posting an OSCLASS 8.1.1 php 8.1
Code: [Select]
Fatal error: Uncaught Error: Call to undefined function imagecreatefromstring() in C:\xampp\htdocs\oc-includes\osclass\classes\ImageProcessing.php:87 Stack trace: #0 C:\xampp\htdocs\oc-includes\osclass\classes\ImageProcessing.php(132): ImageProcessing->__construct('C:/xampp/htdocs...') #1 C:\xampp\htdocs\oc-includes\osclass\ItemActions.php(518): ImageProcessing::fromFile('C:/xampp/htdocs...') #2 C:\xampp\htdocs\oc-includes\osclass\ItemActions.php(272): ItemActions->uploadItemResources(Array, 7648) #3 C:\xampp\htdocs\oc-includes\osclass\controller\item.php(156): ItemActions->add() #4 C:\xampp\htdocs\index.php(229): CWebItem->doModel() #5 {main} thrown in C:\xampp\htdocs\oc-includes\osclass\classes\ImageProcessing.php on line 87
Code: [Select]
PHP Warning:  Undefined array key "b_enabled" in /home/***/public_html/oc-includes/osclass/controller/item.php on line 790
« Last Edit: February 21, 2023, 03:34:46 PM by rooman »

*

MB Themes

Re: Error when posting an OSCLASS 8.1.1 php 8.1
« Reply #1 on: February 21, 2023, 09:05:04 PM »
https://www.php.net/manual/en/function.imagecreatefromstring.php

Function exists.
You probably miss it in your setup.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

rooman

  • ****
  • 231 posts
Re: Error when posting an OSCLASS 8.1.1 php 8.1
« Reply #2 on: February 22, 2023, 07:23:23 AM »
The reason for this problem is this
Code: [Select]
PHP Warning:  Undefined array key "b_enabled" in /home/***/public_html/oc-includes/osclass/controller/item.php on line 790This
// Force disable URL encoding for non-latin characters
Code: [Select]
define('OSC_FORCE_DISABLE_URL_ENCODING', true);
This is another error when modifying a city's translation data from websites in the control panel
Quote
PHP Fatal error:  Uncaught ValueError: Unknown format specifier "�" in /home/***/public_html/oc-admin/locations.php:269
Stack trace:
#0 /home/***/public_html/oc-admin/locations.php(269): sprintf()
#1 /home/***/public_html/oc-admin/index.php(158): CAdminLocations->doModel()
#2 {main}
  thrown in /home/***/public_html/oc-admin/locations.php on line 269
This error also appears when editing an advertisement
I am currently using php 8.0

« Last Edit: February 22, 2023, 11:51:26 AM by rooman »

*

rooman

  • ****
  • 231 posts
Re: Error when posting an OSCLASS 8.1.1 php 8.1
« Reply #3 on: February 23, 2023, 10:16:05 AM »
The reason for this problem is this
Quote
Fatal error: Uncaught Error: Call to undefined function imagecreatefromstring() in C:\xampp\htdocs\oc-includes\osclass\classes\ImageProcessing.php:87 Stack trace: #0 C:\xampp\htdocs\oc-includes\osclass\classes\ImageProcessing.php(132): ImageProcessing->__construct('C:/xampp/htdocs...') #1 C:\xampp\htdocs\oc-includes\osclass\ItemActions.php(518): ImageProcessing::fromFile('C:/xampp/htdocs...') #2 C:\xampp\htdocs\oc-includes\osclass\ItemActions.php(272): ItemActions->uploadItemResources(Array, 7648) #3 C:\xampp\htdocs\oc-includes\osclass\controller\item.php(156): ItemActions->add() #4 C:\xampp\htdocs\index.php(229): CWebItem->doModel() #5 {main} thrown in C:\xampp\htdocs\oc-includes\osclass\classes\ImageProcessing.php on line 87

Pre-resize Images Plugin
Is there a solution for that

This warning is still repeated
Code: [Select]
PHP Warning:  Undefined array key "b_enabled" in /home/***/public_html/oc-includes/osclass/controller/item.php on line 790
« Last Edit: February 23, 2023, 10:31:41 AM by rooman »

*

MB Themes

Re: Error when posting an OSCLASS 8.1.1 php 8.1
« Reply #4 on: February 24, 2023, 09:04:27 PM »
@rooman
Discuss with your hosting provider.
That function should exists in your PHP, but maybe it's just part of some library.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

rooman

  • ****
  • 231 posts
Re: Error when posting an OSCLASS 8.1.1 php 8.1
« Reply #5 on: February 25, 2023, 12:59:44 PM »
@rooman
Discuss with your hosting provider.
That function should exists in your PHP, but maybe it's just part of some library.
This warning is still repeated
Code: [Select]
PHP Warning:  Undefined array key "b_enabled" in /home/***/public_html/oc-includes/osclass/controller/item.php on line 790

*

MB Themes

Re: Error when posting an OSCLASS 8.1.1 php 8.1
« Reply #6 on: February 25, 2023, 01:23:07 PM »
b_enabled is standard item column. Should be there.
If not, there is probably different issue.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots