I am a long time allocPSA user. I recently retired an old server and migrated to a newer server that does not run php 5.6 but only 7.1, 7.2 and 7.3.
I also had to update versions of alloc at the same time as trying to run the previously migrated code did not work as is.
I first ran the update patch which loaded the patch page without errors, however subsequent clicking on the "apply all patches" button but received a server 500 error:
Fatal error: Uncaught Error: Call to undefined function set_magic_quotes_runtime() in /home/psaito01/public_html/shared/util.inc.php:421 Stack trace: #0 /home/psaito01/public_html/installation/patch.php(54): parse_sql_file('/home/psaito01/...') #1 /home/psaito01/public_html/installation/patch.php(103): apply_patch('/home/psaito01/...') #2 {main} thrown in /home/psaito01/public_html/shared/util.inc.php on line==
I know this may be a longshot since the project is quiet, but hopefully Con may still be around to field the question.
I still love this software and want to continue to use it.
Keith Waldron
IT Outfitters
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We're many months into the lengthy process of migrating allocPSA to PHP 7.x and updated MySQL/MariaDB.
With luck, that should be finished in the coming months.
In the meantime, we recommend that users host their previously running allocPSA instances as a VM, while taking sensible precautions to limit remote access etc, to reduce security risks.
-- Con
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
PHP 5.6 should be fine to use. Zero-ing in on what the cause of the issue is may be difficult however.
Do you have the options of making a VM of your existing, functioning allocPSA server that you can then continue hosting as a VM?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2021-02-10
Hi Con,
Unfortunately I don't have the original operational vm anymore. I migrated the site over using cPanel transfer tools and assumed it was ok since I tested some other php websites and they were running fine but did not check all of them. Subsequently I destroyed the old vm. I also have backups, and tried restoring those without success. It may be possible that the current state of the app is between upgrades since at different times I did manage to get the update php page to run, but subsequently it threw errors.
I have a database and php files and it seems regardless of how I try to run it, it will not continue.
Is there anyway to start with a clean version for each release and then see if I can get the update to work and continue with that process until I am at the latest version?
Keith
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I don't have the option of virtualizing the earlier running environment. I did a cpanel migration of accounts, I confirmed that everything was there and randomly tested several php production sites and all worked. I checked that the database and files migrated successfully. I did manage to start the update process, but this errored out. Subsequently I can neither run it under php 5.6.
I do have full control of this instance (centos vm), so I can implement reasonable work arounds to get it operational again.
Do you have any ideas?
Keith
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
alloc_config.php should have the database credentials, if you manually try those credentials from the webserver, eg mysql -u blah -p dbname can the webserver connect to the db?
this error:
Fatal error: Call to a member function query() on null in /home/psaito01/public_html/shared/lib/db.inc.php on line 147
Which kind of smells like the php/apache PDO package isn't installed. Did you restart apache/nginx after installing that package?
If you run <?php phpinfo(); ?> in a small script does it mention that PDO is installed and happy?
Also that line of code is inside a try/catch block, which can hide error messages, try moving that line of code (that calls query()) outside that block and the error message might be more descriptive.
Last resort: feel free to shoot me a quick email with auth details and I'll jump onto your box and take a quick look.
Cheers,
Alex (s20210212@alexlance.com)
Last edit: Alex Lance 2021-02-11
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I am a long time allocPSA user. I recently retired an old server and migrated to a newer server that does not run php 5.6 but only 7.1, 7.2 and 7.3.
I also had to update versions of alloc at the same time as trying to run the previously migrated code did not work as is.
I first ran the update patch which loaded the patch page without errors, however subsequent clicking on the "apply all patches" button but received a server 500 error:
Fatal error: Uncaught Error: Call to undefined function set_magic_quotes_runtime() in /home/psaito01/public_html/shared/util.inc.php:421 Stack trace: #0 /home/psaito01/public_html/installation/patch.php(54): parse_sql_file('/home/psaito01/...') #1 /home/psaito01/public_html/installation/patch.php(103): apply_patch('/home/psaito01/...') #2 {main} thrown in /home/psaito01/public_html/shared/util.inc.php on line==
I know this may be a longshot since the project is quiet, but hopefully Con may still be around to field the question.
I still love this software and want to continue to use it.
Keith Waldron
IT Outfitters
Howdy Keith,
We're many months into the lengthy process of migrating allocPSA to PHP 7.x and updated MySQL/MariaDB.
With luck, that should be finished in the coming months.
In the meantime, we recommend that users host their previously running allocPSA instances as a VM, while taking sensible precautions to limit remote access etc, to reduce security risks.
-- Con
Con!
So happy you are still at it with AllocPSA.
Update - I decided to install php 5.6 to the server, I can manage this reasonably safely for a short time.
Now - I applied the php 5.6 to my web app and subsequetly enabled mbstring as per one of your other posts. I also installed the php PDO package.
I am now getting another error which perhaps you can help me with:
Fatal error: Call to a member function query() on null in /home/psaito01/public_html/shared/lib/db.inc.php on line 147
This occurs when I run the following 1st step as per the upgrade instructions:
/installation/patch.php
I am not sure what else I might be missing.
This is running on one of my cloud servers - WHM - Cpanel - I have full control of the server.
Any ideas?
Keith
P.S. I will look forward to revisions that allow it to run with the later php versions - this is very worthwhile software and it deserves to live on!
Note - I have installed php 5.6 and set allocPSA to use that. I am still getting errors.
I would like to stabilize and make this functional although I am not sure if the database or the files are consistent.
Is there a way I can take the database I have, check the version, then pick a suitable release, run the upgrade and make it function?
TIA
KW
Hi Keith,
PHP 5.6 should be fine to use. Zero-ing in on what the cause of the issue is may be difficult however.
Do you have the options of making a VM of your existing, functioning allocPSA server that you can then continue hosting as a VM?
Hi Con,
Unfortunately I don't have the original operational vm anymore. I migrated the site over using cPanel transfer tools and assumed it was ok since I tested some other php websites and they were running fine but did not check all of them. Subsequently I destroyed the old vm. I also have backups, and tried restoring those without success. It may be possible that the current state of the app is between upgrades since at different times I did manage to get the update php page to run, but subsequently it threw errors.
I have a database and php files and it seems regardless of how I try to run it, it will not continue.
Is there anyway to start with a clean version for each release and then see if I can get the update to work and continue with that process until I am at the latest version?
Keith
I don't have the option of virtualizing the earlier running environment. I did a cpanel migration of accounts, I confirmed that everything was there and randomly tested several php production sites and all worked. I checked that the database and files migrated successfully. I did manage to start the update process, but this errored out. Subsequently I can neither run it under php 5.6.
I do have full control of this instance (centos vm), so I can implement reasonable work arounds to get it operational again.
Do you have any ideas?
Keith
Hi Keith,
Couple of things to check:
alloc_config.php should have the database credentials, if you manually try those credentials from the webserver, eg
mysql -u blah -p dbnamecan the webserver connect to the db?this error:
Looks like it's around this line:
https://github.com/alexlance/alloc/blob/42d9be421bb31d0d967d8cc0ecbc178907105787/shared/lib/db.inc.php#L150
Which kind of smells like the php/apache PDO package isn't installed. Did you restart apache/nginx after installing that package?
If you run
<?php phpinfo(); ?>in a small script does it mention that PDO is installed and happy?Also that line of code is inside a try/catch block, which can hide error messages, try moving that line of code (that calls
query()) outside that block and the error message might be more descriptive.Last resort: feel free to shoot me a quick email with auth details and I'll jump onto your box and take a quick look.
Cheers,
Alex (s20210212@alexlance.com)
Last edit: Alex Lance 2021-02-11