pi0 / osticket-docker

osTicket Docker Image (unofficial)
MIT License
25 stars 32 forks source link

PHP Parse error #22

Open WingerathM opened 1 year ago

WingerathM commented 1 year ago

I tried setting up an osticket-container today as described in osTicket on docker hub. Unfortunarly starting the container exits with a php parsing error:

$>docker logs osticket
....
  Install/Update osTicket
  PHP Notice:  Constant INCLUDE_DIR already defined in /var/www/src/bootstrap.php on line 339
  PHP Notice:  Constant SETUP_DIR already defined in /var/www/src/bootstrap.php on line 341
  Configuring mail settings
  OSTicket cron job is set to run every 5 minutes
  Using linked MySQL container
  Waiting for database TCP connection to become available...
  Connecting to database mysql://osticket@mysql/osticket
  Loading installation secret
  Updating configuration file
  Installing database. Please wait...

  Parse error: syntax error, unexpected '=' in /var/www/src/public/include/class.forms.php on line 4039
  PHP Parse error:  syntax error, unexpected '=' in /var/www/src/public/include/class.forms.php on line 4039
bpivk commented 1 year ago

Same error here.

Parse error: syntax error, unexpected '=' in /var/www/src/public/include/class.forms.php on line 4039 PHP Parse error: syntax error, unexpected '=' in /var/www/src/public/include/class.forms.php on line 4039

phithor commented 1 year ago

I have the same issue, seems the code while checking if database is there use a standard port while the actual database connection uses without the standard port. is this container usable?

// Wait for database connection
echo "Waiting for database TCP connection to become available...\n";
$s = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
$t = 0;
while (!@socket_connect($s,$vars['dbhost'],3306) && $t < CONNECTION_TIMEOUT_SEC) {
// Check database installation status
$db_installed = false;
echo "Connecting to database mysql://${vars['dbuser']}@${vars['dbhost']}/${vars['dbname']}\n";