Guidance, PHP errors in Timetrex

Ask your questions regarding TimeTrex installation here.
Locked
StAugIT
Posts: 21
Joined: Wed Oct 25, 2006 6:07 am

Guidance, PHP errors in Timetrex

Post by StAugIT »

I am getting this error which is not letting me do anything, including uninstall/reinstall

Fatal error: Non-static method DateTime::setTimezone() cannot be called statically in /var/www/php/timetrex/includes/global.inc.php on line 147

If a solution is present, please let me know, if the problem is on my end please give me guidance on troubleshooting.

php5 --version output:

PHP 5.2.0-7 (cli) (built: Nov 24 2006 14:36:54)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies

I am running mysql --version output:

mysql Ver 14.12 Distrib 5.0.26, for pc-linux-gnu (i486) using readline 5.2

uname -a output:

Linux foo 2.6.18-1-686 #1 SMP Sat Oct 21 17:21:28 UTC 2006 i686 GNU/Linux

running debian unstable


Thankyou ahead of time.
--------------------
Atlantique Press
St. Augustine Florida
mikeb
Posts: 711
Joined: Thu Jul 27, 2006 11:58 am

Re: Guidance, PHP errors in Timetrex

Post by mikeb »

StAugIT wrote:I am getting this error which is not letting me do anything, including uninstall/reinstall

Fatal error: Non-static method DateTime::setTimezone() cannot be called statically in /var/www/php/timetrex/includes/global.inc.php on line 147

If a solution is present, please let me know, if the problem is on my end please give me guidance on troubleshooting.

php5 --version output:

PHP 5.2.0-7 (cli) (built: Nov 24 2006 14:36:54)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies

I am running mysql --version output:

mysql Ver 14.12 Distrib 5.0.26, for pc-linux-gnu (i486) using readline 5.2

uname -a output:

Linux foo 2.6.18-1-686 #1 SMP Sat Oct 21 17:21:28 UTC 2006 i686 GNU/Linux

running debian unstable


Thankyou ahead of time.
Unfortunately PHP v5.2 introduced its own DateTime class which conflicts with TimeTrex's DateTime class, therefore TimeTrex is unable to run on PHP v5.2 until v1.4.0-beta1 is released hopefully by the end of this week.

If this is an urgent issue for you please contact Support and we can figure out a work-around for you.
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
StAugIT
Posts: 21
Joined: Wed Oct 25, 2006 6:07 am

Post by StAugIT »

Could you either point me toward a link that has some instructions on how to roll back the version on a PHP installation or,

Can I do a search and replace and change every instance of "DateTime" to something else?

Thanks again in advance
--------------------
Atlantique Press
St. Augustine Florida
mikeb
Posts: 711
Joined: Thu Jul 27, 2006 11:58 am

Post by mikeb »

StAugIT wrote:Could you either point me toward a link that has some instructions on how to roll back the version on a PHP installation or,

Can I do a search and replace and change every instance of "DateTime" to something else?

Thanks again in advance
You could try doing a global search and replace in the TimeTrex directory:

Search for: "DateTime::"
Replace with: "TTDate::"
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
StAugIT
Posts: 21
Joined: Wed Oct 25, 2006 6:07 am

Post by StAugIT »

Just giving an update, I did a global search and replace but I still get the error:

"Fatal error: Class 'TTDate' not found in /var/www/php/timetrex/includes/global.inc.php on line 147"

I figured it wouldn't be able to get solved. I will just wait for the beta release late this week. Thanks for your help Mike.
--------------------
Atlantique Press
St. Augustine Florida
mikeb
Posts: 711
Joined: Thu Jul 27, 2006 11:58 am

Post by mikeb »

StAugIT wrote:Just giving an update, I did a global search and replace but I still get the error:

"Fatal error: Class 'TTDate' not found in /var/www/php/timetrex/includes/global.inc.php on line 147"

I figured it wouldn't be able to get solved. I will just wait for the beta release late this week. Thanks for your help Mike.
Sorry, I neglected to tell you that you also need to rename classes/core/DateTime.class.php to TTDate.class.php as well as edit that file and rename the class to "TTDate" from "DateTime"
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
StAugIT
Posts: 21
Joined: Wed Oct 25, 2006 6:07 am

