Install imap extension for php 5.3.3-7+squeeze17 - php

Server has debian wheezy os installed. Php version is php5.3:
user#example:~# php -v
PHP 5.3.3-7+squeeze17 with Suhosin-Patch (cli) (built: Aug 23 2013 15:06:16)
I try to install imap extension via apt-get and the result is:
user#example:~# apt-get install php5-imap=5.3.3-7+squeeze17
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '5.3.3-7+squeeze17' for 'php5-imap' was not found
When I try another version I get:
user#example:~# apt-get install php5-imap=5.3.3-7+squeeze19
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
php5-imap : Depends: php5-common (= 5.3.3-7+squeeze19) but 5.3.3-7+squeeze17 is to be installed
E: Unable to correct problems, you have held broken packages.
Does anybody know the safest way to install php5-imap in this case?
P.S. Update to 5.4 from wheezy repo is not solution :(

I solved the issue with calling external python script, which uses imaplib (http://pymotw.com/2/imaplib/).
Example of calling python from php:
<? exec("python <ABSOLUTE_PATH_TO_SCRIPT>.py " . escapeshellarg($arg1));

Related

Problema with Debian 5.14 and php8.1-gd

A have a problem.
I need the php8.1 and I intalled. But, a try install extensions how: gd with command: sudo apt install php8.1-gd and have a problem:
enter image description here
Translate:
Reading package lists... Done
Building dependency tree... Done
Reading status information... Done
Some packages cannot be installed. This could mean that
you request an impossible situation or if you are using the
unstable distribution where some requested packages have not yet been
created or moved from Incoming.
The following information may help resolve a situation:
The following packages have unsatisfied dependencies:
libgd3 : Depends: libavif9 (>= 0.8.4) but not installable
E: Unable to fix issues, you have broken acceptable (hold) packages.
I try upgrade, update but I don't find a solution. What happens? Has a support for this?
enter image description here
Thanks
I'd try upgrade and update in my system expecting the libs were corretly, but, until this time I don't find a solution.

Package 'mysql-server' has no installation candidate

I recently purged MySQL but now I am unable to reinstall it using:
sudo apt-get install mysql-server
I get the following error
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package mysql-server is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
mariadb-server-10.2
E: Package 'mysql-server' has no installation candidate
Although there are many such questions on the internet, none of them are working. I am desperate here please help.
I am using UBUNTU 17.10 x64
If it is urgent, try restoring from your backup.

PHP 5.6 Mcrypt x64 and MIT Scheme not compatible?

I have PHP 5.6 PHP 5.6.17-1+deb.sury.org~trusty+2 (cli) installed currently, on Mint 17.2 x64 (Cinnamon). If I try to install mit-scheme, I get:
sudo apt-get install mit-scheme
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
dbconfig-common libjs-codemirror libjs-jquery-cookie libjs-jquery-event-drag
libjs-jquery-metadata libjs-jquery-mousewheel libjs-jquery-tablesorter
libjs-jquery-ui php-gettext
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
libmcrypt4:i386 libmhash2:i386 libpq5:i386
Suggested packages:
libmcrypt-dev:i386 mcrypt:i386 mit-scheme-dbg:i386
The following packages will be REMOVED:
libmcrypt-dev libmcrypt4 mcrypt php5-mcrypt phpmyadmin
The following NEW packages will be installed:
libmcrypt4:i386 libmhash2:i386 libpq5:i386 mit-scheme:i386
0 upgraded, 4 newly installed, 5 to remove and 38 not upgraded.
Need to get 6,668 kB of archives.
After this operation, 5,040 kB disk space will be freed.
Seems the problem is between libmcrypt4 and libmcrypt4:i386. Is there not an x64 version of Scheme, or a way to keep those two mcrypt versions from interfering with each other? Best (of poor) options looks like installing Scheme in a 32bit virtual machine. Another option is compiling PHP from a 32 bit source, if that is possible on a 64bit machine. Anyone else run into this issue?
I actually ended up building mit-scheme from source outside my package manager on gentoo two years ago and it's still working. I would suggest you install mit-scheme from the source (https://www.gnu.org/software/mit-scheme/liarc-build.html) or update to jessie, as jessie includes an amd64 version, whereas wheezy does not. https://packages.debian.org/jessie/mit-scheme
So within wheezy the answer is not. However I know for sure you can compile 9.0.1 and later to a 64-bit target.
file /usr/local/bin/mit-scheme-x86-64
/usr/local/bin/mit-scheme-x86-64: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.9, not stripped

Install libssh2-php on PHP 5.4.9 (x64)

I have a problem with the update on php 5.4.9 (i install it with the ppa "ppa:ondrej/php5")
Now i have the problem that i can't install libssh2-php (which is required on my project)
I found some .deb files, but it's only for 32-bit systems.
So when i'm trying to install libssh2-php i have a collision with "libssh2-php:i386" and i have the following dependiesmessage:
ucf:i386 libc6:i386 (>= 2.4) libssh2-1:i386 (>= 1.0) and phpapi-20090626+lfs:i386
System: Ubuntu Server 12.04 LTS x64 | PHP 5.4.9
I also got a warning on running "php -v"
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/ssh2.so' - /usr/lib/php5/20100525/ssh2.so: cannot open shared object file: No such file or directory in Unknown on line 0
The problem is/was that the libssh2 is not aviable for PHP5.4.x AND a x64 system.
I have the same problem trying to use ondrej's ppa for ubuntu 10.04 LTS. It seams that he didn't include the sssh extension.
Apt-get tries to install the version from default package which runs into conflict (depends phpapi-20090626+lfs) with current installed version, isn't it?
Only my backup php cli script needs this extension to run. After trying to solve dependencies witout success, I switched to a shell_exec('ssh ...#...') solution as workaround.
I am only a developer with advanced admin knowledge, no apt-get or linux packaging admin professional. There maybe other solution to fix this via packaging management or maybe building the needed version from source?
EDIT:
There will be another nicer solution :-) you can use pecl to install / build the extension, here is what i have done:
$ sudo pecl install ssh2
Failed to download pecl/ssh2 within preferred state "stable", latest release is version 0.12, stability "beta", use "channel://pecl.php.net/ssh2-0.12" to install
install failed
$ sudo pecl install channel://pecl.php.net/ssh2-0.12
downloading ssh2-0.12.tgz ...
Starting to download ssh2-0.12.tgz (26,223 bytes)
[...]
Build process completed successfully
Installing '/usr/lib/php5/20100525+lfs/ssh2.so'
install ok: channel://pecl.php.net/ssh2-0.12
configuration option "php_ini" is not set to php.ini location
You should add "extension=ssh2.so" to php.ini
Afterwards I add extension=/usr/lib/php5/20100525+lfs/ssh2.so to php config.
Just do:
sudo aptitude purge php5-suhosin
It's described in detail here: bugs.debian.org

How to install libapache2-modxslt on Ubuntu 12.04 LTS

I'm attempting to deploy a symphony application on ubuntu 12.04 LTS and am having problems installing libapache2-modxslt. Here is the output from check_configuration.php, as you can see XSL module is not installed.
********************************
* *
* symfony requirements check *
* *
********************************
php.ini used by PHP: /etc/php5/apache2/php.ini
** Mandatory requirements **
OK PHP version is at least 5.2.4 (5.3.10-1ubuntu3.2)
** Optional checks **
OK PDO is installed
OK PDO has some drivers installed: mysql
OK PHP-XML module is installed
[[WARNING]] XSL module is installed: FAILED
*** Install and enable the XSL module (recommended for Propel) ***
OK The token_get_all() function is available
OK The mb_strlen() function is available
OK The iconv() function is available
OK The utf8_decode() is available
OK The posix_isatty() is available
[[WARNING]] A PHP accelerator is installed: FAILED
*** Install a PHP accelerator like APC (highly recommended) ***
[[WARNING]] php.ini has short_open_tag set to off: FAILED
*** Set it to off in php.ini ***
OK php.ini has magic_quotes_gpc set to off
OK php.ini has register_globals set to off
OK php.ini has session.auto_start set to off
OK PHP version is not 5.2.9
I've type the following command in attempt to install libapache2-modxslt and this is what the output is.
mark#ubuntu:/$ sudo apt-get install libapache2-modxslt php5-xsl
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libapache2-modxslt
Please advise.
Debian/Ubuntu packages are named slightly different. It should rather be libapache2-mod-xslt not libapache2-modxslt (note the dash between "mod" and module name). So try
sudo apt-get install libapache2-mod-xslt php5-xsl
BUT, since you need XLS package for PHP only, then simply let the package manager find right dependencies itself (package management is well done and powerful on Debian and derivatives as Ubuntu). So simply do:
sudo apt-get install php5-xsl
and let the things roll. If you are curious, you can always list package dependencies using i.e. apt-cache like this:
sudo apt-cache depends php5-xsl
but if not, and package you are going to install would need something additional, apt will let you know and ask for confirmation to install additional required packages.

Categories