From: Lee Cartwright Date: July 11 2012 7:33am Subject: Re: Weekly report issue after moving to new OS List-Archive: http://lists.mysql.com/eventum-users/6054 Message-Id: <4FFD2C3B.2020309@diamond.demon.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Hi Greg, Neither system reports the php.ini files I sent to you when I run php --ini. Is it possible that when PHP is executed on the command line it uses a different set of ini files from when it's executed within Apache? Lee On 10/07/12 20:34, Greg Larkin wrote: > Hi Lee, > > Interesting, I would expect some differences, but also run this command > on each machine to make sure the .ini files you attached are the same as > reported in the output: > > php --ini > > > I did see some differences between the .ini files you sent, and the new > one would benefit from these changes: > > allow_call_time_pass_reference = Off > display_errors = Off > enable_dl = Off > magic_quotes_gpc = Off > register_argc_argv = Off > session.use_only_cookies = 1 > session.hash_function = 1 > session.cookie_httponly = 1 > session.bug_compat_42 = Off > session.bug_compat_warn = On > short_open_tag = Off > error_log = syslog > > You'll need to restart the web server after making those changes. You > should also visit the /setup URL of your Eventum installation to check > if there are any other tweaks needed after moving to the new system. > > Hope that helps, > Greg > > On 7/10/12 12:11 PM, Lee Cartwright wrote: >> Hi Greg, >> >> Old Machine >> # php -i | grep register >> register_argc_argv => On => On >> register_globals => Off => Off >> register_long_arrays => Off => Off >> >> New Machine >> $ php -i | grep register >> register_argc_argv => On => On >> register_globals => Off => Off >> register_long_arrays => Off => Off >> >> I've attached the two ini files in case they're still of use. >> >> Thanks, >> Lee >> >> >> On 10/07/12 16:44, Greg Larkin wrote: >>> Hi Lee, >>> >>> Excellent, glad to hear it! Yes, those are the php.ini files I >>> mentioned, but here's an easier way to check for differences. Run the >>> following command on each machine and check if there are any >>> differences: >>> >>> php -i|grep register >>> >>> I have a hunch that the register_globals setting is different on the two >>> machines. >>> >>> Regards, >>> Greg >>> >>> On 7/10/12 11:16 AM, Lee Cartwright wrote: >>>> Hi Greg, >>>> >>>> That worked. Thanks you both for the quick help. >>>> >>>> The machine differences are: >>>> >>>> Old >>>> # php --version >>>> PHP 5.2.11 with Suhosin-Patch 0.9.7 (cli) (built: Sep 24 2009 13:35:48) >>>> >>>> >>>> New >>>> $ php --version >>>> PHP 5.3.2-1ubuntu4.17 with Suhosin-Patch (cli) (built: Jun 19 2012 >>>> 01:35:33) >>>> >>>> Do you mean the php.ini files in /etc/php5/apache2? Sorry if that's a >>>> silly question, I'm very new to PHP. >>>> >>>> Lee >>>> >>>> On 10/07/12 15:43, Greg Larkin wrote: >>>>> On 7/10/12 4:11 AM, Lee Cartwright wrote: >>>>>> I've attached the weekly data file from my templates_c directory. >>>>>> >>>>>> I've checked the Eventum config files and they are pointing >>>>>> APP_SMARTY_PATH at the Smarty directory included with Eventum. >>>>>> Just in >>>>>> case I've checked the Smarty install on this machine and it is also >>>>>> Smarty2 >>>>>> >>>>>> lee@www:/var/www/dcs-eventum/templates_c$ dpkg -l | grep smarty >>>>>> ii smarty >>>>>> 2.6.26-0.1ubuntu1 Template engine for PHP >>>>>> >>>>>> Thanks >>>>>> Lee >>>>>> >>>>>> On 09/07/12 18:05, Elan Ruusamäe wrote: >>>>>>> On 07/09/2012 07:51 PM, Lee Cartwright wrote: >>>>>>>> Thanks for the quick response. I have tried clearing out >>>>>>>> templates_c, which didn't help. >>>>>>> copy of the template_c file would be useful then, maybe could figure >>>>>>> out from there >>>>>>> >>>>> Hi Lee, >>>>> >>>>> Try changing the code in the template file from this: >>>>> >>>>> {$data.issues.other[issue].iss_id|str_pad:5:" ":"STR_PAD_LEFT"} >>>>> >>>>> >>>>> to this: >>>>> >>>>> {$data.issues.other[issue].iss_id|str_pad:5:" >>>>> ":$smarty.const.STR_PAD_LEFT} >>>>> >>>>> >>>>> Then delete the cached template and give the page another try. >>>>> >>>>> What version of PHP was Eventum installed on prior to the >>>>> migration? To >>>>> determine the underlying cause of the problem, it would also help >>>>> to see >>>>> the php.ini file from the old and new installations, but you may >>>>> want to >>>>> clean the files of any sensitive information before posting a link to >>>>> them. >>>>> >>>>> Hope that helps, >>>>> Greg >>>>> >>>