Error on upgrading from 2.4.8_1 to 3.1.1

Hi all
I’ve got this log file after executing install command from CLI. After that my migration doesn’t complete successfully.
What should I do for fixing this problem?

Regards
Amir

login as:
‘s password:
Last login: Tue Nov 27 00:21:12 2018 from 37.98.47.6
[root@plesk ~]# cd /var/www/vhosts/abc.xyz/ojs3.abc.xyz/tools/
[root@plesk tools]# /opt/plesk/php/7.0/bin/php upgrade.php upgrade
PHP Warning: Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 386
PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/lib/adodb/drivers/adodb-mysql.inc.php:456
Stack trace:
#0 /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/lib/adodb/adodb.inc.php(558): ADODB_mysql->connect(‘localhost’, ‘5gfdfg’, ‘#9’, 'darajehgmj_gmj…’)
#1 /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/db/DBConnection.inc.php(144): ADOConnection->Connect(‘localhost’, ‘daraj_sdsadmj_ojs3’, ‘yRgf64#9’, ‘darajehgmj_gmj_…’, false)
#2 /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/db/DBConnection.inc.php(119): DBConnection->connect()
#3 /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/db/DBConnection.inc.php(76): DBConnection->initConn()
#4 /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/db/DBConnection.inc.php(52): DBConnection->initDefaultDBConnection()
#5 /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/db/DBConnection.inc.php(220): DBConnection->__construct()
#6 /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/db/DBConnection.i in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/lib/adodb/drivers/adodb-mysql.inc.php on line 456
[root@plesk tools]# /opt/plesk/php//bin/php upgrade.php upgrade
5.4/ 5.5/ 5.6/ 7.0/
[root@plesk tools]# /opt/plesk/php/5./bin/php upgrade.php upgrade
5.4/ 5.5/ 5.6/
[root@plesk tools]# /opt/plesk/php/5.6/bin/php upgrade.php upgrade
[pre-install]
[load: upgrade.xml]
[version: 3.1.1.2]

[code: Installer Installer::checkPhpVersion]

[code: Installer Installer::syncSeriesAssocType]
[data: dbscripts/xml/upgrade/2.4.0_preupdate_usageStatistics.xml (skipped)]
[data: dbscripts/xml/upgrade/2.4.0_preupdate_usageStatistics2.xml (skipped)]

[code: Installer Installer::removeReviewEntries]
[data: dbscripts/xml/upgrade/3.0.0_preupdate.xml]
[data: dbscripts/xml/upgrade/3.0.0_adaptTimedViews.xml (skipped)]
[data: dbscripts/xml/upgrade/3.0.0_adaptReferrals.xml]
[data: dbscripts/xml/upgrade/3.0.0_adaptBooksForReview.xml]
[data: dbscripts/xml/upgrade/remove_timed_views_bots.xml (skipped)]
[data: dbscripts/xml/upgrade/3.0.0_preupdate_commentsToEditor.xml]
[data: dbscripts/xml/upgrade/3.1.0_preupdate_review_assignments.xml]
[data: dbscripts/xml/upgrade/3.1.0_preupdate_notes.xml]
[data: dbscripts/xml/upgrade/3.1.0_preupdate_payments.xml]
[data: dbscripts/xml/upgrade/3.1.1_preupdate_citations.xml]
[schema: lib/pkp/xml/schema/common.xml]
[schema: lib/pkp/xml/schema/log.xml]
[schema: lib/pkp/xml/schema/announcements.xml]
[schema: lib/pkp/xml/schema/scheduledTasks.xml]
[schema: lib/pkp/xml/schema/temporaryFiles.xml]
[schema: lib/pkp/xml/schema/metadata.xml]
^[[C[schema: lib/pkp/xml/schema/reviews.xml]
[schema: lib/pkp/xml/schema/reviewForms.xml]
[schema: lib/pkp/xml/schema/controlledVocab.xml]
[schema: lib/pkp/xml/schema/submissions.xml]
[schema: lib/pkp/xml/schema/submissionFiles.xml]
[schema: lib/pkp/xml/schema/notes.xml]
[schema: lib/pkp/xml/schema/views.xml]
[schema: lib/pkp/xml/schema/genres.xml]
[schema: lib/pkp/xml/schema/tombstone.xml]
[schema: lib/pkp/xml/schema/rolesAndUserGroups.xml]
[schema: lib/pkp/xml/schema/metrics.xml]
[schema: lib/pkp/xml/schema/views.xml]
[schema: lib/pkp/xml/schema/libraryFiles.xml]
[schema: lib/pkp/xml/schema/navigationMenus.xml]
[schema: dbscripts/xml/ojs_schema.xml]
[data: dbscripts/xml/indexes.xml]

[code: Installer Installer::installDefaultNavigationMenus]

[code: Installer Installer::migrateStaticPagesToNavigationMenuItems]

[code: Installer Installer::migrateSRLocale]

[code: Installer Installer::concatenateIntoAbout]

[code: Installer Installer::concatenateIntoMasthead]

[code: Installer Installer::migrateCounterPluginUsageStatistics (skipped)]

[code: Installer Installer::migrateTimedViewsUsageStatistics (skipped)]

[code: Installer Installer::migrateDefaultUsageStatistics (skipped)]
[data: dbscripts/xml/upgrade/2.4.0_postUsageStatsMigration.xml (skipped)]
[data: dbscripts/xml/upgrade/2.4.0_postUsageStatsMigration2.xml (skipped)]
[data: dbscripts/xml/upgrade/2.4.0_postCounterMigration.xml (skipped)]
[data: dbscripts/xml/upgrade/2.4.0_postTimedViewsMigration.xml (skipped)]
[data: dbscripts/xml/upgrade/3.0.0_change_assoc_type.xml]
[data: dbscripts/xml/upgrade/3.0.0_change_assoc_type_metrics.xml]
[data: dbscripts/xml/upgrade/3.0.0_settings.xml]

[code: Installer Installer::installDefaultGenres]

[code: Installer Installer::migrateArticleMetadata]
[data: dbscripts/xml/upgrade/3.0.0_update.xml]

[code: Installer Installer::clearDataCache]

[code: Installer Installer::migrateUserRoles]

[code: Installer Installer::fixReviewForms]

[code: Installer Installer::htmlifyEmailTemplates]
[note: docs/release-notes/README-BEACON]

[code: Installer Installer::installEmailTemplate]

[code: Installer Installer::installEmailTemplate]

[code: Installer Installer::installEmailTemplate]

[code: Installer Installer::installEmailTemplate]

[code: Installer Installer::installEmailTemplate]

[code: Installer Installer::installEmailTemplate]
[data: dbscripts/xml/upgrade/3.0.0_scheduledTasks.xml]

[code: Installer Installer::localizeCustomBlockSettings]
PHP Notice: unserialize(): Error at offset 19 of 257 bytes in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/db/DAO.inc.php on line 352
PHP Notice: unserialize(): Error at offset 467 of 469 bytes in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/db/DAO.inc.php on line 352

[code: Installer Installer::convertEditorDecisionNotes]

[code: Installer Installer::convertQueries]

[code: Installer Installer::migrateFiles]
WARNING: Unable to find a match for “613-3898-1-LE.docx” in “/var/www/vhosts/abc.xyz/ojs3.abc.xyz/files/journals/1//articles/613/”. Skipping this file.
WARNING: Unable to find a match for “682-3886-1-LE.docx” in “/var/www/vhosts/abc.xyz/ojs3.abc.xyz/files/journals/1//articles/682/”. Skipping this file.
WARNING: Unable to find a match for “704-3913-1-SP.docx” in “/var/www/vhosts/abc.xyz/ojs3.abc.xyz/files/journals/1//articles/704/”. Skipping this file.
WARNING: Unable to find a match for “704-3915-2-SP.docx” in “/var/www/vhosts/abc.xyz/ojs3.abc.xyz/files/journals/1//articles/704/”. Skipping this file.
WARNING: Unable to find a match for “891-4960-1-SM.docx” in “/var/www/vhosts/abc.xyz/ojs3.abc.xyz/files/journals/1//articles/891/”. Skipping this file.
WARNING: Unable to find a match for “1085-6421-13-ED.pdf” in “/var/www/vhosts/abc.xyz/ojs3.abc.xyz/files/journals/1//articles/1085/”. Skipping this file.
WARNING: Unable to find a match for “1085-6421-12-ED.docx” in “/var/www/vhosts/abc.xyz/ojs3.abc.xyz/files/journals/1//articles/1085/”. Skipping this file.
WARNING: Unable to find a match for “1085-6421-11-ED.docx” in “/var/www/vhosts/abc.xyz/ojs3.abc.xyz/files/journals/1//articles/1085/”. Skipping this file.
WARNING: Unable to find a match for “1121-6542-1-AT.pdf” in “/var/www/vhosts/abc.xyz/ojs3.abc.xyz/files/journals/1//articles/1121/”. Skipping this file.
WARNING: Unable to find a match for “1134-6554-1-ED.doc” in “/var/www/vhosts/abc.xyz/ojs3.abc.xyz/files/journals/1//articles/1134/”. Skipping this file.
file.
WARNING: Unable to find a match for “1174-6552-1-SP.docx” in “/var/www/vhosts/abc.xyz/ojs3.abc.xyz/files/journals/1//articles/1174/”. Skipping this file.

[code: Installer Installer::convertSupplementaryFiles]
PHP Warning: assert(): Assertion failed in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 374
PHP Warning: assert(): Assertion failed in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 374
PHP Warning: assert(): Assertion failed in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 374
PHP Warning: assert(): Assertion failed in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 374
PHP Warning: copy(/var/www/vhosts/abc.xyz/ojs3.abc.xyz/files/journals/1//articles/704/attachment/704-1-3913-1-13-20160913.docx): failed to open stream: No such file or directory in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/file/FileManager.inc.php on line 159
PHP Warning: assert(): Assertion failed in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/submission/SubmissionFileDAODelegate.inc.php on line 123
PHP Warning: copy(/var/www/vhosts/abc.xyz/ojs3.abc.xyz/files/journals/1//articles/704/attachment/704-1-3915-2-13-20160914.docx): failed to open stream: No such file or directory in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/file/FileManager.inc.php on line 159
PHP Warning: assert(): Assertion failed in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/submission/SubmissionFileDAODelegate.inc.php on line 123
PHP Warning: assert(): Assertion failed in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 374
PHP Warning: assert(): Assertion failed in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 374
PHP Warning: assert(): Assertion failed in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 374
PHP Warning: assert(): Assertion failed in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 374
PHP Warning: assert(): Assertion failed in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 374
PHP Warning: assert(): Assertion failed in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 374
PHP Warning: assert(): Assertion failed in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 374
PHP Warning: assert(): Assertion failed in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 374
PHP Warning: copy(/var/www/vhosts/abc.xyz/ojs3.abc.xyz/files/journals/1//articles/1145/attachment/1145-1-6546-1-13-20180401.docx): failed to open stream: No such file or directory in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/file/FileManager.inc.php on line 159
PHP Warning: assert(): Assertion failed in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/submission/SubmissionFileDAODelegate.inc.php on line 123
PHP Warning: copy(/var/www/vhosts/abc.xyz/ojs3.abc.xyz/files/journals/1//articles/1170/attachment/1170-1-6535-1-13-20180325.docx): failed to open stream: No such file or directory in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/file/FileManager.inc.php on line 159
PHP Warning: assert(): Assertion failed in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/submission/SubmissionFileDAODelegate.inc.php on line 123
PHP Warning: copy(/var/www/vhosts/abc.xyz/ojs3.abc.xyz/files/journals/1//articles/1170/attachment/1170-1-6536-1-13-20180325.docx): failed to open stream: No such file or directory in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/file/FileManager.inc.php on line 159
PHP Warning: assert(): Assertion failed in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/submission/SubmissionFileDAODelegate.inc.php on line 123
PHP Warning: copy(/var/www/vhosts/abc.xyz/ojs3.abc.xyz/files/journals/1//articles/1173/attachment/1173-1-6548-1-13-20180401.doc): failed to open stream: No such file or directory in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/file/FileManager.inc.php on line 159
PHP Warning: assert(): Assertion failed in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/submission/SubmissionFileDAODelegate.inc.php on line 123
PHP Warning: copy(/var/www/vhosts/abc.xyz/ojs3.abc.xyz/files/journals/1//articles/1173/attachment/1173-1-6549-1-13-20180401.doc): failed to open stream: No such file or directory in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/file/FileManager.inc.php on line 159
PHP Warning: assert(): Assertion failed in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/submission/SubmissionFileDAODelegate.inc.php on line 123
PHP Warning: copy(/var/www/vhosts/abc.xyz/ojs3.abc.xyz/files/journals/1//articles/1174/attachment/1174-1-6552-1-13-20180401.docx): failed to open stream: No such file or directory in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/file/FileManager.inc.php on line 159
PHP Warning: assert(): Assertion failed in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/submission/SubmissionFileDAODelegate.inc.php on line 123

[code: Installer Installer::provideSupplementaryFilesForReview]
PHP Warning: assert(): Assertion failed in /var/www/vhosts/abc.xyz/ojs3.abc.xyz/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 285

Invalid file!

ojs2: Invalid file! [root@plesk tools]#

Hi @Amir_Darejeh

Hmmm…
I can speak about some of the errors that have occurred:
– the funciton migrateFiles, the messages like: “Unable to find a match for “613-3898-1-LE.docx” in “/var/www/vhosts/abc.xyz/ojs3.abc.xyz/files/journals/1//articles/613/”. Skipping this file.”
mean that something is wrong with those files – it seems they cannot be found in your file system/folder. You would need to check every one of them. It is best to use the web GUI and repair (e.g. properly delete and/or upload the correct) files from there.
– the function convertSupplementaryFiles and provideSupplementaryFilesForReview: maybe you have some files/entries in your DB table artile_supplementary_files that are actually not in the table article_files. You could check if this is the case, when running this SQL:

SELECT a.journal_id, sf.* FROM article_supplementary_files sf, articles a WHERE a.article_id = sf.article_id AND sf.file_id <> 0 AND sf.show_reviewers = 1 AND sf.remote_url IS NULL and sf.file_id not in (select f.file_id from article_files f)

Let me know what is the result of this SQL statement. (Those entries should then be removed from the DB table article_supplementary_files. Please make a full backup before doing any changes in your DB!!!)

Then you would need to start the upgrade anew, using the clean backup of your OJS 2 installation. Every time an upgrade is run, it has to run on a clean backup (and NOT on the DB, the code and the files that already went through an unsuccessful upgrade).

Best,
Bozana

After the fix for 4287, these records of missing files will be skipped in the upgrade process. If you recommend deleting the records, should we output that as warnings within the upgrade process so that users can delete the record (or re-add the missing files)?

Thanks for your responds
I ran this query, but the result is empty!!

What should I do?

Regards
Amir

Hi @ctgraham,

Yes, I think it would be best if the DB would be clean, so that we do not encounter similar problems in the future…

Thanks!!!
(Somehow this haven’t crossed my mind :-\ )

Best,
Bozana

Hi @Amir_Darejeh

Hmmm…
Could you maybe also try this SQL:

SELECT a.journal_id, sf.* FROM article_supplementary_files sf, articles a WHERE a.article_id = sf.article_id AND sf.file_id <> 0 AND sf.remote_url IS NULL and sf.file_id not in (select f.file_id from article_files f)

Thanks!
Bozana

Thanks
But the result still is empty!

What should I do?

Regards
Amir

Hi @Amir_Darejeh

Hmmm… Maybe then to first fix those missing files reported in the function/section [code: Installer Installer::migrateFiles] (for example WARNING: Unable to find a match for “613-3898-1-LE.docx” in “/var/www/vhosts/abc.xyz/ojs3.abc.xyz/files/journals/1//articles/613/”. Skipping this file.). You have to do that in your OJS 2 installation. When all are fixed i.e. either removed or uploaded correctly, then make a new full backup of your OJS 2 installation again – keep all full backups, between all steps you do!!! – and start a new update on that new clean backup. Then report what messages you see…

EDIT: maybe also to be sure: check if all your articles have a section_id in your DB table articles and if all those section IDs exist in the DB table sections:

SELECT a.article_id FROM articles a WHERE a.section_id IS NULL or a.section_id  = ''
SELECT a.article_id FROM articles a LEFT JOIN sections s ON (a.section_id = s.section_id) WHERE s.section_id IS NULL

Best,
Bozana

Hi Bozana
I ran those queries and got just one result, so what should I do with this?

Regards
Amir

Hi @Amir_Darejeh

Which SQL returned one result?

Best,
Bozana

Hi
Both that you mentioned!

Regards
Amir

Hi @Amir_Darejeh,

For the first SQL: You would then need to enter the correct section ID for that article that has section_id = NULL in the DB table articles.
For the second SQL: You would need to investigate why that section ID does not exist and change it to an existing section ID.

Best,
Bozana

Hi again
I tried and tried many times and each time I got new messages, but in my some final tries each time I got same messages!

s/file/FileManager.inc.php on line 159
                                  PHP Warning:  assert(): Assertion failed i                                                            n /var/www/vhosts/gmj.ir/httpdocs/lib/pkp/classes/submission/PKPSubmissionFileDA                                                            O.inc.php on line 374
                 PHP Warning:  copy(/var/www/vhosts/gmj.ir/httpdocs/files/jo                                                            urnals/1//articles/1216/attachment/1216-1-6740-1-13-20180505.docx): failed to op                                                            en stream: No such file or directory in /var/www/vhosts/gmj.ir/httpdocs/lib/pkp/                                                            classes/file/FileManager.inc.php on line 159
                                        PHP Warning:  assert(): Assertion fa                                                            iled in /var/www/vhosts/gmj.ir/httpdocs/lib/pkp/classes/submission/PKPSubmission                                                            FileDAO.inc.php on line 374
                        PHP Warning:  assert(): Assertion failed in /var/www                                                            /vhosts/gmj.ir/httpdocs/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php                                                             on line 374
       PHP Warning:  assert(): Assertion failed in /var/www/vhosts/gmj.ir/ht                                                            tpdocs/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 374
                                                                      PHP Wa                                                            rning:  assert(): Assertion failed in /var/www/vhosts/gmj.ir/httpdocs/lib/pkp/cl                                                            asses/submission/PKPSubmissionFileDAO.inc.php on line 374
                                                     PHP Warning:  assert():                                                             Assertion failed in /var/www/vhosts/gmj.ir/httpdocs/lib/pkp/classes/submission/                                                            PKPSubmissionFileDAO.inc.php on line 374
                                                   PHP Warning:  copy(/var/w                                                            ww/vhosts/gmj.ir/httpdocs/files/journals/1//articles/1446/attachment/1446-1-8383                                                            -1-13-20181217.jpg): failed to open stream: No such file or directory in /var/ww                                                            w/vhosts/gmj.ir/httpdocs/lib/pkp/classes/file/FileManager.inc.php on line 159
                                                                         PHP                                                             Warning:  assert(): Assertion failed in /var/www/vhosts/gmj.ir/httpdocs/lib/pkp                                                            /classes/submission/PKPSubmissionFileDAO.inc.php on line 374
                                                        PHP Warning:  copy(/                                                            var/www/vhosts/gmj.ir/httpdocs/files/journals/1//articles/1446/attachment/1446-1                                                            -8384-1-13-20181217.jpg): failed to open stream: No such file or directory in /v                                                            ar/www/vhosts/gmj.ir/httpdocs/lib/pkp/classes/file/FileManager.inc.php on line 1                                                            59
  PHP Warning:  assert(): Assertion failed in /var/www/vhosts/gmj.ir/httpdocs/li                                                            b/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 374
                                                             PHP Warning:  a                                                            ssert(): Assertion failed in /var/www/vhosts/gmj.ir/httpdocs/lib/pkp/classes/sub                                                            mission/PKPSubmissionFileDAO.inc.php on line 374
                                            PHP Warning:  assert(): Assertio                                                            n failed in /var/www/vhosts/gmj.ir/httpdocs/lib/pkp/classes/submission/PKPSubmis                                                            sionFileDAO.inc.php on line 374
                           PHP Warning:  assert(): Assertion failed in /var/                                                            www/vhosts/gmj.ir/httpdocs/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.p                                                            hp on line 374
          PHP Warning:  assert(): Assertion failed in /var/www/vhosts/gmj.ir                                                            /httpdocs/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 374
                                                                         PHP                                                             Warning:  assert(): Assertion failed in /var/www/vhosts/gmj.ir/httpdocs/lib/pkp                                                            /classes/submission/PKPSubmissionFileDAO.inc.php on line 374
                                                        PHP Warning:  assert                                                            (): Assertion failed in /var/www/vhosts/gmj.ir/httpdocs/lib/pkp/classes/submissi                                                            on/PKPSubmissionFileDAO.inc.php on line 374
                                       PHP Warning:  assert(): Assertion fai                                                            led in /var/www/vhosts/gmj.ir/httpdocs/lib/pkp/classes/submission/PKPSubmissionF                                                            ileDAO.inc.php on line 374
                      PHP Warning:  assert(): Assertion failed in /var/www/v                                                            hosts/gmj.ir/httpdocs/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on                                                             line 374
     PHP Warning:  assert(): Assertion failed in /var/www/vhosts/gmj.ir/http                                                            docs/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 374
                                                                    PHP Warn                                                            ing:  copy(/var/www/vhosts/gmj.ir/httpdocs/files/journals/1//articles/1467/attac                                                            hment/1467-1-8454-1-13-20181225.docx): failed to open stream: No such file or di                                                            rectory in /var/www/vhosts/gmj.ir/httpdocs/lib/pkp/classes/file/FileManager.inc.                                                            php on line 159
           PHP Warning:  assert(): Assertion failed in /var/www/vhosts/gmj.i                                                            r/httpdocs/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 374
                                                                          PH                                                            P Warning:  copy(/var/www/vhosts/gmj.ir/httpdocs/files/journals/1//articles/1467                                                            /attachment/1467-1-8455-1-13-20181225.jpeg): failed to open stream: No such file                                                             or directory in /var/www/vhosts/gmj.ir/httpdocs/lib/pkp/classes/file/FileManage                                                            r.inc.php on line 159
                 PHP Warning:  assert(): Assertion failed in /var/www/vhosts                                                            /gmj.ir/httpdocs/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line                                                             374
PHP Warning:  copy(/var/www/vhosts/gmj.ir/httpdocs/files/journals/1//article                                                            s/1468/attachment/1468-1-8459-1-13-20181225.docx): failed to open stream: No suc                                                            h file or directory in /var/www/vhosts/gmj.ir/httpdocs/lib/pkp/classes/file/File                                                            Manager.inc.php on line 159
                       PHP Warning:  assert(): Assertion failed in /var/www/                                                            vhosts/gmj.ir/httpdocs/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php o                                                            n line 374
      PHP Warning:  assert(): Assertion failed in /var/www/vhosts/gmj.ir/htt                                                            pdocs/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 374
                                                                     PHP War                                                            ning:  copy(/var/www/vhosts/gmj.ir/httpdocs/files/journals/1//articles/1474/atta                                                            chment/1474-1-8511-1-13-20190101.docx): failed to open stream: No such file or d                                                            irectory in /var/www/vhosts/gmj.ir/httpdocs/lib/pkp/classes/file/FileManager.inc                                                            .php on line 159
            PHP Warning:  assert(): Assertion failed in /var/www/vhosts/gmj.                                                            ir/httpdocs/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 374
                                                                           P                                                            HP Warning:  copy(/var/www/vhosts/gmj.ir/httpdocs/files/journals/1//articles/147                                                            4/attachment/1474-1-8512-1-13-20190101.docx): failed to open stream: No such fil                                                            e or directory in /var/www/vhosts/gmj.ir/httpdocs/lib/pkp/classes/file/FileManag                                                            er.inc.php on line 159
                  PHP Warning:  assert(): Assertion failed in /var/www/vhost                                                            s/gmj.ir/httpdocs/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on lin                                                            e 374
 [code: Installer Installer::provideSupplementaryFilesForReview]
                                                                [code: Insta                                                            ller Installer::setFileUploader]
                            [code: Installer Installer::setFileName]
                                                                    [data: d                                                            bscripts/xml/upgrade/3.0.0_postupdate.xml]
                                      [data: dbscripts/xml/upgrade/3.0.0_pub                                                            Id_settings.xml]
            [data: dbscripts/xml/upgrade/3.0.0_postupgrade_galley_files.xml]
                                                                           [                                                            data: dbscripts/xml/upgrade/3.0.0_postupgrade_metrics.xml]
                                                      [data: dbscripts/xml/u                                                            pgrade/3.0.0_issue_settings.xml]
                            [data: dbscripts/xml/upgrade/3.0.0_submission_se                                                            ttings.xml]
       [data: dbscripts/xml/upgrade/3.0.0_review_method.xml]
                                                            [data: dbscripts                                                            /xml/upgrade/3.0.0_edit_decisions.xml]
                                  [code: Installer Installer::convertComment                                                            sToEditor]
      [note: docs/release-notes/README-3.0]
                                           [note: docs/release-notes/README-                                                            3.0.1]
  [data: dbscripts/xml/upgrade/3.0.2_update.xml]
                                                [note: docs/release-notes/RE                                                            ADME-3.0.2]
       [code: Installer Installer::moveReviewerFiles]
                                                     <h1>There are no readab                                                            le files in this directory tree. Are safe mode or open_basedir active?</h1>ojs2:                                                             There are no readable files in this directory tree. Are safe mode or open_based                                                            ir active?

In each try, I got list of many missing files(files mentioned above are only some of them) and after fixing them, I replaced DB with old version and then ran upgrade command again, and I got list of new missing files again and upgrade process be terminated by this sentence:

There are no readable files in this directory tree. Are safe mode or open_basedir active?ojs2: There are no readable files in this directory tree. Are safe mode or open_basedir active?

Please help me

Regards
Amir

Hi @Amir_Darejeh

Hmmm… Where exactly (in which installation) and how did you fix the missing files?
You should correctly fix them in your 2.4.8 installation, then make a full backup again, and copy it (DB and files folder) on a test environment where you try the upgrade. Have you done it so?

Best,
Bozana

Hi
I did exactly things that you said in my previous attempts!
I’d upgrade many OJS 2.4.8 to OJS 3.x but in this case I’m so confused!

What should I do ?

Regards
Amir

Hi @Amir_Darejeh

I cannot see correctly the error messages in your last post, but:

PHP Warning:  assert(): Assertion failed i                                                            n /var/www/vhosts/gmj.ir/httpdocs/lib/pkp/classes/submission/PKPSubmissionFileDA                                                            O.inc.php on line 374
                 PHP Warning:  copy(/var/www/vhosts/gmj.ir/httpdocs/files/jo     

Those messages seems to have problems with those files – the files are either not there or cannot be copied (e.g. because of the permissions in your files folder). Thus, could you double check all those files in your OJS 2.4.8 installation and that they are there and that you can download/access them via GUI?
Also, please double check that your permissions on the files folder before the upgrade are correct.
It seems like some files cannot be correctly migrated during the upgrade process…
And finally, you could try to debug, to see what is going on, e.g. to print out the variable $sourceFile and $targetFilePath before this line: pkp-lib/SubmissionFileDAODelegate.inc.php at ojs-3_1_1-4 · pkp/pkp-lib · GitHub.

Best,
Bozana

Hi @bozana
I think the error reasons come from “//” in this line:

PHP Warning: copy(/var/www/vhosts/gmj.ir/httpdocs/files/journals/1//article s/1468/attachment/1468-1-8459-1-13-20181225.docx): failed to open stream: No such file or directory in /var/www/vhosts/gmj.ir/httpdocs/lib/pkp/classes/file/File Manager.inc.php on line 159

Where can I find codes that generate these lines? and how can I fix it?

Regards
Amir

Hi
Anybody there ?

@bozana

Hi @Amir_Darejeh

Do you have the file /var/www/vhosts/gmj.ir/httpdocs/files/journals/1/articles/1468/attachment/1468-1-8459-1-13-20181225.docx (either in your files folder of your OJS 2 installation or of your upgraded installation)?

I think the path is constructed here: pkp-lib/BaseSubmissionFileManager.inc.php at ojs-3_1_1-4 · pkp/pkp-lib · GitHub.

Somehow I do not think “//” are the problem – else, the other users would already have encountered the same problem…

Best,
Bozana

Hi
Thanks for your answer
No, in my current version 2.4.8_3 These files are not exist in the path!
What should I do ?

Regards
Amir

1 Like