i am doing web application based on php ,
while i am forcing my content to network printer
the following error was happening..
Fatal error: Uncaught Error: Call to undefined function printer_open()
in E:\xampp\htdocs\print\index.php:3 Stack trace: #0 {main} thrown in
E:\xampp\htdocs\print\index.php on line 3
my codes :
$php_content='Test Print';
$handle = printer_open("\\\\192.168.2.4\\EPSON L365 Series");
printer_write($handle, $php_content);
printer_close($handle);
I am adding php_printer.dll file to xampp/php/ext folder
and adding the extension=php_printer into php.ini file
After restarting my xampp server its working fine on locally.
Same code I was executed on my Cpanel server HTTP ERROR 500 was showing.
Kindly give the solution for this..
Thanks in advance.
Related
Fatal error: Uncaught Error: Call to undefined function wp() in /home/customer/www/monkinsider.com/public_html/wp-blog-header.php:16 Stack trace: #0 /home/customer/www/monkinsider.com/public_html/index.php(17): require() #1 {main} thrown in /home/customer/www/monkinsider.com/public_html/wp-blog-header.php on line 16
I don't know but since last week I am getting this error. My site is hosted on siteground and there are no updates from my side. Also, when I contacted them they said its Wordpress issue and they cant help. I tried to restore backup but only it works for 5 minutes after that error shows up again. Also, I referred to previous articles and everything seems fine the file wp-config and all. Also,I cannot even open my admin Wordpress panel.
That's a malware.
You should scan your server and restore wp-blog-header.php with a default one.
You can download a fresh version here: https://wordpress.org/download/releases/
You won't be able to restore the account until the malware is deleted
I had the same issue. In my case wp-load.php was empty for some reasons, not sure what caused it. I copied the files content from a different website and it fixed the issue.
I am using 7.2.27 PHP version with Laravel 7.
Below code working on my local same configuration,
$captured = imagegrabscreen();
imagepng($captured, "~path/" . time() . ".png");
imagedestroy($captured);
But this code not working on live server it's throwing exception like,
Fatal error: Uncaught Error: Call to undefined function imagegrabscreen() in ~file-path:11 Stack trace: #0 {main} thrown in ~file-path on line 11
I don't know what is the exact issue.
I also checked below answer but I don't know what is php_gd2.dll,
https://stackoverflow.com/a/8715544/6656706
Edit:
I also tried on AWS ec2 with xampp but not working ! I also tried by installing php_gd2.dll.
Any help will be appreciated !
Thanks.
If the server is on Linux, it can't work because imagegrabscreen() is only supported on Windows:
Note:
This function is only available on Windows.
Also note that the screenshot is performed on the server. It will not capture the user screen.
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.
I am trying to run LWT on my mac and have installed MAMP for this. I have followed these instructions, but when I try to go to http://localhost:8888/lwt/ I am getting:
The localhost page isn’t working
localhost is currently unable to handle this request.
500
I have created a different folder in my htdocs folder and created a php file in it (index.php), with some code to see if php is working:
<?php
echo "this is the start";
phpinfo();
echo "<br>this is the end";
?>
That is all fine and works. I have also checked the user-rights for the lwt folder, but it seems fine too (Admins & Me are Read&Write, Others are ReadOnly). Typing tail -f /Applications/MAMP/logs/php_error.log into the terminal gives me the following error log:
PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /Applications/MAMP/htdocs/lwt/utilities.inc.php:3272
Stack trace:
#0 /Applications/MAMP/htdocs/lwt/index.php(46): require_once()
#1 {main}
thrown in /Applications/MAMP/htdocs/lwt/utilities.inc.php on line 3272
I am a beginner though, so I don't know what else the problem could be. Any ideas?
I don't know which version of PHP you use. But the mysql_* function are deprecated and its possible that its not included in your new version anymore. Use mysqli_* to connect to your database or use PDO.
In the new version of MAMP is PHP7 included. Perhaps you use that.
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