PHP Fatal error: Class 'Styles_model' not found

If you need support with TeamCal Pro (installation, configuration, usage) post your request here.
Post Reply
skoshold
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 2015-11-07, 20:17
Are you a spam bot?: No

PHP Fatal error: Class 'Styles_model' not found

Post by skoshold » 2015-11-08, 14:53

Hi,

first I like to thank Lewe for providing us with such a great tool!

Anyway, I have problems getting TeamCal Pro up and running on my Ubuntu 12.04.5 LTS.

Here is what I did:
1. Downloaded the tcp (I tried all steps with tcpro_36019.zip and tcpro_36018.zip)
2. Did the installation and mysql connection checks offered by the installer
3. Double checked all file and directory access rights so that they all belong to www-data group

Once I finished installation (last installation step) tcp is not doing anything but showing a white screen (nothing is shown, no message displayed)

I checked the error log and found this entry:
"/usr/lib/cgi-bin/php5-fcgi" stderr: PHP message: PHP Fatal error: Class 'Styles_model' not found in /srv/www/MYURL/www/includes/header_html_inc.php on line 45"

In model directory I can access the class file for Styles_model and it looks OK to me (compared to the other model files).

Then I setup a local MAMP environment on my laptop to check if this is an error in the distribution package itself. On my MAMP environment I don`t have this issue and tcp is working as expected. So the problem must have something to do with my environment.

I then played around with the include order in header_html_inc.php but it´s only Styles_model causing the problem every other model seem to be included ok.

Here is my apache virtual host config file:
==
<VirtualHost MYIP:80>
ServerName MYURL
ServerAlias SERVERALIAS
ServerAdmin Admins email
DocumentRoot /srv/www/MYURL/www
## robots.txt for dev system:
<IfDefine dev>
Alias /robots.txt /srv/www/MYURL/data/dev-robots.txt
</IfDefine>

<Location />
Order Deny,Allow
Deny from All
AuthType Basic
AuthName "Access not allowed"
AuthUserFile /srv/www/MYURL/data/.htpasswd
Require valid-user
Allow from localhost
Satisfy Any
</Location>


# Directory config
<Directory /srv/www/MYURL/www/>
AllowOverride All
Options +FollowSymLinks -Indexes
Order allow,deny
Allow from all
</Directory>
<IfModule mod_fastcgi.c>
AddHandler php5-fcgi .php
Action php5-fcgi /php5-fcgi
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
#FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -appConnTimeout 10 -idle-timeout 180 -socket /var/run/php5-fpm.sock -pass-header Authorization
</IfModule>
</VirtualHost>
==

I hope that somebody out there can give me some directions in what to check or where to look for. Any help is appreciated;-).

Thanx in advance for your time!
User avatar
George
Platinum Boarder
Platinum Boarder
Posts: 389
Joined: 2004-11-29, 21:20
Are you a spam bot?: No
Contact:

Re: PHP Fatal error: Class 'Styles_model' not found

Post by George » 2015-11-08, 19:55

Hi skoshold,
before we dig deeper into this, in your environment, do you have PHP short tags enabled?
http://php.net/manual/en/ini.core.php#i ... t-open-tag

Best regards,
George
skoshold
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 2015-11-07, 20:17
Are you a spam bot?: No

Re: PHP Fatal error: Class 'Styles_model' not found

Post by skoshold » 2015-11-08, 20:48

George wrote:Hi skoshold,
before we dig deeper into this, in your environment, do you have PHP short tags enabled?
http://php.net/manual/en/ini.core.php#i ... t-open-tag

Best regards,
George

Yes, i noticed that this was one of the tipps given here in this forum so I checked that right away. They are enabled.
skoshold
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 2015-11-07, 20:17
Are you a spam bot?: No

Re: PHP Fatal error: Class 'Styles_model' not found

Post by skoshold » 2015-11-09, 17:52

Hi everybody,

I think I found a solution for this issue myself... So if anybody else is having the same problem this is how I solved it...

On my Ubuntu system I had PHP 5.3 active for this website. I seem like PHP 5.3, at least the version I'm using, has a bug in the implementation of "require_once". For testing purposes we added some "echo" commands for the "require_once" modules that were never executed.

Therefore we switch the project to PHP 5.5 (which is much better anyway;-)) and everything works perfect. As a temporary solution I could get the project working by changing "require_once" to "require". Anyway, PHP 5.3 is no longer supported so everybody should switch to later versions asap.

Thx George for your support!

Best regards
SK
User avatar
George
Platinum Boarder
Platinum Boarder
Posts: 389
Joined: 2004-11-29, 21:20
Are you a spam bot?: No
Contact:

Re: PHP Fatal error: Class 'Styles_model' not found

Post by George » 2015-11-10, 07:25

Thanks for sharing your solution. I am glad it worked out.
Post Reply