B4J Question [SOLVED][BANanoVuetifyAD] BANanoMySQLE Error

Johan Hormaza

Well-Known Member
Licensed User
Longtime User
Hello, this is the error message when executing MySQL. This problem in BANanoVuetify Expenses has no problem


1607978099673.png


1607978125890.png
 
Last edited:

Mashiane

Expert
Licensed User
Longtime User
The only reason I can think of that this is happening is because the app cannot find the php file (mysqlconfig.php). There is nothing wrong with the php script at all.

Q. Which example of the BVAD3 tutorial are you exploring?

Q. What is your ServerIP variable defined as on the Main Module? Is it ServerIP = "http://www.localhost:8080"

Q. Can you confirm the variable name for AppName? Did you change it?

Q. Are you running from a development server / external web server?

Q. Are you using a port number to run your web server?

1. Check this in Process_Globals

B4X:
Public AppName As String = "bvad3"

2. Check this in App_Start

B4X:
BANano.PHP_NAME = $"${AppName}.php"$
    #if release
        'change to external host domain e.g http://www.google.com
        'exclude the port address
    #end if
    BANano.PHPHost = $"${ServerIP}/${AppName}/"$
    BANano.PHPAddHeader("Access-Control-Allow-Origin: *")
 
Last edited:
Upvote 0

Johan Hormaza

Well-Known Member
Licensed User
Longtime User
The only reason I can think of that this is happening is because the app cannot find the php file. There is nothing wrong with the php script at all.

Q. Which example of the BVAD3 tutorial are you exploring?

Q. What is your ServerIP variable defined as on the Main Module? Is it ServerIP = "http://www.localhost:8080"

Q. Can you confirm the variable name for AppName? Did you change it?

Q. Are you running from a development server / external web server?

Q. Are you using a port number to run your web server?

1. Check this in Process_Globals

B4X:
Public AppName As String = "bvad3"

2. Check this in App_Start

B4X:
BANano.PHP_NAME = $"${AppName}.php"$
    #if release
        'change to external host domain e.g http://www.google.com
        'exclude the port address
    #end if
    BANano.PHPHost = $"${ServerIP}/${AppName}/"$
    BANano.PHPAddHeader("Access-Control-Allow-Origin: *")
I'm running it locally with Laragon, and all the projects and examples you've shared with BANano have always worked for me. The example I use is the one in the Tutorials folder Part35

B4X:
Sub Process_Globals
    Public BANano As BANano 'ignore
    Public AppName As String = "bvad3"
    Public AppTitle As String = "BANanoVuetify AD3"
    Private Publish As String = "C:\laragon\www"
    Public Version As String = "1.00"
    Public ServerIP As String = "http://www.localhost:8080"
End Sub

Sub AppStart (Form1 As Form, Args() As String)
    'initialize banano for first use
    BANano.Initialize("BANano", AppName, DateTime.now)
    BANano.HTML_NAME = "index.html"
    BANano.Header.Title = AppTitle
    BANano.Header.AddFavicon("favicon.ico", "16x16")
    BANano.Header.AddAppleTouchIcon("apple-touch-icon.png", "180x180")
    BANano.Header.Author ="Anele Mbanga (Mashy)"
    'BANano.Header.Charset = "iso-8859-1"
    BANano.Header.Description = "BANanoVuetify Empty Template"
    'BANano.header.Expires = "Mon, 22 Jul 2002 11:12:01 GMT"
    BANano.Header.Keywords = "banano,vuetify,material design"
    BANano.Header.Language = "en"
    BANano.Header.AddMeta($"<meta name="copyright" content="&copy; 2020 BANanoVuetifyAD3">"$)
    BANano.Header.AddMeta($"<meta name="robots" content="ALL">"$)
   
    'BANano.Header.AddMSTileIcon("mstile-150x150.png", "144x144")
    'BANano.Header.SetMaskIcon("safari-pinned-tab.svg")
    BANano.Header.AddManifestIcon("android-chrome-192x192.png", "192x192")
    BANano.Header.AddManifestIcon("android-chrome-512x512.png", "512x512")
    BANano.TranspilerOptions.UseServiceWorker = False
    BANano.TranspilerOptions.MergeAllCSSFiles = True
    BANano.TranspilerOptions.MergeAllJavascriptFiles = True
    BANano.TranspilerOptions.MinifyOnline = False
    BANano.TranspilerOptions.RemoveDeadCode = False
    'BANano.TranspilerOptions.SetFireReadyWhenReadyStateComplete
    'BANano.TranspilerOptions.GZipGeneratedWebsite(10)
    #if release
        BANano.TranspilerOptions.EnableLiveCodeSwapping = False
    #end if
    BANano.TranspilerOptions.RedirectOutput(File.DirApp, "log.txt")
    'set php settings
    BANano.PHP_NAME = $"${AppName}.php"$
    #if release
        'change to external host domain e.g http://www.google.com
        'exclude the port address
        ServerIP = "http://www.localhost:8080"
    #end if
    BANano.PHPHost = $"${ServerIP}/${AppName}/"$
    BANano.PHPAddHeader("Access-Control-Allow-Origin: *")
    BANano.Build(Publish)
    Dim fx As JFX
    Dim URL As String = File.GetUri(File.DirApp,"log.txt")
    fx.ShowExternalDocument(URL)
    Dim appPath As String = $"${ServerIP}/${AppName}/index.html"$
    fx.ShowExternalDocument(appPath)
    #if release
        ExitApplication
    #end if
End Sub

'Return true to allow the default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
    Return True
End Sub

Sub BANano_Ready
    pgIndex.Init
End Sub

1608130317782.png
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
The only reason I can think of that this is happening is because the app cannot find the php file.
And why the error mentions some lines from the PHP-Script then when it is not found at all?

See Attachments in #1:
Line 131, 161 and 502
 
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
Upvote 0
Top