cPanel PHP Update - php

I have currently become the administrator of an website. The first thing I wanted to do was to update the PHP version from 5.6 to 8.1. In cPanel, I chose MultiPHP Manager and tried to apply the new version to the selected domain. This is the error I got:
Error: “/usr/local/cpanel/bin/python-packman” reported error code “1” when it ended: Traceback (most recent call last): File "/usr/local/cpanel/bin/packman_get_info_json", line 16, in packman.init_yum() File "/usr/local/cpanel/bin/packman_lib/yum_impl.py", line 78, in init_yum yb.repos.populateSack() File "/usr/lib/python2.7/site-packages/yum/repos.py", line 347, in populateSack self.doSetup() File "/usr/lib/python2.7/site-packages/yum/repos.py", line 157, in doSetup self.retrieveAllMD() File "/usr/lib/python2.7/site-packages/yum/repos.py", line 88, in retrieveAllMD dl = repo._async and repo._commonLoadRepoXML(repo) File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1482, in _commonLoadRepoXML result = self._getFileRepoXML(local, text) File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1259, in _getFileRepoXML size=102400) # setting max size as 100K File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1025, in _getFile result = self.grab.urlgrab(misc.to_utf8(relative), local, File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 703, in grab = property(lambda self: self._getgrab()) File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 698, in _getgrab self._setupGrab() File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 635, in _setupGrab urls = self.urls File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 881, in urls = property(fget=lambda self: self._geturls(), File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 878, in _geturls self._baseurlSetup() File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 844, in _baseurlSetup self.check() File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 562, in check 'Cannot find a valid baseurl for repo: %s' % self.ui_id yum.Errors.RepoError: Cannot find a valid baseurl for repo: base/7/x86_64 w/ /usr/local/cpanel/bin/packman_get_info_json ea-php81-php-fpm Often errors like this can be resolved by running yum makecache
Running yum makecache in the terminal raised another error. I wasn't able to find anything helpful on the internet. What am I doing wrong?

Related

How can I read and write php 5.6 error log?

I'm using Ubuntu 20.04.4 LTS, Apache/2.4.41, PHP 5.6.40-57.
When I call
error_log ('Page is not writable for save called)', 3, "/var/log/apache2/php_error.log");
there is nothing in /var/log/apache2/php_error.log.
php_error.log file is exist, and it is 777.
When I open /var/log/apache2/error.log, this error log was added.
PHP Warning: error_log(/var/log/apache2/error.log):
failed to open stream: \xed\x97\x88\xea\xb0\x80 \xea\xb1\xb0\xeb\xb6\x80 in /var/www/html/moniwiki/wiki.php on line 1258, referer: https:/
/myhome.ddns.net:9443/moniwiki/wiki.php?015B
why php_error.log is empty?
how am I able to change these \xed.. character to normal character?
what is \xed... and is there any website to decode these characters?

Sublime text error when uploading (gaierror: [Errno 11001] getaddrinfo failed)

Im use ftpsync in sublime text 2, this is working good before and suddenly got this error.. Im googling and still got no working solution.. This is the console:
Traceback (most recent call last):
File ".\FTPSync.py", line 957, in makeConnection
File ".\ftpsyncwrapper.py", line 318, in connect
File ".\ftpsyncwrapper.py", line 290, in retryingCommand
File ".\ftpsyncwrapper.py", line 284, in call
File ".\lib2\ftplib.py", line 140, in connect
File ".\socket.py", line 500, in create_connection
gaierror: [Errno 11001] getaddrinfo failed

Sublime-phpcs - Can't get PHP MD and CS packages to function properly

