62 Commits

Author SHA1 Message Date
Brad Dutton
870060406b gh actions for CI 2021-04-23 12:06:25 -07:00
Brad Dutton
33d109b1d0 make some PHP CS recommended changes 2021-04-01 20:05:06 -07:00
Johan Cwiklinski
5ee4d2f99b Fix htaccess and installer 2018-05-19 17:01:42 +02:00
Bradley W. Dutton
d0c250f916 call fetch_object on the result, not the db handle 2018-05-02 12:06:27 -07:00
bwdutton
41e3c56115 a better mysqli fix for the installer 2018-02-26 10:04:09 -08:00
Bradley W. Dutton
00c0539047 make installer work with mysqli not just mysql
get rid of undefined warning
2017-06-08 11:55:54 -07:00
shadlaws
d012cddf78 #2020 - Add CLI install argument to set admin password.
This isn't too useful for end users, but would be really useful for developers
that install Gallery3 over and over again...
2013-02-26 13:36:31 +01:00
shadlaws
b0180288e0 #1749, 1754, 1901 - revert two recent commits that check for Zend Guard obfuscation level support.
This is not the root of the problem for all installs, and can trigger false positives
that break previously-working installs... we'll have to find a better way.
2013-02-16 08:23:36 +01:00
shadlaws
0a10f3719a Follow-on to b01897af8d - add debugging message if Zend Guard code obfuscation is enabled to installer, too. 2013-02-12 22:21:50 +01:00
Bharat Mediratta
d45a737779 Update copyright to 2013. Fixes #1953. 2013-01-21 01:22:01 -05:00
Bharat Mediratta
3caf3cc323 Harden installer against bad characters in the database name or prefix. Fixes #1866. 2012-05-15 10:54:51 -07:00
Bharat Mediratta
bf2bb3e1ea Update copyright to 2012. #1822 2012-02-27 09:48:23 -08:00
Tim Almdal
d5a31ceede Fix for ticket 1275. Do the same checking as Kohana uses and don't worry about calling the utf8_encode routine.
Corrected the error messages and also added a check to insure the XML Parser extension is loaded as we still need the utf8_encode function from it.
2011-05-05 21:53:11 -07:00
Bharat Mediratta
423daa52d5 Update copyright to 2011. 2011-01-21 23:01:06 -08:00
Bharat Mediratta
6ac82bc6b7 Detect safe_mode and abort the install. Fixes #1534. 2010-12-16 11:33:41 -08:00
Bharat Mediratta
45c63f4d11 Use mt_rand() instead of rand() since it provides better portability.
Fixes #1527.
2010-12-15 12:48:56 -08:00
Bharat Mediratta
97a5656296 Check for the PHP Ctype extension. Fixes ticket #1474. 2010-11-08 11:09:06 -08:00
Bharat Mediratta
c31e9f1188 Add a check for short_open_tag 2010-06-06 19:06:24 -07:00
Bharat Mediratta
a63b0e8e8b Whitespace fixes 2010-06-06 19:04:15 -07:00
Bharat Mediratta
c3c2b45280 Update the copyright to 2010. It's only 3 months into the year :-) 2010-03-03 10:15:34 -08:00
Andy Staudacher
824087416a Avoid PHP warnings when the DB host string has no port. 2010-02-14 17:07:31 -08:00
Tim Almdal
7778d4c050 Provide an error message when the sql in installer::empty_db fails. Also change the show tables not to specify a database as it will use the database in the active connection. Fixes ticket #963. 2010-01-06 10:11:03 -08:00
Bharat Mediratta
8cf0348e6c Make sure that we have the mbstring extension. 2009-12-29 11:36:52 -08:00
Tim Almdal
393896a701 Initialize the database config with the port number if it is specified. Also set it up so the mysqli constructor will split it into host and port for the call to the mysqli constructor. Fixes ticket: #780 2009-11-12 14:42:37 -08:00
Tim Almdal
86681eebf7 Move the check_environment into the installer helper and call it from the command line installer as well as the web installer. 2009-09-17 07:29:37 -07:00
Bharat Mediratta
3dd40bf97c Trim the input line to get rid of carriage returns on Windows. Fixes
ticket #740.  Thanks to jankoprowski!
2009-09-10 21:22:46 -07:00
Bharat Mediratta
b8053c9ddf Rename "after_installer" to "welcome_message" in the code to make it
clearer what its purpose is.  Add some spacing in the theme for it
so that it's less cramped.
2009-09-10 21:10:20 -07:00
Bharat Mediratta
064038a24f Escape backslashes (\) in the $salt in create_admin() as they will
interfere with our hand rolled UPDATE statement.  Big thanks to
paulepanter.
2009-09-01 21:13:03 -07:00
Bharat Mediratta
b3cac5c173 Suppress errors to mysql_connect(). We had this before, but it
appears to have been accidentally removed in 177a854d
2009-08-31 21:26:14 -07:00
Bharat Mediratta
e4eedadcbb Add back mysql_fetch_object() call that I accidentally removed in my
rush to catch a plane.
2009-08-30 21:12:35 -07:00
Bharat Mediratta
31dcdcc6ad Remove unnecessary cleverness in stripping off the hyphen for mysql
version checks that was causing problems in the case where there's no
hyphen.  version_compare handles hypens fine.
2009-08-30 15:18:20 -07:00
Bharat Mediratta
fd954fe86e Print out the version of MySQL that we found along with our error
message, which should resolve http://gallery.menalto.com/node/90646
2009-08-30 13:43:29 -07:00
Tim Almdal
1ce8643b80 Fix for #440. Basically add a check that the mysql version is > 5.0.0.
It was felt that actually listing the requirements might be overwhelming
to novice users.
2009-08-28 15:17:07 -07:00
Bharat Mediratta
177a854dbb Move the mysql_xxx() override function definitions inside
installer::connect(), otherwise they're defined before we call
check_environment, then we think we have mysql_query when we really
don't.
2009-06-28 19:23:19 -07:00
Bharat Mediratta
52ac0e7172 Remap mysql_xx() functions to their mysqli counterparts if the mysql
extension is unavailable.  Fixes ticket #393.
2009-06-13 17:06:34 -07:00
bharat
c96b81db65 Fix a warning 2009-06-01 00:22:21 -04:00
Bharat Mediratta
994830f611 Fix the code to specify which columns its inserting into. Without
that it's fragile, and I broke it when I sorted the columns
alphabetically a day or two ago.
2009-05-29 18:04:54 -07:00
Bharat Mediratta
88a3d43ba9 Update all references to the core application to now point to the
gallery module.  This type of mass update is prone to some small bugs.
2009-05-27 16:17:29 -07:00
Bharat Mediratta
baa220186e Suppress some warnings 2009-05-13 22:34:54 +00:00
Bharat Mediratta
5495037a3d Gee it's May already. Update copyright to 2009. 2009-05-13 20:04:58 +00:00
Bharat Mediratta
7008bfb5c3 Warn the user if they're attemping to reinstall into a database that
already has Gallery 3 tables.  Otherwise, permit it to continue.

We key this off of the existence of the g3_items table.  Theoretically
it's possible that the g3_items table is gone but other tables are
still there, which could mess things up.  I'm not going to worry about
that for now.

Fixes ticket #175
2009-05-13 00:32:19 +00:00
Bharat Mediratta
198297e0d4 Instead of putting after_install in the url, put it in the session.
This helps us to make sure that we only see the welcome message once.
2009-03-09 00:03:04 +00:00
Bharat Mediratta
72c7fed975 Log the user in as admin after running the web installer, and give
them a nice "Welcome to Gallery 3" dialog.  The text in there needs a
little work but it's a start.

In the process, re-build the install.sql using the scaffolding code.
2009-03-08 21:21:09 +00:00
Tim Almdal
c04ff8e02f Change the pattern to identify tables that need prefix substitution to
mirror the drupal pattern of using braces {}.
2009-02-28 06:37:28 +00:00
Tim Almdal
0b9fe18a6b Both the command line and web installer installer now supports
creating tables with a table prefix.
There are still some queries that haven't been converted, so don't
start using prefixes yet.  However, if you do, you can login and
modify the user profile.
2009-02-27 19:26:21 +00:00
Bharat Mediratta
82ccbba124 Move private key generation into the installer so that we're not
generating it lazily.
2009-02-17 07:03:40 +00:00
Bharat Mediratta
6c59a19677 Get rid of InstallException and handle exceptions from create_admin()
properly.
2009-02-15 09:14:03 +00:00
Bharat Mediratta
8384cac5e3 Deal gracefully with bad mysql connection and database information. 2009-01-20 04:56:10 +00:00
Bharat Mediratta
681197a265 Web based installer. It's still got some rough edges, but you can now
do a complete CLI or web based install.
2009-01-20 00:54:02 +00:00
Bharat Mediratta
d51955c8ef Pull the environment check out into a separate web page to simplify
the CLI installer.  Put a link to it in the footer of every web
install page.  Don't allow users to run it if Gallery 3 is already
installed.
2009-01-19 20:20:10 +00:00