require_once() errors

Permalink
Does anyone know how to get rid of these errors?
Site doesn't work anymore...
( why is it still referencing concrete5.4.2.1, because I upgraded to concrete5.4.2.2)
Thanks for any help.

[Fri Dec 23 17:30:21 2011] [error] [client xxx] PHP Warning: require_once(Zend/Search/Lucene/Analysis/Analyzer/Common.php): failed to open stream: No such file or directory in /opt/liveMamp/apache2/htdocs/xxxx/updates/concrete5.4.2.1/concrete/libraries/3rdparty/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8Num.php on line 25
[Fri Dec 23 17:30:21 2011] [error] [client xxxx] PHP Fatal error: require_once(): Failed opening required 'Zend/Search/Lucene/Analysis/Analyzer/Common.php' (include_path='.:/opt/liveMamp/php/lib/php') in /opt/liveMamp/apache2/htdocs/xxxx/updates/concrete5.4.2.1/concrete/libraries/3rdparty/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8Num.php on line 25

maartenfb
 
mkly replied on at Permalink Reply
mkly
I've seen a couple reasons it doesn't know it's upgraded.

1) The Cache needs clearing.
1a) Manually delete all files in /files/cache/ (keep the folder)

2) Check /config/site.php you should see something like
<?php define('DIRNAME_APP_UPDATED', 'concrete5.4.2.2'); ?>

Do you have that? If so what version is it?

3) Check the Config table of the database. You should see two entries
SITE_APP_VERSION

and
APP_VERSION_LATEST

Are these both 5.4.2.2 ?

That said
concrete/libraries/3rdparty/Zend/Search/Lucene/Analysis/Analyzer/Common.php

does exist in 5.4.2.1 so it actually looks like you might have a path issue
Line 25 has this
require_once 'Zend/Search/Lucene/Analysis/Analyzer/Common.php';

Which based on your error looks like set_include_path() is not getting set. Which I'm not versed enough with on concrete5 bootstrap process to understand. Maybe this will make sense to someone coming into this thread?
maartenfb replied on at Permalink Reply
maartenfb
Thanks for replying so quickly :-)

1) Cleared cache folder

2) Added DIR_APP_UPDATED to 5.4.2.2 (that line wasn't there)

3) SITE_APP_VERSION was 5.4.2.1 Changed to 5.4.2.2
APP_VERSION_LATEST was correct 5.4.2.2

Still getting same errors with references to 5.4.2.1
Thank so far!

Hope someone can shed some light on set_include_path()
mkly replied on at Permalink Reply
mkly
Ok. I did a little digging.

From /concrete/config/base.php
# Used by the loader to load core libraries
define('DIR_LIBRARIES', DIR_BASE . '/libraries'); // front-end
define('DIR_LIBRARIES_CORE', DIR_BASE_CORE . '/libraries'); // front-end
define('DIR_LIBRARIES_3RDPARTY', DIR_LIBRARIES . '/3rdparty');
define('DIR_LIBRARIES_3RDPARTY_CORE', DIR_LIBRARIES_CORE . '/3rdparty');
ini_set('include_path', DIR_LIBRARIES_3RDPARTY . PATH_SEPARATOR . DIR_LIBRARIES_3RDPARTY_CORE . PATH_SEPARATOR . get_include_path());


Looks to be the same for both versions

You seem to be getting this
include_path='.:/opt/liveMamp/php/lib/php

which I'm guessing isn't correct and should have the 3rd party directories as well. Zend's require_once statements needs this in the include_path.


Has anything else possibly changed with your server setup?

I wonder if maybe there is a permission issue or something with the updated folder?

Do you have an /updates/concrete5.4.2.2/ folder?
mkly replied on at Permalink Reply
mkly
One more thing. How exactly did you upgrade concrete5? Did you upgrade through the Dashboard?
maartenfb replied on at Permalink Reply
maartenfb
ok , here's what I did:
1) started from a backup 5.4.2.1

2) Now here's a weird thing:
in the concrete/config/base.php I pasted the ini_set line from your post because the (outcommented)
original line does not look very good. (kinda backwards ???)
#ini_set('include_path', get_include_path() . PATH_SEPARATOR . DIR_LIBRARIES_3RDPARTY . PATH_SEPARATOR . DIR_LIBRARIES_3RDPARTY_CORE);
ini_set('include_path', DIR_LIBRARIES_3RDPARTY . PATH_SEPARATOR . DIR_LIBRARIES_3RDPARTY_CORE . PATH_SEPARATOR . get_include_path());


3) I suspect permissions may have well been an issue during updates, so I gave apache user (daemon) group ownership (recursive) to my entire website folder.

3) updated via dashboard to 5.4.2.2
All went well , except that in the config table the APP_VERSION_LATEST was still set to 5.4.2.1 (changed it to 5.4.2.2)

Site is slightly more responsive but daemon processes are still spiking CPU and memory. (but at least they are also releasing again)

Zend references are gone now in apache error log but now I'm getting these:
[Fri Dec 23 21:11:19 2011] [error] [client xxx] PHP Fatal error:  Class 'Loader' not found in /opt/liveMamp/apache2/htdocs/xxx/updates/concrete5.4.2.2/concrete/elements/profile/sidebar.php on line 1
[Fri Dec 23 21:11:31 2011] [error] [client xxx] PHP Fatal error:  Class 'Loader' not found in /opt/liveMamp/apache2/htdocs/xxx/updates/concrete5.4.2.2/concrete/blocks/video/controller.php on line 10
[Fri Dec 23 21:11:56 2011] [error] [client xxx] PHP Warning:  require_once(Auth/Yadis/HTTPFetcher.php): failed to open stream: No such file or directory in /opt/liveMamp/apache2/htdocs/xxx/updates/concrete5.4.2.1/concrete/libraries/3rdparty/Auth/Yadis/ParanoidHTTPFetcher.php on line 19
[Fri Dec 23 21:11:56 2011] [error] [clientxxx] PHP Fatal error:  require_once(): Failed opening required 'Auth/Yadis/HTTPFetcher.php' (include_path='.:/opt/liveMamp/php/lib/php') in /opt/liveMamp/apache2/htdocs/xxx/updates/concrete5.4.2.1/concrete/libraries/3rdparty/Auth/Yadis/ParanoidHTTPFetcher.php on line 19
mkly replied on at Permalink Reply
mkly
Did you change /concrete/config/base.php or did you change /concrete/updates/concrete5.4.2.2/config/base.php?

If you changed /concrete/config/base.php and it did anything then AFAIK you are still using 5.4.2.1

You said that you added DIR_APP_UPDATED to config/site.php. This should be DIRNAME_APP_UPDATED. Not sure if you just typo'd this in the forum.

Could you check to make sure there are no typos in /config/site.php and that there is no extra lines at the bottom of that file. It's very important that there are no extra empty lines.

The original ini_set should be fine. What do you have in your php.ini for include_path= ? I wonder if there is something in that that could be causing a problem.
fastcrash replied on at Permalink Reply
fastcrash
somehow when i see require_once, i remember this guy said
Try to avoid using include_once and require_once if possible. You are
 much better off using a straight include or require call, 
because the *_once() calls are very slow under an opcode cache. Sometimes
 there is no way around using these calls, but recognize that each
 one costs you an extra open() syscall and hash look up.

http://toys.lerdorf.com/archives/38-The-no-framework-PHP-MVC-framew...

this is old article from fonder php, the cranberries said 'no need to argue', i like that album.

maart, are u sure the file not missing and the path Absolute or Relative Paths was correct?

i experience this, i blame that host ITt company because of this error, but later i realize it was because my path in my php script not corect, tehehee.. poor me
maartenfb replied on at Permalink Reply
maartenfb
Hi fastcrash,
Thanks for joining in.

