PHP Extension

Discussions about the usage of KeyHelp.
veszvs
Posts: 10
Joined: Wed 8. Feb 2023, 19:53

PHP Extension

Post by veszvs »

Hello everybody, I'm new to the forum.

I've been using KeyHelp for weeks now, great panel, really nice.

But I have problems.
I need to enable and disable extensions of PHP versions.
Many of my scripts don't work properly.

Thank you.
christian.john
Posts: 228
Joined: Tue 9. Apr 2019, 16:31
Location: Korschenbroich
Contact:

Re: PHP Extension

Post by christian.john »

Hallo and welcome,

perhaps you can tell us something about your scripts or even tell us something about the extensions you need.

Have you seen the configuration part where you can activate or disable php-functions?

Chris
Individuelle Entwicklung webbasierter Datenbanksysteme
https://www.john-softwareentwicklung.de
User avatar
Florian
Keyweb AG
Posts: 1243
Joined: Wed 20. Jan 2016, 02:28

Re: PHP Extension

Post by Florian »

Hello,

PHP module for the system PHP version can be installed easily by apt

PHP modules for the additional Keyhelp PHP version have to be compiled or installed via PECL.

e.g. compiling of redis extension for PHP 7.4:

Code: Select all

wget https://pecl.php.net/get/redis-5.1.1.tgz

tar xzf redis-5.1.1.tgz

cd redis-5.1.1/

/opt/keyhelp/php/7.4/bin/phpize (install autoconf if necessary)

./configure --with-php-config=/opt/keyhelp/php/7.4/bin/php-config
make
make install

echo "extension=redis.so" > /opt/keyhelp/php/7.4/etc/conf.d/redis.ini

/etc/init.d/keyhelp-php74-fpm restart
Mit freundlichen Grüßen / Best regards
Florian Cheno

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
veszvs
Posts: 10
Joined: Wed 8. Feb 2023, 19:53

Re: PHP Extension

Post by veszvs »

christian.john wrote: Thu 9. Feb 2023, 08:10 Hallo and welcome,

perhaps you can tell us something about your scripts or even tell us something about the extensions you need.

Have you seen the configuration part where you can activate or disable php-functions?

Chris
Honestly, I still don't understand how it works.
I'm used to cpanel, that I just select what I need and done.
veszvs
Posts: 10
Joined: Wed 8. Feb 2023, 19:53

Re: PHP Extension

Post by veszvs »

Florian wrote: Thu 9. Feb 2023, 09:50 Hello,

PHP module for the system PHP version can be installed easily by apt

PHP modules for the additional Keyhelp PHP version have to be compiled or installed via PECL.

e.g. compiling of redis extension for PHP 7.4:

Code: Select all

wget https://pecl.php.net/get/redis-5.1.1.tgz

tar xzf redis-5.1.1.tgz

cd redis-5.1.1/

/opt/keyhelp/php/7.4/bin/phpize (install autoconf if necessary)

./configure --with-php-config=/opt/keyhelp/php/7.4/bin/php-config
make
make install

echo "extension=redis.so" > /opt/keyhelp/php/7.4/etc/conf.d/redis.ini

/etc/init.d/keyhelp-php74-fpm restart
Honestly, I did not understand what you made me do ...
but it didn't work for me.
veszvs
Posts: 10
Joined: Wed 8. Feb 2023, 19:53

Re: PHP Extension

Post by veszvs »

It would be nice, like on many other panels, to be able to manually select the php extensions for each php version.
Unfortunately, not all of them are very practical.

So it would be just ideal... perfect even for less experienced and practical users.

Image



I do not know what to do...
Unfortunately, there isn't much detailed information on the keyhelp site, and there aren't any step-by-step guides online.
😞
User avatar
Tobi
Community Moderator
Posts: 2812
Joined: Thu 5. Jan 2017, 13:24

Re: PHP Extension

Post by Tobi »

I would guess you´re probably fine with one of the additional PHP interpreters.

Only the standard OS PHP version needs some manual installations.

In the additional PHP interpreters 99,9% of common PHP modules & extensions are already included.


So far we do not really know which extentions you are missing...
Gruß,
Tobi


-----------------------------
wewoco.de
Das Forum für Reseller, Digital-Agenturen, Bildschirmarbeiter und Mäuseschubser
veszvs
Posts: 10
Joined: Wed 8. Feb 2023, 19:53

Re: PHP Extension

Post by veszvs »

Tobi wrote: Thu 9. Feb 2023, 15:19 I would guess you´re probably fine with one of the additional PHP interpreters.

Only the standard OS PHP version needs some manual installations.

In the additional PHP interpreters 99,9% of common PHP modules & extensions are already included.


So far we do not really know which extentions you are missing...

Honestly, I don't even know what extension this script needs.
But I know that on cpanel, cwp and hestiacp, it can be seen correctly, while here I can't do it, I've been working on it for 10 days, I had completed the migration when I realized this very serious problem that prevents some of my apps from working.

The script must read a json file.
The script must encrypt the json file.
The script has to write the json file.

In the error log, it gives a small error, but this error also gives me on the other panels, I don't think this affects the functioning.


Could it be that some extension is missing for json to work properly?
User avatar
24unix
Posts: 1560
Joined: Sun 21. Jun 2020, 17:16
Location: Kollmar
Contact:

Re: PHP Extension

Post by 24unix »

veszvs wrote: Thu 9. Feb 2023, 15:38 In the error log, it gives a small error, but this error also gives me on the other panels, I don't think this affects the functioning.


Could it be that some extension is missing for json to work properly?
Maybe, if you just post the error here.

