Trouble with self hosted site - mod_rewrite not working

Hi there, I’m trying to get to the bottom of the issues with my self-hosted (shared hosting on a web host) site.

First issue to tackle is that mod_rewrite doesn’t seem to be working. My web host ensures me it’s enabled, but when I go to my site, it adds /public/index.php to all the URLs.

The top of my .htaccess file is here:

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteRule "^.env" - [F,L]
#  RewriteRule "^storage" - [F,L]
  RewriteRule ^(.well-known)($|/) - [L]
  RewriteRule ^(.*)$ public/$1 [L]

What else can I look at to troubleshoot this?


You may want to setup a phpinfo page to check the server configuration.

@david do you have any suggestions?

I’ve done that, what do you need from it?

I think I’ve redacted all identifying info from this:

PHP Version 7.3.33
System	Linux REDACTED 3.10.0-962.3.2.lve1.5.39.el7.x86_64 #1 SMP Thu Sep 17 06:10:33 EDT 2020 x86_64
Build Date	Dec 7 2021 18:38:38
Configure Command	'./configure' '--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/opt/alt/php73' '--exec-prefix=/opt/alt/php73' '--bindir=/opt/alt/php73/usr/bin' '--sbindir=/opt/alt/php73/usr/sbin' '--sysconfdir=/opt/alt/php73/etc' '--datadir=/opt/alt/php73/usr/share' '--includedir=/opt/alt/php73/usr/include' '--libdir=/opt/alt/php73/usr/lib64' '--libexecdir=/opt/alt/php73/usr/libexec' '--localstatedir=/var' '--with-curl=/opt/alt/curlssl11/usr' '--sharedstatedir=/usr/com' '--mandir=/opt/alt/php73/usr/share/man' '--infodir=/opt/alt/php73/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/opt/alt/php73/etc' '--with-config-file-scan-dir=/opt/alt/php73/link/conf' '--disable-debug' '--enable-calendar' '--enable-exif' '--enable-ftp' '--enable-huge-code-pages' '--enable-opcache' '--enable-opcache-file' '--enable-shmop' '--enable-unicode' '--enable-xml' '--with-bz2' '--with-freetype-dir=/usr' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-layout=GNU' '--with-libxml-dir=/opt/alt/libxml2/usr' '--with-mhash' '--with-openssl-dir=/opt/alt/openssl11' '--with-openssl=/opt/alt/openssl11' '--with-password-argon2=/usr' '--with-pcre-jit' '--with-pcre-regex' '--with-pic' '--with-png-dir=/usr' '--with-readline' '--with-t1lib=/opt/alt/t1lib/usr' '--with-webp-dir=/usr' '--with-xpm-dir=/usr' '--with-zlib' '--with-zlib-dir=/usr' '--without-gdbm' '--without-pear' '--with-litespeed' '--enable-pcntl' '--without-mysqli' '--disable-mbstring' '--disable-bcmath' '--disable-dba' '--disable-dom' '--disable-fileinfo' '--disable-json' '--disable-intl' '--disable-pdo' '--disable-phar' '--disable-posix' '--disable-soap' '--disable-sockets' '--disable-sysvsem' '--disable-sysvshm' '--disable-sysvmsg' '--disable-wddx' '--disable-xmlreader' '--disable-xmlwriter' '--disable-zip' '--without-gd' '--without-imap' '--without-xmlrpc' '--without-xsl' '--without-ldap' '--without-pgsql' '--without-snmp' '--without-sodium' '--without-tidy' '--without-enchant' '--without-recode' '--without-mssql' '--without-pspell' '--without-unixODBC' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'target_alias=x86_64-redhat-linux-gnu' 'CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fno-strict-aliasing -Wno-pointer-sign' 'CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic'
Server API	LiteSpeed V7.9 Cloudlinux 1.3
Virtual Directory Support	disabled
Configuration File (php.ini) Path	/opt/alt/php73/etc
Loaded Configuration File	/opt/alt/php73/etc/php.ini
Scan this dir for additional .ini files	/opt/alt/php73/link/conf
Additional .ini files parsed	/opt/alt/php73/link/conf/alt_php.ini
PHP API	20180731
PHP Extension	20180731
Zend Extension	320180731
Zend Extension Build	API320180731,NTS
PHP Extension Build	API20180731,NTS
Debug Build	no
Thread Safety	disabled
Zend Signal Handling	enabled
Zend Memory Manager	enabled
Zend Multibyte Support	provided by mbstring
IPv6 Support	enabled
DTrace Support	disabled
Registered PHP Streams	https, ftps, compress.zlib, compress.bzip2, php, file, glob, data, http, ftp, phar, zip
Registered Stream Socket Transports	tcp, udp, unix, udg, ssl, sslv3, tls, tlsv1.0, tlsv1.1, tlsv1.2
Registered Stream Filters	zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk
Zend logoThis program makes use of the Zend Scripting Language Engine:
Zend Engine v3.3.33, Copyright (c) 1998-2018 Zend Technologies
    with the ionCube PHP Loader + ionCube24 v11.0.0, Copyright (c) 2002-2021, by ionCube Ltd.
BCMath support	enabled
Directive	Local Value	Master Value
bcmath.scale	0	0
BZip2 Support	Enabled
Stream Wrapper support	compress.bzip2://
Stream Filter support	bzip2.decompress, bzip2.compress
BZip2 Version	1.0.6, 6-Sept-2010
Calendar support	enabled
PHP Version	7.3.33
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	show_source, system, shell_exec, passthru, exec, popen, proc_open, allow_url_fopen	show_source, system, shell_exec, passthru, exec, popen, proc_open, allow_url_fopen
display_errors	Off	Off
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	error_log	error_log
error_prepend_string	no value	no value
error_reporting	32767	32767
expose_php	On	On
extension_dir	/opt/alt/php73/usr/lib64/php/modules	/opt/alt/php73/usr/lib64/php/modules
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	.:/opt/alt/php73/usr/share/pear	.:/opt/alt/php73/usr/share/pear
input_encoding	no value	no value
internal_encoding	no value	no value
log_errors	On	On
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	300	300
max_file_uploads	20	20
max_input_nesting_level	64	64
max_input_time	-1	-1
max_input_vars	1000	1000
memory_limit	368M	368M
open_basedir	no value	no value
output_buffering	4096	4096
output_encoding	no value	no value
output_handler	no value	no value
post_max_size	64M	64M
precision	14	14
realpath_cache_size	4096K	4096K
realpath_cache_ttl	120	120
register_argc_argv	Off	Off
report_memleaks	On	On
report_zend_debug	On	On
request_order	no value	no value
sendmail_from	no value	no value
sendmail_path	/usr/sbin/sendmail -t -i	/usr/sbin/sendmail -t -i
serialize_precision	-1	-1
short_open_tag	On	On
SMTP	localhost	localhost
smtp_port	25	25
sys_temp_dir	no value	no value
syslog.facility	LOG_USER	LOG_USER
syslog.filter	no-ctrl	no-ctrl
syslog.ident	php	php
track_errors	Off	Off
unserialize_callback_func	no value	no value
upload_max_filesize	64M	64M
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
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
zend.signal_check	Off	Off
ctype functions	enabled
cURL support	enabled
cURL Information	7.71.0
Age	6
AsynchDNS	Yes
CharConv	No
Debug	No
GSS-Negotiate	No
IPv6	Yes
krb4	No
Largefile	Yes
libz	Yes
Protocols	dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, pop3, pop3s, rtsp, scp, sftp, smb, smbs, smtp, smtps, telnet, tftp
Host	x86_64-redhat-linux-gnu
SSL Version	OpenSSL/1.1.1d
ZLib Version	1.2.7
libSSH Version	libssh2/1.8.0
Directive	Local Value	Master Value
curl.cainfo	no value	no value
date/time support	enabled
timelib version	2018.04
"Olson" Timezone Database Version	2020.4
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	UTC	UTC
DOM/XML	enabled
DOM/XML API Version	20031129
libxml Version	2.9.7
HTML Support	enabled
XPath Support	enabled
XPointer Support	enabled
Schema Support	enabled
RelaxNG Support	enabled
EXIF Support	enabled
Supported EXIF Version	0220
Supported filetypes	JPEG, TIFF
Multibyte decoding support using mbstring	enabled
Extended EXIF tag formats	Canon, Casio, Fujifilm, Nikon, Olympus, Samsung, Panasonic, DJI, Sony, Pentax, Minolta, Sigma, Foveon, Kyocera, Ricoh, AGFA, Epson
Directive	Local Value	Master Value
exif.decode_jis_intel	JIS	JIS
exif.decode_jis_motorola	JIS	JIS
exif.decode_unicode_intel	UCS-2LE	UCS-2LE
exif.decode_unicode_motorola	UCS-2BE	UCS-2BE
exif.encode_jis	no value	no value
exif.encode_unicode	ISO-8859-15	ISO-8859-15
fileinfo support	enabled
libmagic	533
Input Validation and Filtering	enabled
Directive	Local Value	Master Value
filter.default	unsafe_raw	unsafe_raw
filter.default_flags	no value	no value
FTP support	enabled
FTPS support	enabled
GD Support	enabled
GD Version	bundled (2.1.0 compatible)
FreeType Support	enabled
FreeType Linkage	with freetype
FreeType Version	2.8.0
GIF Read Support	enabled
GIF Create Support	enabled
JPEG Support	enabled
libJPEG Version	6b
PNG Support	enabled
libPNG Version	1.5.13
WBMP Support	enabled
XPM Support	enabled
libXpm Version	30411
XBM Support	enabled
WebP Support	enabled
Directive	Local Value	Master Value
gd.jpeg_ignore_warning	1	1
GetText Support	enabled
gmp support	enabled
GMP version	6.0.0
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
i360 param	Value
i360 state	activated
i360 mode	kill
i360 blamer	true
i360 path to log data	sock:/opt/imunify360/lib/proactive.sock
i360 log type	2
i360 send on shtdwn	0
i360 report on kill	0
i360 build for	7.3.33
i360 signs	110122
i360 signs path	/usr/share/i360-php-opts/sigs/6.2/.rules
iconv support	enabled
iconv implementation	glibc
iconv library version	2.17
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
IMAP c-Client Version	2007f
SSL Support	enabled
Kerberos Support	enabled
Directive	Local Value	Master Value
imap.enable_insecure_rsh	Off	Off
ionCube Loader
ionCube logoionCube24 logo
ionCube Loader developed by ionCube Ltd.
Visit for latest Loaders and support.
This Loader also includes features for real-time error reporting and malware protection. Visit for more details.
Loader version	11.0.0
ionCube24 features	unconfigured
Directive	Local Value	Master Value
ic24.api.log_msg_errors	0	0
ic24.api.max_timeout	7	7
ic24.api_access_key	********	********
ic24.api_check_ip	1	1
ic24.enable	0	0
ic24.home_dir	no value	no value
ic24.phperr.enable	auto	auto
ic24.phperr.ignore	0	0
ic24.sec.block_stdin	1	1
ic24.sec.block_uploaded_files	1	1
ic24.sec.enable	auto	auto
ic24.sec.exclusion_key	********	********
ic24.sec.initial_action	block	block
ic24.sec.initial_cache_all	1	1
ic24.sec.initial_notify	always	always
ic24.sec.initial_state	1	1
ic24.sec.stop_on_error	1	1
ic24.sec.trusted_include_paths	********	********
ic24.slt	7	7
ic24.update_domains_retry_interval	30	30
ioncube.loader.encoded_paths	no value	no value
json support	enabled
json version	1.7.0
libXML support	active
libXML Compiled Version	2.9.7
libXML Loaded Version	20907
libXML streams	enabled
Multibyte Support	enabled
Multibyte string engine	libmbfl
HTTP input encoding translation	disabled
libmbfl version	1.3.2
oniguruma version	6.9.4
mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.
Multibyte (japanese) regex support	enabled
Multibyte regex (oniguruma) backtrack check	On
Multibyte regex (oniguruma) version	6.9.4
Directive	Local Value	Master Value
mbstring.detect_order	no value	no value
mbstring.encoding_translation	Off	Off
mbstring.func_overload	0	0
mbstring.http_input	no value	no value
mbstring.http_output	no value	no value
mbstring.http_output_conv_mimetypes	^(text/|application/xhtml\+xml)	^(text/|application/xhtml\+xml)
mbstring.internal_encoding	no value	no value
mbstring.language	neutral	neutral
mbstring.regex_stack_limit	100000	100000
mbstring.strict_detection	Off	Off
mbstring.substitute_character	no value	no value
MysqlI Support	enabled
Client API library version	5.7.37
Active Persistent Links	0
Inactive Persistent Links	0
Active Links	0
Client API header version	5.7.36
MYSQLI_SOCKET	/var/lib/mysql/mysql.sock
Directive	Local Value	Master Value
mysqli.allow_local_infile	Off	Off
mysqli.allow_persistent	On	On
mysqli.default_host	no value	no value
mysqli.default_port	3306	3306
mysqli.default_pw	no value	no value
mysqli.default_socket	no value	no value
mysqli.default_user	no value	no value
mysqli.max_links	Unlimited	Unlimited
mysqli.max_persistent	Unlimited	Unlimited
mysqli.reconnect	Off	Off
mysqli.rollback_on_cached_plink	Off	Off
mysqlnd	enabled
Version	mysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $
Compression	supported
core SSL	supported
extended SSL	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,auth_plugin_sha256_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
OpenSSL support	enabled
OpenSSL Library Version	OpenSSL 1.1.1d 10 Sep 2019
OpenSSL Header Version	OpenSSL 1.1.1d 10 Sep 2019
Openssl default config	/opt/alt/openssl11/etc/pki/tls/openssl.cnf
Directive	Local Value	Master Value
openssl.cafile	no value	no value
openssl.capath	no value	no value
pcntl support	enabled
PCRE (Perl Compatible Regular Expressions) Support	enabled
PCRE Library Version	10.32 2018-09-10
PCRE Unicode Version	11.0.0
PCRE JIT Support	enabled
PCRE JIT Target	x86 64bit (little endian + unaligned)
Directive	Local Value	Master Value
pcre.backtrack_limit	1000000	1000000
pcre.jit	1	1
pcre.recursion_limit	100000	100000
PDO support	enabled
PDO drivers	mysql, sqlite
PDO Driver for MySQL	enabled
Client API version	5.7.37
Directive	Local Value	Master Value
pdo_mysql.default_socket	/var/lib/mysql/mysql.sock	/var/lib/mysql/mysql.sock
PDO Driver for SQLite 3.x	enabled
SQLite Library	3.26.0
Phar: PHP Archive support	enabled
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	enabled
OpenSSL support	enabled
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
POSIX support	enabled
Readline Support	enabled
Readline library	6.2
Directive	Local Value	Master Value
cli.pager	no value	no value
cli.prompt	\b \> 	\b \> 
Reflection	enabled
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	no value	no value
session.cookie_lifetime	0	0
session.cookie_path	/	/
session.cookie_samesite	no value	no value
session.cookie_secure	0	0
session.gc_divisor	1000	1000
session.gc_maxlifetime	1440	1440
session.gc_probability	1	1
session.lazy_write	On	On	PHPSESSID	PHPSESSID
session.referer_check	no value	no value
session.save_handler	files	files
session.save_path	/opt/alt/php73/var/lib/php/session	/opt/alt/php73/var/lib/php/session
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.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
shmop support	enabled
SimpleXML support	enabled
Schema support	enabled
Soap Client	enabled
Soap Server	enabled
Directive	Local Value	Master Value
soap.wsdl_cache	1	1
soap.wsdl_cache_dir	/tmp	/tmp
soap.wsdl_cache_enabled	1	1
soap.wsdl_cache_limit	5	5
soap.wsdl_cache_ttl	86400	86400
Sockets Support	enabled
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
SQLite3 support	enabled
SQLite Library	3.28.0
Directive	Local Value	Master Value
sqlite3.defensive	1	1
sqlite3.extension_dir	no value	no value
Dynamic Library Support	enabled
Path to sendmail	/usr/sbin/sendmail -t -i
Directive	Local Value	Master Value	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	a=href,area=href,frame=src,input=src,form=fakeentry	a=href,area=href,frame=src,input=src,form=fakeentry
user_agent	no value	no value
Tokenizer Support	enabled
WDDX Support	enabled
WDDX Session Serializer	enabled
XML Support	active
XML Namespace Support	active
libxml2 Version	2.9.7
XMLReader	enabled
core library version	xmlrpc-epi v. 0.51
author	Dan Libby
open sourced by
XMLWriter	enabled
XSL	enabled
libxslt Version	1.1.28
libxslt compiled against libxml Version	2.9.1
EXSLT	enabled
libexslt Version	1.1.28
Zip	enabled
Zip version	1.15.4
Libzip headers version	1.3.2
Libzip library version	1.3.2
ZLib Support	enabled
Stream Wrapper	compress.zlib://
Stream Filter	zlib.inflate, zlib.deflate
Compiled Version	1.2.7
Linked Version	1.2.7
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
Variable	Value
PATH	/usr/local/bin:/usr/bin:/bin
TEMP	/tmp
TMP	/tmp
PHP Variables
Variable	Value
$_SERVER['PATH']	/usr/local/bin:/usr/bin:/bin
$_SERVER['TEMP']	/tmp
$_SERVER['TMP']	/tmp
$_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;q=0.9
$_SERVER['HTTP_USER_AGENT']	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36 Edg/99.0.1150.30
$_SERVER['HTTP_CDN_LOOP']	cloudflare
$_SERVER['HTTP_CF_RAY']	6e8fe4514a2d844a-YVR
$_SERVER['HTTP_CF_VISITOR']	{"scheme":"https"}
$_SERVER['HTTP_SEC_CH_UA']	" Not A;Brand";v="99", "Chromium";v="99", "Microsoft Edge";v="99"
$_SERVER['SCRIPT_URL']	/invoices/public/phpinfo.php
$_SERVER['SCRIPT_URI']	https://REDACTED/public/phpinfo.php
$_SERVER['SCRIPT_FILENAME']	/REDACTED/public/phpinfo.php
$_SERVER['REQUEST_URI']	/invoices/public/phpinfo.php
$_SERVER['SCRIPT_NAME']	/invoices/public/phpinfo.php
$_SERVER['PHP_SELF']	/invoices/public/phpinfo.php
$_SERVER['REQUEST_TIME_FLOAT']	1646787817.7189
$_SERVER['REQUEST_TIME']	1646787817
$_ENV['PATH']	/usr/local/bin:/usr/bin:/bin
$_ENV['TEMP']	/tmp
$_ENV['TMP']	/tmp
$_ENV['TMPDIR']	/tmp
$_ENV['PWD']	/


