defendtheweb / hackthis.co.uk

HackThis!!
http://www.hackthis.co.uk
Other
46 stars 55 forks source link

Fix installation script for Ubuntu #199

Closed tehron closed 6 years ago

tehron commented 8 years ago

The installation script didn't finish successfully on Ubuntu 16.04 LTS (amd64) until the following fixes were applied.

lwward commented 8 years ago

I don't think most of these changes are necessary.

What errors were you having before you added these changes?

tehron commented 8 years ago

I did a fresh installation of the latest Ubuntu.

tehron@ubuntu:~/flabby/hackthis.co.uk$ sudo apt-get install php5 [sudo] password for tehron: Reading package lists... Done Building dependency tree Reading state information... Done Package php5 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

E: Package 'php5' has no installation candidate

  • Without these default values added, there was the following error:

tehron@ubuntu:~/flabby/hackthis.co.uk$ mysql -u root -p < sql/schema.sql Enter password: ERROR 1067 (42000) at line 31: Invalid default value for 'completed'

Using mysqld 5.7.12-0ubuntu1.1

lwward commented 8 years ago

Are you using Ubuntu 16.04? Looks like they dropped the php5 package from the repository.

Also could you try changing the timestamp lines to TIMESTAMP NULL DEFAULT NULL and see if that fixes your issue?

tehron commented 8 years ago

Ubuntu 16.04, yes. And yes, php5 has been removed for php7. See http://askubuntu.com/questions/756879/cant-install-php5-on-ubuntu-16-04

With your suggested fix, sql/schema.sql can be fed to mysql successfully.

LauraRozier commented 8 years ago

What you could do, to get php5.6 (I know, awefully specific) anyways, is the following: Remove all the stock php packages sudo aptitude purge dpkg -l | grep php | awk '{print $2}' | tr "\n" " "

Add the PPA sudo add-apt-repository ppa:ondrej/php

Install your PHP Version sudo apt-get update sudo apt-get upgrade sudo apt-get install php5.6

You can also install php5.6 modules sudo apt-get install php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-xml

Verify your version sudo php -v

There is also a way to use another repo with custom build of php5.4 and php5.6 (Including mods), not sure where the link went off to but I lost it. xD