I am trying to use COM object in my script and running the script on linux server and got below error.
Fatal error: Class 'COM' not found
Any help?
You can serve a COM object to a Windows client, connect to one running on a Windows host etc, - but you can't run it under Linux.
On a Windws host running PHP >= v5 you need to enable it in php.ini:
[PHP_COM_DOTNET]
extension=php_com_dotnet.dll
Related
I am trying to connect to mysql 8.0.15 using php_mysql_xdevapi but getting following errror.
Notice: mysql_xdevapi\getSession(): send of 5 bytes failed with errno=10053 An established connection was aborted by the software in your host machine.
Fatal error: Uncaught mysql_xdevapi\Exception: [2000][HY000] The server sent invalid packet type
I am using
Windows 10
MySQL 8.0.15
PHP 7.3.0
PECL Extension MySQL X DevAPI for PHP
Finally after 2 days of searching, I make php_mysql_xdevapi work on windows using wampserver.
Steps to make php_mysql_xdevapi work on windows 10, using wamp.
Install Pecl extension php_mysql_xdevapi.
Add the extension into the ini extension=php_mysql_xdevapi
Be default in wamp the XPlugin is disable enable it in my.ini
;Disabling X Plugin
;mysqlx=0
use this to connect to mysql using php_mysql_xdevapi
$session = mysql_xdevapi\getSession('mysqlx://root:123#localhost:33060?connect-timeout=5000&ssl-mode=disabled');
Now you can use this to further query in mysql document store.
I installed xampp on my local computer. The data in the project is stored in memory, but the memcached function did not work on my local machine.
$memcache=memcache_connect('127.0.0.1', 11211);
Error code:
Fatal error: Call to undefined function memcache_connect() in
I called the error, but the solutions didn't work for me.
Suggested solutions include the addition of new services
I am getting this error when adding new service
"failed to install service or service already installed"
**Windows 7
**Xampp
**Apache/2.4.34 (Win32) OpenSSL/1.0.2o PHP/5.6.38
My db2 database is on windows machine
my php application on Linux machines on xamp
when i start my app then error is occured
error is :- Call to undefined function db2_connect()
DB2 is an extension and must be installed separately before its functions are made available.
http://php.net/manual/en/ibm-db2.installation.php
You need to enable the ibm db2 extension:
http://php.net/manual/en/ibm-db2.installation.php
I checked out the PhpWebSockets project from here:
https://code.google.com/p/phpwebsocket/
It's in its own project on my localhost (Windows 7 64-bit) box, inside of a WAMP server. I issue the following command in Windows Command Line to run the server.php file:
C:\wamp\bin\php\php5.4.12\php.exe C:\wamp\www\phpwebsocket\server.php
But it results in the following error message:
PHP Fatal error: Call to undefined function socket_create() in C:\wamp\www\phpwebsocket\server.php on line 58
My WAMP instance DOES have the php_sockets extension enabled (since I saw this similar question who had that problem).
Anyone know what I could possibly be doing wrong?
Found the answer in another thread:
Error with PHP Websocket and Wamp Server
Turns out running the file on the command line means it uses a different php.ini file than the WAMP server does. Seems stupid, but turned out php_sockets wasn't uncommented in that php.ini file, and removing it removed the error with it.
I'm trying to print some string using PHP, i'm using the PHP print functions:
$printer = ("HP LaserJet Professional P1102");
$handler= printer_open($printer);
$content="Test Content";
printer_write($handler, $content);
printer_close($handler);
but I got that error :
Fatal error: Call to undefined function printer_open() in C:\xampp\htdocs\print.php on line 12
after googling it i found that i must add the php_printer.dll to the extensions file in php and add it's extension to the php.ini file, then restarting the server services, all of that accomplished but still getting that error.
p.s. I've tried it on WAMP and XAMPP
I think solution would be extension location.php_printer extension should be stored in c:\xampp\php\ext and not in c:\xampp\php. So move it to the ext-folder, and restart Apache.
Can you look into the error_log, which tells you, if it fails to load the module. You should also run a phpinfo(), which shows up all loaded modules, you must find the printer extensions there.
I hope it may resolve your issue.