This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

timezone problem, permition problem and intl problem checkin

Discuss installing Symfony 2 here

timezone problem, permition problem and intl problem checkin

by Godot » Sun Mar 02, 2014 1:45 am

Hi

I have some problems detected by the config.php file of Symfony wich I can't solve.
I'm on Ubuntu 13.10 64 bits and LAMP.


The permition problem, Symfony ask for giving to the server permitions to access to app/cache and app/logs. Well, I solved this by giving all rights to other, but I belive that thats not the right way to do it.

An other problem is the date.timezone in php.ini. Symfony tells that it should be set. It asked for it when I ran check.php, it asked to correct it at php.ini, what I did. Then, running symfony/web/config.php in the browser it ask me to do the same again, in /etc/php5/apache2/php.ini wich is not the same php.ini than the first one. I have changed this, but this time, it is still asking me for this even if I changed it :
Code: Select all
[code][Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = Europe/Paris[/code]

The intl problem, I dont understand that to do with it. In php.ini I have :

Code: Select all
[intl]
;intl.default_locale =
; This directive allows you to produce PHP errors when some error
; happens within intl functions. The value is the level of the error produced.
; Default is 0, which does not produce any errors.
;intl.error_level = E_WARNING


So, I understand that intl is installed at the server. I have tried to take away the comment, like that :

intl.error_level = E_WARNING

but it dont work.

Thank you
Godot
Junior Member
 
Posts: 5
Joined: Sun Mar 02, 2014 1:05 am

Re: timezone problem, permition problem and intl problem che

by nymo » Mon Mar 03, 2014 10:50 am

Each time you change something in your php.ini you have to restart your webserver in order to make the changes applied. Regards INTL you're looking at the wrong part of the php.ini. Search for the part in your ini where the extensions are loaded and add the following:

extension=php_intl.so

After that you have to restart your server again.

Regards the permission problem for the cache and logs folder you should have take a look at the docs. That's the prefered way for setting the security settings.


http://symfony.com/doc/current/book/installation.html#configuration-and-setup
nymo
Senior Member
 
Posts: 174
Joined: Fri Jan 07, 2011 11:37 pm
Location: Germany

Re: timezone problem, permition problem and intl problem che

by Godot » Tue Mar 04, 2014 7:22 pm

Hi

Thank you for your answer.

I had the hope to add OK to the topic, but I have still a problem.

OK for reloading after modifying the php.ini file, the timezone is now ok.
Ok for the permission problem, it's OK to. It is the second method of two wich worked.

.

I tried to modify both /etc/php5/cli/php.ini and /etc/php5/apache2/php.ini, restarted Apache with $ sudo /etc/init.d/apache2 reload and to be absolutly sure that Apache was reloaded I have restarted the computer.


But I don't see were I have to put the extension=php_intl.so statement. I Tried here :
Code: Select all
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;

; If you wish to have an extension loaded automatically, use the following
; syntax:
;
;   extension=modulename.extension
;
; For example, on Windows:
;
;   extension=msql.dll
;
; ... or under UNIX:
;
;   extension=msql.so
;
; ... or with a path:
;
;   extension=/path/to/extension/msql.so
;
; If you only provide the name of the extension, PHP will look for it in its
; default extension directory.
;
extension=php_intl.so ; ajout alex sur recommandation de Symfony


and I dont see where else I could put it.

Thank you again.
Godot
Junior Member
 
Posts: 5
Joined: Sun Mar 02, 2014 1:05 am

Re: timezone problem, permition problem and intl problem che

by nymo » Wed Mar 05, 2014 10:05 am

Search for the intl extension on your machine in order to get the location where it is saved. In Terminal you could use this:

Code: Select all
sudo find / | grep php_intl.so
or
sudo find / | grep *intl.so
or
sudo find / | grep *intl.*


Then check the path for your extension dir in your php.ini file. This tells php where to look for the extension.

Example:
Code: Select all
extension_dir = "ext"


If it is different then the location of your found intl.so file then fix the path or make a symlink of the intl.so file to your ext dir location.

After you restarted your webserver open a file where you have phpinfo(); output to check if the intl extension is loaded. There you can also see from which directory the extension are loaded and which php.ini file is being used.
nymo
Senior Member
 
Posts: 174
Joined: Fri Jan 07, 2011 11:37 pm
Location: Germany

Re: timezone problem, permition problem and intl problem che

by Godot » Wed Mar 12, 2014 2:05 pm

I have tried this but I dont find any php_intl.so in the computer in any way.

I have been looking in php documentation how to install this but, first, it should be there. And, in the other hand, to install this it talks about compilation of php and other complicated things.

What can I do ?
Godot
Junior Member
 
Posts: 5
Joined: Sun Mar 02, 2014 1:05 am

Re: timezone problem, permition problem and intl problem che

by nymo » Thu Mar 13, 2014 10:09 am

When this file is missing than you have two options:

1. The easier one is to check if there is already a intl extension available for installation in Ubuntu via terminal.

Code: Select all
sudo apt-get install php-intl


I'm not sure if this is the correct command but with a little search on the internet I think you can find it.

2. Compile this extension by yourself. You will find lots of tutorials on the internet about how to compile php. Since you using linux you should be familiar with compilation :D
nymo
Senior Member
 
Posts: 174
Joined: Fri Jan 07, 2011 11:37 pm
Location: Germany

Re: timezone problem, permition problem and intl problem che

by Godot » Wed Mar 19, 2014 9:31 pm

I got it. The command was :

Code: Select all
$ sudo apt-get install php5-intl


Thank you for all answers.
Godot
Junior Member
 
Posts: 5
Joined: Sun Mar 02, 2014 1:05 am