partkeepr / PartKeepr

Open Source Inventory Management
http://www.partkeepr.org
GNU General Public License v3.0
1.37k stars 398 forks source link

Error after re-running setup: "Your database schema is not up-to-date!" #916

Closed chris-thorn closed 4 years ago

chris-thorn commented 6 years ago

System Information

image

I've had PartKeepr working on an Ubuntu 16.04 server for a few days and I've started adding parts to it without any issues. Today I added an Octopart API key to parameters.php, and then re-run setup which proceeded without any errors or warnings. I then restarted the server.

Now when I log in to PartKeepr I get the error "Your database schema is not up-to-date! Please re-run setup immediately!"

I re-run setup again, and the setup page 2/2 was all green ("Database successfully install/updated", "Database schema successfully migrated", etc), but after completing setup I still get the warning that my database schema is not up-to-date.

Here's my system information:

image

Please let me know if there's any other information you require.

Thanks for your continued work on PartKeepr.

Chris

JelleDijkhuizen commented 6 years ago

I have the same issue on a clean install on CentOS 7

andreaslink-de commented 6 years ago

I'm having the same issue here on Ubuntu 16.04.3 LTS after upgrading from 1.2.0. image I also repeated setup several times now. Is there a chance to manually upgrade the database schema to fix this at least?

Drachenkaetzchen commented 6 years ago

Well I have no idea where the issue comes from. You might wish to see if the GIT version of PartKeepr works and report back

JelleDijkhuizen commented 6 years ago

i'm on the git version. It had the same problem parktkeepr system

Drachenkaetzchen commented 6 years ago

@JelleDijkhuizen can you check what php app/console doctrine:schema:update --dump-sql outputs for you?

Also which database system are you using? MySQL or PostgreSQL?

JelleDijkhuizen commented 6 years ago