I’m not sure, I checked my shared hosting test instance, and using the default .htaccess file hides the index.php file for me. Have you modified the standard one?

I believe for v5 to run you need php7.4 at a minimum. Your phpinfo says you are running php7.3.

I thought you were on to something here, but I switched to PHP7.4.28, and there’s no change in my issues.

Sorry, missed that: no I haven’t modified my .htaccess file at all.

Well, upgrading to php7.4 is a necessary, but not necessarily a sufficient condition. :slight_smile: Let’s continue then. Have you:

  • restarted fpm if you are using fpm
  • restarted nginx if you are using nginx
  • enabled mod_rewrite in your apache config and restarted apache if you are using apache
  • deleted the php7.3 or verified with phpinfo that your daemon is using the correct version?

Thanks for sticking with me on this. I don’t have access to restart apache in my shared hosting environment, but I have confirmed that it’s running PHP7.4.28 now using phpinfo.

Well, I’m still chipping away at it! It seems like I don’t have a way to enable the following PHP extensions:

  • ctype extension
  • openssl extension
  • tokenizer extension
  • xml extension (unless this is actually XMLreader and XMLwriter)
  • curl extension
  • gmp extension

Hopefully my webhost can assist with that.

Turns out they’re all on.

Still digging at this!

Note: also mod_rewrite IS enabled.

