500 - Internal server error

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
hrivera0312
New user
New user
Posts: 12
Joined: 2019-09-19 03:43

500 - Internal server error

Post by hrivera0312 » 2019-09-19 04:02

Hi all, phpwebadmin was working perfectly but I reset IIS and now I'm getting a 500 - Internal server error. When I enable display error in php I get "Fatal error: Uncaught Error: Class 'COM' not found in C:\inetpub\wwwroot\hMailAdmin\initialize.php:15 Stack trace: #0 C:\inetpub\wwwroot\hMailAdmin\index.php(20): require_once() #1 {main} thrown in C:\inetpub\wwwroot\hMailAdmin\initialize.php on line 15"

I already follow indication in : https://www.hmailserver.com/documentati ... ermissions for DCOM permissions and still getting the same error. I also have the extension_dir "c:\php\ext\" and also have set extension=php_com_dotnet.dll

I also set IIS_IUSRS and IUSR permission to the phpwebadmin directory. I removed and added the directory again in IIS, remove and added again permissions.

I don't know what else to do to make this work again, I will really appreciate any help.

User avatar
mattg
Moderator
Moderator
Posts: 20794
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: 500 - Internal server error

Post by mattg » 2019-09-19 08:57

Set DCOM for the IIS users gropup
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

hrivera0312
New user
New user
Posts: 12
Joined: 2019-09-19 03:43

Re: 500 - Internal server error

Post by hrivera0312 » 2019-09-19 19:43

Thank you mattg but I already tried that and I'm still getting the same error.

User avatar
Dravion
Senior user
Senior user
Posts: 1688
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: 500 - Internal server error

Post by Dravion » 2019-09-19 22:12

Make sure PHP loaded the Microsoft COM
Extension by your php.ini and restart your IIS-Server.

Remove ";" before

extension=php_com_dotnet.dll

in your php.ini, save your php.ini file changes and restart iis.

hrivera0312
New user
New user
Posts: 12
Joined: 2019-09-19 03:43

Re: 500 - Internal server error

Post by hrivera0312 » 2019-09-19 23:15

Thanks Dravion, I have done that too and doesn't work.

User avatar
mattg
Moderator
Moderator
Posts: 20794
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: 500 - Internal server error

Post by mattg » 2019-09-20 01:13

IIS + PHP is painful on a good day

What versions of IIS and PHP are you using?
Can you show the results of, or a link to, your PHPinfo?
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

hrivera0312
New user
New user
Posts: 12
Joined: 2019-09-19 03:43

Re: 500 - Internal server error

Post by hrivera0312 » 2019-09-20 04:22

mattg wrote:
2019-09-20 01:13
IIS + PHP is painful on a good day You are 100% correct

What versions of IIS and PHP are you using? IIS v.10.0.14 / PHP v.7.2.19
Can you show the results of, or a link to, your PHPinfo?

Code: Select all

PHP logo
PHP Version 7.2.19
System	Windows NT REMOVED FOR SECURITY 10.0 build 14393 (Windows Server 2016) i586
Build Date	May 29 2019 13:56:21
Compiler	MSVC15 (Visual C++ 2017)
Architecture	x86
Configure Command	cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack" "--disable-zts" "--with-pdo-oci=c:\php-snap-build\deps_aux\oracle\x86\instantclient_12_1\sdk,shared" "--with-oci8-12c=c:\php-snap-build\deps_aux\oracle\x86\instantclient_12_1\sdk,shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet=shared" "--without-analyzer" "--with-pgo"
Server API	CGI/FastCGI
Virtual Directory Support	disabled
Configuration File (php.ini) Path	C:\Windows
Loaded Configuration File	C:\php\php.ini
Scan this dir for additional .ini files	(none)
Additional .ini files parsed	(none)
PHP API	20170718
PHP Extension	20170718
Zend Extension	320170718
Zend Extension Build	API320170718,NTS,VC15
PHP Extension Build	API20170718,NTS,VC15
Debug Build	no
Thread Safety	disabled
Zend Signal Handling	disabled
Zend Memory Manager	enabled
Zend Multibyte Support	disabled
IPv6 Support	enabled
DTrace Support	disabled
Registered PHP Streams	php, file, glob, data, http, ftp, zip, compress.zlib, phar
Registered Stream Socket Transports	tcp, udp
Registered Stream Filters	convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, zlib.*
Zend logoThis program makes use of the Zend Scripting Language Engine:
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
Configuration
bcmath
BCMath support	enabled
Directive	Local Value	Master Value
bcmath.scale	0	0
calendar
Calendar support	enabled
cgi-fcgi
Directive	Local Value	Master Value
cgi.check_shebang_line	1	1
cgi.discard_path	0	0
cgi.fix_pathinfo	1	1
cgi.force_redirect	1	1
cgi.nph	0	0
cgi.redirect_status_env	no value	no value
cgi.rfc2616_headers	0	0
fastcgi.impersonate	0	0
fastcgi.logging	1	1
Core
PHP Version	7.2.19
Directive	Local Value	Master Value
allow_url_fopen	On	On
allow_url_include	Off	Off
arg_separator.input	&	&
arg_separator.output	&	&
auto_append_file	no value	no value
auto_globals_jit	On	On
auto_prepend_file	no value	no value
browscap	no value	no value
default_charset	UTF-8	UTF-8
default_mimetype	text/html	text/html
disable_classes	no value	no value
disable_functions	no value	no value
display_errors	On	On
display_startup_errors	Off	Off
doc_root	no value	no value
docref_ext	no value	no value
docref_root	no value	no value
enable_dl	On	On
enable_post_data_reading	On	On
error_append_string	no value	no value
error_log	no value	no value
error_prepend_string	no value	no value
error_reporting	no value	no value
expose_php	On	On
extension_dir	C:\php\ext	C:\php\ext
file_uploads	On	On
hard_timeout	2	2
highlight.comment	#FF8000	#FF8000
highlight.default	#0000BB	#0000BB
highlight.html	#000000	#000000
highlight.keyword	#007700	#007700
highlight.string	#DD0000	#DD0000
html_errors	On	On
ignore_repeated_errors	Off	Off
ignore_repeated_source	Off	Off
ignore_user_abort	Off	Off
implicit_flush	Off	Off
include_path	.;C:\php\pear	.;C:\php\pear
input_encoding	no value	no value
internal_encoding	no value	no value
log_errors	Off	Off
log_errors_max_len	1024	1024
mail.add_x_header	Off	Off
mail.force_extra_parameters	no value	no value
mail.log	no value	no value
max_execution_time	30	30
max_file_uploads	20	20
max_input_nesting_level	64	64
max_input_time	-1	-1
max_input_vars	1000	1000
memory_limit	128M	128M
open_basedir	no value	no value
output_buffering	0	0
output_encoding	no value	no value
output_handler	no value	no value
post_max_size	8M	8M
precision	14	14
realpath_cache_size	4096K	4096K
realpath_cache_ttl	120	120
register_argc_argv	On	On
report_memleaks	On	On
report_zend_debug	On	On
request_order	no value	no value
sendmail_from	no value	no value
sendmail_path	no value	no value
serialize_precision	-1	-1
short_open_tag	On	On
SMTP	localhost	localhost
smtp_port	25	25
sys_temp_dir	no value	no value
track_errors	Off	Off
unserialize_callback_func	no value	no value
upload_max_filesize	2M	2M
upload_tmp_dir	no value	no value
user_dir	no value	no value
user_ini.cache_ttl	300	300
user_ini.filename	.user.ini	.user.ini
variables_order	EGPCS	EGPCS
windows.show_crt_warning	Off	Off
xmlrpc_error_number	0	0
xmlrpc_errors	Off	Off
zend.assertions	1	1
zend.detect_unicode	On	On
zend.enable_gc	On	On
zend.multibyte	Off	Off
zend.script_encoding	no value	no value
ctype
ctype functions	enabled
date
date/time support	enabled
timelib version	2017.09
"Olson" Timezone Database Version	2018.9
Timezone Database	internal
Default timezone	UTC
Directive	Local Value	Master Value
date.default_latitude	31.7667	31.7667
date.default_longitude	35.2333	35.2333
date.sunrise_zenith	90.583333	90.583333
date.sunset_zenith	90.583333	90.583333
date.timezone	no value	no value
dom
DOM/XML	enabled
DOM/XML API Version	20031129
libxml Version	2.9.9
HTML Support	enabled
XPath Support	enabled
XPointer Support	enabled
Schema Support	enabled
RelaxNG Support	enabled
filter
Input Validation and Filtering	enabled
Revision	$Id: REMOVED FOR SECURITY
Directive	Local Value	Master Value
filter.default	unsafe_raw	unsafe_raw
filter.default_flags	no value	no value
hash
hash support	enabled
Hashing Engines	md2 md4 md5 sha1 sha224 sha256 sha384 sha512/224 sha512/256 sha512 sha3-224 sha3-256 sha3-384 sha3-512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru snefru256 gost gost-crypto adler32 crc32 crc32b fnv132 fnv1a32 fnv164 fnv1a64 joaat haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5
MHASH support	Enabled
MHASH API Version	Emulated Support
iconv
iconv support	enabled
iconv implementation	"libiconv"
iconv library version	1.15
Directive	Local Value	Master Value
iconv.input_encoding	no value	no value
iconv.internal_encoding	no value	no value
iconv.output_encoding	no value	no value
json
json support	enabled
json version	1.6.0
libxml
libXML support	active
libXML Compiled Version	2.9.9
libXML Loaded Version	20909
libXML streams	enabled
mysqlnd
mysqlnd	enabled
Version	mysqlnd 5.0.12-dev - 20150407 - REMOVED FOR SECURITY
Compression	supported
core SSL	supported
extended SSL	not supported
Command buffer size	4096
Read buffer size	32768
Read timeout	86400
Collecting statistics	Yes
Collecting memory statistics	No
Tracing	n/a
Loaded plugins	mysqlnd,debug_trace,auth_plugin_mysql_native_password,auth_plugin_mysql_clear_password
API Extensions	no value
mysqlnd statistics	
bytes_sent	0
bytes_received	0
packets_sent	0
packets_received	0
protocol_overhead_in	0
protocol_overhead_out	0
bytes_received_ok_packet	0
bytes_received_eof_packet	0
bytes_received_rset_header_packet	0
bytes_received_rset_field_meta_packet	0
bytes_received_rset_row_packet	0
bytes_received_prepare_response_packet	0
bytes_received_change_user_packet	0
packets_sent_command	0
packets_received_ok	0
packets_received_eof	0
packets_received_rset_header	0
packets_received_rset_field_meta	0
packets_received_rset_row	0
packets_received_prepare_response	0
packets_received_change_user	0
result_set_queries	0
non_result_set_queries	0
no_index_used	0
bad_index_used	0
slow_queries	0
buffered_sets	0
unbuffered_sets	0
ps_buffered_sets	0
ps_unbuffered_sets	0
flushed_normal_sets	0
flushed_ps_sets	0
ps_prepared_never_executed	0
ps_prepared_once_executed	0
rows_fetched_from_server_normal	0
rows_fetched_from_server_ps	0
rows_buffered_from_client_normal	0
rows_buffered_from_client_ps	0
rows_fetched_from_client_normal_buffered	0
rows_fetched_from_client_normal_unbuffered	0
rows_fetched_from_client_ps_buffered	0
rows_fetched_from_client_ps_unbuffered	0
rows_fetched_from_client_ps_cursor	0
rows_affected_normal	0
rows_affected_ps	0
rows_skipped_normal	0
rows_skipped_ps	0
copy_on_write_saved	0
copy_on_write_performed	0
command_buffer_too_small	0
connect_success	0
connect_failure	0
connection_reused	0
reconnect	0
pconnect_success	0
active_connections	0
active_persistent_connections	0
explicit_close	0
implicit_close	0
disconnect_close	0
in_middle_of_command_close	0
explicit_free_result	0
implicit_free_result	0
explicit_stmt_close	0
implicit_stmt_close	0
mem_emalloc_count	0
mem_emalloc_amount	0
mem_ecalloc_count	0
mem_ecalloc_amount	0
mem_erealloc_count	0
mem_erealloc_amount	0
mem_efree_count	0
mem_efree_amount	0
mem_malloc_count	0
mem_malloc_amount	0
mem_calloc_count	0
mem_calloc_amount	0
mem_realloc_count	0
mem_realloc_amount	0
mem_free_count	0
mem_free_amount	0
mem_estrndup_count	0
mem_strndup_count	0
mem_estrdup_count	0
mem_strdup_count	0
mem_edupl_count	0
mem_dupl_count	0
proto_text_fetched_null	0
proto_text_fetched_bit	0
proto_text_fetched_tinyint	0
proto_text_fetched_short	0
proto_text_fetched_int24	0
proto_text_fetched_int	0
proto_text_fetched_bigint	0
proto_text_fetched_decimal	0
proto_text_fetched_float	0
proto_text_fetched_double	0
proto_text_fetched_date	0
proto_text_fetched_year	0
proto_text_fetched_time	0
proto_text_fetched_datetime	0
proto_text_fetched_timestamp	0
proto_text_fetched_string	0
proto_text_fetched_blob	0
proto_text_fetched_enum	0
proto_text_fetched_set	0
proto_text_fetched_geometry	0
proto_text_fetched_other	0
proto_binary_fetched_null	0
proto_binary_fetched_bit	0
proto_binary_fetched_tinyint	0
proto_binary_fetched_short	0
proto_binary_fetched_int24	0
proto_binary_fetched_int	0
proto_binary_fetched_bigint	0
proto_binary_fetched_decimal	0
proto_binary_fetched_float	0
proto_binary_fetched_double	0
proto_binary_fetched_date	0
proto_binary_fetched_year	0
proto_binary_fetched_time	0
proto_binary_fetched_datetime	0
proto_binary_fetched_timestamp	0
proto_binary_fetched_string	0
proto_binary_fetched_json	0
proto_binary_fetched_blob	0
proto_binary_fetched_enum	0
proto_binary_fetched_set	0
proto_binary_fetched_geometry	0
proto_binary_fetched_other	0
init_command_executed_count	0
init_command_failed_count	0
com_quit	0
com_init_db	0
com_query	0
com_field_list	0
com_create_db	0
com_drop_db	0
com_refresh	0
com_shutdown	0
com_statistics	0
com_process_info	0
com_connect	0
com_process_kill	0
com_debug	0
com_ping	0
com_time	0
com_delayed_insert	0
com_change_user	0
com_binlog_dump	0
com_table_dump	0
com_connect_out	0
com_register_slave	0
com_stmt_prepare	0
com_stmt_execute	0
com_stmt_send_long_data	0
com_stmt_close	0
com_stmt_reset	0
com_stmt_set_option	0
com_stmt_fetch	0
com_deamon	0
bytes_received_real_data_normal	0
bytes_received_real_data_ps	0
pcre
PCRE (Perl Compatible Regular Expressions) Support	enabled
PCRE Library Version	8.41 2017-07-05
PCRE JIT Support	enabled
Directive	Local Value	Master Value
pcre.backtrack_limit	1000000	1000000
pcre.jit	1	1
pcre.recursion_limit	100000	100000
PDO
PDO support	enabled
PDO drivers	no value
Phar
Phar: PHP Archive support	enabled
Phar EXT version	2.0.2
Phar API version	1.1.1
Phar-based phar archives	enabled
Tar-based phar archives	enabled
ZIP-based phar archives	enabled
gzip compression	enabled
bzip2 compression	disabled (install pecl/bz2)
OpenSSL support	disabled (install ext/openssl)
Phar based on pear/PHP_Archive, original concept by Davey Shafik.
Phar fully realized by Gregory Beaver and Marcus Boerger.
Portions of tar implementation Copyright (c) 2003-2009 Tim Kientzle.
Directive	Local Value	Master Value
phar.cache_list	no value	no value
phar.readonly	On	On
phar.require_hash	On	On
readline
Readline Support	enabled
Readline library	WinEditLine
Directive	Local Value	Master Value
cli.pager	no value	no value
cli.prompt	\b \> 	\b \> 
Reflection
Reflection	enabled
Version	REMOVED FOR SECURITY
session
Session Support	enabled
Registered save handlers	files user
Registered serializer handlers	php_serialize php php_binary wddx
Directive	Local Value	Master Value
session.auto_start	Off	Off
session.cache_expire	180	180
session.cache_limiter	nocache	nocache
session.cookie_domain	no value	no value
session.cookie_httponly	0	0
session.cookie_lifetime	0	0
session.cookie_path	/	/
session.cookie_secure	0	0
session.gc_divisor	100	100
session.gc_maxlifetime	1440	1440
session.gc_probability	1	1
session.lazy_write	On	On
session.name	PHPSESSID	PHPSESSID
session.referer_check	no value	no value
session.save_handler	files	files
session.save_path	no value	no value
session.serialize_handler	php	php
session.sid_bits_per_character	4	4
session.sid_length	32	32
session.upload_progress.cleanup	On	On
session.upload_progress.enabled	On	On
session.upload_progress.freq	1%	1%
session.upload_progress.min_freq	1	1
session.upload_progress.name	PHP_SESSION_UPLOAD_PROGRESS	PHP_SESSION_UPLOAD_PROGRESS
session.upload_progress.prefix	upload_progress_	upload_progress_
session.use_cookies	1	1
session.use_only_cookies	1	1
session.use_strict_mode	0	0
session.use_trans_sid	0	0
SimpleXML
Simplexml support	enabled
Revision	$Id: REMOVED FOR SECURITY
Schema support	enabled
SPL
SPL support	enabled
Interfaces	OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
Classes	AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, CallbackFilterIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveCallbackFilterIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException
standard
Dynamic Library Support	enabled
Internal Sendmail Support for Windows	enabled
Directive	Local Value	Master Value
assert.active	1	1
assert.bail	0	0
assert.callback	no value	no value
assert.exception	0	0
assert.quiet_eval	0	0
assert.warning	1	1
auto_detect_line_endings	0	0
default_socket_timeout	60	60
from	no value	no value
session.trans_sid_hosts	no value	no value
session.trans_sid_tags	a=href,area=href,frame=src,form=	a=href,area=href,frame=src,form=
url_rewriter.hosts	no value	no value
url_rewriter.tags	form=	form=
user_agent	no value	no value
tokenizer
Tokenizer Support	enabled
wddx
WDDX Support	enabled
WDDX Session Serializer	enabled
xml
XML Support	active
XML Namespace Support	active
libxml2 Version	2.9.9
xmlreader
XMLReader	enabled
xmlwriter
XMLWriter	enabled
zip
Zip	enabled
Zip version	1.15.4
Libzip version	1.4.0
zlib
ZLib Support	enabled
Stream Wrapper	compress.zlib://
Stream Filter	zlib.inflate, zlib.deflate
Compiled Version	1.2.11
Linked Version	1.2.11
Directive	Local Value	Master Value
zlib.output_compression	Off	Off
zlib.output_compression_level	-1	-1
zlib.output_handler	no value	no value
Additional Modules
Module Name
Environment
Variable	Value
PROCESSOR_ARCHITEW6432	AMD64
_FCGI_X_PIPE_	\\.\pipe\REMOVED FOR SECURITY
ALLUSERSPROFILE	C:\ProgramData
APPDATA	C:\Windows\system32\config\systemprofile\AppData\Roaming
APP_POOL_CONFIG	C:\inetpub\temp\apppools\DefaultAppPool\DefaultAppPool.config
APP_POOL_ID	DefaultAppPool
CommonProgramFiles	C:\Program Files (x86)\Common Files
CommonProgramFiles(x86)	C:\Program Files (x86)\Common Files
CommonProgramW6432	C:\Program Files\Common Files
COMPUTERNAME	REMOVED FOR SECURITY
ComSpec	C:\Windows\system32\cmd.exe
LOCALAPPDATA	C:\Windows\system32\config\systemprofile\AppData\Local
NUMBER_OF_PROCESSORS	2
OS	Windows_NT
REMOVED FOR SECURITY
PATHEXT	.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE	x86
PROCESSOR_IDENTIFIER	Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
PROCESSOR_LEVEL	6
PROCESSOR_REVISION	3a09
ProgramData	C:\ProgramData
ProgramFiles	C:\Program Files (x86)
ProgramFiles(x86)	C:\Program Files (x86)
ProgramW6432	C:\Program Files
PSModulePath	C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\PowerShell\Modules\;C:\Program Files\VisualSVN Server\PowerShellModules
PUBLIC	C:\Users\Public
SystemDrive	C:
SystemRoot	C:\Windows
TEMP	C:\Windows\TEMP
TMP	C:\Windows\TEMP
USERDOMAIN	WORKGROUP
USERNAME	REMOVED FOR SECURITY
USERPROFILE	C:\Windows\system32\config\systemprofile
VISUALSVN_SERVER	C:\Program Files\VisualSVN Server\
windir	C:\Windows
PHP Variables
Variable	Value
$_REQUEST['PHPSESSID']	REMOVED FOR SECURITY
$_COOKIE['PHPSESSID']	REMOVED FOR SECURITY
$_SERVER['PROCESSOR_ARCHITEW6432']	AMD64
$_SERVER['_FCGI_X_PIPE_']	\\.\pipe\REMOVED FOR SECURITY
$_SERVER['ALLUSERSPROFILE']	C:\ProgramData
$_SERVER['APPDATA']	C:\Windows\system32\config\systemprofile\AppData\Roaming
$_SERVER['APP_POOL_CONFIG']	C:\inetpub\temp\apppools\DefaultAppPool\DefaultAppPool.config
$_SERVER['APP_POOL_ID']	DefaultAppPool
$_SERVER['CommonProgramFiles']	C:\Program Files (x86)\Common Files
$_SERVER['CommonProgramFiles(x86)']	C:\Program Files (x86)\Common Files
$_SERVER['CommonProgramW6432']	C:\Program Files\Common Files
$_SERVER['COMPUTERNAME']	REMOVED FOR SECURITY
$_SERVER['ComSpec']	C:\Windows\system32\cmd.exe
$_SERVER['LOCALAPPDATA']	C:\Windows\system32\config\systemprofile\AppData\Local
$_SERVER['NUMBER_OF_PROCESSORS']	2
$_SERVER['OS']	Windows_NT
$_SERVER['Path']	C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\;C:\Program Files\VisualSVN Server\bin;C:\Program Files\Git\cmd;C:\Program Files\Microsoft\Web Platform Installer\;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps
$_SERVER['PATHEXT']	.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
$_SERVER['PROCESSOR_ARCHITECTURE']	x86
$_SERVER['PROCESSOR_IDENTIFIER']	Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
$_SERVER['PROCESSOR_LEVEL']	6
$_SERVER['PROCESSOR_REVISION']	3a09
$_SERVER['ProgramData']	C:\ProgramData
$_SERVER['ProgramFiles']	C:\Program Files (x86)
$_SERVER['ProgramFiles(x86)']	C:\Program Files (x86)
$_SERVER['ProgramW6432']	C:\Program Files
$_SERVER['PSModulePath']	C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\PowerShell\Modules\;C:\Program Files\VisualSVN Server\PowerShellModules
$_SERVER['PUBLIC']	C:\Users\Public
$_SERVER['SystemDrive']	C:
$_SERVER['SystemRoot']	C:\Windows
$_SERVER['TEMP']	C:\Windows\TEMP
$_SERVER['TMP']	C:\Windows\TEMP
$_SERVER['USERDOMAIN']	WORKGROUP
$_SERVER['USERNAME']	REMOVED FOR SECURITY
$_SERVER['USERPROFILE']	C:\Windows\system32\config\systemprofile
$_SERVER['VISUALSVN_SERVER']	C:\Program Files\VisualSVN Server\
$_SERVER['windir']	C:\Windows
$_SERVER['ORIG_PATH_INFO']	/test.php
$_SERVER['URL']	/test.php
$_SERVER['SERVER_SOFTWARE']	Microsoft-IIS/10.0
$_SERVER['SERVER_PROTOCOL']	HTTP/1.1
$_SERVER['SERVER_PORT_SECURE']	0
$_SERVER['SERVER_PORT']	80
$_SERVER['SERVER_NAME']	xxxxxxx.com
$_SERVER['SCRIPT_NAME']	/test.php
$_SERVER['SCRIPT_FILENAME']	C:\inetpub\wwwroot\test.php
$_SERVER['REQUEST_URI']	/test.php
$_SERVER['REQUEST_METHOD']	GET
$_SERVER['REMOTE_USER']	no value
$_SERVER['REMOTE_PORT']	60250
$_SERVER['REMOTE_HOST']	REMOVED FOR SECURITY
$_SERVER['REMOTE_ADDR']	REMOVED FOR SECURITY
$_SERVER['QUERY_STRING']	no value
$_SERVER['PATH_TRANSLATED']	C:\inetpub\wwwroot\test.php
$_SERVER['LOGON_USER']	no value
$_SERVER['LOCAL_ADDR']	REMOVED FOR SECURITY
$_SERVER['INSTANCE_META_PATH']	/LM/W3SVC/1
$_SERVER['INSTANCE_NAME']	DEFAULT WEB SITE
$_SERVER['INSTANCE_ID']	1
$_SERVER['HTTPS_SERVER_SUBJECT']	no value
$_SERVER['HTTPS_SERVER_ISSUER']	no value
$_SERVER['HTTPS_SECRETKEYSIZE']	no value
$_SERVER['HTTPS_KEYSIZE']	no value
$_SERVER['HTTPS']	off
$_SERVER['GATEWAY_INTERFACE']	CGI/1.1
$_SERVER['DOCUMENT_ROOT']	C:\inetpub\wwwroot
$_SERVER['CONTENT_TYPE']	no value
$_SERVER['CONTENT_LENGTH']	0
$_SERVER['CERT_SUBJECT']	no value
$_SERVER['CERT_SERIALNUMBER']	no value
$_SERVER['CERT_ISSUER']	no value
$_SERVER['CERT_FLAGS']	no value
$_SERVER['CERT_COOKIE']	no value
$_SERVER['AUTH_USER']	no value
$_SERVER['AUTH_PASSWORD']	no value
$_SERVER['AUTH_TYPE']	no value
$_SERVER['APPL_PHYSICAL_PATH']	C:\inetpub\wwwroot\
$_SERVER['APPL_MD_PATH']	/LM/W3SVC/1/ROOT
$_SERVER['HTTP_UPGRADE_INSECURE_REQUESTS']	1
$_SERVER['HTTP_USER_AGENT']	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36
$_SERVER['HTTP_HOST']	xxxxxxx.com
$_SERVER['HTTP_COOKIE']	PHPSESSID=REMOVED FOR SECURITY
$_SERVER['HTTP_ACCEPT_LANGUAGE']	en-US,en;q=0.9
$_SERVER['HTTP_ACCEPT_ENCODING']	gzip, deflate
$_SERVER['HTTP_ACCEPT']	text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
$_SERVER['HTTP_CONNECTION']	keep-alive
$_SERVER['HTTP_CACHE_CONTROL']	max-age=0
$_SERVER['FCGI_ROLE']	RESPONDER
$_SERVER['PHP_SELF']	/test.php
$_SERVER['REQUEST_TIME_FLOAT']	1568930356.7144
$_SERVER['REQUEST_TIME']	1568930356
$_SERVER['argv']	
Array
(
)
$_SERVER['argc']	0
$_ENV['PROCESSOR_ARCHITEW6432']	AMD64
$_ENV['_FCGI_X_PIPE_']	\\.\pipe\REMOVED FOR SECURITY
$_ENV['ALLUSERSPROFILE']	C:\ProgramData
$_ENV['APPDATA']	C:\Windows\system32\config\systemprofile\AppData\Roaming
$_ENV['APP_POOL_CONFIG']	C:\inetpub\temp\apppools\DefaultAppPool\DefaultAppPool.config
$_ENV['APP_POOL_ID']	DefaultAppPool
$_ENV['CommonProgramFiles']	C:\Program Files (x86)\Common Files
$_ENV['CommonProgramFiles(x86)']	C:\Program Files (x86)\Common Files
$_ENV['CommonProgramW6432']	C:\Program Files\Common Files
$_ENV['COMPUTERNAME']	REMOVED FOR SECURITY
$_ENV['ComSpec']	C:\Windows\system32\cmd.exe
$_ENV['LOCALAPPDATA']	C:\Windows\system32\config\systemprofile\AppData\Local
$_ENV['NUMBER_OF_PROCESSORS']	2
$_ENV['OS']	Windows_NT
$_ENV['Path']	REMOVED FOR SECURITY
$_ENV['PATHEXT']	.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
$_ENV['PROCESSOR_ARCHITECTURE']	x86
$_ENV['PROCESSOR_IDENTIFIER']	Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
$_ENV['PROCESSOR_LEVEL']	6
$_ENV['PROCESSOR_REVISION']	3a09
$_ENV['ProgramData']	C:\ProgramData
$_ENV['ProgramFiles']	C:\Program Files (x86)
$_ENV['ProgramFiles(x86)']	C:\Program Files (x86)
$_ENV['ProgramW6432']	C:\Program Files
$_ENV['PSModulePath']	C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\PowerShell\Modules\;C:\Program Files\VisualSVN Server\PowerShellModules
$_ENV['PUBLIC']	C:\Users\Public
$_ENV['SystemDrive']	C:
$_ENV['SystemRoot']	C:\Windows
$_ENV['TEMP']	C:\Windows\TEMP
$_ENV['TMP']	C:\Windows\TEMP
$_ENV['USERDOMAIN']	WORKGROUP
$_ENV['USERNAME']	REMOVED FOR SECURITY
$_ENV['USERPROFILE']	C:\Windows\system32\config\systemprofile
$_ENV['VISUALSVN_SERVER']	C:\Program Files\VisualSVN Server\
$_ENV['windir']	C:\Windows
$_ENV['ORIG_PATH_INFO']	/test.php
$_ENV['URL']	/test.php
$_ENV['SERVER_SOFTWARE']	Microsoft-IIS/10.0
$_ENV['SERVER_PROTOCOL']	HTTP/1.1
$_ENV['SERVER_PORT_SECURE']	0
$_ENV['SERVER_PORT']	80
$_ENV['SERVER_NAME']	xxxxxx.com
$_ENV['SCRIPT_NAME']	/test.php
$_ENV['SCRIPT_FILENAME']	C:\inetpub\wwwroot\test.php
$_ENV['REQUEST_URI']	/test.php
$_ENV['REQUEST_METHOD']	GET
$_ENV['REMOTE_USER']	no value
$_ENV['REMOTE_PORT']	60250
$_ENV['REMOTE_HOST']	REMOVED FOR SECURITY
$_ENV['REMOTE_ADDR']	REMOVED FOR SECURITY
$_ENV['QUERY_STRING']	no value
$_ENV['PATH_TRANSLATED']	C:\inetpub\wwwroot\test.php
$_ENV['LOGON_USER']	no value
$_ENV['LOCAL_ADDR']	REMOVED FOR SECURITY
$_ENV['INSTANCE_META_PATH']	/LM/W3SVC/1
$_ENV['INSTANCE_NAME']	DEFAULT WEB SITE
$_ENV['INSTANCE_ID']	1
$_ENV['HTTPS_SERVER_SUBJECT']	no value
$_ENV['HTTPS_SERVER_ISSUER']	no value
$_ENV['HTTPS_SECRETKEYSIZE']	no value
$_ENV['HTTPS_KEYSIZE']	no value
$_ENV['HTTPS']	off
$_ENV['GATEWAY_INTERFACE']	CGI/1.1
$_ENV['DOCUMENT_ROOT']	C:\inetpub\wwwroot
$_ENV['CONTENT_TYPE']	no value
$_ENV['CONTENT_LENGTH']	0
$_ENV['CERT_SUBJECT']	no value
$_ENV['CERT_SERIALNUMBER']	no value
$_ENV['CERT_ISSUER']	no value
$_ENV['CERT_FLAGS']	no value
$_ENV['CERT_COOKIE']	no value
$_ENV['AUTH_USER']	no value
$_ENV['AUTH_PASSWORD']	no value
$_ENV['AUTH_TYPE']	no value
$_ENV['APPL_PHYSICAL_PATH']	C:\inetpub\wwwroot\
$_ENV['APPL_MD_PATH']	/LM/W3SVC/1/ROOT
$_ENV['HTTP_UPGRADE_INSECURE_REQUESTS']	1
$_ENV['HTTP_USER_AGENT']	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36
$_ENV['HTTP_HOST']	xxxxxx.com
$_ENV['HTTP_COOKIE']	PHPSESSID=REMOVED FOR SECURITY
$_ENV['HTTP_ACCEPT_LANGUAGE']	en-US,en;q=0.9
$_ENV['HTTP_ACCEPT_ENCODING']	gzip, deflate
$_ENV['HTTP_ACCEPT']	text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
$_ENV['HTTP_CONNECTION']	keep-alive
$_ENV['HTTP_CACHE_CONTROL']	max-age=0
$_ENV['FCGI_ROLE']	RESPONDER
$_ENV['PHP_SELF']	/test.php
$_ENV['REQUEST_TIME_FLOAT']	1568930356.7144
$_ENV['REQUEST_TIME']	1568930356
$_ENV['argv']	

