phpipam / phpipam

phpipam development repository
https://phpipam.net
2.18k stars 723 forks source link

Unable to Add IP address after upgrade to PHPIPAM 1.3.2 #2540

Open lopwal opened 5 years ago

lopwal commented 5 years ago

Describe the bug Unable to Add IP address after upgrade to PHPIPAM 1.3.2

phpIPAM version Upgraded from 1.3.1 to 1.3.2

Your Environment (please supply the following information):

Steps To Reproduce Please include steps to reproduce the issue:

  1. Try to add IP address and return error: Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'dns_name' in 'NEW'

Screenshots and error logs PHPIPAM-Error

Troubleshooting done:

  1. Already ran Verify Database. No errors present.

  2. Already ran the following commands: ALTER TABLE ipaddresses DROP hostname ; ALTER TABLE requests DROP hostname ; ALTER TABLE ipaddresses CHANGE dns_name hostname VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL; ALTER TABLE requests CHANGE dns_name hostname VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;

What else can I try? Why is "dns_name" trying to push into "NEW"? What exactly is "NEW"?

routenull0 commented 5 years ago

Did you have any "Fix Actions" after the upgrade? They would have shown up on the main screen upon login after the 1.3.2 upgrade.

GaryAllan commented 5 years ago

Hello @lopwal

dns_name was renamed to hostname in 1.32. I think you're running 1.3.1 php code (that expects dns_name) on a 1.3.2 database schema.

The phpIPAM git 1.3 branch contains a number of back-ported fixes (1.32rev004)

cd /var/www/html  # replace with your dir
git clone -b 1.3 https://github.com/phpipam/phpipam/ .
git submodule update --init --recursive
lopwal commented 5 years ago

Hello @lopwal

dns_name was renamed to hostname in 1.32. I think you're running 1.3.1 php code (that expects dns_name) on a 1.3.2 database schema.

The phpIPAM git 1.3 branch contains a number of back-ported fixes (1.32rev004)

cd /var/www/html  # replace with your dir
git clone -b 1.3 https://github.com/phpipam/phpipam/ .
git submodule update --init --recursive

I tried that, our installation is under that directory "/var/www/html" but I got this error message. I know the parent directory is not empty, that "html" is where I want to install the upgrade files, so what am I doing wrong? PHPIPAM-Error2

GaryAllan commented 5 years ago

Hi

Use a band new empty directory and then move it to the correct location.

cd /my/new/empty/dir/i/created/earlier/  #  Don't copy/paste this! use something sensible
git clone -b 1.3 https://github.com/phpipam/phpipam/ .
git submodule update --init --recursive

# Copy this new dir to correct location for your Apache.