Critical Error- file is missing


Site had been working fine. Now getting critical error.
My website has been functioning fine. Last time I accessed it I think was a couple of weeks ago. I know it needed to be updated from ocPortal to Composr but had not gotten to it due to life issues. I tried to access the site today to do some work on it and I am suddenly getting a "Critical error – bailing out A source-code (database) file is missing" error.Can anyone point me towards steps to troubleshoot or is my site just toast?
Thanks.


A quasi-official upgrade was posted at https://github.com/chrisgraham/ocPortal/releases (9.0.42).
There is also a Git branch with changes https://github.com/chrisgraham/ocPortal/commits/v9_urgent_maintenance
I'm trying to find out if there's an upgrader we've posted somewhere.
Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon
- If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
- If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
- If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
- If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.


Looking at the Git history I can see the following files were changed since 9.0.41…
adminzone/pages/modules/admin_addons.php
adminzone/pages/modules/admin_emaillog.php
adminzone/pages/modules/admin_lang.php
adminzone/pages/modules/admin_permissions.php
adminzone/pages/modules/admin_redirects.php
adminzone/pages/modules/admin_sitetree.php
adminzone/pages/modules/admin_themes.php
adminzone/stats_graph.php
cms/pages/modules/cms_blogs.php
cms/pages/modules/cms_catalogues.php
cms/pages/modules/cms_galleries.php
cms/pages/modules/cms_news.php
cms/pages/modules/filedump.php
code_editor.php
config_editor.php
data/areaedit/plugins/SpellChecker/spell-check-logic.php
data/upgrader2.php
forum/pages/modules/topics.php
pages/modules/forums.php
pages/modules/recommend.php
rootkit_detection.php
site/pages/modules/search.php
sources/aed_module.php
sources/ajax.php
sources/blocks/bottom_rss.php
sources/blocks/main_gallery_embed.php
sources/blocks/main_include_module.php
sources/chat2.php
sources/comcode_renderer.php
sources/comcode_text.php
sources/comcode_xml.php
sources/critical_errors.php
sources/css_and_js.php
sources/database.php
sources/database_search.php
sources/developer_tools.php
sources/diff.php
sources/downloads2.php
sources/feedback.php
sources/files2.php
sources/firephp.php
sources/forum/ocf.php
sources/global2.php
sources/hooks/modules/admin_import/mybb.php
sources/hooks/modules/admin_import/phpbb3.php
sources/hooks/modules/admin_occle_commands/feed_display.php
sources/hooks/systems/ecommerce_via/paypal.php
sources/hooks/systems/ocf_auth/wordpress.php
sources/hooks/systems/profiles_tabs/about.php
sources/hooks/systems/rss/comments.php
sources/hooks/systems/snippets/comments.php
sources/integrator.php
sources/jsmin.php
sources/mail.php
sources/menus.php
sources/minikernel.php
sources/notifications.php
sources/occle.php
sources/phpstub.php
sources/rss.php
sources/site.php
sources/site_tree.php
sources/stats.php
sources/support.php
sources/symbols.php
sources/tar.php
sources/tempcode.php
sources/tempcode__runtime.php
sources/tempcode_compiler.php
sources/templates_donext.php
sources/templates_internalise_screen.php
sources/templates_pagination.php
sources/topics.php
sources/upgrade.php
sources/uploads.php
sources/urls.php
sources/urls2.php
sources/users.php
sources/users_active_actions.php
sources/users_inactive_occasionals.php
sources/validation2.php
sources/version.php
sources/xml_storage.php
It's tricky though because you likely won't have all the bundled addons still installed, so you can't just upload all these files from the Git repository. Plus a handful of these are new files.
So…
"Critical error – bailing out A source-code (database) file is missing" actually is a misleading error message. The file is there, but ocPortal cannot load it because it's no longer compatible with the server's version of PHP. So a start would be to replace that file with the one from Git (https://raw.githubusercontent.com/chrisgraham/ocPortal/master/sources/database.php). If you then get an error about another file, repeat. Hopefully doing that will at least get the basic site functioning.
Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon
- If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
- If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
- If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
- If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.


I did not upgrade the php version but it is very likely that the host provider did without any notice.
I am thinking that my first step then would be to see if they could roll it back long enough for me to upgrade the site. Am I correct in thinking that with the older version of php restored then I could run an automated upgrade to Composr?
If not I will start walking through the steps you outlined.




But the question is, what version of ocPortal were you on? If you're not sure, sources/version.php contains the information.
Also though sometimes, multi-php manager is not enough to change the PHP version. Sometimes .htaccess files are put there by webhosts to override its choice, so you could also check that.
Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon
- If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
- If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
- If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
- If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.


The general version number of your installation
*/
function ocp_version_number()
{
return 9.0;


function cms_version_minor()
{
return '…';
}
Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon
- If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
- If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
- If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
- If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.


function ocp_version_minor()
{
return '0.6';


Suffice to say, this is very old.
Can you provide a list of all the files in sources/hooks/systems/addon_registry (in text format, not a screenshot). I'll see if I can manually generate an upgrader for you to extract on top of your existing installation.
Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon
- If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
- If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
- If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
- If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.


Composr ecosystem / Make Composr Upgrader · GitLab
If it is too complex for you I'll generate the TAR file for you. I do need the list of addons from the step 3 I documented though (on the project instructions).
Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon
- If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
- If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
- If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
- If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.


.htaccess
actionlog.php
apache_config_files.php
authors.php
awards.php
backup.php
banners.php
bookmarks.php
breadcrumbs.php
bulkupload.php
calendar.php
captcha.php
catalogues.php
cedi.php
chat.php
code_editor.php
collaboration_zone.php
core.php
core_abstract_components.php
core_abstract_interfaces.php
core_addon_management.php
core_adminzone_frontpage.php
core_cleanup_tools.php
core_comcode_pages.php
core_configuration.php
core_database_drivers.php
core_feedback_features.php
core_fields.php
core_form_interfaces.php
core_forum_drivers.php
core_graphic_text.php
core_html_abstractions.php
core_language_editing.php
core_menus.php
core_notifications.php
core_ocf.php
core_permission_management.php
core_primary_layout.php
core_rich_media.php
core_themeing.php
core_upgrader.php
core_validation.php
core_zone_editor.php
counting_blocks.php
custom_comcode.php
debrand.php
devguide.php
downloads.php
ecommerce.php
errorlog.php
filedump.php
flagrant.php
forum_blocks.php
galleries.php
guestbook.php
help_page.php
hphp_buildkit.php
import.php
index.html
installer.php
iotds.php
jwplayer.php
language_block.php
ldap.php
linux_helper_scripts.php
match_key_permissions.php
msn.php
news.php
news_shared.php
newsletter.php
occle.php
ocf_avatars.php
ocf_cartoon_avatars.php
ocf_clubs.php
ocf_contactmember.php
ocf_cpfs.php
ocf_forum.php
ocf_member_avatars.php
ocf_member_photos.php
ocf_member_titles.php
ocf_multi_moderations.php
ocf_post_templates.php
ocf_reported_posts.php
ocf_signatures.php
ocf_thematic_avatars.php
ocf_warnings.php
page_management.php
phpinfo.php
points.php
pointstore.php
polls.php
printer_friendly_block.php
quizzes.php
random_quotes.php
realtime_rain.php
recommend.php
redirects_editor.php
rootkit_detector.php
search.php
securitylogging.php
setupwizard.php
shopping.php
sms.php
ssl.php
staff.php
staff_messaging.php
stats.php
stats_block.php
supermember_directory.php
syndication.php
syndication_blocks.php
tester.php
textbased_persistent_cacheing.php
themewizard.php
tickets.php
uninstaller.php
unvalidated.php
users_online_block.php
weather.php
welcome_emails.php
windows_helper_scripts.php
wordfilter.php
xml_fields.php
zone_logos.php


custom_upgrade.tar.gz
You actually have all the bundled addons still installed.
Important note for [b\anyone else looking at this topic: do not use this archive if you don't (and you probably don't). The whole point of this manual custom upgrade is to only upgrade the addons that are actually installed, and if you extract files for non-installed addons it could cause big problems.
Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon
- If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
- If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
- If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
- If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.


Progress of sorts, I think.
I did the backup. Uploaded the tar.gz file and extracted it.
The error message changed and the new error referenced the info.php file so I took a look at it and replaced the site references to my info which I pulled from a copy of the info.php file that I had made.
I now am getting an error that says, "Could not connect to database-server (when authenticating) (The server requested authentication method unknown to the client)"
Next step?
Thanks.


You can just entirely replace with your own.
That said, it won't fix your error. You might need to talk to your webhost about that, as MySQL and PHP cannot communicate on your server (something outside of our control). Unless you have the ability to change to a newer version of PHP yourself.
EDIT: Probably won't fix your error. But do try reuploading your old info.php to see what happens. You could also try changing the MySQL password for your MySQL user (and update info.php with that) to see what happens.
Last edit: by Chris Graham
Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon
- If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
- If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
- If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
- If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.


I tried re-uploading the old info.php file and that did not fix it.
I spent time with the host service help desk. They could not figure anything out.
Then I tried updating the password via the host control panel. I did not make it something different, just reentered it as it has been. No more error message and I am able to access the site.
The pages and blog/news posts seem to be working.
A few glitches to figure out. The photo galleries seem to have broken links. The site recognizes the galleries and images that should exist but does not actually show the image or the thumbnail. The forums module does not find the forums.
Any suggestions on the galleries and forums? In the meantime I will poke around the admin area and see if I can find any kind of update/refresh function.
The admin area seems not to have a theme but rather displays more like a page but seems functional. It seems to indicate that I am on 9.0.42. So that would still be ocPortal and I still need to upgrade to Composr?
Thanks for your help.
Michael


The forums module does not find the forums.
If you are using OCF (now named Conversr in Composr), then you use the forum zone (which contains the forumview and topicview modules). The forums module is only intended for integration with third-party forums, and even then is not particularly recommended as you can just like to the third party forum directly.
If you really always were using the forums module, check the forum base URL, which is the board_prefix setting in info.php.
As for galleries, are some files actually missing from disk somehow? You can see if the files referenced by individual gallery images actually exist in uploads/galleries. They should not just disappear for any kind of upgrade scenario, so it's hard for me to speak to that unless somehow the whole uploads directory was replaced with an older version from a backup and it's the newer images that are missing.
If everything is white and looks like old school HTML in the Admin Zone, that usually means the permissions to the template cache directory are wrong somehow. You can look at the HTML source, find a URL to one of the CSS files, and try and open it directly in the browser. You'll probably get some kind of access denied error that you can try and fix.
Yes you have been updated to the latest ocPortal. Updating to Composr is a big process.
Sorry this has been such a struggle. It is stuff mostly outside of our sphere of control going wrong, but it is frustrating to see.
Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon
- If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
- If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
- If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
- If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.


1- In regards to the gallery - the image files still seem to exist in the galleries and galleries_thumbs folders. Trying to access the galleries in the Admin Zone it looks like maybe there is a permissions issue. The server permissions for both folders is 755. In the box that seems like where I would select the gallery or image to edit there is the following statement: "It appears you don't have permission to access this page. 403 Error. Forbidden."
2- In regards to the forums - I have always used the native (OCF now Conversr?) forum. I can still find the forums in the Admin Zone, however, when I click on the forum link in the menu when viewing the site I get an error. - PHP Notice [8] Trying to access array offset on value of type int in sources/support2.php on line 53 (version: 9.0.42, PHP version: 7.4.21, URL:/w1/forum/index.php?page=forumview)
I get the same error if I click on the forum name on the edit forums page.
There is a stack trace that I could try to capture if that would be helpful to you.
I am wondering if, for me, these issues might resolve if I go through the steps to convert the site to Composr or if that is such a big process if I am better off just rebuilding the site on a fresh install of Composr. It would be a big time consuming pain but it seems that I need to get it to Composr one way or the other.
Thanks, Michael


It looks like the forums error in sources/support2.php had a fix backported late to it just a little after I made the custom upgrade zip for you. Replace your sources/support2.php with this:
https://raw.githubusercontent.com/chrisgraham/ocPortal/d412a719ef96e0cedf045476cc501c0f6cbc0fdd/sources/support2.php
That should fix the forums.
As for galleries, if it's a file permissions issue I would SSH into the server, cd into the ocPortal's base directory and type "sh fixperms.sh". That should get everything back to a working state. However, I can't speak for the exact situation on your server unless I actually looked in depth.
I do think it is sensible to get onto v10. I don't want to get into what is best, as I just don't have the time to think in more detail about exact circumstances. I just want to make sure your site isn't broken at this moment.
Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon
- If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
- If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
- If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
- If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.


The new support2 file seems to have fixed the forums.
On the gallery issue, my server does not recognize the fix permissions command, probably because this domain is on a shared server environment. I can access and change permission on a folder/subfolder basis. Right now it looks like the root and most of the folders are set at 755. The images in the gallery folder are set at 644. Could I maybe fix it by adjusting these settings?
Michael