Contao 4.1.2 installation just does not work out - symfony

I have extracted and copied the source files from https://contao.org/de/download.html (Contao 4.1.2 zip) to my web space (givoo.de) per FTP.
After visiting the url givoo.de/web/install.php it tells me to set the password and directly after that I am getting this error:
Fatal error: Call to undefined function Patchwork\grapheme_strlen() in /kunden/484914_14059/webseiten/vendor/patchwork/utf8/src/Patchwork/Utf8.php on line 234
I mean, there is not much else to do. A composer or such is not needed with the newer versions beginning in 4.1 or so.

You need at least PHP 5.4 to run Contao 4. If you do run PHP 5.4 or higher already, then your PHP environment does not have the PHP intl extension enabled, which is currently required for Contao 4.
PHP intl is integrated into the PHP binary since PHP 5.4, however some Linux distributions come with a custom built PHP binary without the intl extension.
Check with your hosting provider if and how you can enable the PHP intl extension for your server.
See also https://github.com/contao/check/issues/95

Related

How to adapt my composer.lock version for a lower php version?

I made a symfony project on php 7.4, however it seems like OVH php version is 7.3.16.
Which folder are not necessary for deployment and how can I adapt my composer for a different php version ?
Here's the error I get while accessing to my website :
Fatal Error: composer.lock was created for PHP version 7.4 or higher but the current PHP version is 7.3.16.
OVH offer a way to change the PHP version used by your domain.
Check Details of the .ovhconfig file for more information about it. You should also have an option in the control panel about it.

Error Installing Silverstripe 4.0.1

Trying a fresh install of Silverstripe 4.0.1 but only gets this far -
Installing SilverStripe...
I am now running through the installation steps (this should take about 30 seconds)
If you receive a fatal error, refresh this page to continue the installation
Setting up /var/www/duonsdev/public_html/index.php
Setting up /var/www/duonsdev/public_html/mysite/_config.php
Setting up /var/www/duonsdev/public_html/mysite/_config/theme.yml
Setting up /var/www/duonsdev/public_html/.env
Setting up /var/www/duonsdev/public_html/.htaccess
Building database schema...
ERROR [Emergency]: Uncaught TypeError: Return value of Symfony\Component\Filesystem\Filesystem::toIterable() must be an instance of Symfony\Component\Filesystem\iterable, array returned IN POST /install.php Line 729 in /var/www/duonsdev/public_html/vendor/symfony/filesystem/Filesystem.php Source ====== 720: } 721: 722
And the error goes on and on. I tried refresh, but same error.
If I try a dev/build instead then it always dies at the point of -
Index File_Versions.OwnerID: created as index ("OwnerID")
Website Error
There has been an error
The website server has not been able to respond to your request
Trying to setup on Ubuntu 16 on local dev machine running Apache virtual host.
Never had this problem before and setup fine with ss4.0.
Any ideas?
I ran into the same issue, and after checking in the official SilverStripe Community's slack channel, they mentioned this is because I was not running PHP 7.1.
Apparently, the official SilverStripe tarball offered in their website was built with PHP 7.1, so Composer added newer Symfony dependencies. They mentioned this would be fixed in newer releases.
Therefore, there are 2 ways you can fix this issue:
Download SilverStripe with Composer:
$ curl -sS https://getcomposer.org/installer | php
$ ./composer.phar create-project silverstripe/installer /var/www/duonsdev/public_html/
Update your PHP version to 7.1.
After doing any of those steps, you will be able to access the web wizard for installing SilverStripe.
NOTE: If you're on a shared hosting, you will need to download SilverStripe on your local machine (ensuring the PHP version matches, at least in the major version, e.g. 7.0), and upload the files that were generated to your public_html directory.
Make sure the module php version of apache in the same version as the cli php version.
Looks like the error was to do with the php version.
I was installing silverstripe through the cli using composer, but running a different version of php in apache.
So in the cli the php version was php 7.1
But in apache the php version was php 7.0.
After changing the apache php to match the cli (because silverstripe was installed using composer in the cli) it worked!

Deployment Symfony 2.4 on Microsoft Azure (git/composer)

For the last two days I'm trying to push my application on Azure but I'm facing problems about the Symfony 2.4 deps (with composer). The main error is :
symfony/icu v1.2.1 requires lib-icu >=4.4 -> the requested linked library icu has the wrong version installed or is missing from your system, make sure to have the extension providing it.
I saw on the internet that the problem could be about the php_intl extension not loaded. So after hours I managed to get it by creating a bin\ext\php_intl.dll in my root directory (the documentation does not mention the ext subdirectory, and it was not working for me when I put the intl into the bin directory).
Internationalization support enabled
version 1.1.0
ICU version 49.1.2
ICU Data version 49.1.2
But I always get the same error. Do you have any idea about this?
Thanks.
Try to add in your composer.json :
require: {
"symfony/icu": "1.1.*"
}
See http://symfony.com/doc/current/components/intl.html, chapter "ICU and Deployment Problems"

Install Fixtures in Sylius - Symfony2

After having successfully installed and updated all vendors in my project folder for Sylius i tried running this code :
app/console sylius:install --fixtures
I get this error :
PHP Fatal error: Class 'ResourceBundle' not found in C:\wamp\www\sylius\vendor\
symfony\symfony\src\Symfony\Component\Locale\Locale.php on line 51
Then i tried all possible solutions given here
Installed intl extension in php (working successfully).Then ran this command
php build-data.php 'your ICU version'
On running the above command i get this:
'which' is not recognized as an internal or external command,
operable program or batch file.
The command "svn" is not installed
I want to know if there is another workaround to this issue.
Please help and thanks in advance.
P.S. - No SVN runs on my system. And i'm using icu*46.dll
Anyone came across this??
This error relates to be PHP intl-extension. Make sure it is enabled and you have the LATEST version.
quick test:
<?php
var_dump(extension_loaded('intl'));
Make sure your PHP folder is correctly registered in your %PATH% environment variable.
Control Panel - System - Advanced - ...
Without that, the ICU dlls are not loaded by PHP as Apache module - no error message is displayed, but the extension is not enabled.
Check aswell from phpinfo() ! not with ...
php -m
... or ( windows = findstr, linux/cygwin = grep )
php -i | findstr intl
check that the extension is enabled in your php.ini ( dont know WAMP's extenion path so adjust it please )
extension=php_intl.dll
As i can see you are on Windows and using WAMP you will have to get a precompiled version of the extension.
The packages on http://windows.php.net/download/ all contain the php_intl.dll in the ext folder.
Make sure that the ICU is compiled with the same version of MSVC that PHP is.
You run into problems if the ICU was compiled with VC10 and PHP was with VC9.
Although php -m and php -i detect the INTL it wouldn't show up in phpinfo().

What I can't do with symfony 2.1 if php-intl extension has not been installed in my host?

When I check Symfony requirements in my host only throw a warning:
[[WARNING]] Checking that the intl extension is available: FAILED
I'm worried because I must deploy a fully internationalized app.
You can use translations and everything else related with internationalization even without the intl extension. As far as I know the intl extension makes it possible for PHP to automatically translate, for example, month names and weekdays.
Depending on the operating system there are different ways to install the intl extension on your system. It should be bundled with PHP 5.3 (however, it is not bundled with, e.g., the PHP version that ships with OS X or MAMP), but you can install it using PECL, Homebrew, MacPorts, apt-get, etc.
This topic in the Symfony2 Google Group discusses the installation on Windows.
intl extension with MAMP
Installation intl extension with PECL and Homebrew

Resources