User avatar
mattg
Moderator
Moderator
Posts: 20794
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: 500 - Internal server error

Post by mattg » 2019-09-20 05:40

I can't see the problem

I did check my setup
My DCOM permissions include for the user 'everyone', so maybe I had to do that once to get it to work.

(My IIS is well hidden from the internet and only accessible from my LAN)
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

User avatar
Dravion
Senior user
Senior user
Posts: 1688
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: 500 - Internal server error

Post by Dravion » 2019-09-20 17:26

hrivera0312 wrote:
2019-09-19 23:15
Thanks Dravion, I have done that too and doesn't work.
"Fatal error: Uncaught Error: Class 'COM' not found

occurs only if PHP has NOT loaded the COM Extension.
Without PHPWebAdmin cannot work.

hrivera0312
New user
New user
Posts: 12
Joined: 2019-09-19 03:43

Re: 500 - Internal server error

Post by hrivera0312 » 2019-09-23 05:29

Thanks Dravion,

But I have check the extension setting and everything looks good. What can cause the COM extension to not be loaded beside from not being set ?

User avatar
Dravion
Senior user
Senior user
Posts: 1688
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: 500 - Internal server error

Post by Dravion » 2019-09-23 12:13

Make sure the com extension for php is loaded
by doing the following:

1)
Open a Command prompt and cd into
your PHP.EXE folder

2)
Run php.exe -m

3)
Copy and paste the result in your next reply

hrivera0312
New user
New user
Posts: 12
Joined: 2019-09-19 03:43

Re: 500 - Internal server error

Post by hrivera0312 » 2019-09-24 03:32

The weird part is that everything was working fine before and when I performed an IIS reset phpwebadmin stop working.

I have been checking this list executing "php -m" before and I don't see dcom loaded. What can cause the extension not be loaded if it was working before and nothing have change?

Code: Select all

[PHP Modules]
bcmath
calendar
Core
ctype
date
dom
filter
hash
iconv
json
libxml
mysqlnd
pcre
PDO
Phar
readline
Reflection
session
SimpleXML
SPL
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
zip
zlib

User avatar
Dravion
Senior user
Senior user
Posts: 1688
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: 500 - Internal server error

Post by Dravion » 2019-09-24 08:22

Exactly, it's not loaded.

This is my php -m output for example:

C:\Program Files\PHP\php-7.2.14-nts-Win32-VC15-x64>php -m
[PHP Modules]
bcmath
bz2
calendar
com_dotnet <---
Core
ctype
...


You need to enable it, because it's not enabled by default by php.ini
If you done it right, it should look like this:

extension_dir = "ext"

extension=bz2
extension=php_com_dotnet
extension=curl
extension=fileinfo
extension=gd2
extension=gettext
;extension=gmp
extension=intl
;extension=imap
;extension=interbase
;extension=ldap
;extension=mbstring
;extension=exif ; Must be after
...