Post by StAugIT »

My installation now works so far. Thanks again for your time Mike :).
--------------------
Atlantique Press
St. Augustine Florida
poopa
Posts: 57
Joined: Tue Dec 05, 2006 7:02 am

Post by poopa »

I had the exact same errors and did the exact same steps to correct it eas mentioned, but now when i go to http://localhost/timetrex/interface/install/install.php
it directs me to
http://localhost/timetrex/interface/install/License.php
and all I see is a white page.
any ideas?

I used XAMPP 1.5.5
* Apache 2.2.3
* MySQL 5.0.27
* PHP 5.2.0 & PHP 4.4.4
* phpMyAdmin 2.9.1.1
* FileZilla FTP Server 0.9.20
* OpenSSL 0.9.8d
TimeTrex Standard Edition 1.3.1
mikeb
Posts: 711
Joined: Thu Jul 27, 2006 11:58 am

Post by mikeb »

poopa wrote:I had the exact same errors and did the exact same steps to correct it eas mentioned, but now when i go to http://localhost/timetrex/interface/install/install.php
it directs me to
http://localhost/timetrex/interface/install/License.php
and all I see is a white page.
any ideas?

I used XAMPP 1.5.5
* Apache 2.2.3
* MySQL 5.0.27
* PHP 5.2.0 & PHP 4.4.4
* phpMyAdmin 2.9.1.1
* FileZilla FTP Server 0.9.20
* OpenSSL 0.9.8d
TimeTrex Standard Edition 1.3.1
Please take a look at this FAQ entry:

http://forums.timetrex.com/viewtopic.php?t=89
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
poopa
Posts: 57
Joined: Tue Dec 05, 2006 7:02 am

Post by poopa »

I looked at the FAQ and did everything mentioned there
Still I don't see any logs
you can view the files I changed here:

http://docs.google.com/View?docid=d6wtmxg_2cs64xk - php.ini
http://docs.google.com/View?docid=d6wtmxg_1cznjj3 - timetrex.ini.php

my filemon log:
http://docs.google.com/View?docid=d6wtmxg_3d9nw56

the only log changed is the apache access.log
127.0.0.1 - - [06/Dec/2006:11:10:26 +0200] "GET /timetrex/interface/install/install.php HTTP/1.1" 302 -
127.0.0.1 - - [06/Dec/2006:11:10:27 +0200] "GET /timetrex/interface/install/License.php HTTP/1.1" 200 -

and error.log
[Wed Dec 06 11:27:04 2006] [notice] Apache/2.2.3 (Win32) DAV/2 mod_ssl/2.2.3 OpenSSL/0.9.8d mod_autoindex_color PHP/5.2.0 configured -- resuming normal operations
[Wed Dec 06 11:27:04 2006] [notice] Server built: Sep 30 2006 21:24:06
[Wed Dec 06 11:27:04 2006] [notice] Parent: Created child process 496
[Wed Dec 06 11:27:05 2006] [notice] Child 496: Child process is running
[Wed Dec 06 11:27:05 2006] [notice] Child 496: Acquired the start mutex.
[Wed Dec 06 11:27:05 2006] [notice] Child 496: Starting 250 worker threads.
[Wed Dec 06 11:27:05 2006] [notice] Child 496: Starting thread to listen on port 443.
[Wed Dec 06 11:27:05 2006] [notice] Child 496: Starting thread to listen on port 80.

I did a little checking with Sysinternal's FileMon and I noticed that there is no read of a file php.ini. I dont know what it means.
I am able to load the http://localhost/xampp/index.php that came with XAMPP though and still no read from php.ini

The location of my edited php.ini is:
c:\Program Files\XAMPP\xampp\php\php.ini

I found some other php.ini files at:
c:\Program Files\XAMPP\xampp\apache\bin\php.ini
c:\Program Files\XAMPP\xampp\php\php4\php.ini

neither one is read during the page load

ANY help would be much appreciated
mikeb
Posts: 711
Joined: Thu Jul 27, 2006 11:58 am

Post by mikeb »