I've been trying to configure sublime-phpcs. I've installed pear and from command line installed PHP_CodeSniffer, and PHPMD using their documented install procedures. PHP and pear are in my path at d:/Program Files/xampp/php and d:/Program Files/xampp/php/pear, and I can use them outside of the directories. I set PHPCodeSniffer, PHPMD, and showdebug to be true in the user config file, but on save nothing get highlighted or outlined, can only see an error in the console. It pops an error after saying:
[Phpcs] phpcs --report=checkstyle --standard=PSR2 -n D:\htdocs\ubc\app\main\source\plugins\project\core\class-cse-meta-boxes.php
[Phpcs] phpcs --report=checkstyle --standard=PSR2 -n D:\htdocs\ubc\app\main\source\plugins\project\core\class-cse-meta-boxes.php
[Phpcs] cwd: C:\Users\mtpultz
Exception in thread Thread-183:
Traceback (most recent call last):
File "X/subprocess.py", line 1090, in _execute_child
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "X/threading.py", line 639, in _bootstrap_inner
File "X/threading.py", line 596, in run
File "phpcs in C:\Users\mtpultz\AppData\Roaming\Sublime Text 3\Installed Packages\Phpcs.sublime-package", line 433, in run
File "phpcs in C:\Users\mtpultz\AppData\Roaming\Sublime Text 3\Installed Packages\Phpcs.sublime-package", line 139, in get_errors
File "phpcs in C:\Users\mtpultz\AppData\Roaming\Sublime Text 3\Installed Packages\Phpcs.sublime-package", line 215, in execute
File "phpcs in C:\Users\mtpultz\AppData\Roaming\Sublime Text 3\Installed Packages\Phpcs.sublime-package", line 218, in parse_report
File "phpcs in C:\Users\mtpultz\AppData\Roaming\Sublime Text 3\Installed Packages\Phpcs.sublime-package", line 169, in shell_out
File "X/subprocess.py", line 818, in __init__
File "X/subprocess.py", line 1096, in _execute_child
FileNotFoundError: [WinError 2] The system cannot find the file specified
I've restarted the server and reopened sublimetext after all installs.
UPDATE
In response to Sergey's help with the addition of the phpcs executable path to user settings.
[Phpcs] phpmd D:\htdocs\ubc\app\main\source\plugins\ubc\core\class-cse-meta-boxes.php text codesize,unusedcode,naming
[Phpcs] phpmd D:\htdocs\ubc\app\main\source\plugins\ubc\core\class-cse-meta-boxes.php text codesize,unusedcode,naming
[Phpcs] cwd: C:\Users\mtpultz
Exception in thread Thread-183:
Traceback (most recent call last):
File "X/subprocess.py", line 1090, in _execute_child
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "X/threading.py", line 639, in _bootstrap_inner
File "X/threading.py", line 596, in run
File "phpcs in C:\Users\mtpultz\AppData\Roaming\Sublime Text 3\Installed Packages\Phpcs.sublime-package", line 435, in run
File "phpcs in C:\Users\mtpultz\AppData\Roaming\Sublime Text 3\Installed Packages\Phpcs.sublime-package", line 139, in get_errors
File "phpcs in C:\Users\mtpultz\AppData\Roaming\Sublime Text 3\Installed Packages\Phpcs.sublime-package", line 311, in execute
File "phpcs in C:\Users\mtpultz\AppData\Roaming\Sublime Text 3\Installed Packages\Phpcs.sublime-package", line 314, in parse_report
File "phpcs in C:\Users\mtpultz\AppData\Roaming\Sublime Text 3\Installed Packages\Phpcs.sublime-package", line 169, in shell_out
File "X/subprocess.py", line 818, in __init__
File "X/subprocess.py", line 1096, in _execute_child
FileNotFoundError: [WinError 2] The system cannot find the file specified
UPDATE 2
In response to Sergey's help with the addition of the phpmd executable path to user settings.
[Phpcs] D:\Program Files\xampp\php\pear\phing\tasks\ext\phpmd D:\htdocs\ubc\app\main\source\plugins\ubc-petrography\core\class-cse-meta-boxes.php text codesize,unusedcode,naming
[Phpcs] D:\Program Files\xampp\php\pear\phing\tasks\ext\phpmd D:\htdocs\ubc\app\main\source\plugins\ubc-petrography\core\class-cse-meta-boxes.php text codesize,unusedcode,naming
[Phpcs] cwd: C:\Users\mtpultz
Exception in thread Thread-18:
Traceback (most recent call last):
File "X/subprocess.py", line 1090, in _execute_child
PermissionError: [WinError 5] Access is denied
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "X/threading.py", line 639, in _bootstrap_inner
File "X/threading.py", line 596, in run
File "phpcs in C:\Users\mtpultz\AppData\Roaming\Sublime Text 3\Installed Packages\Phpcs.sublime-package", line 435, in run
File "phpcs in C:\Users\mtpultz\AppData\Roaming\Sublime Text 3\Installed Packages\Phpcs.sublime-package", line 139, in get_errors
File "phpcs in C:\Users\mtpultz\AppData\Roaming\Sublime Text 3\Installed Packages\Phpcs.sublime-package", line 311, in execute
File "phpcs in C:\Users\mtpultz\AppData\Roaming\Sublime Text 3\Installed Packages\Phpcs.sublime-package", line 314, in parse_report
File "phpcs in C:\Users\mtpultz\AppData\Roaming\Sublime Text 3\Installed Packages\Phpcs.sublime-package", line 169, in shell_out
File "X/subprocess.py", line 818, in __init__
File "X/subprocess.py", line 1096, in _execute_child
PermissionError: [WinError 5] Access is denied
Anyone had this issue?
Try to open PHPCS settings: Preferences → Package Settings → PHP Code Sniffer → Settings — User
Add this to the settings file:
{
"phpcs_executable_path": "some_path"
}
Where some_path is the phpcs's executable path (if you have installed it by PEAR command in Windows, its executable file is phpcs.bat in root folder of PHP). :)
For example, I have installed code sniffer and its executable is D:\dev\php\phpcs.bat. So my config is
{
"phpcs_executable_path": "D:\\dev\\php\\phpcs.bat",
// Enable debug to see verbose output
"show_debug": true
}
Sublime-phpcs did not work for me, too, until I've set phpcs_executable_path in its config.
Update: As I see from your question update, right now you need also set phpmd_executable_path. Also I will use your path to PHP in this listing.
{
"phpcs_executable_path": "D:\\Program Files\\xampp\\php\\phpcs.bat",
"phpmd_executable_path": "D:\\Program Files\\xampp\\php\\phpmd.bat",
// Enable debug to see verbose output
"show_debug": true
}