I think you edited the "wrong" php.ini file.
PHP has the option to load different PHP.INI file for different Webspaces and your IIS-Server loaded a complete
other PHP.INI file where COM is still not enabled.

To get to know which php.ini file is loaded by IIS you need to do the following

1) Create a new file with the name pi.php in your IIS PHP enabled Webspace and
2) Insert this command only <?php phpinfo(); ?> and save the file
3) View the file in a Browser (url should something like this: http://localhost/pi.php
4) Take a look at "Loaded Configuration File" (this is the file where you need to enable the COM Extension)

PS: Maybe you cannot edit this file as long as IIS is running. If this is the case, stop IIS-Server, edit the PHP.INI file and save
your changes and restart IIS after it again.

hrivera0312
New user
New user
Posts: 12
Joined: 2019-09-19 03:43

Re: 500 - Internal server error

Post by hrivera0312 » 2019-09-25 17:51

Thank you Dravion,

I already set:

extension_dir = "ext"

extension=bz2
extension=php_com_dotnet
extension=curl
extension=fileinfo
extension=gd2
extension=gettext
.....

The loaded configuration file is pointed to the correct php.ini file. I even relocated the file to a different directory and still nothing is working.

palinka
Senior user
Senior user
Posts: 1923
Joined: 2017-09-12 17:57

Re: 500 - Internal server error

Post by palinka » 2019-09-25 18:06

You're probably missing the actual dll. Have you looked into the ext folder to see if it's there? I know that i had to download it.

hrivera0312
New user
New user
Posts: 12
Joined: 2019-09-19 03:43

Re: 500 - Internal server error

Post by hrivera0312 » 2019-09-25 18:47

Thanks Palinka,

Yes the dll file is in "ext" folder.

palinka
Senior user
Senior user
Posts: 1923
Joined: 2017-09-12 17:57

Re: 500 - Internal server error

Post by palinka » 2019-09-25 19:26

com.allow_dcom=TRUE in your php.ini?

hrivera0312
New user
New user
Posts: 12
Joined: 2019-09-19 03:43

Re: 500 - Internal server error

Post by hrivera0312 » 2019-09-25 19:28

com.allow_dcom=TRUE in your php.ini? Yes

User avatar
Dravion
Senior user
Senior user
Posts: 1688
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: 500 - Internal server error

Post by Dravion » 2019-09-25 21:12

hrivera0312 wrote:
2019-09-25 17:51
Thank you Dravion,

I already set:

extension_dir = "ext"

extension=bz2
extension=php_com_dotnet
extension=curl
extension=fileinfo
extension=gd2
extension=gettext
.....

