mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-08-03 21:50:43 -04:00
Changed get_db_info.html.php to not display the database information request form until the var directory is successfully tested as writable. This prevents users from thinking they can enter the database information prior to successfully accessing the var directory. Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
92 lines
2.2 KiB
PHP
92 lines
2.2 KiB
PHP
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
|
<h1> Welcome! </h1>
|
|
<p>
|
|
Installing Gallery is very easy. We just need to know how to talk
|
|
to your MySQL database, and we need a place to store your photos on
|
|
your web host.
|
|
</p>
|
|
|
|
|
|
<fieldset>
|
|
<legend>Photo Storage</legend>
|
|
<?php if (!installer::var_writable()): ?>
|
|
<p class="error">
|
|
We're having trouble creating a place for your photos. Can you
|
|
help? Please create a directory called "var" using <code>mkdir var</code> in your
|
|
gallery3 directory, then run <code>chmod 777 var</code>. That
|
|
should fix it.
|
|
<br/><br/>
|
|
<a href="index.php">Check again</a>
|
|
</p>
|
|
<?php else: ?>
|
|
<p class="success">
|
|
We've found a place to store your photos:
|
|
<code class="location"> <?= VARPATH ?> </code>
|
|
</p>
|
|
<?php endif ?>
|
|
</fieldset>
|
|
|
|
<?php if (installer::var_writable()): ?>
|
|
<form method="post" action="index.php?step=save_db_info">
|
|
<fieldset>
|
|
<legend>Database</legend>
|
|
<p>
|
|
We've provided values that work for most common web hosts. If
|
|
you have problems, contact your web host for help.
|
|
</p>
|
|
<br/>
|
|
<table id="db_info">
|
|
<tr>
|
|
<td>
|
|
Database Name
|
|
</td>
|
|
<td>
|
|
<input name="dbname" value="gallery3"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
User
|
|
</td>
|
|
<td>
|
|
<input name="dbuser" value="root"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
Password
|
|
</td>
|
|
<td>
|
|
<input name="dbpass" value=""/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
Host
|
|
</td>
|
|
<td>
|
|
<input name="dbhost" value="localhost"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
Table Prefix
|
|
</td>
|
|
<td>
|
|
<input name="prefix" value=""/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2">
|
|
<?php if (installer::var_writable()): ?>
|
|
<input type="submit" value="Continue"/>
|
|
<?php else: ?>
|
|
<i class="error">(Please fix the photo storage problem before continuing)</i>
|
|
<?php endif ?>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</fieldset>
|
|
</form>
|
|
<? endif ?>
|