ALTER TABLE TempUploadedFile CHANGE originalname originalname VARCHAR(255) DEFAULT NULL, CHANGE extension extension VARCHAR(255) DEFAULT NULL; ALTER TABLE FOSUser CHANGE last_login last_login DATETIME DEFAULT NULL, CHANGE expires_at expires_at DATETIME DEFAULT NULL, CHANGE confirmation_token confirmation_token VARCHAR(255) DEFAULT NULL, CHANGE password_requested_at password_requested_at DATETIME DEFAULT NULL, CHANGE credentials_expire_at credentials_expire_at DATETIME DEFAULT NULL, CHANGE email_canonical email_canonical VARCHAR(255) DEFAULT NULL, CHANGE email email VARCHAR(255) DEFAULT NULL; ALTER TABLE PartKeeprUser CHANGE provider_id provider_id INT DEFAULT NULL, CHANGE password password VARCHAR(32) DEFAULT NULL, CHANGE email email VARCHAR(255) DEFAULT NULL, CHANGE lastSeen lastSeen DATETIME DEFAULT NULL; ALTER TABLE Footprint CHANGE category_id category_id INT DEFAULT NULL; ALTER TABLE FootprintAttachment CHANGE footprint_id footprint_id INT DEFAULT NULL, CHANGE originalname originalname VARCHAR(255) DEFAULT NULL, CHANGE extension extension VARCHAR(255) DEFAULT NULL; ALTER TABLE FootprintCategory CHANGE parent_id parent_id INT DEFAULT NULL, CHANGE root root INT DEFAULT NULL; ALTER TABLE FootprintImage CHANGE footprint_id footprint_id INT DEFAULT NULL, CHANGE originalname originalname VARCHAR(255) DEFAULT NULL, CHANGE extension extension VARCHAR(255) DEFAULT NULL; ALTER TABLE MetaPartParameterCriteria CHANGE part_id part_id INT DEFAULT NULL, CHANGE unit_id unit_id INT DEFAULT NULL, CHANGE value value DOUBLE PRECISION DEFAULT NULL, CHANGE normalizedValue normalizedValue DOUBLE PRECISION DEFAULT NULL, CHANGE siPrefix_id siPrefix_id INT DEFAULT NULL; ALTER TABLE Part CHANGE category_id category_id INT DEFAULT NULL, CHANGE footprint_id footprint_id INT DEFAULT NULL, CHANGE description description VARCHAR(255) DEFAULT NULL, CHANGE status status VARCHAR(255) DEFAULT NULL, CHANGE partCondition partCondition VARCHAR(255) DEFAULT NULL, CHANGE productionRemarks productionRemarks VARCHAR(255) DEFAULT NULL, CHANGE createDate createDate DATETIME DEFAULT NULL, CHANGE internalPartNumber internalPartNumber VARCHAR(255) DEFAULT NULL, CHANGE partUnit_id partUnit_id INT DEFAULT NULL, CHANGE storageLocation_id storageLocation_id INT DEFAULT NULL; ALTER TABLE PartAttachment CHANGE part_id part_id INT DEFAULT NULL, CHANGE originalname originalname VARCHAR(255) DEFAULT NULL, CHANGE extension extension VARCHAR(255) DEFAULT NULL, CHANGE isImage isImage TINYINT(1) DEFAULT NULL; ALTER TABLE PartCategory CHANGE parent_id parent_id INT DEFAULT NULL, CHANGE root root INT DEFAULT NULL; ALTER TABLE PartDistributor CHANGE distributor_id distributor_id INT DEFAULT NULL, CHANGE part_id part_id INT DEFAULT NULL, CHANGE orderNumber orderNumber VARCHAR(255) DEFAULT NULL, CHANGE price price NUMERIC(13, 4) DEFAULT NULL, CHANGE currency currency VARCHAR(3) DEFAULT NULL, CHANGE sku sku VARCHAR(255) DEFAULT NULL, CHANGE ignoreForReports ignoreForReports TINYINT(1) DEFAULT NULL; ALTER TABLE PartManufacturer CHANGE part_id part_id INT DEFAULT NULL, CHANGE manufacturer_id manufacturer_id INT DEFAULT NULL, CHANGE partNumber partNumber VARCHAR(255) DEFAULT NULL; ALTER TABLE PartParameter CHANGE part_id part_id INT DEFAULT NULL, CHANGE unit_id unit_id INT DEFAULT NULL, CHANGE value value DOUBLE PRECISION DEFAULT NULL, CHANGE normalizedValue normalizedValue DOUBLE PRECISION DEFAULT NULL, CHANGE maximumValue maximumValue DOUBLE PRECISION DEFAULT NULL, CHANGE normalizedMaxValue normalizedMaxValue DOUBLE PRECISION DEFAULT NULL, CHANGE minimumValue minimumValue DOUBLE PRECISION DEFAULT NULL, CHANGE normalizedMinValue normalizedMinValue DOUBLE PRECISION DEFAULT NULL, CHANGE siPrefix_id siPrefix_id INT DEFAULT NULL, CHANGE minSiPrefix_id minSiPrefix_id INT DEFAULT NULL, CHANGE maxSiPrefix_id maxSiPrefix_id INT DEFAULT NULL; ALTER TABLE StockEntry CHANGE part_id part_id INT DEFAULT NULL, CHANGE user_id user_id INT DEFAULT NULL, CHANGE price price NUMERIC(13, 4) DEFAULT NULL, CHANGE comment comment VARCHAR(255) DEFAULT NULL; ALTER TABLE Distributor CHANGE url url VARCHAR(255) DEFAULT NULL, CHANGE phone phone VARCHAR(255) DEFAULT NULL, CHANGE fax fax VARCHAR(255) DEFAULT NULL, CHANGE email email VARCHAR(255) DEFAULT NULL, CHANGE skuurl skuurl VARCHAR(255) DEFAULT NULL; ALTER TABLE Manufacturer CHANGE url url VARCHAR(255) DEFAULT NULL, CHANGE email email VARCHAR(255) DEFAULT NULL, CHANGE phone phone VARCHAR(255) DEFAULT NULL, CHANGE fax fax VARCHAR(255) DEFAULT NULL; ALTER TABLE ManufacturerICLogo CHANGE manufacturer_id manufacturer_id INT DEFAULT NULL, CHANGE originalname originalname VARCHAR(255) DEFAULT NULL, CHANGE extension extension VARCHAR(255) DEFAULT NULL; ALTER TABLE TempImage CHANGE originalname originalname VARCHAR(255) DEFAULT NULL, CHANGE extension extension VARCHAR(255) DEFAULT NULL; ALTER TABLE Project CHANGE user_id user_id INT DEFAULT NULL, CHANGE description description VARCHAR(255) DEFAULT NULL; ALTER TABLE ProjectAttachment CHANGE project_id project_id INT DEFAULT NULL, CHANGE originalname originalname VARCHAR(255) DEFAULT NULL, CHANGE extension extension VARCHAR(255) DEFAULT NULL; ALTER TABLE ProjectPart CHANGE project_id project_id INT DEFAULT NULL, CHANGE part_id part_id INT DEFAULT NULL, CHANGE remarks remarks VARCHAR(255) DEFAULT NULL, CHANGE overageType overageType VARCHAR(255) DEFAULT '' NOT NULL; ALTER TABLE ProjectRun CHANGE project_id project_id INT DEFAULT NULL; ALTER TABLE ProjectRunPart CHANGE part_id part_id INT DEFAULT NULL, CHANGE projectRun_id projectRun_id INT DEFAULT NULL; ALTER TABLE Report CHANGE name name VARCHAR(255) DEFAULT NULL; ALTER TABLE ReportPart CHANGE distributor_id distributor_id INT DEFAULT NULL, CHANGE report_id report_id INT DEFAULT NULL, CHANGE part_id part_id INT DEFAULT NULL; ALTER TABLE ReportProject CHANGE project_id project_id INT DEFAULT NULL, CHANGE report_id report_id INT DEFAULT NULL; ALTER TABLE StorageLocation CHANGE category_id category_id INT DEFAULT NULL; ALTER TABLE StorageLocationCategory CHANGE parent_id parent_id INT DEFAULT NULL, CHANGE root root INT DEFAULT NULL; ALTER TABLE StorageLocationImage CHANGE originalname originalname VARCHAR(255) DEFAULT NULL, CHANGE extension extension VARCHAR(255) DEFAULT NULL, CHANGE storageLocation_id storageLocation_id INT DEFAULT NULL; ALTER TABLE TipOfTheDayHistory CHANGE user_id user_id INT DEFAULT NULL; ALTER TABLE StatisticSnapshotUnit CHANGE statisticSnapshot_id statisticSnapshot_id INT DEFAULT NULL, CHANGE partUnit_id partUnit_id INT DEFAULT NULL; ALTER TABLE BatchJobQueryField CHANGE batchJob_id batchJob_id INT DEFAULT NULL; ALTER TABLE BatchJobUpdateField CHANGE batchJob_id batchJob_id INT DEFAULT NULL;