Well, I’ve abandoned the idea of running this on my webhost as it’s such a pain to get things working correctly. I’ve set up a VM running ubuntu 20.04 on my home server.

The problem now is that I can’t access the export data function on my old host, as it is not functioning correctly. SOOOO, I took a SQL export from PHPMyAdmin and m now trying to link it to my new server.

I’ve imported the DB, granted the related privileges, and then renamed it to what I was using for InvoiceNinja before, but then I get a HTTP500 error when I try to load InvoiceNinja.

How should I go about doing this??

@xoo @david @hillel

Any errors in the logs? also, you may need to copy over your .env file from your old system as this would be required to decrypt any data such as payment gateways.

Alright, I figured out that the package I used to install was actually v4. I knew something looked wrong, but it took me a while to catch it.

I’ve replaced it with v5 now, imported my DB fresh, copied my APP_KEY from the old installation and now I’m getting a 500 error when logging in.

I don’t have any payment gateways set up.

Hmm, new error:

Error :: '[{id: 1, name: Authorize.Net, key: 3b6621f970ab18887c4f6dca78d3f8bb, provider...' to 'minified:a2<minified:k9>' failed due to: Deserializing '[id, 57, name, Authorize.Net AIM, key, , provider, AuthorizeNet_AIM, visible,...' to 'minified:k9' failed due to: Tried to construct class "GatewayEntity" with null field "fields". This is forbidden; to allow it, mark "fields" with @nullable.

Strange, I haven’t set up

What do you mean by “imported my DB fresh”? Did you bring over the v4 database?

No, let me explain:

  • I was running v5 on my web host, but it wasn’t working correctly.
  • I installed v4 (by mistake) on my Ubuntu server at home.
  • I backed up my DB from my web host and imported it to my Ubuntu Server MariaDB.
  • I attempted to attach my v5 DB to my v4 server, got an HTTP 500 error.
  • I’ve now removed v4, and installed v5 at home.
  • I was concerned that trying to run v4 with a v5 DB would have made some changes, so I dropped that DB and imported another copy from backup.
  • Now I get the error.

@david do you have any ideas?

I’m a little confused. The error about is from the Front end not being able to parse the gateways table.

I wonder if the v4 database is still connected?

I would suggest wiping everything and doing a plain v5 installation.