473,659 Members | 2,671 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need help with Joomla 1.5.2

19 New Member
Hi I am trying to learn Joomla - a tool for web development using php.My problem is I keep getting warnings such as

Warning: strtotime() [function.strtot ime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_ti mezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Pacific/Auckland' for '12.0/no DST' instead in C:\xampp\htdocs \joomla15\libra ries\joomla\uti lities\date.php on line 56

I tried changing the code

Expand|Select|Wrap|Line Numbers
  1. function __construct($date = 'now', $tzOffset = 0)
  2.  {        
  3.    if ($date == 'now' || empty($date))    
  4.     {
  5.       $this->_date = strtotime(gmdate("M d Y H:i:s", time()));            
  6.      return;
  7.    } 
  8.    :
  9.    : //more code  
  10.  }

to

Expand|Select|Wrap|Line Numbers
  1. function __construct($date = 'now', $tzOffset = 0)
  2.  {
  3.   if ($date == 'now' || empty($date))
  4.    {
  5.     $this->_date = date_default_timezone_set('Pacific/Fiji');            
  6.     return;
  7.    }
  8.    :
  9.    :  //more code 
  10.  }
Before changing the code, I got the home page as I had designed, together with the warnings but now I get a blank page.I can't even view my home page.Can someone familiar with Joomla help me please...

Thanks
Sep 19 '10 #1
3 1465
Rizladonovich
13 New Member
date_default_ti mezone_set returns a boolean value (check man page). In other words; your statement set $this->date to TRUE if success or FALSE if failure.

The "best way" (could of course depend on special cases in code) is to set it in php.ini.

If not set it "early" in the code, so that you are sure it is set before any time function are used.

So: do _not_ change line 5, but add definition of timezone _before_ that line is executed...

I.e.:

date_default_ti mezone_set('Pac ific/Fiji'); could be added in another file executed before the one you have your posted code or:

Expand|Select|Wrap|Line Numbers
  1.  
  2. /* HERE */
  3.  
  4. function __construct($date = 'now', $tzOffset = 0)
  5.  {        
  6.    /* or HERE */
  7.    if ($date == 'now' || empty($date))    
  8.     {
  9.      /* or HERE */
  10.       $this->_date = strtotime(gmdate("M d Y H:i:s", time()));            
  11.      return;
  12.    } 
  13.    :
  14.    : //more code  
  15.  }
  16.  
Sep 19 '10 #2
nlal
19 New Member
According to this posting
http://forum.joomla.org/viewtopic.php?p=2149186
The construct function actually has two underscore
function __construct()
and removing an underscore solves the problem.
This is true.But the problem remains that I can no longer view the page I designed
Sep 19 '10 #3
Rizladonovich
13 New Member
> ...
> The construct function actually has two underscore
> function __construct()
> and removing an underscore solves the problem.
> This is true.But the problem remains that I can no longer view the page I designed
> ...

That sounds very strange.

Construct should have two underscores if it is supposed to be a class construct.

ref: http://www.php.net/manual/en/language.oop5.decon.php
Sep 19 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

7
12225
by: i_vincent | last post by:
Hi all, Newbie Python programmer here, so please be patient. I have spent all day googling for an answer to my problem, but everything I try fails to work (or works from the Interpreter with a set value but not from my code with dynamic values). Okay, here is the general gist of the problem. I am using Python to parse an output file (from a MAK Logger but that is not really important). Now I have some data that is contained on a line...
0
1707
by: Adam Haskell | last post by:
Ok heres the situation: We have a linked server from SQL 2000 to a foxpro dbf. In our test enviroment we had the Foxpro and SQL server on the same machine. The linked worked perfect. Now we are ready to implement it. When we made a link to the real FoxPro dbf nothing is showing up in the tables. The FoxPro is on a seperate machine under another domain in active Directory. We have tried on the same Active Directory as well, not
1
2678
by: Srinivasa Ra via .NET 247 | last post by:
(Type your message here) I am writing an application that does lot of read/write's withcomputer's serial port. The application as a whole is workingfine. Current Approach: I have a Timer that checks once every millisecond to see if there is any data avaialable to read at theserial port. If so then reads it. The serial port is openedwithout OVERLAPPING. TRYING TO GET TO: I don't think polling serial port every millisecond is a good approach....
25
1908
by: Mark | last post by:
I'm just starting out in an introductory ASP.Net course, and am trying to run a simple program but keeping getting an error. I'm running XP, have installed Internet Information Services (5.1) , Microsoft .Net Framework (English) v1.0.3705 and Microsoft .Net Framework SDK (English) v1.0a on my computer. Also Visual Studio .Net 2002 is also installed. "http://localhost/day1/listing0104.aspx" is placed in the address line of Browser. ...
1
1560
by: Arvind P Rangan | last post by:
Hi, I have created a class library which i need to use in my ASPX file. when i say: Dim mylib As TestLib = new TestLib() it gives me an error saying type required. How do we use a class library ?
0
282
by: saravanan_article | last post by:
Hi I am newbie to C#, i am using C# 2005 and DataGridView in my Application. The problem is described here I am using DataGrid and I placed some Headers like Column1,Column2,Column3.... What i want is i that i want to Create secondary column under the Column1(Col name) of dataGridView. Please share ur ideas.. Its very urgent. Is there any properties i need to set or any methods i need to override? Reply me as soon as possible
2
1454
by: manisha.patravali | last post by:
Hello, First let me explain the scenario where i m using this requirement. We are Using CustomAppWizard and designing a wizard .One of the wizard pages will Insert Composite controls as many as the user wants . 1.So i should be able to dynamically insert ATL controls without using Insert Control Dailog. 2. can any one tell me how to dynamically create Template file in TEMPLATE folder of resource view .
2
1754
by: Andrew | last post by:
Hi, I am trying to write a program to solve roots using the Newtonian method of roots, and I am recieving several errors which I cannot figure out... if anyone could give me a point in the right direction it wuld be appreciaed. Here is what I have so far: #include <iostream> #include <math.h> using namespace std;
8
9156
by: rdabane | last post by:
I'm trying to perform following type of operation from inside a python script. 1. Open an application shell (basically a tcl ) 2. Run some commands on that shell and get outputs from each command 3. Close the shell I could do it using communicate if I concatenate all my commands ( separated by newline ) and read all the output in the end. So basically I could do following sequence: 1. command1 \n command2 \n command 3 \n
0
1064
by: P.K Sahu | last post by:
hello there, i'm new to web service but i have a difficulty to understand web services. See, I created the webservice through the default template of visual studio & " hello world" but that does not suffice my pupose. i went thru many books of web services but coding hunger is still there. can anybody give me some directions which book to read. however, if somebody can provide me the complete small applications based on webservice with...
0
8330
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8850
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8746
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8626
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6178
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4334
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.