and i'm running 10.2.10-MariaDB-log MariaDB Server

Drachenkaetzchen commented 6 years ago

@JelleDijkhuizen it seems that setup did not, for some reason, update the tables.

Make a database backup and you run php app/console doctrine:schema:update --force. It should then add the fields.

If you re-run php app/console doctrine:schema:update --dump-sql the output should be:

Nothing to update - your database is already in sync with the current entity metadata.

If it still lists lots of fields, I think I have to report an upstream issue against doctrine.

JelleDijkhuizen commented 6 years ago

Mmm wierd. I executed the command it tels me: Database schema updated successfully! "34" queries were executed but then when I recheck still the same output.

andreaslink-de commented 6 years ago

Thx, that's a good idea, I ran now: /usr/bin/php7.0 /var/www/partkeepr/app/console doctrine:schema:update --force Nothing to update - your database is already in sync with the current entity metadata.

And: /usr/bin/php7.0 /var/www/partkeepr/app/console doctrine:schema:update --dump-sql Nothing to update - your database is already in sync with the current entity metadata.

When I login again, I get the same message and probably I should mention, I also get: image But I have the cronjob up and running and also ran it manually once. Is there a log somewhere, were I might get some further information from?

Drachenkaetzchen commented 6 years ago

@andreaslink-de the message is completely different, can you create a separate issue for that?

@JelleDijkhuizen it seems like doctrine decides that the database schema doesn't match the configuration, as such that might be the root cause. I will try to reproduce the issue and create an upstream bug report