Programmers have reason to give them names, and to print them out.
mfg Micha
--
If Bill Gates had a nickel for every time Windows crashed …
… oh wait, he does.
veszvs
Posts: 10
Joined: Wed 8. Feb 2023, 19:53

Re: PHP Extension

Post by veszvs »

24unix wrote: Thu 9. Feb 2023, 15:45
veszvs wrote: Thu 9. Feb 2023, 15:38 In the error log, it gives a small error, but this error also gives me on the other panels, I don't think this affects the functioning.


Could it be that some extension is missing for json to work properly?
Maybe, if you just post the error here.

Programmers have reason to give them names, and to print them out.

This error:

Code: Select all

AH01071: Got error 'PHP message: PHP Notice: Undefined index: password in /home/users/USER/www/folder/index.php on line 7'
index.php
line 7-8

Code: Select all

$plaintext_password = $_POST['password'];  
  $hash = password_hash($plaintext_password, 
          PASSWORD_DEFAULT);
It looks like an error that can't recover the password.
But when I log in with my details, it works, I can log in without problems.

So as I said it's not a problem of this little error.
User avatar
24unix
Posts: 1560
Joined: Sun 21. Jun 2020, 17:16
Location: Kollmar
Contact:

Re: PHP Extension

Post by 24unix »

veszvs wrote: Thu 9. Feb 2023, 15:48
24unix wrote: Thu 9. Feb 2023, 15:45
veszvs wrote: Thu 9. Feb 2023, 15:38 In the error log, it gives a small error, but this error also gives me on the other panels, I don't think this affects the functioning.


Could it be that some extension is missing for json to work properly?
Maybe, if you just post the error here.

Programmers have reason to give them names, and to print them out.

This error:

Code: Select all

AH01071: Got error 'PHP message: PHP Notice: Undefined index: password in /home/users/USER/www/folder/index.php on line 7'
That is a notification, not an error.
But, yes, that is the reason that your script won't work.
veszvs wrote: Thu 9. Feb 2023, 15:48
index.php
line 7-8

Code: Select all

$plaintext_password = $_POST['password'];  
  $hash = password_hash($plaintext_password, 
          PASSWORD_DEFAULT);
It looks like an error that can't recover the password.
But when I log in with my details, it works, I can log in without problems.

So as I said it's not a problem of this little error.
The script expects $_POST['password'] to have a value.
It neither tests if it's empty, nor does it make any input validation.

That is very 90ies like …

Is it a script from the internet? Can we check the code?
mfg Micha
--
If Bill Gates had a nickel for every time Windows crashed …
… oh wait, he does.
veszvs
Posts: 10
Joined: Wed 8. Feb 2023, 19:53

Re: PHP Extension

Post by veszvs »

24unix wrote: Thu 9. Feb 2023, 15:58
veszvs wrote: Thu 9. Feb 2023, 15:48
24unix wrote: Thu 9. Feb 2023, 15:45
Maybe, if you just post the error here.

Programmers have reason to give them names, and to print them out.

This error:

Code: Select all

AH01071: Got error 'PHP message: PHP Notice: Undefined index: password in /home/users/USER/www/folder/index.php on line 7'
That is a notification, not an error.
But, yes, that is the reason that your script won't work.
veszvs wrote: Thu 9. Feb 2023, 15:48
index.php
line 7-8

Code: Select all

$plaintext_password = $_POST['password'];  
  $hash = password_hash($plaintext_password, 
          PASSWORD_DEFAULT);
It looks like an error that can't recover the password.
But when I log in with my details, it works, I can log in without problems.

So as I said it's not a problem of this little error.
The script expects $_POST['password'] to have a value.
It neither tests if it's empty, nor does it make any input validation.

That is very 90ies like …

Is it a script from the internet? Can we check the code?
Unfortunately it is not a script that I can show in full.
I am sorry.
This error appears when I login to the index.php page.
But I don't care about that, it's the after that there are problems.
It's when the script has to fetch the contents of the json file, which are encoded and it has to decode them and save them encoded.
That's where the problem arises.
It does not work...

Code: Select all

$prepair = file_get_contents("json/file.json");
$json_arr = json_decode($prepair, true);

array_splice($json_arr['file_info'], $delete, 1);

$newJsonData = json_encode($json_arr, JSON_PRETTY_PRINT);

file_put_contents("./json/file.json",$newJsonData);
header('Location: info.php');
As shown above... this seems to be the problem, this is where keyhelp fails.
User avatar
24unix
Posts: 1560
Joined: Sun 21. Jun 2020, 17:16
Location: Kollmar
Contact:

Re: PHP Extension

Post by 24unix »

veszvs wrote: Thu 9. Feb 2023, 16:03 It does not work...
It does not work is no error message.

What's in error.log?
mfg Micha
--
If Bill Gates had a nickel for every time Windows crashed …
… oh wait, he does.
veszvs
Posts: 10
Joined: Wed 8. Feb 2023, 19:53

Re: PHP Extension

Post by veszvs »

24unix wrote: Thu 9. Feb 2023, 16:08
veszvs wrote: Thu 9. Feb 2023, 16:03 It does not work...
It does not work is no error message.

What's in error.log?
There are no errors in the error.log

In my opinion, It's just a shortage of php extensions.
User avatar
24unix
Posts: 1560
Joined: Sun 21. Jun 2020, 17:16
Location: Kollmar
Contact:

Re: PHP Extension

Post by 24unix »

Missing extension are noted in the error log.
mfg Micha
--
If Bill Gates had a nickel for every time Windows crashed …
… oh wait, he does.
Post Reply