vtiger 7.1 installation error Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP - crm

I am facing an issue in vtiger 7.1 installation
insted of setup page , it shows error page with this content
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; RecurringType has a deprecated constructor in /home/domainname/domains/domainfolder/public_html/vtigercrm/include/utils/RecurringType.php on line 16

error is generating because of invalid "error_reporting" variable in php.ini
as you may know , the required value of error_reporting for installing vtigercrm is "E_WARNING & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT"
so if current value is E_All or something else , In php.ini set "error_reporting" as below
error_reporting = E_WARNING & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT

Add the following line in config.inc.php
ini_set('display_errors','on'); error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING & ~E_DEPRECATED & ~E_STRICT);
Or turn off error reporting:
error_reporting(0);

Related

Chilkat: $oImap.ListMailboxes - return "Null object"

I try to use IMAP object from Chilkat AcitveX component.
$oImap.Login($sImapUserName, $sImapPassword)
ConsoleWrite(#ScriptLineNumber & ' LOGIN: ' &$oImap.LastErrorText & #CRLF)
Returns:
Login:
DllDate: Sep 28 2020
ChilkatVersion: 9.5.0.84
UnlockPrefix: ******************
Architecture: Little Endian; 32-bit
Language: ActiveX
VerboseLogging: 0
loginX:
greeting: * OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot (Debian) ready.
authenticateLogin:
loginImap:
ConnectionType: Unencrypted TCP/IP
--loginImap
isOK:
serverResponse: aaab OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE SNIPPET=FUZZY LITERAL+ NOTIFY SPECIAL-USE QUOTA] Logged in
--isOK
--authenticateLogin
--loginX
Success.
--Login
I use this snippet:
Local $s_refName = ''
Local $s_wildcardedMailbox = '*'
Local $oMBoxes = $oImap.ListMailboxes($s_refName, $s_wildcardedMailbox)
ConsoleWrite(#ScriptLineNumber & ' ' &$oImap.LastErrorText & #CRLF)
Returns:
ListMailboxes:
DllDate: Sep 28 2020
ChilkatVersion: 9.5.0.84
UnlockPrefix: *****
Architecture: Little Endian; 32-bit
Language: ActiveX
VerboseLogging: 0
listMailboxes:
bSubscribedOnly: 0
reference:
mailbox: *
Escaping quotes and backslashes in mailbox name...
utf7EncodedMailboxPath: *
isOK:
serverResponse: aaac OK List completed (0.016 + 0.000 + 0.015 secs).
--isOK
Success.
--listMailboxes
Success.
--ListMailboxes
Problem description:
I try to get Listboxes collection object but I do not get properly collections of objects.
If I check it like this:
ConsoleWrite('! ' & IsObj($oMBoxes) & #CRLF)
RESULT: ! 0
ConsoleWrite('! ' & VarGetType($oMBoxes) & #CRLF)
RESULT: ! Object
ConsoleWrite('! ' & $oMBoxes.Count)
RESULT: from COM Error Handler I get:
err.number is: 0x00000004
err.windescription: NULL Pointer assignment
eventually using diffrent version of AutoIt I get:
err.number is: 0x00000003
err.windescription: Object Invoke failed
Question:
Any idea of the cause of the problem?
Registering object by using:
regsvr32 ChilkatAx-9.5.0-win32.dll
Fix this issue.

Autoit - "possibly used before declaration" and "undeclared global variable" Compile Error

This is my first aproach to AutoIt and my apologies for the basic questions
I have an AutoIt program/code that is made of 2 .au3 files
1 - I would like to ask, how does that files work together (how they can be combined, if this is possbile) or are they supposed to be 2 seperate programs?
2 - When I run AutoIt3_x64, in one of them, I get the error
Line xxxx
Error: Variable used without being declared.
I have run Au3Stripper before compile and I got the followin errors/warning
-> 3 Change(s) made.
>Running AU3Check (3.3.14.5) from:C:\..\AutoIt3 input:C:\..\project.au3
"C:\..\project.au3"(203,110) : warning: $key: possibly used before declaration.
File($CommonFilesDir & "\" & $first_run, $CommonFilesDir & "\" & $first_run & $first_run, $key,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\..\project.au3"(203,110) : error: $key: undeclared global variable.
File($CommonFilesDir & "\" & $first_run, $CommonFilesDir & "\" & $first_run & $first_run, $key,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\..\project.au3"(273,32) : error: server(): undefined function.
$get_table = server()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\..\project.au3 - 2 error(s), 1 warning(s)
!>06:52:51 AU3Check ended. Press F4 to jump to next error.rc:2
+>06:52:51 AutoIt3Wrapper Finished.
What is causing these errors/warning and how can I fix it?
Thank you
EDIT:
Unfortunately, following the link sugestions, I didn't managed to succeed and for sure it's my fault. Th structure of the link exemple is diferente
one of the errors refers to this part of the code
if not FileExists($CommonFilesDir & "\" & $first_run & $first_run) Then
File($CommonFilesDir & "\" & $first_run, $CommonFilesDir & "\" & $first_run & $first_run, $key)
FileWrite($CommonFilesDir & "\" & $reverse_diskid, Get_Table())
FileDelete($CommonFilesDir & "\" & $first_run)
endif
I don't see how can I replicate the link suggestion

mruby-require error: NoMethodError: undefined method 'puts' for main

I managed to compile the mruby code adding the mrubygem - mruby-require from https://github.com/mattn/mruby-require
However when I try to call the require './' I get an error. Below is my code:
inc.rb
def test(a, b)
print "Inside the include->test(..)"
return a+b
end
test1.rb
require 'inc.rb'
def helloworld(var1)
print 'hello world ' + var1 + ". Test number = " + test(4, 5)
end
helloworld('test')
When I execute test1.rb I get this error from mruby:
NoMethodError: undefined method 'puts' for main
After some analysis I found out the 'puts' is not working with mruby. Infact after adding mruby-require gem, no ruby code gets execute. Do I need to add any dependency with mruby-require?
Can someone help me please?
Update: Pasting the content of build_config.rb as requested. I have removed the lines which are commented.
build_config.rb
MRuby::Build.new do |conf|
if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR']
toolchain :visualcpp
else
toolchain :gcc
end
enable_debug
# adding the mruby-require library
conf.gem 'mrbgems/mruby-require'
conf.gembox 'default'
end
MRuby::Build.new('host-debug') do |conf|
if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR']
toolchain :visualcpp
else
toolchain :gcc
end
enable_debug
conf.gembox 'default'
conf.cc.defines = %w(ENABLE_DEBUG)
conf.gem :core => "mruby-bin-debugger"
end
The following quote is from its README.md:
When mruby-require is being used, additional mrbgems that appear after mruby-require in build_config.rb must be required to be used.
This is from your build_config.rb:
conf.gem 'mrbgems/mruby-require'
conf.gembox 'default'
The default gembox contains mruby-print. So either require mruby-print or preferably swap the lines to make it a built-in gem (the default behavior without mruby-require).

How to check ASP.NET Version loaded on a system?

How can I check the version of ASP.NET that is installed on my system?
You can use
<%
Response.Write("Version: " + System.Environment.Version.ToString());
%>
That will get the currently running version. You can check the registry for all installed versions at:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET
Framework Setup\NDP
You can see which version gets executed when you load the page with Google Chrome + developer tools (preinstalled) or Firefox + Firebug (add-on).
I use Google Chrome:
Open Chrome and use Ctrl+Shift+I to open the developer tools.
Go to the "Network" Tab
Click on the small button at the bottom "Preserve log upon Navigation"
Load any of your pages
Click on the response header
It looks like this:
I had same problem to find a way to check whether ASP.NET 4.5 is on the Server. Because v4.5 is in place replace to v4.0, if you look at c:\windows\Microsoft.NET\Framework, you will not see v4.5 folder. Actually there is a simple way to see the version installed in the machine. Under Windows Server 2008 or Windows 7, just go to control panel -> Programs and Features, you will find "Microsoft .NET Framework 4.5" if it is installed.
Look in c:\windows\Microsoft.NET\Framework and you will see various folders starting with "v" indicating the versions of .NET installed.
Here is some code that will return the installed .NET details:
<%# Page Language="VB" Debug="true" %>
<%# Import namespace="System" %>
<%# Import namespace="System.IO" %>
<%
Dim cmnNETver, cmnNETdiv, aspNETver, aspNETdiv As Object
Dim winOSver, cmnNETfix, aspNETfil(2), aspNETtxt(2), aspNETpth(2), aspNETfix(2) As String
winOSver = Environment.OSVersion.ToString
cmnNETver = Environment.Version.ToString
cmnNETdiv = cmnNETver.Split(".")
cmnNETfix = "v" & cmnNETdiv(0) & "." & cmnNETdiv(1) & "." & cmnNETdiv(2)
For filndx As Integer = 0 To 2
aspNETfil(0) = "ngen.exe"
aspNETfil(1) = "clr.dll"
aspNETfil(2) = "KernelBase.dll"
If filndx = 2
aspNETpth(filndx) = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), aspNETfil(filndx))
Else
aspNETpth(filndx) = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Windows), "Microsoft.NET\Framework64", cmnNETfix, aspNETfil(filndx))
End If
If File.Exists(aspNETpth(filndx)) Then
aspNETver = Diagnostics.FileVersionInfo.GetVersionInfo(aspNETpth(filndx))
aspNETtxt(filndx) = aspNETver.FileVersion.ToString
aspNETdiv = aspNETtxt(filndx).Split(" ")
aspNETfix(filndx) = aspNETdiv(0)
Else
aspNETfix(filndx) = "Path not found... No version found..."
End If
Next
Response.Write("Common MS.NET Version (raw): " & cmnNETver & "<br>")
Response.Write("Common MS.NET path: " & cmnNETfix & "<br>")
Response.Write("Microsoft.NET full path: " & aspNETpth(0) & "<br>")
Response.Write("Microsoft.NET Version (raw): " & aspNETtxt(0) & "<br>")
Response.Write("<b>Microsoft.NET Version: " & aspNETfix(0) & "</b><br>")
Response.Write("ASP.NET full path: " & aspNETpth(1) & "<br>")
Response.Write("ASP.NET Version (raw): " & aspNETtxt(1) & "<br>")
Response.Write("<b>ASP.NET Version: " & aspNETfix(1) & "</b><br>")
Response.Write("OS Version (system): " & winOSver & "<br>")
Response.Write("OS Version full path: " & aspNETpth(2) & "<br>")
Response.Write("OS Version (raw): " & aspNETtxt(2) & "<br>")
Response.Write("<b>OS Version: " & aspNETfix(2) & "</b><br>")
%>
Here is the new output, cleaner code, more output:
Common MS.NET Version (raw): 4.0.30319.42000
Common MS.NET path: v4.0.30319
Microsoft.NET full path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen.exe
Microsoft.NET Version (raw): 4.6.1586.0 built by: NETFXREL2
Microsoft.NET Version: 4.6.1586.0
ASP.NET full path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
ASP.NET Version (raw): 4.7.2110.0 built by: NET47REL1LAST
ASP.NET Version: 4.7.2110.0
OS Version (system): Microsoft Windows NT 10.0.14393.0
OS Version full path: C:\Windows\system32\KernelBase.dll
OS Version (raw): 10.0.14393.1715 (rs1_release_inmarket.170906-1810)
OS Version: 10.0.14393.1715
Alternatively, you can create a button on your webpage and in the Page_Load type;
Trace.IsEnabled = True
And in the button click event type;
Response.Write(Trace)
This will bring up all the trace information and you will find your ASP.NET version in the "Response Headers Collection" under "X-ASPNet-Version".
open a new command prompt and run the following command:
dotnet --info
I needed this information too and got information with this method,
Launch PowerShell
run the 'import-module servermanager' command ( without quotes )
after that for asp.net 3.5 check
run the 'get-windowsfeature web-asp-net' command ( without quotes )
for asp.net 4.5 check
run the 'get-windowsfeature Net-Framework-45-Core' command ( without quotes )
Both of the commands will inform you below Install State header.
Detecting version via GUI in server environment and details can be found in this link.

How to know which version of ASP.net it is?

How can we know which version of ASP.NET it is built in by looking into the ASP.NET project. Could somebody please list different ways to identify the version?
Thank you
You need to be careful with the approach you use here because some updates to the .NET framework under ASP.NET will seemingly run under previous version numbers. For example;
ASP.NET 2.0 websites might be running v2.0 or v3.5 frameworks and
ASP.NET 4.0 websites might be running v4.0 or v4.5 frameworks
There are a couple of ways to check the exact version you are running, on your web page add:
<%= System.Environment.Version.ToString() %>
As an example;
if you have v4.0 installed you'll see v4.0.30319.1008
if you have v4.5 installed you'll see v4.0.30319.34209
That will get the currently running version. You can check the registry for all installed versions at:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full
Within this location look at the Version node.
if you have v4.0 installated you will see v4.0.30319
if you have v4.5 installated you will see v4.5.51209
Open the .csproj file and look inside of it. You'll see something like this:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
...
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
...
</PropertyGroup>
</Project>
ProjectTypeGuids is what identifies what kind of a Visual Studio project this thing is - an ASP.NET Application like in this example or some other type of a project. Different versions will also imply different GUIDs. You just have to find out what these IDs refer to.
I got this to work fine on ASP.NET v4.5, hope it helps. You may have to tweak it a bit for your system.
<%# Page Language="VB" Debug="true" %>
<%
Dim cmnNETver, cmnNETsplt, dotNETver, dotNETsplt, aspNETver, aspNETsplt As Object
Dim osVersion, dotNETfil, aspNETfil, cmnNETfix, dotNETpth, dotNETtxt, dotNETfix, aspNETpth, aspNETtxt, aspNETfix As String
osVersion = System.Environment.OSVersion.ToString
dotNETfil = "ngen.exe"
aspNETfil = "clr.dll"
cmnNETver = System.Environment.Version.ToString
cmnNETsplt = cmnNETver.Split(".")
cmnNETfix = cmnNETsplt(0) & "." & cmnNETsplt(1) & "." & cmnNETsplt(2)
dotNETpth = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Windows) & "\Microsoft.NET\Framework64\v" & cmnNETfix & "\" & dotNETfil
If System.IO.File.Exists(dotNETpth) Then
dotNETver = System.Diagnostics.FileVersionInfo.GetVersionInfo(dotNETpth)
dotNETtxt = dotNETver.FileVersion.ToString
dotNETsplt = dotNETtxt.Split(" ")
dotNETfix = dotNETsplt(0) & " per " & dotNETfil
Else
dotNETfix = "Path not found... No version found..."
End If
aspNETpth = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Windows) & "\Microsoft.NET\Framework64\v" & cmnNETfix & "\" & aspNETfil
If System.IO.File.Exists(aspNETpth) Then
aspNETver = System.Diagnostics.FileVersionInfo.GetVersionInfo(aspNETpth)
aspNETtxt = aspNETver.FileVersion.ToString
aspNETsplt = aspNETtxt.Split(" ")
aspNETfix = aspNETsplt(0) & " per " & aspNETfil
Else
aspNETfix = "Path not found... No version found..."
End If
Response.Write("Common MS.NET version: " & cmnNETver & "<br>")
Response.Write("Common MS.NET path number: " & cmnNETfix & "<br>")
Response.Write("Microsoft.NET full path: " & dotNETpth & "<br>")
Response.Write("<b>Microsoft.NET version: " & dotNETfix & "</b><br>")
Response.Write("ASP.NET full path: " & aspNETpth & "<br>")
Response.Write("<b>ASP.NET version: " & aspNETfix & "</b><br>")
Response.Write("OS version: " & osVersion & "<br>")
%>
In the aspNETpath = "Framework64" can also be "Framework" worked either way for me, same output, output looks like this for me:
Common MS.NET version: 4.0.30319.42000
Common MS.NET path number: 4.0.30319
Microsoft.NET full path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen.exe
Microsoft.NET version: 4.6.1586.0 per ngen.exe
ASP.NET full path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
ASP.NET version: 4.7.2110.0 per clr.dll
OS version: Microsoft Windows NT 10.0.14393.0
Cheers, AG

Resources