The loaded configuration file is pointed to the correct php.ini file. I even relocated the file to a different directory and still nothing is working.

Always re-test with php -m in Command prompt if the php com module is loaded or not.
This is the first thing we need to know after any change on your php.ini file!

Next, try to set your php extension dir manually to a absolute path position

For example, like this:
extension_dir = "C:/Program Files/Apache24/php-7.3.1-Win32-VC15-x64/ext" (of where ever your php version is installed)

and enable the extension with:
extension=php_com_dotnet

Report back what php -m is saying

User avatar
mattg
Moderator
Moderator
Posts: 20794
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: 500 - Internal server error

Post by mattg » 2019-09-25 23:22

Yeah, I've seen where a PHP.ini is loaded that wasn't the one that you've modified

From your php.info output earlier

Configuration File (php.ini) Path C:\Windows
Loaded Configuration File C:\php\php.ini
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

palinka
Senior user
Senior user
Posts: 1923
Joined: 2017-09-12 17:57

Re: 500 - Internal server error

Post by palinka » 2019-09-26 02:27

Are you restarting iis after making changes to php.ini? I don't know much about iis but for apache, it's absolutely required.

hrivera0312
New user
New user
Posts: 12
Joined: 2019-09-19 03:43

Re: 500 - Internal server error

Post by hrivera0312 » 2019-09-26 03:44

mattg wrote:
2019-09-25 23:22
Yeah, I've seen where a PHP.ini is loaded that wasn't the one that you've modified

From your php.info output earlier

Configuration File (php.ini) Path C:\Windows
Loaded Configuration File C:\php\php.ini
Yes you are right mattg but I only modified the loaded configuration file "c:\php\php.ini", but just in case It was reading the php.ini that is in "c:\windows" I copied the same php.ini and still see the same issue. :?

hrivera0312
New user
New user
Posts: 12
Joined: 2019-09-19 03:43

Re: 500 - Internal server error

Post by hrivera0312 » 2019-09-26 03:47

palinka wrote:
2019-09-26 02:27
Are you restarting iis after making changes to php.ini? I don't know much about iis but for apache, it's absolutely required.
Yes I restart IIS every time and modified the php.ini.

executing c:\IISRESET as well as restarting it using IIS Manager

hrivera0312
New user
New user
Posts: 12
Joined: 2019-09-19 03:43

Re: 500 - Internal server error

Post by hrivera0312 » 2019-09-26 05:19

Thank you all,

palinka, mattg, Dravion for your help I was able to fix the issue. I replaced my dll file with and old copy I had and everything is working again. I really appreciate your help and your time.

Post Reply