not able to bring wpt instance up
|
05-24-2016, 08:10 AM
Post: #1
|
|||
|
|||
not able to bring wpt instance up
Hi,
I installed 64-bit Apache, PHP & wpt 2.9 (since it support 64 bit), I am not able to see WPT instance while i hit localhost or 127.0.0.1 showing below error @ WebPagetest Installation Check Filesystem Permissions Test Locations $label: $value"; if (!$pass and !$required) { echo ' (optional)'; } echo ""; } /*----------------------------------------------------------------------------- -----------------------------------------------------------------------------*/ function CheckPHP() { ShowCheck('PHP version at least 5.3', phpversion() >= 5.3, true, phpversion()); ShowCheck('GD Module Installed', extension_loaded('gd')); ShowCheck('zip Module Installed', extension_loaded('zip')); ShowCheck('zlib Module Installed', extension_loaded('zlib')); ShowCheck('curl Module Installed', extension_loaded('curl'), false); ShowCheck('php.ini upload_max_filesize > 10MB', return_bytes(ini_get('upload_max_filesize')) > 10000000, false, ini_get('upload_max_filesize')); ShowCheck('php.ini post_max_size > 10MB', return_bytes(ini_get('post_max_size')) > 10000000, false, ini_get('post_max_size')); } /*----------------------------------------------------------------------------- -----------------------------------------------------------------------------*/ function CheckFilesystem() { ShowCheck('{docroot}/tmp writable', IsWritable('tmp')); ShowCheck('{docroot}/results writable', IsWritable('results')); ShowCheck('{docroot}/work/jobs writable', IsWritable('work/jobs')); ShowCheck('{docroot}/work/video writable', IsWritable('work/video')); ShowCheck('{docroot}/logs writable', IsWritable('logs')); } /*----------------------------------------------------------------------------- -----------------------------------------------------------------------------*/ function CheckLocations() { $locations = parse_ini_file('./settings/locations.ini', true); $out = ''; $video = false; foreach($locations['locations'] as $id => $location) { if (is_numeric($id)) { $info = GetLocationInfo($locations, $location); if ($info['video']) { $video = true; } $out .= "•{$info['label']}"; if (count($info['locations'])) { $out .= ""; foreach($info['locations'] as $loc_name => $loc) { $out .= "{$loc['label']}"; $out .= ' '; } $out .= ""; } $out .= " "; } } if ($video) { echo '•Video rendering is supported '; } else { echo 'No test agents are configured to render video '; } echo $out; } /*----------------------------------------------------------------------------- -----------------------------------------------------------------------------*/ function GetLocationInfo(&$locations, $location) { $info = array('state' => 'pass', 'label' => "$location : ", 'video' => false, 'locations' => array()); if (array_key_exists($location, $locations)) { if (array_key_exists('label', $locations[$location])) { $info['label'] .= $locations[$location]['label']; } else { $info['label'] .= 'Label Missing'; $info['locations'][$loc_name]['state'] = 'fail'; $info['state'] = 'fail'; } foreach($locations[$location] as $id => $loc_name) { if (is_numeric($id)) { $info['locations'][$loc_name] = array('state' => 'pass', 'label' => "$loc_name : "); if (array_key_exists($loc_name, $locations)) { if (array_key_exists('label', $locations[$loc_name])) { $info['locations'][$loc_name]['label'] .= $locations[$loc_name]['label']; } else { $info['locations'][$loc_name]['label'] .= 'Label Missing'; $info['locations'][$loc_name]['state'] = 'fail'; $info['state'] = 'fail'; } $info['locations'][$loc_name]['label'] .= ' - '; $file = "./tmp/$loc_name.tm"; $testerCount = 0; $elapsedCheck = -1; $lock = LockLocation($loc_name); if ($lock) { if (is_file($file)) { $now = time(); $testers = json_decode(file_get_contents($file), true); $testerCount = count($testers); if( $testerCount ) { $latest = 0; foreach($testers as $tester) { if( array_key_exists('updated', $tester) && $tester['updated'] > $latest) { $latest = $tester['updated']; } if (array_key_exists('video', $tester) && $tester['video']) { $info['video'] = true; } } if ($latest > 0) { $elapsedCheck = 0; if( $now > $latest ) $elapsedCheck = (int)(($now - $latest) / 60); } } } UnlockLocation($lock); } if ($testerCount && $elapsedCheck >= 0) { if ($elapsedCheck < 60) { $info['locations'][$loc_name]['label'] .= "$testerCount agents connected"; } else { $info['locations'][$loc_name]['label'] .= "$elapsedCheck minutes since last agent connected"; $info['locations'][$loc_name]['state'] = 'fail'; $info['state'] = 'fail'; } } else { $info['locations'][$loc_name]['label'] .= 'No Agents Connected'; $info['locations'][$loc_name]['state'] = 'fail'; $info['state'] = 'fail'; } } else { $info['locations'][$loc_name]['label'] .= 'Definition Missing'; $info['locations'][$loc_name]['state'] = 'fail'; $info['state'] = 'fail'; } } } } else { $info['label'] .= 'Definition Missing'; $info['state'] = 'fail'; } return $info; } /*----------------------------------------------------------------------------- -----------------------------------------------------------------------------*/ function IsWritable($dir) { $ok = false; $dir = './' . $dir; if (!is_dir($dir)) { mkdir($dir, 0777, true); } if (is_dir($dir)) { $file = "$dir/install_check.dat"; if (file_put_contents($file, 'wpt')) { if (file_get_contents($file) == 'wpt') { $ok = true; } } unlink($file); } return $ok; } /*----------------------------------------------------------------------------- -----------------------------------------------------------------------------*/ function return_bytes($val) { if (!isset($val)) { $val = '0'; } $val = trim($val); switch (strtolower(substr($val, -1))) { case 'm': $val = (int)substr($val, 0, -1) * 1048576; break; case 'k': $val = (int)substr($val, 0, -1) * 1024; break; case 'g': $val = (int)substr($val, 0, -1) * 1073741824; break; case 'b': switch (strtolower(substr($val, -2, 1))) { case 'm': $val = (int)substr($val, 0, -2) * 1048576; break; case 'k': $val = (int)substr($val, 0, -2) * 1024; break; case 'g': $val = (int)substr($val, 0, -2) * 1073741824; break; default : break; } break; default: break; } return $val; } ?> ------------------------------------------------------------------------ My locations.ini [locations] 1=Test_loc 2=Public_Dulles default=Test_loc ; ; These are the top-level locations that are listed in the location dropdown ; Each one points to one or more browser configurations ; [Test_loc] 1=Local-URLBlast 2=Local-WPTDriver label=Local [Public_Dulles] 1=WPT_Dulles_IE8 label="WebPagetest.org - Dulles, VA" ; ; Tese are the browser-specific configurations that match the configurations ; defined in the top-level locations. Each one of these MUST match the location ; name configured on the test agent (urlblast.ini or wptdriver.ini) ; [IE] browser=IE 11 latency=0 label="Test Location - IE 11" ;browserExe=pagetest.exe ;key=TestKey123 ---------------------------------------------------------------------- wptdriver.ini [WebPagetest] url=http://127.0.0.1/ location=Local-URLBlast browser=Chrome,Firefox,Firefox 3,Chromium,IE_11 ;key=TestKey123 ;Automatically install and update support software (Flash, Silverlight, etc) software=http://www.webpagetest.org/installers/software.dat [Chrome] exe="C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" options='--load-extension="%WPTDIR%\extension" --user-data-dir="%PROFILE%" --no-proxy-server' installer=http://www.webpagetest.org/installers/browsers/chrome.dat [Firefox] exe="C:\Program Files (x86)\Mozilla Firefox\firefox.exe" options='-profile "%PROFILE%" -no-remote' installer=http://www.webpagetest.org/installers/browsers/firefox.dat template=firefox [Safari] exe="%PROGRAM_FILES%\Safari\Safari.exe" [IE_11] exe="C:\Program Files (x86)\Internet Explorer\iexplore.exe" Thanks rama |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)