Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error after migration #1565

Open
eVenster opened this issue Aug 14, 2023 · 3 comments
Open

error after migration #1565

eVenster opened this issue Aug 14, 2023 · 3 comments

Comments

@eVenster
Copy link

After a migration there is an error, which reads:
mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Call to undefined function expProcessBuffer() in /XXX/public_html/index.php:32 Apache error
mod_fcgid: stderr: Stack trace: Apache error
mod_fcgid: stderr: #0 [internal function]: epb() Apache error
mod_fcgid: stderr: #1 {main} Apache error
mod_fcgid: stderr: thrown in /XXX/public_html/index.php on line 32

All pages return a 400
It concerns Exponent 2.7.1 p2

@dleffler
Copy link
Collaborator

I've seen this error only once before. Not sure if it wasn't an Apache or mod_fcgid error. You MIGHT be able to circumvent it by moving some lines of code in /index.php. The current code lines 28-33 has several commented lines

function epb($buffer, $mode) {
//    @ob_gzhandler($buffer, $mode);
//    @ob_gzhandler($buffer);
//    return $buffer; // uncomment if you're messing with output buffering so errors show. ~pb
    return expProcessBuffer($buffer);  // add/process css & jscript for page
}

Remove the 2 slashes at the beginning of line #31 and add them to the beginning of line #32.

function epb($buffer, $mode) {
//    @ob_gzhandler($buffer, $mode);
//    @ob_gzhandler($buffer);
    return $buffer; // uncomment if you're messing with output buffering so errors show. ~pb
//    return expProcessBuffer($buffer);  // add/process css & jscript for page
}

This will prevent most css info from begin on the page, but will load the page, HOWEVER it should expose the error/warning which causes line #28 (output) to be called too early (e.g., an error before the first few lines of line #38 'require_once('exponent.php' is called to declare function expProcessBuffer()

Once you nail that down, you can reverse the comments as per the original code.

@eVenster
Copy link
Author

I Tried uncommenting/commenting lines 32 and 31. The homepage loads, without CSS, any other pages doen not load. I'm not a programmer, so

"This will prevent most css info from begin on the page, but will load the page, HOWEVER it should expose the error/warning which causes line #28 (output) to be called too early (e.g., an error before the first few lines of line #38 'require_once('exponent.php' is called to declare function expProcessBuffer()

Once you nail that down, you can reverse the comments as per the original code."

is not something i'm able to do

@dleffler
Copy link
Collaborator

Do you have access to the server error log? You might also try editing the /framework/conf/config.php file and changing the following line setting from 0 to 1 to turn on Error Reporting manually:

define("DEVELOPMENT",'0');

The reload the web page which should hopefully reveal the error, HOWEVER the best error reporting would be at the end of the server error log file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants