I am currently have two PHP version in my server ;
PHP version 5.2.11 - the current version of the php in the server
wherein many programs uses it. Have libxml2-2.6.16 as libxml2 version.
Virtually Installed PHP
PHP version 5.4.44 - the virtually installed version of php in the server. Since, I upload my project in the server which uses Symfony
Framework. As symfony requirement, php version must be at least have
a php version of 5.3. And so, we installed this PHP version virtually.
After setting all the necessary configuration, we run it in the browser using its customize port. Unfortunately,the page gives this error.
Fatal error: Uncaught exception 'InvalidArgumentException' with message '[ERROR 3070] CT 'container': The content model is not determinist. (in file:////home/sanchez/ProjectName/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd - line 20, column 0)' in /home/sanchez/ProjectName/vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php:96 Stack trace: #0 /home/sanchez/ProjectName/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php(218): Symfony\Component\Config\Util\XmlUtils::loadFile('/home/sanchez/...', Array) #1 /home/sanchez/ProjectName/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php(41): Symfony\Component\DependencyInjection\Loader\XmlFileLoader->parseFileToDOM('/home/sanchez/...') #2 /home/sanchez/ProjectName/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php(48): Symfony\Component\DependencyInjection\Loader\XmlFileLo in /home/sanchez/ProjectName/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php on line 220
To understand more about the error, I research in the internet and find some related topics that may help. Then,, I found out that it is all about the libxml2, so I installed another libxml2 version in my directory (personal) and just use symlink for it to point to my directory. By the way I install, libxml2-2.8.0 as libxml2 version. I am also using RHEL4.After setting again the neccessary configuration , it still give the same error as above.
How can I solve this? Is it really possible to have two libxml2 version on the server? Do I miss any configuration or something? Is my libxml2 version and php version 5.4.44 is compatible? Or there is any libxml2 that is compatible with my php version? What should I do?
Appreciate any help.Thanks.
Related
I use MAMP 5.5 (383) on my macOS Catalina (10.15.6) for general PHP related development. Some of my projects require LDAP connectivity for various reasons.
My process works well using MAMP, but recently I noticed that if I switch from whoever PHP version I have available in either app from PHP 7.2 to PHP 7.3 or above, all LDAP support stops; I get errors like this:
[30-Jul-2020 23:59:14 America/New_York] PHP Fatal error: Uncaught Error: Call to undefined function ldap_connect() in /Users/Jake/htdocs/ldap_test.php:3
Stack trace:
#0 {main}
And the only command in that file is simply a test ldap_connect() command.
In MAMP when I do a phpinfo() call, when it is running PHP 7.3.8 I see no LDAP references even in the configure command. But when I switch to PHP 7.2.21 I see --with-ldap in the configure command as well as this:
LDAP Support: enabled
RCS Version: $Id: 3839f871a91c293a52322c63329c68db23a0290a $
Total Links: 0/unlimited
API Version: 3001
Vendor Name: OpenLDAP
Vendor Version: 20428
Why is this?
I have tried to upgrade to MAMP 5.7 that has PHP 7.3 as well as PHP 7.4 but I get the same results; no LDAP support.
Has something happened in the way that OpenLDAP is supported in packages like this? I found this Homebrew related discussion which states the following and refers to this reported issue in an official PHP bug report:
“I can patch PHP 7.2 and older to use system LDAP again, but PHP 7.3 will require new symbols that only openldap exposes.”
Does this effectively mean that LDAP support in macOS is dead for PHP 7.3 and above unless there is a patch to PHP code or on the other side in the macOS implementation of OpenLDAP?
I use Ubuntu and CentOS as well and I can easily enable LDAP support via package installers there. But that’s little help when using MAMP for desktop development.
Looking for a solution that centers on the MAMP application and would like to avoid Homebrew or other setups where I am effectively building an M(acOS)AMP server from scratch on macOS.
Looks like this issue has been solved as of MAMP 6.3
LDAP support is back in the versions of PHP that come with MAMP 6.3 and higher.
Deciding to check a newer version of MAMP — since PHP 8 is looming and sticking with PHP 7.2 is no longer a real option — I downloaded MAMP 6.3 and it comes with PHP 7.4.12 and PHP 8.0.0 installed.
And without saying anything else… Both versions of PHP here have LDAP support baked in right out of the box! Confirmed by using a basic ldap_connect command as well as taking a few small apps I have developed around the block in these new versions of PHP and all works great!
So it seems like the PHP 7.3 cycles for MAMP had a weird “no-LDAP” blip. I recommend anyone wanting to move forward in their code, just download MAMP 6.3 and use PHP 7.4 at least and you should be solid.
The vendor version of LDAP contained in MAMP 6.3 is 20448 for anyone who needs to know that.
After about a week of trying to install grpc for Firestore with PHP, I managed to get it working, however only when ran in terminals / cmd. This php.ini / environment is on my desktop in a folder and when executing files with firestore commands it works. No errors.
However, when in WAMP, it crashes the page with:
Fatal error: Uncaught Google\Cloud\Core\Exception\GoogleException: The requested client requires the gRPC extension. Please see https://cloud.google.com/php/grpc for installation instructions. in D:\wamp64\www\karma\vendor\google\cloud-core\src\ClientTrait.php:76 Stack trace: #0 D:\wamp64\www\karma\vendor\google\cloud-firestore\src\FirestoreClient.php(139): Google\Cloud\Firestore\FirestoreClient->requireGrpc() #1 D:\wamp64\www\karma\functions.php(32): Google\Cloud\Firestore\FirestoreClient->__construct(Array) #2 D:\wamp64\www\karma\Firestore.php(8): Firestore->__construct('test') #3 {main} thrown in D:\wamp64\www\karma\vendor\google\cloud-core\src\ClientTrait.php on line 76
Now what is really weird is that I copied the directory from desktop and literally pasted it into the WAMP PHP area and there is no difference. It even says in the config that php_grpc is loaded! I dont think the bottom dlls are needed so I don't think its an issue they're missing but I find it incredibly strange the same directory on the desktop will run php files from the command line but not in WAMP. WAMP is 64 bit and so is the plugin. PHP version of wamp was 7.0.1 but I replaced the whole 7.0.1 folder with the new 7.4.x version as with the plugin of that version.
Why would it say its loaded and yet say it isnt?
I too have have the same issue.I tried all possible ways to fix it.The extension is loaded in waamp but the php shows missing error.
I had to completely reinstall wamp to fix this error, in a new directory, reinstall php and made sure I had the correct grpc version. I have no idea what caused the error, but try every recent grpc version (I think there is four) and ensure that in your config file every addition copies the format.
I had a new php install outside of WAMP which worked, but as wamp has it's own that was bugged for me
So I set up TYPO3 on Red Hat Enterprise Linux Server release 7.6 and I downloaded PHP 7.2.15. After I updated the PHP version the whole backend broke.
Here is my System:
Red Hat Enterprise Linux Server release 7.6 (Maipo)
TYPO3 CMS 8.7.6
PHP 7.2.15
MYSQL 5.5.60
When I log in with my password at http://myurl.com/typo3/
it simply sais this:
Uncaught TYPO3 Exception
#1476107295: PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/typo3/vendor/typo3fluid/fluid/src/ViewHelpers/CountViewHelper.php line 67
Here is also a screenshot of my error page:
What should i do?
I only have TemplaVoila+ installed.
Help is appreciated.
You encountered this issue: https://forge.typo3.org/issues/82227
Solve it like this:
Update your TYPO3 Core to the latest TYPO3 8 Version (currently 8.7.24)
replace TYPO3 8.7.6 Core with 8.7.24, then access http://myurl.com/typo3/install (install tool) and execute the update-wizard
check if PHP 7.2 is working now as this should also update "typo3fluid" (https://github.com/TYPO3/Fluid)
This should fix your problem.
For the future: always upDATE at TYPO3 asap. With upGRADES you can wait untill all extensions are compatible as TYPO3 supports LTS Versions quiet long :)
try to run the install tool (as stand alone).
clear all caches.
check for broken extensions.
do system checks.
otherwise: disable all extensions in your PackageStates.php one after the other until your system is running again (of course: start with non core extensions, start from the end)
I got such warning :
Warning: mysql_connect(): Headers and client library minor version mismatch. Headers:50537 Library:50617
when try to upload my code to my remote server, and my remote server currently using php 5.5
, It's because the mysql extension has been already deprecated so that i have to change the extension to mysqli?
but in my local server, i tested in php 5.5 too and it works as normal
what would be the issue here?
If you are running ubuntu/debian.
apt-cache search php5-mysqlnd
Find one that fits:
apt-get install php5-mysqlnd
I think your issue is this:
After having MySQL 5.6.17 published, some users complained about a
warning thrown by their PHP applications :
PHP Warning: mysql_connect(): Headers and client library minor version
mismatch. Headers:50535 Library:50617
In fact, this could happen with any application linked to
libmysqlclient18 in a certain version (php5-mysql from Dotdeb is
linked to the 5.5.35 version from the stock Debian distribution) when
connecting to a MySQL server in another version (5.6.17 in our case).
The warning is thrown by libmysqlclient18 itself. And this is just a
warning, there is no reason why any bad behavior would happen in that
case.
Of course, I could build php5-mysql against the latest
libmysqlclient18 (5.6.17), but it would lead to very bad issues, such
as duplicate symbols or segfaults when PHP is loaded with other
MySQL-linked modules from the stock Debian distribution (those are
linked to libmysqlclient18 5.5.35). For example : mod_php5 + Apache +
mod_auth_mysql would crash.
If this this warning really annoys you, feel free to install
php5-mysqlnd instead of php5-mysql :
it’s a drop-in replacement
it’s not linked against any libmysqlclient library
it won’t throw any irrelevant warning about version mismatch
it has a lot of benefits. See http://www.php.net/mysqlnd for more info
I hope this helps.
I'm relatively new to using Vagrant and Chef. I'm currently running Ubuntu Lucid 64 and using the Opscode PHP cookbook which installs PHP 5.3.2, as a package, by default. I'd like to install PHP 5.3.8 or 9 (either from source or as a package) but I can't seem to figure out how to configure it correctly. I have copied over the dependent cookbooks (build-essential, xml, mysql). This is what I have so far:
# vagrant_main/recipes/default.rb
require_recipe "apt"
node.override["php"]["version"] = "5.3.9"
require_recipe "php::source"
But I am getting an error. Here are the relevant lines of the stack trace:
NameError: wrong constant name DebianBeforeSqueeze?
/opt/ruby/lib/ruby/gems/1.8/gems/chef-0.10.2/bin/../lib/chef/mixin/recipe_definition_dsl_core.rb:56:in `const_defined?'
/opt/ruby/lib/ruby/gems/1.8/gems/chef-0.10.2/bin/../lib/chef/mixin/recipe_definition_dsl_core.rb:56:in `method_missing'
/tmp/vagrant-chef-1/chef-solo-1/mysql/recipes/client.rb:26:in `from_file'
/opt/ruby/lib/ruby/gems/1.8/gems/chef-0.10.2/bin/../lib/chef/cookbook_version.rb:578:in `load_recipe'
/opt/ruby/lib/ruby/gems/1.8/gems/chef-0.10.2/bin/../lib/chef/mixin/language_include_recipe.rb:40:in `include_recipe'
/opt/ruby/lib/ruby/gems/1.8/gems/chef-0.10.2/bin/../lib/chef/mixin/language_include_recipe.rb:27:in `each'
/opt/ruby/lib/ruby/gems/1.8/gems/chef-0.10.2/bin/../lib/chef/mixin/language_include_recipe.rb:27:in `include_recipe'
/tmp/vagrant-chef-1/chef-solo-1/php/recipes/source.rb:25:in `from_file'
Update: If I tell the PHP recipe not to worry about MySQL, it seems to install fine...
node.override["php"]["version"] = "5.3.9"
node.override["php"]["configure_options"]["mysql"] = false
require_recipe "php::source"
...however, Apache doesn't seem to know which version of PHP it's running. php_info() is reporting that it's using PHP 5.3.2, but command line (php -v) is correctly reporting 5.3.9.
What am I doing wrong?
In /etc/apache2/mods-enabled/php5.load you can detemine which version of php will Apache use (it has to be installed).