You're PHP.INI file is only read when your webserver starts up in most cases, not at each page load. Which is why you need to restart your web server if you make any changes to it.

You can get detailed PHP information by pointing your browser to this:

interface/install/Requirements.php?action=phpinfo

That will tell you exactly which PHP.INI file your PHP installation is using.

You can also try enabling display_errors in your PHP.INI file.

Unfortunately these are the worst kind of issues to resolve, ones that give you no idea as to what is going on.

The only other thing I can suggest at this point is editing classes/modules/install/install.class.php and removing any "@", which there should only be three of. If that doesn't start giving you hints as to what is wrong then your only other choice is to start debugging the old fashion way by adding:

<a few lines of code>
echo "Test1<br>\n";
<a few more lines of code>
echo "Test2<br>\n";

To key parts of the code until you find out what is causing the problem. If you're not comfortable with that then I suggest you purchase installation support and we can login to your box and figure it out for you.
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
poopa
Posts: 57
Joined: Tue Dec 05, 2006 7:02 am

Post by poopa »

navigating to interface/install/Requirements.php?action=phpinfo
gives me a blank screen also

I edited ALL php.ini on my HD to enabling display_errors.
also edited install.class.php like u suggested. nothing.

I dont see how debugging the old way would help since I cant see ANY erros what so ever.

btw I tried getting a Quote but I cant sub mit my form bcz it says I have bad input in Province/State and there is no such field....
mikeb
Posts: 711
Joined: Thu Jul 27, 2006 11:58 am

Post by mikeb »

poopa wrote:navigating to interface/install/Requirements.php?action=phpinfo
gives me a blank screen also

I edited ALL php.ini on my HD to enabling display_errors.
also edited install.class.php like u suggested. nothing.

I dont see how debugging the old way would help since I cant see ANY erros what so ever.

btw I tried getting a Quote but I cant sub mit my form bcz it says I have bad input in Province/State and there is no such field....
It is quite possible its a PHP v5.2 issue as TimeTrex v1.3.1 doesn't support that version of PHP yet. v1.4.0 due out in beta this week will though.

Debugging the "old" way should still work, because the idea is to echo text BEFORE the error occurs and then have echo lines AFTER the error occurs (which won't actually print out) to determine where the error is.

The quote form should be fixed now, that is quite strange that you got that error message since quote requests come in all day long without problems. Thanks for the heads up.
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
poopa
Posts: 57
Joined: Tue Dec 05, 2006 7:02 am

Post by poopa »

I decided to uninstall everything and start from scratch.
I installed an earlier version XAMPP, which doesnt make me change the timezone thingie.

This time I was able to see the License Acceptance Form.
but aftwr I choose accept it shows me:

http://timetrex/interface/install/License.php
Firefox can't find the server at timetrex.

Ill try to get logs.

well, I tried IE instead and it got me up to step 3.Database configuration

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'timetrex'@'localhost' (using password: YES) in D:\Program Files\xampp\htdocs\timetrex\classes\adodb\drivers\adodb-mysql.inc.php on line 358

I tired this
http://forums.timetrex.com/viewtopic.php?t=65
and I did something wrong.
How can I delete the databse I created and start that all over?
mikeb
Posts: 711
Joined: Thu Jul 27, 2006 11:58 am

Post by mikeb »

poopa wrote:I decided to uninstall everything and start from scratch.
I installed an earlier version XAMPP, which doesnt make me change the timezone thingie.

This time I was able to see the License Acceptance Form.
but aftwr I choose accept it shows me:

http://timetrex/interface/install/License.php
Firefox can't find the server at timetrex.

Ill try to get logs.

well, I tried IE instead and it got me up to step 3.Database configuration

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'timetrex'@'localhost' (using password: YES) in D:\Program Files\xampp\htdocs\timetrex\classes\adodb\drivers\adodb-mysql.inc.php on line 358

I searched the forum and couldnt find how to fix it in windows.
Can you help me please?
Interesting, sounds like your BASE_URL may be incorrect in your timetrex.ini.php file.

This FAQ entry should help you create the TimeTrex user in MySQL properly:

http://forums.timetrex.com/viewtopic.php?t=65
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
Locked