Connecting to XMPP with SSL throws exception "error:100AE081:elliptic curve routines:EC_GROUP_new_by_curve_name:unknown group"

I'm using xmpppy on a Fedora 19 computer for connecting to xmpp server which requires ssl connection.
Code:
client = xmpp.Client(self.domain, debug=[])
server = (self.server, 5222)
client.connect(server)
It was working fine, I didn't change anything in code. Then I installed some applications and updated Fedora, now it gives this error:
Traceback (most recent call last):
File "chat.py", line 20, in connect
client.connect(server)
File "/usr/lib/python2.7/site-packages/xmpp/client.py", line 205, in connect
while not self.TLS.starttls and self.Process(1): pass
File "/usr/lib/python2.7/site-packages/xmpp/dispatcher.py", line 303, in dispatch
handler['func'](session,stanza)
File "/usr/lib/python2.7/site-packages/xmpp/transports.py", line 337, in StartTLSHandler
self._startSSL()
File "/usr/lib/python2.7/site-packages/xmpp/transports.py", line 315, in _startSSL
tcpsock._sslObj = socket.ssl(tcpsock._sock, None, None)
File "/usr/lib64/python2.7/socket.py", line 64, in ssl
return _realssl.sslwrap_simple(sock, keyfile, certfile)
File "/usr/lib64/python2.7/ssl.py", line 477, in sslwrap_simple
ssl_sock.do_handshake()
ssl.SSLError: [Errno 1] _ssl.c:504: error:100AE081:elliptic curve routines:EC_GROUP_new_by_curve_name:unknown group
I also tried to connect to XMPP server using PHP
$this->send_xml($this->START_TLS);
$xml = $this->recv_xml();
stream_socket_enable_crypto($this->fp, true, STREAM_CRYPTO_METHOD_TLS_CLIENT);
but it throws
PHP Warning: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
error:100AE081:elliptic curve routines:EC_GROUP_new_by_curve_name:unknown group
error:1408D010:SSL routines:SSL3_GET_KEY_EXCHANGE:EC lib in /var/www/html/libs/xmpp.php on line 71

install pear on WAMP

