Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - nagiyevel

Pages: [1]
1
Apache / Re: CWP can't compile php-fpm 8.2
« on: November 08, 2023, 12:00:16 PM »
Managing compile options for Your PHP version. In my case nano /usr/local/cwpsrv/htdocs/resources/conf/el8/php-fpm_selector/8.2_last_build.ini and find the following part
Code: [Select]
[pgsql]
default="0"
option="--with-pgsql=/usr/pgsql-16/bin"
info-file="pgsql.txt"
[pdo-pgsql]
default="0"
option="--with-pdo-pgsql=/usr/pgsql-16/bin"
info-file="pdo-pgsql.txt"

Edit and set the postgresql bin path for options --with-pgsql and --with-pdo-pgsql. In my case the postgresql bin path was /usr/pgsql-16/bin.

Code: [Select]
[pgsql]
default="1"
option="--with-pgsql=/usr/pgsql-16/bin"
info-file="pgsql.txt"
[pdo-pgsql]
default="1"
option="--with-pdo-pgsql=/usr/pgsql-16/bin"
info-file="pdo-pgsql.txt"

You can also edit this file from CWP panel too.

Now You will be able to compile PHP from source code.

Additionally you can find your postgresql bin dir with the command pg_config --bindir

2
PHP / Re: PHP raw post json_decode content-length limit
« on: February 08, 2021, 07:03:37 PM »
Don't know how but it was an apache web server problem.
After upgrading to apache 2.4.46 version with the same configuration the problem was solved.

3
PHP / PHP raw post json_decode content-length limit
« on: February 06, 2021, 11:30:30 AM »


I have a web server with licensed CWP installed on it and PHP7.4 configured.


Today I wanted to post raw JSON data to my php application and decode it.


<?php
$json = file_get_contents('php://input');
print_r(json_decode($json));
print_r(json_last_error_msg());


But saw that when content-length of JSON self is higher than 8192 symbol raw data didn't encoded and function return empty string.


json_last_error() return "control character error possibly incorrectly encoded"


When I clear POST data there is no content-length limit and I cant post more data


<?php
$json = file_get_contents('php://input');
$json = preg_replace('/[[:cntrl:]]/', '', $json);
print_r(json_decode($json));
print_r(json_last_error_msg());


Why this happen?

4
Apache / Module vhost_rebuild didn't rebuild sub domain configurations.
« on: October 05, 2016, 08:20:14 AM »
Module vhost_rebuild build configuration only for main domains. After rebuilding all from this module sub domains started to show CWP default page. After checking vhosts.conf I saw sub domain configuration are absent. I had to recreate all subdomains and after that all was fine. Please check it. Sorry for my English.

Pages: [1]