We used "cPanel API2" library to create park domain in our server and it was working fine until last cPanel up-gradation.
We created file mytest.live.php on server to create a object of "CPANEL class" for troubleshooting the issue, but unfortunately it returns error as below.
<?php
require_once "/usr/local/cpanel/php/cpanel.php";
$cpanel = new CPANEL(); ?>
And Output Returns:
Fatal error: Uncaught exception 'RuntimeException' with message 'There was a problem fetching the env variablecontaining the path to the socket' in /usr/local/cpanel/php/cpanel.php:146 Stack trace: #0 /home/cityusa/public_html/mytest.live.php(4): CPANEL->__construct() #1 {main} thrown in /usr/local/cpanel/php/cpanel.php on line 146
So please help for resolve this issue.
You should try naming your file as ".live.php" or ".livephp". That worked for me.
Related
I created a page for tests using easyphp, in easyphp the classes are loaded normally and everything works fine, but when sending the files to the hosting, the classes are no longer recognized for some reason I don't know... does anyone know how to help me?
Page: https://spetests.000webhostapp.com/gerar-qrcode-dinamico.php
Error: Fatal error: Uncaught Error: Class 'App\Pix\Api' not found in /storage/ssd4/870/19749870/public_html/gerar-qrcode-dinamico.php:12 Stack trace: #0 {main} thrown in /storage/ssd4/870/19749870/public_html/gerar-qrcode-dinamico.php on line 12
Files(from tutorial): https://github.com/william-costa/wdev-qrcode-pix-php
hi I'm using php/symfony ( symfony 1.0 ) and im getting following exception at the very first page
PHP Fatal error: Class 'sfContext' not found
I tried symfony cc at the root and its working but error is still there ,
may be its due to failure in autoloading files and following line from the code gives me the exception
$customerName = sfContext::getInstance()->getUser()->getAttribute('meta.customerName');
I'm assuming it might be a symfony exception
Sorry for the less information , actually I was installing a web based application and thats all printed in the log , anyhow I managed to find the fault with adding some var_dumps on the flow methods ,
missing php-mysqli extension caused the problem and unfortunately it's not handled from the application level so only a symfony level single line exception printed.
Here is the stack trace :
PHP Fatal error: Uncaught Error: Class 'sfContext' not found in /usr/local/rms/evt/uranai/lib/symfony-1.0.11/util/sfCore.class.php:171\nStack trace:\n#0 [internal function]: sfCore::splAutoload('sfContext')\n#1 /usr/local/rms/evt/uranai/lib/symfony-1.0.11/util/sfCore.class.php(171): spl_autoload_call('sfContext')\n#2 [internal function]: sfCore::splAutoload('sfPhpConfigHand...')\n#3 /usr/local/rms/evt/uranai/cache/pc/prod/config/config_config_handlers.yml.php(7): spl_autoload_call('sfPhpConfigHand...')\n#4 /usr/local/rms/evt/uranai/lib/symfony-1.0.11/config/sfConfigCache.class.php(279): require_once('/usr/local/rms/...')\n#5 /usr/local/rms/evt/uranai/lib/symfony-1.0.11/config/sfConfigCache.class.php(60): sfConfigCache->loadConfigHandlers()\n#6 /usr/local/rms/evt/uranai/lib/symfony-1.0.11/config/sfConfigCache.class.php(190): sfConfigCache->callHandler('config/settings...', Array, '/usr/local/rms/...')\n#7 /usr/local/rms/evt/uranai/lib/symfony-1.0.11/symfony.php(87): sfConfigCache->checkConfig('config/settings...')\n#8 /usr/local/rms/evt in /usr/local/rms/evt/uranai/lib/symfony-1.0.11/util/sfCore.class.php on line 171
i have a problem when use jsonRPCClient to get info bitcoin on my vps ubuntu, and i dont'n know how can fix it.
<?php
require_once 'jsonRPCClient.php';
$bitcoin = new jsonRPCClient('http://user:password#127.0.0.1:8332/');
echo "<pre>\n";
print_r($bitcoin->getinfo());
echo "</pre>";
?>
my config:
server=1
rpcuser=username
rpcpassword=pass123
rpcallowip=127.0.0.1
daemon=1
it has error:
Warning: fopen(http://...#127.0.0.1:8332/): failed to open stream: Connection refused in /var/www/.../jsonRPCClient.php on line 133
Fatal error: Uncaught exception 'Exception' with message 'Unable to connect to http://user:password#127.0.0.1:8332/' in /var/www/.../jsonRPCClient.php:141
Stack trace:
#0 /var/www/.../common.php(15): jsonRPCClient->__call('getinfo', Array)
#1 /var/www/.../common.php(15): jsonRPCClient->getinfo()
#2 /var/www/.../index.php(3): include('/var/www/coinba...')
#3 {main}
thrown in /var/www/.../jsonRPCClient.php on line 141
how to fix it, help me, please!!!
It would appear your username and password do not match you bitcoin.conf file.
rpcuser=username
rpcpassword=pass123
('http://user:password#127.0.0.1:8332/');
It can be difficult to debug with jsonRPCclient for this exact reason. The jsonRPCClient library uses fopen() and will throw an exception saying "Unable to connect" if it receives a 404 or 500 error from bitcoind. This prevents you from being able to see error messages generated by bitcoind.
Also it is recommended to use easybitcoin library instead of jsonRPCClient.
Source
Instead, follow the above link, use the easybitcoin.php library, and give this a try.
require("easybitcoin.php");
$bitcoin = new Bitcoin("username", "pass123");
$info = $bitcoin->getinfo();
print_r($info);
When I try to run zend program its shows error as follows
PHP Fatal error: Uncaught exception
'Zend\ModuleManager\Listener\Exception\RuntimeException' with message
'Could not find a valid ServiceManager for RoutePluginManager' in
/Documents/zf2-example-login/vendor/zendframework/zend-modulemanager/src/Listener/ServiceListener.php:202
Stack trace:
#0 /Documents/zf2-example-login/vendor/zendframework/zend-eventmanager/src/EventManager.php(271):
Zend\ModuleManager\Listener\ServiceListener-onLoadModulesPost(Object(Zend\ModuleManager\ModuleEvent))
#1 /Documents/zf2-example-login/vendor/zendframework/zend-eventmanager/src/EventManager.php(143):
Zend\EventManager\EventManager-triggerListeners(Object(Zend\ModuleManager\ModuleEvent))
#2 /Documents/zf2-example-login/vendor/zendframework/zend-modulemanager/src/ModuleManager.php(129):
Zend\EventManager\EventManager-triggerEvent(Object(Zend\ModuleManager\ModuleEvent))
#3 /Documents/zf2-example-login/vendor/zendframework/zend-mvc/src/Application.php(264): Zend\ModuleManager\ModuleManager-> in
/Documents/zf2-example-login/vendor/zendframework/zend-modulemanager/src/Listener/ServiceListener.php
on line 202
I'm newbie to zend, I tried googling but unable to find the solution.Help me.
Found a clue here:
https://github.com/zendframework/zend-modulemanager/issues/42
You first need to check to see if you have ZF3 installed. One quick way to check is to look under "vendor/zendframework" and see if you have a subdirectory "zend-router".
If so, add this to your application.config.php file under the "modules" key:
'Zend\Router'
I had downloaded from official website, uploaded to my hosting server. I got this error message.
[08-Mar-2012 21:26:07] PHP Fatal error: Class 'PhpThumb' not found in /home/sokad
/public_html/libs/phpthumb/thumb_plugins/gd_reflection.inc.php on line 179
Fatal error: Uncaught exception 'RuntimeException' with message 'Cannot show image, headers
have already been sent' in /home/sokad/public_html/libs/phpthumb/GdThumb.inc.php:569 Stack
trace: #0 /home/sokad/public_html/resize.php(14): GdThumb->show() #1 {main} thrown in
/home/sokad/public_html/libs/phpthumb/GdThumb.inc.php on line 569
require_once 'libs/phpthumb/ThumbLib.inc.php';
$thumb = PhpThumbFactory::create($url);
$thumb->adaptiveResize($width, $height);
$thumb->show();
I found that a lot of website also got same problem. Any idea how to solve it?
scan your "phpthumb" directory for all "error_log" files or "_notes" directories, and delete them. In my case I had an error_log file at the thumb_plugins, as soon as I deleted it, it worked on the remote side.
I came to this conclusion because there was no reason why it whould work differently locally and remotely, the only difference? these files.
Good Luck