I tried to install pear
WAMPserver 2.1
OS : win 7
steps I followed from following link
http://chadash.tumblr.com/post/1515528654/how-to-install-php5-pear-lib-on-windows-7
I get a copy of go-pear.phar from http://pear.php.net/go-pear.phar url.
Following is the output
Are you installing a system-wide PEAR or a local copy?
(system|local) [system] : system
Below is a suggested file layout for your new PEAR installation. To
change individual locations, type the number in front of the
directory. Type 'all' to change all of them or simply press Enter to
accept these locations.
1. Installation base ($prefix) : C:\wamp\bin\php\php5.3.3
2. Temporary directory for processing : C:\wamp\bin\php\php5.3.3\tmp
3. Temporary directory for downloads : C:\wamp\bin\php\php5.3.3\tmp
4. Binaries directory : C:\wamp\bin\php\php5.3.3
5. PHP code directory ($php_dir) : C:\wamp\bin\php\php5.3.3\pea
r
6. Documentation directory : C:\wamp\bin\php\php5.3.3\doc
s
7. Data directory : C:\wamp\bin\php\php5.3.3\dat
a
8. User-modifiable configuration files directory : C:\wamp\bin\php\php5.3.3\cfg
9. Public Web Files directory : C:\wamp\bin\php\php5.3.3\www
10. Tests directory : C:\wamp\bin\php\php5.3.3\tes
ts
11. Name of configuration file : C:\Windows\pear.ini
12. Path to CLI php.exe : .
1-12, 'all' or Enter to continue:
'".\php.exe"' is not recognized as an internal or external command,
operable program or batch file.
*WARNING*
We found php.exe under ., it uses an unknown SAPI. PEAR commandline
tool has not been tested with it, if you have a CLI (or CGI) php.exe available,
we strongly recommend using it.
Beginning install...
Configuration written to C:\Windows\pear.ini...
Initialized registry...
Preparing to install...
installing phar://C:/wamp/bin/php/php5.3.3/PEAR/go-pear.phar/PEAR/go-pear-tarbal
ls/Archive_Tar-1.3.7.tar...
installing phar://C:/wamp/bin/php/php5.3.3/PEAR/go-pear.phar/PEAR/go-pear-tarbal
ls/Console_Getopt-1.3.0.tar...
installing phar://C:/wamp/bin/php/php5.3.3/PEAR/go-pear.phar/PEAR/go-pear-tarbal
ls/PEAR-1.9.3.tar...
installing phar://C:/wamp/bin/php/php5.3.3/PEAR/go-pear.phar/PEAR/go-pear-tarbal
ls/Structures_Graph-1.0.4.tar...
installing phar://C:/wamp/bin/php/php5.3.3/PEAR/go-pear.phar/PEAR/go-pear-tarbal
ls/XML_Util-1.2.1.tar...
PHP Warning: mkdir(): Invalid argument in phar://C:/wamp/bin/php/php5.3.3/PEAR/
go-pear.phar/System.php on line 302
Warning: mkdir(): Invalid argument in phar://C:/wamp/bin/php/php5.3.3/PEAR/go-pe
ar.phar/System.php on line 302
ERROR: file \Archive_Tar-1.3.7\Archive\Tar.php does not exist
PHP Warning: mkdir(): Invalid argument in phar://C:/wamp/bin/php/php5.3.3/PEAR/
go-pear.phar/System.php on line 302
Warning: mkdir(): Invalid argument in phar://C:/wamp/bin/php/php5.3.3/PEAR/go-pe
ar.phar/System.php on line 302
ERROR: file \Console_Getopt-1.3.0\Console\Getopt.php does not exist
PHP Warning: mkdir(): Invalid argument in phar://C:/wamp/bin/php/php5.3.3/PEAR/
go-pear.phar/System.php on line 302
Warning: mkdir(): Invalid argument in phar://C:/wamp/bin/php/php5.3.3/PEAR/go-pe
ar.phar/System.php on line 302
ERROR: file \Structures_Graph-1.0.4\docs\html\media\banner.css does not exist
PHP Warning: mkdir(): Invalid argument in phar://C:/wamp/bin/php/php5.3.3/PEAR/
go-pear.phar/System.php on line 302
Warning: mkdir(): Invalid argument in phar://C:/wamp/bin/php/php5.3.3/PEAR/go-pe
ar.phar/System.php on line 302
ERROR: file \XML_Util-1.2.1\examples\example.php does not exist
PHP Warning: mkdir(): Invalid argument in phar://C:/wamp/bin/php/php5.3.3/PEAR/
go-pear.phar/System.php on line 302
Warning: mkdir(): Invalid argument in phar://C:/wamp/bin/php/php5.3.3/PEAR/go-pe
ar.phar/System.php on line 302
ERROR: file \PEAR-1.9.3\OS\Guess.php does not exist
** WARNING! Old version found at C:\wamp\bin\php\php5.3.3, please remove it or b
e sure to use the new c:\wamp\bin\php\php5.3.3\pear.bat command
The 'pear' command is now at your service at c:\wamp\bin\php\php5.3.3\pear.bat
** The 'pear' command is not currently in your PATH, so you need to
** use 'c:\wamp\bin\php\php5.3.3\pear.bat' until you have added
** 'C:\wamp\bin\php\php5.3.3' to your PATH environment variable.
Run it without parameters to see the available actions, try 'pear list'
to see what packages are installed, or 'pear help' for help.
For more information about PEAR, see:
http://pear.php.net/faq.php
http://pear.php.net/manual/
Thanks for using go-pear!
* WINDOWS ENVIRONMENT VARIABLES *
For convenience, a REG file is available under C:\wamp\bin\php\php5.3.3PEAR_ENV.
reg .
This file creates ENV variables for the current user.
Double-click this file to add it to the current user registry.
Press any key to continue . . .
C:\wamp\bin\php\php5.3.3>
pear command is still not recognized by the system.
*WARNING*
We found php.exe under ., it uses an unknown SAPI. PEAR commandline
tool has not been tested with it, if you have a CLI (or CGI) php.exe available,
we strongly recommend using it.
There are no such message the author receive. I updated the environmental var and php is running as cli.
Please help.
Regards,
12. Path to CLI php.exe : .
1-12, 'all' or Enter to continue:
'".\php.exe"' is not recognized as an internal or external command,
operable program or batch file.
You need to specify the full path to the php.exe file, including php.exe. "." alone is not sufficient.
Here's an answer for the same thing but installing in XAMPP: Error installing go-pear.phar in Windows 10 with XAMPP
When you're prompted with
1-12, 'all' or Enter to continue:
I think you need to enter
12
Then a pop up browser appears, allowing you to select the folder where php.exe is in your WAMP installation (do a search in Windows if you're not sure), then continue the PEAR installation.

Categories