andreaslink-de commented 6 years ago

@andreaslink-de the message is completely different, can you create a separate issue for that?

Yes, of course, but this was just an info-add-on. The main issue is still the same as I was just following your suggestion to update the table. But again, is there a log somewhere, were I might get some further information from?

Drachenkaetzchen commented 6 years ago

@andreaslink-de no, I believe that these particular events are not logged. You could try to restart your webserver, sometimes APC caches metadata and restarting the webserver helps.

andreaslink-de commented 6 years ago

@felicitus Yes, that fixed it! I restarted MySQL and Apache2, now the issue is fixed for me. I can login without database schema pop-up!

chris-thorn commented 6 years ago

I'm getting similar results to @JelleDijkhuizen.

If I run php app/console doctrine:schema:update --force I get:

Updating database schema...
Database schema updated successfully! "35" queries were executed

Then if I run php app/console doctrine:schema:update --dump-sql I get:

ALTER TABLE TempUploadedFile CHANGE originalname originalname VARCHAR(255) DEFAULT NULL, CHANGE extension extension VARCHAR(255) DEFAULT NULL;
ALTER TABLE FOSUser CHANGE last_login last_login DATETIME DEFAULT NULL, CHANGE expires_at expires_at DATETIME DEFAULT NULL, CHANGE confirmation_token confirmation_token VARCHAR(255) DEFAULT NULL, CHANGE password_requested_at password_requested_at DATETIME DEFAULT NULL, CHANGE credentials_expire_at credentials_expire_at DATETIME DEFAULT NULL, CHANGE email_canonical email_canonical VARCHAR(255) DEFAULT NULL, CHANGE email email VARCHAR(255) DEFAULT NULL;
ALTER TABLE PartKeeprUser CHANGE provider_id provider_id INT DEFAULT NULL, CHANGE password password VARCHAR(32) DEFAULT NULL, CHANGE email email VARCHAR(255) DEFAULT NULL, CHANGE lastSeen lastSeen DATETIME DEFAULT NULL;
ALTER TABLE FootprintCategory CHANGE parent_id parent_id INT DEFAULT NULL, CHANGE root root INT DEFAULT NULL;
ALTER TABLE FootprintImage CHANGE footprint_id footprint_id INT DEFAULT NULL, CHANGE originalname originalname VARCHAR(255) DEFAULT NULL, CHANGE extension extension VARCHAR(255) DEFAULT NULL;
ALTER TABLE FootprintAttachment CHANGE footprint_id footprint_id INT DEFAULT NULL, CHANGE originalname originalname VARCHAR(255) DEFAULT NULL, CHANGE extension extension VARCHAR(255) DEFAULT NULL;
ALTER TABLE Footprint CHANGE category_id category_id INT DEFAULT NULL;
ALTER TABLE MetaPartParameterCriteria CHANGE part_id part_id INT DEFAULT NULL, CHANGE unit_id unit_id INT DEFAULT NULL, CHANGE value value DOUBLE PRECISION DEFAULT NULL, CHANGE normalizedValue normalizedValue DOUBLE PRECISION DEFAULT NULL, CHANGE siPrefix_id siPrefix_id INT DEFAULT NULL;
ALTER TABLE PartImage CHANGE part_id part_id INT DEFAULT NULL, CHANGE originalname originalname VARCHAR(255) DEFAULT NULL, CHANGE extension extension VARCHAR(255) DEFAULT NULL;
ALTER TABLE PartAttachment CHANGE part_id part_id INT DEFAULT NULL, CHANGE originalname originalname VARCHAR(255) DEFAULT NULL, CHANGE extension extension VARCHAR(255) DEFAULT NULL, CHANGE isImage isImage TINYINT(1) DEFAULT NULL;
ALTER TABLE PartDistributor CHANGE distributor_id distributor_id INT DEFAULT NULL, CHANGE part_id part_id INT DEFAULT NULL, CHANGE orderNumber orderNumber VARCHAR(255) DEFAULT NULL, CHANGE price price NUMERIC(13, 4) DEFAULT NULL, CHANGE currency currency VARCHAR(3) DEFAULT NULL, CHANGE sku sku VARCHAR(255) DEFAULT NULL, CHANGE ignoreForReports ignoreForReports TINYINT(1) DEFAULT NULL;
ALTER TABLE PartManufacturer CHANGE part_id part_id INT DEFAULT NULL, CHANGE manufacturer_id manufacturer_id INT DEFAULT NULL, CHANGE partNumber partNumber VARCHAR(255) DEFAULT NULL;
ALTER TABLE Part CHANGE category_id category_id INT DEFAULT NULL, CHANGE footprint_id footprint_id INT DEFAULT NULL, CHANGE description description VARCHAR(255) DEFAULT NULL, CHANGE status status VARCHAR(255) DEFAULT NULL, CHANGE partCondition partCondition VARCHAR(255) DEFAULT NULL, CHANGE productionRemarks productionRemarks VARCHAR(255) DEFAULT NULL, CHANGE createDate createDate DATETIME DEFAULT NULL, CHANGE internalPartNumber internalPartNumber VARCHAR(255) DEFAULT NULL, CHANGE partUnit_id partUnit_id INT DEFAULT NULL, CHANGE storageLocation_id storageLocation_id INT DEFAULT NULL;
ALTER TABLE PartCategory CHANGE parent_id parent_id INT DEFAULT NULL, CHANGE root root INT DEFAULT NULL;
ALTER TABLE PartParameter CHANGE part_id part_id INT DEFAULT NULL, CHANGE unit_id unit_id INT DEFAULT NULL, CHANGE value value DOUBLE PRECISION DEFAULT NULL, CHANGE normalizedValue normalizedValue DOUBLE PRECISION DEFAULT NULL, CHANGE maximumValue maximumValue DOUBLE PRECISION DEFAULT NULL, CHANGE normalizedMaxValue normalizedMaxValue DOUBLE PRECISION DEFAULT NULL, CHANGE minimumValue minimumValue DOUBLE PRECISION DEFAULT NULL, CHANGE normalizedMinValue normalizedMinValue DOUBLE PRECISION DEFAULT NULL, CHANGE siPrefix_id siPrefix_id INT DEFAULT NULL, CHANGE minSiPrefix_id minSiPrefix_id INT DEFAULT NULL, CHANGE maxSiPrefix_id maxSiPrefix_id INT DEFAULT NULL;
ALTER TABLE StockEntry CHANGE part_id part_id INT DEFAULT NULL, CHANGE user_id user_id INT DEFAULT NULL, CHANGE price price NUMERIC(13, 4) DEFAULT NULL, CHANGE comment comment VARCHAR(255) DEFAULT NULL;
ALTER TABLE Distributor CHANGE url url VARCHAR(255) DEFAULT NULL, CHANGE phone phone VARCHAR(255) DEFAULT NULL, CHANGE fax fax VARCHAR(255) DEFAULT NULL, CHANGE email email VARCHAR(255) DEFAULT NULL, CHANGE skuurl skuurl VARCHAR(255) DEFAULT NULL;
ALTER TABLE Manufacturer CHANGE url url VARCHAR(255) DEFAULT NULL, CHANGE email email VARCHAR(255) DEFAULT NULL, CHANGE phone phone VARCHAR(255) DEFAULT NULL, CHANGE fax fax VARCHAR(255) DEFAULT NULL;
ALTER TABLE ManufacturerICLogo CHANGE manufacturer_id manufacturer_id INT DEFAULT NULL, CHANGE originalname originalname VARCHAR(255) DEFAULT NULL, CHANGE extension extension VARCHAR(255) DEFAULT NULL;
ALTER TABLE TempImage CHANGE originalname originalname VARCHAR(255) DEFAULT NULL, CHANGE extension extension VARCHAR(255) DEFAULT NULL;
ALTER TABLE ProjectRun CHANGE project_id project_id INT DEFAULT NULL;
ALTER TABLE Report CHANGE name name VARCHAR(255) DEFAULT NULL;
ALTER TABLE ReportProject CHANGE project_id project_id INT DEFAULT NULL, CHANGE report_id report_id INT DEFAULT NULL;
ALTER TABLE Project CHANGE user_id user_id INT DEFAULT NULL, CHANGE description description VARCHAR(255) DEFAULT NULL;
ALTER TABLE ProjectAttachment CHANGE project_id project_id INT DEFAULT NULL, CHANGE originalname originalname VARCHAR(255) DEFAULT NULL, CHANGE extension extension VARCHAR(255) DEFAULT NULL;
ALTER TABLE ProjectRunPart CHANGE part_id part_id INT DEFAULT NULL, CHANGE projectRun_id projectRun_id INT DEFAULT NULL;
ALTER TABLE ReportPart CHANGE distributor_id distributor_id INT DEFAULT NULL, CHANGE report_id report_id INT DEFAULT NULL, CHANGE part_id part_id INT DEFAULT NULL;
ALTER TABLE ProjectPart CHANGE project_id project_id INT DEFAULT NULL, CHANGE part_id part_id INT DEFAULT NULL, CHANGE remarks remarks VARCHAR(255) DEFAULT NULL;
ALTER TABLE StorageLocationCategory CHANGE parent_id parent_id INT DEFAULT NULL, CHANGE root root INT DEFAULT NULL;
ALTER TABLE StorageLocation CHANGE category_id category_id INT DEFAULT NULL;
ALTER TABLE StorageLocationImage CHANGE originalname originalname VARCHAR(255) DEFAULT NULL, CHANGE extension extension VARCHAR(255) DEFAULT NULL, CHANGE storageLocation_id storageLocation_id INT DEFAULT NULL;
ALTER TABLE TipOfTheDayHistory CHANGE user_id user_id INT DEFAULT NULL;
ALTER TABLE StatisticSnapshotUnit CHANGE statisticSnapshot_id statisticSnapshot_id INT DEFAULT NULL, CHANGE partUnit_id partUnit_id INT DEFAULT NULL;
ALTER TABLE BatchJobUpdateField CHANGE batchJob_id batchJob_id INT DEFAULT NULL;
ALTER TABLE BatchJobQueryField CHANGE batchJob_id batchJob_id INT DEFAULT NULL;

I've restarted my server and run the commands again, but I still have the 'schema not up-to-date' error ☹️

(PartKeepr version in my original post.)

Chris

JelleDijkhuizen commented 6 years ago

I did some digging in the database but the changes are written to the database. So my quastion at thius point is: this warning does it come from a database check or a check with the command php app/console doctrine:schema:update --dump-sql ?

phuebner commented 6 years ago

I ran into the same problem trying to run partkeepr 1.3.0 attached to a mariadb 10.3 image. It turns out that there is a compatibility problem between mariadb 10.3 and doctrine 2.5. See also this bug report: https://github.com/doctrine/doctrine2/issues/6565. After downgrading to mariadb 10.0 the error is gone.

mindsolve commented 6 years ago

It looks like the bug you @phuebner mentioned is fixed in doctrine. Maybe we can get an update for this repo?

Drachenkaetzchen commented 6 years ago

@mindsolve as far as I can tell there's no backport to the doctrine 2.5 series, so no, an update is not possible without upgrading the whole Symfony2 environment, which is a huge effort right now. As I'm the only PartKeepr developer, this will most likely take quite a long time.

alpiste commented 5 years ago

I have the same problem by running partkeepr on my Synology NAS. Everything works Ok on installation but I have this message every time I enter into the system. My default PHP is 5.6 running under Apache 2.2.

If I run "php app/console doctrine:schema:update --force" I get the message:

PHP Fatal error: Call to undefined function Zend\Code\Reflection\token_get_all() in /volume1/web/test/vendor/zendframework/zend-code/src/Reflection/MethodReflection.php on line 230

Fatal error: Call to undefined function Zend\Code\Reflection\token_get_all() in /volume1/web/test/vendor/zendframework/zend-code/src/Reflection/MethodReflection.php on line 230

If I run "php56 app/console doctrine:schema:update --force" I get this one:

[Exception]
module php-ldap isn't installed

I don't know at all How to install php-ldap (that on php.ini is active) for this php56 version on Synology... or, in any case, how to install/activate Tokenizer for php

The problem is that there is two different compilations of php on the system, one of them in the usual folder of a linux system, and another one in the @appstore folder....

My MYSQL distribution is MariaDB 10.3

Any one has any idea about how to solve this???

Thanks a lot in advance

HendriXML commented 5 years ago

I run it with php 7.0 on a Synology nas. Maybe that will solve your issue?

alpiste commented 5 years ago

I tried with php 7.0 also, with the same problem... No ldap-mod...

El mar., 6 nov. 2018 23:09, HendriXML notifications@github.com escribió:

I run it with php 7.0 on a Synology nas. Maybe that will solve your issue?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/partkeepr/PartKeepr/issues/916#issuecomment-436427006, or mute the thread https://github.com/notifications/unsubscribe-auth/AQ40MJ25zVQe961-xFfchsfp9KN4WMj3ks5usgingaJpZM4P9xxi .

HendriXML commented 5 years ago

Are you shure the right ini is used. There is a way to let php report it. Did you also run the commandline “php70” instead of just “php”? I remember to have issues there. I made a ini myself because I couldn’t find the ini files, the webserver uses. Those determine which modules are loaded.

HendriXML commented 5 years ago

From my notes on how to run cron-job:

cp /usr/syno/etc/packages/WebStation/php70/php.ini /usr/local/bin/PartKeeprCli.ini

vi /usr/local/bin/PartKeeprCli.ini

Add to ini:

extension_dir = /volume1/@appstore/PHP7.0/usr/local/lib/php70/modules
extension = ldap.so
extension = pdo_mysql.so

[pdo_mysql]
pdo_mysql.default_socket = /run/mysqld/mysqld10.sock

Command to run the cronjob

/usr/local/bin/php70 -c /usr/local/bin/PartKeeprCli.ini /volume1/web/Partkeepr/app/console partkeepr:cron:run
alpiste commented 5 years ago

Thanks a lot HendriXML, it worked for me so now I can run the app/console doctrine:schema:update --force with the result:

Updating database schema... Database schema updated successfully! "34" queries were executed

But still, when I log-in onto partkeepr I have the message:

Your database schema is not up-to-date! Please re-run setup immediately!

So I don't know if I have to restart all services (Apache, WebStation, MariaDB...). I will try..

Many thanks for your comments, now I have a much better idea about how the system is working..

Manuel

https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Libre de virus. www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

El mar., 6 nov. 2018 a las 23:30, HendriXML (notifications@github.com) escribió:

From my notes on how to run cron-job:

cp /usr/syno/etc/packages/WebStation/php70/php.ini /usr/local/bin/PartKeeprCli.ini vi /usr/local/bin/PartKeeprCli.ini

Add to ini:

`` extension_dir = /volume1/@appstore/PHP7.0/usr/local/lib/php70/modules extension = ldap.so extension = pdo_mysql.so

[pdo_mysql] pdo_mysql.default_socket = /run/mysqld/mysqld10.sock ``

/usr/local/bin/php70 -c /usr/local/bin/PartKeeprCli.ini /volume1/web/Partkeepr/app/console partkeepr:cron:run

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/partkeepr/PartKeepr/issues/916#issuecomment-436433193, or mute the thread https://github.com/notifications/unsubscribe-auth/AQ40MCxXSxl8iWVS6LsPIMJLzwVL__BJks5usg2jgaJpZM4P9xxi .

HendriXML commented 5 years ago

Great!

Have you tried rerunning the setup?

I too get the message of the database schema not beeing up to date, but that was -I think- after I deleted al the standard Footprints. I ran setup afterwards and they where inserted again, but I guess the check also checks wether the auto increment id’s are as to be expected from a “fresh table”. They are however the second time higher.

The moral of the story is: some checks may be to sensitive. Like not every criteria can be checked by running it’s fixer. Maybe I will fix my issue by hand, maybe I will leave it as it is. Maybe I will search for the check and disable it. I haven’t made up my mind about it. In my situation Partkeepr runs fine.

christianlupus commented 4 years ago

I think this is a duplucate of #1050 and similar threads originating in the too old symphony framework. Thus closing.