i have tried installing phpmyadmin on arch linux but every time i open localhost/phpmyadmin,i get this text.
PHP 7.2.5+ is required.
Currently installed version is: ' . PHP_VERSION . '
'); } // phpcs:disable PSR1.Files.SideEffects define('PHPMYADMIN', true); // phpcs:enable require_once ROOT_PATH . 'libraries/constants.php'; /** * Activate autoloader */ if (! #is_readable(AUTOLOAD_FILE)) { die( '
File ' . AUTOLOAD_FILE . ' missing or not readable.
' . '
Most likely you did not run Composer to ' . '' . 'install library files.
' ); } require AUTOLOAD_FILE; global $route, $containerBuilder, $request; Common::run(); $dispatcher = Routing::getDispatcher(); Routing::callControllerForRoute($request, $route, $dispatcher, $containerBuilder);
i have installed php and this its version
PHP 8.1.8 (cli) (built: Jul 9 2022 06:10:37) (NTS)
i have also tried following all the steps in arch documentation (https://wiki.archlinux.org/title/phpMyAdmin)
but when i try to open the url(localhost/phpmyadmin),it outputs a blank page with no
body so i had to reset all the configs to default.help me out.thanks alot
to solve this issue,i reinstalled everything again,followed the steps in (https://wiki.archlinux.org/title/phpMyAdmin) and in /etc/php/php.ini,uncommented the extension 'bz2 and mysqli'
Related
What is the best approach to check php version 8.1 and to upgrade in 8.2 the function.
var_dump(phpversion()); ==> 8.1.7-1ubuntu3.2
var_dump((float)phpversion()); ==> 8.1
thank you
There are some builtin constants that may be easier to use as they are not messed about with by per OS compilations
echo 'PHP_MAJOR_VERSION = ' . PHP_MAJOR_VERSION . PHP_EOL;
echo 'PHP_MINOR_VERSION = ' . PHP_MINOR_VERSION . PHP_EOL;
echo 'PHP_RELEASE_VERSION = ' . PHP_RELEASE_VERSION . PHP_EOL;
RESULT
My current version of PHP 8.2.1
PHP_MAJOR_VERSION = 8
PHP_MINOR_VERSION = 2
PHP_RELEASE_VERSION = 1
Getting the following message when attempting to run PhpMyAdmin 5.1.1 within EasyPHP Devserver 17. This is with MySQL 8.0 and PHP 7.4:
Composer detected issues in your platform: Your Composer dependencies require the following PHP extensions to be installed: openssl
I have checked the php.ini and it contains extension=openssl without comment.
Full results from php -i cmd on my Windows 10 machine.
UPDATE
The above error is produced when attempting to open PhpMyAdmin 5.1.1 from EasyPHP Devserver dashboard.
Also, php -i cmd shows:
Configuration File (php.ini) Path =>
Loaded Configuration File => E:\Projects\PHP Migration\EasyPHP-Devserver-17\eds-binaries\php\php7427vc15x86x220629181102\php.ini
...
openssl
OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 1.1.1l 24 Aug 2021
OpenSSL Header Version => OpenSSL 1.1.1l 24 Aug 2021
Openssl default config => C:\Program Files (x86)\Common Files\SSL/openssl.cnf
Directive => Local Value => Master Value
openssl.cafile => no value => no value
openssl.capath => no value => no value
C:\Program Files (x86)\Common Files\SSL/openssl.cnf does not exist. I guess that might be a problem?
The same error occurs with this PHP script:
if (!(PHP_VERSION_ID >= 70103)) {
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.1.3". You are running ' . PHP_VERSION . '.';
}
$missingExtensions = array();
extension_loaded('hash') || $missingExtensions[] = 'hash';
extension_loaded('iconv') || $missingExtensions[] = 'iconv';
extension_loaded('json') || $missingExtensions[] = 'json';
extension_loaded('mysqli') || $missingExtensions[] = 'mysqli';
extension_loaded('openssl') || $missingExtensions[] = 'openssl';
extension_loaded('pcre') || $missingExtensions[] = 'pcre';
extension_loaded('xml') || $missingExtensions[] = 'xml';
if ($missingExtensions) {
$issues[] = 'Your Composer dependencies require the following PHP extensions to be installed: ' . implode(', ', $missingExtensions);
}
if ($issues) {
echo 'Composer detected issues in your platform:' . "\n\n" . implode("\n", $issues);
exit(104);
}
Any ideas how to fix this?
Hi I have moved my smarty project from my linux machine to windows machine , Now i am getting a wrong result for the compile path
C:/xampp/htdocs/smarty/templates_c\%%45^45E^45E480CD%%index.tpl.php
I checked it and found an issue in ths part
templates_c\%%45^45E^45E480CD%%index.tpl.php
the directy sperator is \so my path is failing .
I checked in this function in smarty
function _get_auto_filename($auto_base, $auto_source = null, $auto_id = null)
{
$_compile_dir_sep = $this->use_sub_dirs ? DIRECTORY_SEPARATOR : '^';
$_return = $auto_base . DIRECTORY_SEPARATOR;
DIRECTORY_SEPARATOR is returning \ .
Is there any palce to change my DIRECTORY_SEPARATOR globally to / or is there any other solution for this . :)
Thank you in advance .
Can anyone guide me in installing pThreads in Windows .
Actually i want to enable Threads in PHP .
require_once( 'Thread.php' );
// test to see if threading is available
if( ! Thread::available() ) {
die( 'Threads not supported' );
}
// function to be ran on separate threads
function paralel( $_limit, $_name ) {
for ( $index = 0; $index < $_limit; $index++ ) {
echo 'Now running thread ' . $_name . PHP_EOL;
sleep( 1 );
}
}
// create 2 thread objects
$t1 = new Thread( 'paralel' );
$t2 = new Thread( 'paralel' );
// start them
$t1->start( 10, 't1' );
$t2->start( 10, 't2' );
// keep the program running until the threads finish
while( $t1->isAlive() && $t2->isAlive() ) {
}
Error displaying is "Threads not supported."
My PHP version 5.3.4 .
Install ZTS (thread safe) PHP (obligation)
http://windows.php.net/downloads/releases/php-5.5.6-Win32-VC11-x86.zip
Download Pthread and install
http://windows.php.net/downloads/pecl/releases/pthreads/
Move php_pthreads.dll to the php\ext\ directory.
Move pthreadVC2.dll to the php\ directory.
enter extension=php_pthreads.dll to php.ini
try examples
https://github.com/krakjoe/pthreads/tree/master/examples
The code you have posted is not compatible with pthreads.
Windows binaries for pthreads are available http://windows.php.net/downloads/pecl/releases/pthreads/
Simply download the release, unpack the extension dll (php_pthreads.dll) to your extension directory and the runtime dll (pthreadVC2.dll) to your php directory (same dir as php.exe) and add extension=php_pthreads.dll to your configuration
Example pthreads code can be found on github http://github.com/krakjoe/pthreads
I have MAMP Pro installed running php 5.2.13. When I try to initialize a HTTP-Request
$r = new HttpRequest('http://example.com/', HttpRequest::METH_GET);
it tells me:
"Class 'HttpRequest' not found in ...".
What do I need to do to 'install(?)' it?
You must enable http extension:
http://www.php.net/manual/en/http.setup.php
Or you can try new HTTP_Request2:
sudo pear install --alldeps HTTP_Request2-alpha
And then:
$req = new HTTP_Request2('your.url');
$req->setMethod('POST');
$req->setHeader("content-type", $mimeType);
$req->setBody('');
$response = $req->send();
Contemporary Answer for MAMP 2.0 and HTTP_Request2:
Go into your MAMP/bin/php/php5.3.6/bin/ and run
./pear install --alldeps HTTP_Request2
Restart your server and test with the following code, from the PEAR repository:
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2('http://pear.php.net/', HTTP_Request2::METHOD_GET);
try {
$response = $request->send();
if (200 == $response->getStatus()) {
echo $response->getBody();
} else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
} catch (HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
?>
Don't forget the require_once statement!
You need to enable the extension ...
add the following to your php.ini
extension = php_http.dll
Apparently that was asked a lot:
http://php.bigresource.com/Track/php-33sNme7A/