Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

FQDN issue. #6

Closed
remy1991 opened this issue Jul 1, 2014 · 5 comments
Closed

FQDN issue. #6

remy1991 opened this issue Jul 1, 2014 · 5 comments

Comments

@remy1991
Copy link

remy1991 commented Jul 1, 2014

Cant seem to get this thing started.

I cloned the repo and changed the config.php inside phplib.
I added the fqdn in the config.php as my ServerName as in my apache2.conf.

root@ravi-ThinkPad-X230:/var/www/html/phplib# facter | grep fqdn
fqdn => ravi-ThinkPad-X230.x.x.x

I have kept the prod_fqdn in config.php as the above. Also changed the first array as specified.

I am still getting the error while loading the project on the browser as

.................................................

$number) { $pct = round( ($number / $total) * 100, 2); $html_status_summary .= "{$type} {$number} ({$pct}%) "; $html_status_bar .= "
"; } $html = '
'; $html .= $html_status_bar; $html .= '
'; $html .= "
{$html_status_summary}

"; return $html; } /* * renderTagTables() * Renders a table of tag summaries for a week or a year */ function renderTagTable($tags, $total, $tag_lookup) { foreach ($tags as $type => $number) { $pct = round( ($number / $total) * 100, 2); $html_status_summary .= "{$tag_lookup[$type]} {$number} ({$pct}%) "; } return '' . $html_status_summary . '
'; } function renderSleepStatus($sleep_statuses, $status_total, $mtts_total, $rtts_count, $ntts_count) { global $sleep_state_icons, $sleep_states; foreach ($sleep_statuses as $type => $number) { $pct = round( ($number / $status_total) * 100, 2); $html_status_summary .= " "; $html_status_summary .= "{$sleep_states[$type]} {$number} ({$pct}%) "; } $html = "{$html_status_summary}
"; $html .= "
Mean Time to Sleep: "; $html .= round( ($mtts_total / $rtts_count) / 60, 2); $html .= " minutes

"; $html .= "
Time spent awake due to notifications: "; $html .= round( ($mtts_total / 60 / 60), 2); $html .= " hours

"; $html .= "
Number of times sleep was abandoned: {$ntts_count} times

"; return $html; } function renderTopNTableBody($input_array, $limit = 10) { if(!is_array($input_array)) { return false; } // Get the top N results // First, sort the array by value arsort($input_array); // Then slice the top N off the top. $a = array_slice($input_array, 0, $limit); $html = ''; foreach($a as $k => $v) { $html .= "{$k}{$v}"; } return $html; } function renderTopNPrettyLine($input_array, $limit = 4) { if(!is_array($input_array)) { return false; } arsort($input_array); $a = array_splice($input_array, 0, $limit); foreach ($a as $k => $v) { $strings[] = "{$k} ({$v} times)"; } return implode($strings, ", "); } I don't know what to do with this FQDN, please add it to config.php
..............................................................

I am new to all this. I might be doing something wrong here.

@lozzd
Copy link
Contributor

lozzd commented Jul 1, 2014

Hey!

The reason for this is due to the use of PHP short open tags. I have a pull request that I'm going to merge shortly that will fix this, alternatively you can look for short_open_tag in your php.ini (normally /etc/php.ini) and change to short_open_tag = On

Let me know how it goes!

@wingZero21
Copy link

Hey,

I had a similar issue. I just added the FQDN to the team bit in the config.php on the first team example and that sorted it for me.

Details:
$teams = array(
"YOUR-FQDN-HERE" => array(

@remy1991
Copy link
Author

remy1991 commented Jul 1, 2014

@wingZero21 and @lozzd : so whatever i got from my facter, i should put that right ?

@lozzd
Copy link
Contributor

lozzd commented Jul 2, 2014

You what whatever FQDN you are going to access in your browser. If you point to your local laptop, then yes that should work.

I've just merged the request that adds short tags support and PHP 5.3 support.. please pull again and retry and see if it fixes your issue.

Thanks!

@lozzd
Copy link
Contributor

lozzd commented Jul 8, 2014

Is your issue fixed now @remy1991?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants