NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
new COM Failed to create COM object Class not registered


Joined: 03 Feb 2008
Posts: 42
Reply with quote
When I try to set up a new COM object in phpED I get the above message.

But when I run the same script using XAMPP and localhost, it works. So I know my .dll is registered.

What must I do to get COM objects to run properly?

$eph_obj = new COM("astro_php.astro_php_class");

I am running PHP v5.4.

Thank you.

UPDATE: when I change my phpED PHP version (in Settings) from v5.6 to v5.4, then it works. What is it about v5.6 that breaks it??
View user's profileFind all posts by a_edwallSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
My understanding is that either you didn't install COM extension in php.ini or there is indeed a bug in PHP.
You'd better post your question to php-general news group. We're supporting NuSphere products, while php itself is not our product.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 03 Feb 2008
Posts: 42
Reply with quote
I set up XAMPP with PHP 5.3 and the COM command works. I have PHP 5.4.45 in PhpED and COM works. When I switch {hpED to anything v5.6 or above COM does NOT work.

I downloaded XAMPP with PHP v5.6.40 and, using the same test script, COM does NOT work. It does not work in PHP v7 either. Hopefully this will help others who are trying to run a Windows .dll file and its functions on their local computer, using either PhpED or XAMPP.
View user's profileFind all posts by a_edwallSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
You need to check what extensions are loaded by running php.exe -m or php-cgi.exe -m commands. If you don't see com extensino, you need to enable it in php.ini. Note that under XAMPP path to php.ini might be different. You need to check phpinfo() output to find what real path to php.ini is in effect. Similarly, if you run php from command line, just run php -i to get phpinfo() output.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 03 Feb 2008
Posts: 42
Reply with quote
I have checked everything you mentioned and it simply does not work. There is something wrong somewhere, but where? Here I am with PhpED, v19.3 and it still doesn't work, on any version v5.6, v7.3, or v7.4 of PHP.

BTW, I run the same exact script on phpGUI and it works. So there is something in PhpED or its settings that is preventing proper execution.

Configuration File (php.ini) Path =>
Loaded Configuration File => C:\Program Files XP\NuSphere\PhpED\php73\php.ini

[PHP Modules]
bcmath
calendar
cgi-fcgi
com_dotnet
Core
ctype
curl
date
dbg
dom
fileinfo
filter
gd
hash
iconv
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
readline
Reflection
session
SimpleXML
SPL
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
zip
zlib

[Zend Modules]
DBG

com_dotnet

COM support => enabled
DCOM support => enabled
.Net support => enabled
View user's profileFind all posts by a_edwallSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
PhpED can't prevent from creating a class in your php script.
I'd suggest you to check a) list of loaded php extensions by running phpinfo() right in your script b) check script itself whether there are typos etc c) script(s) that you run in Watch window or in breakpoint condition in the IDE. If your same script works elsewhere, it's merely an indication it's either running under different php configuration that has different extensions, b) it's different script than what you're running in the IDE c) there are no other influencing scripts like the ones you have in Watches or in breakpoint conditions

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 30 May 2006
Posts: 92
Reply with quote
This has nothing to do with PhpEd IDE.
It's your local PHP setup problem.
Did you check web server error logs?

Seems like messing up various version of PHP on various environments - make sure you are clear about:

- what PHP version and php.ini is loaded in XAMPP for both CLI mode and HTTP mode
- what PHP version and php.ini is loaded in NuSphere for both CLI mode and HTTP mode

You will have 4 various scripts executed and 4 various php.ini paths - check if COM is loaded everywhere.

Then on environment where it works (e.g. PHP 5.4) switch to PHP 5.6 (not working version) and try - if fails, it's most likely incompatible script.
And/or reversely - on environment, where it does not work (5.6, 7.3) switch to working lower version e.g. 5.4.

Check:
1/ apache error logs or
2/ in windows -> controle panel -> admin tools -> application events -> application logs.

My guess is there might be silent error log about script crash "astro_php.astro_php_class" somewhere.

Also I would recommend to use WAMP rather than XAMPP, coz it has easier way of switching between various versions of PHP/mySQL/apache.
View user's profileFind all posts by lubosdzSend private message
new COM Failed to create COM object Class not registered
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic