View Full Version : blank screen, blank user
Hello,
I can't seem to get this thing working. I get a blank screen that has some HTML but with nothing between the <body></body> tags.
I'm hosting at daily.co.uk where all files go into a public_html folder, so perhaps I need to amend a few pages.
Alternativey perhaps something else is wrong. I can't seem to get any further forward with the literature, can anyone help please?
The domain is hd-tv.uk.com if anyone can gather any more info from there.
Thanks.
IntroSites
01-09-08, 21:43
usually a missing file, try uploading ALL files again
Hi thanks for the reply. I tried uploading them all again, but to no avail I'm afraid.
I think I partly know what the problem is now although I haven't managed to fix it if anyone can help.
I found a smarty article & put a testsmarty.php file on the server, along with an index.tpl file in the smarty folder. The testsmarty file found the index.tpl & displayed the text just fine.
This suggests to me that the index.php of the shopwindows, & perhaps the constants.inc.php & a few smarty files need amending to reflect the fact that it is in a public_html folder, not the root.
I haven't a clue which bits to change though, although I'm pretty sure I know what the additional address needs to be since I used it in my testsmarty.php file. The testsmarty code was:
<?php
// put full path to Smarty.class.php require('my address...public_html/smarty/libs/Smarty.class.php');
$smarty = new Smarty();
$smarty->template_dir = 'my address...public_html/smarty/templates';
$smarty->compile_dir = 'my address...public_html/smarty/templates_c';
$smarty->cache_dir = 'my address...public_html/smarty/cache';
$smarty->config_dir = 'my address...public_html//smarty/configs';
$smarty->assign('name', 'Ned');
$smarty->display('index.tpl');
?>
The index.tpl is:
<html>
<head>
<title>Smarty</title>
</head>
<body>
Hello, {$name}!
</body>
</html>
Now, I would think that this is going to NOT be an isolated incident, so I would hope that someone can help to resolve it so that future users who experience the same problem can get it resolved without spending a couple of weeks on it.
IntroSites
02-09-08, 21:03
do you get any errors displayed with display_errors turned on in constants.inc.php
ini_set('display_errors', 1);
Hello,
thank you for replying.
I didn't get any errors previously, but I see that my hosting company - who have been trying to help - have added a php.ini file outside the folder.
I now get the following error:
Fatal error: Class 'SoapClient' not found in ......public_html/classes/class.soap_client.php on line 32
However, I'm still getting zero html from any of the templates either.
Any ideas?
That is this bit of code starting at the "class soap_client extends SoapClient" line below:
require_once('class.soap_error.php');
/**
* PHP5: Extends SoapClient and automatically configures settings specific to the AWin API
*
*/
class soap_client extends SoapClient
{
private static $oInstance = null; // an instance of itself
protected $oSoapError = null; // holds any errors produced during the SOAP requests
/**
* The Constructor
*
* @copyright DigitalWindow
* @author Kostas Melas <kostas@digitalwindow.com>
*
* @access public
*
* @param object $oUser the user object with login detail
*/
public function __construct($oUser)
{
// create client
parent::__construct(API_WSDL, array('trace'=>API_SOAP_TRACE,
'compression'=> SOAP_COMPRESSION_ACCEPT |
SOAP_COMPRESSION_GZIP |
SOAP_COMPRESSION_DEFLATE) );
// create headers
$oHeader = new SoapHeader(API_NAMESPACE, 'UserAuthentication', $oUser, true, API_NAMESPACE);
$oHeader2 = new SoapHeader(API_NAMESPACE, 'getQuota', true, true, API_NAMESPACE);
// set headers
$this->__setSoapHeaders(array($oHeader, $oHeader2));
// set WSDL caching
ini_set("soap.wsdl_cache_enabled", 1);
ini_set('soap.wsdl_cache_ttl', 86400);
// set server response timeout
ini_set('default_socket_timeout', 60);
}
/**
* Singleton function
*
* @author Kostas Melas <kostas@digitalwindow.com>
*
* @access public
*
* @param object $oUser the user object with login detail
*
* @return object an instance of the class
*/
public function &getInstance($oUser)
{
$sClassName = __CLASS__;
// only create new instance if necessary
if ( !self::$oInstance instanceof $sClassName ) {
self::$oInstance = new $sClassName($oUser);
}
return self::$oInstance;
}
/**
* Executes the speficied function from the WSDL
*
* @copyright DigitalWindow
* @author Kostas Melas <kostas@digitalwindow.com>
*
* @access public
*
* @param string $sFunctionName the name of the function to be executed
* @param mixed $mParams [optional] the parameters to be passed to the function, can be array or single value
*
* @return mixed the results or a SoapError object
*/
public function call($sFunctionName, $mParams='')
{
// catch any exceptions
try {
return $this->$sFunctionName($mParams);
}
catch(SoapFault $e) {
$this->oSoapError = new soap_error($e, $sFunctionName);
return $this->oSoapError;
}
}
/**
* Gives the remaining operations quota
*
* @copyright DigitalWindow
* @author Kostas Melas <kostas@digitalwindow.com>
*
* @access public
*
* @return int the remaining operations quota
*/
public function getQuota()
{
$sResponse= $this->__getLastResponse();
// use R.Exp. rather than XML parsers, as they might not be installed
preg_match('/getQuotaResponse>(.*)<\/.*:getQuotaResponse>/', $sResponse, $aMatches);
$iQuota = $aMatches[1];
return $iQuota;
}
} // end class