The thing is, I haven't written any custom php code on this site.
So I have no idea where to look for.
The paths that are showing up in the error log are correct and the files are also there.
The only weird thing is that the paths still contain 5.4.2.1 despite the fact that I
upgraded to 5.4.2.2

When googling "concrete5 require_once()" I see an enormous amount of c5 errorlogs but no solution.
maartenfb replied on at Permalink Reply
maartenfb
-both base files are identical (5.4.2.2 now)
-DIR_APP_UPDATED (oops typo)

-php.ini
include_path = ".:/opt/liveMamp/php/lib/php"
mkly replied on at Permalink Reply
mkly
Could you try commenting out that include_path= ?

That way we can rule out any issue with that.
maartenfb replied on at Permalink Reply
maartenfb
here's the log after out commenting include_path
[Fri Dec 23 22:33:50 2011] [error] [client xxx] PHP Warning:  require_once(Zend/Loader.php): failed to open stream: No such file or directory in /opt/liveMamp/apache2/htdocs/xxx/updates/concrete5.4.2.2/concrete/libraries/3rdparty/Zend/Loader/Autoloader.php on line 24
[Fri Dec 23 22:33:50 2011] [error] [client xxx] PHP Fatal error:  require_once(): Failed opening required 'Zend/Loader.php' (include_path='.:/bitnami/mampstack-osx-x86/output/php/lib/php') in /opt/liveMamp/apache2/htdocs/xxx/updates/concrete5.4.2.2/concrete/libraries/3rdparty/Zend/Loader/Autoloader.php on line 24
mkly replied on at Permalink Reply
mkly
I'm not sure if there is something with Mamp but that ini_set('include_path', ) above appears to have no effect. Is there anything about your setup that you can think of that would cause this?
maartenfb replied on at Permalink Reply
maartenfb
I can't think of anything else right now. I'm using a straight forward bitnami stack without any customization.

Maybe I should install a fresh c5 site on this stack and check log again.
If same errors appear then I suppose it's related to my stack.
mkly replied on at Permalink Reply
mkly
that include_path='.:/bitnami/mampstack-osx-x86/output/php/lib/php' should also have the libraries/3rdparty etc directories in it.

I'm not sure why.

Maybe double check DIR_BASE and DIR_REL?

DIR_BASE uses $_SERVER['SCRIPT_FILENAME'] maybe there is something with that?

Was this working before on the same exact mamp installation or is this a new stack that you restored a back up to?
maartenfb replied on at Permalink Reply
maartenfb
I'm still getting errors and I suspect there must be something wrong with PHP settings.
Site is completely down now. When starting up apache , cpu goes to 100% , memory gets eaten up, basically whole server goes down.
I'm running multiple sites on this Apache server, and there's only problems on one site.
The others are responding normally.
Can I get some support from a Concrete5 engineer? This is getting pretty urgent cause I'm dealing with a live site here. I can give full access to my OSX server.
Thanks.

[Wed Dec 28 13:56:19 2011] [error] [client xxx] PHP Fatal error: Call to a member function canWrite() on a non-object in /opt/liveMamp/apache2/htdocs/xxx/libraries/view.php on line 775
[Wed Dec 28 13:59:37 2011] [error] [client xxx] PHP Fatal error: Call to undefined method View::outputFooterItems() in /opt/liveMamp/apache2/htdocs/xxx/concrete/libraries/controller.php on line 467
[Wed Dec 28 13:59:37 2011] [error] [client xxx] PHP Fatal error: Call to undefined method View::outputFooterItems() in /opt/liveMamp/apache2/htdocs/xxx/concrete/libraries/controller.php on line 467
[Wed Dec 28 13:59:38 2011] [error] [client xxx] PHP Fatal error: Call to undefined method View::outputFooterItems() in /opt/liveMamp/apache2/htdocs/epra.com/concrete/libraries/controller.php on line 467
mkly replied on at Permalink Reply
mkly
outputFooterItems is AFAIK only in 5.5? Did you by chance upload the 5.5 version on accident?