Hello, this is the error message when executing MySQL. This problem in BANanoVuetify Expenses has no problem
Last edited:
I have not been able to solve the problem. What have I gotten lost in?Hi
I cannot re-produce your error on my side.
A tutorial with working source code on BVAD3 for MySQL CRUD is available here, https://www.b4x.com/android/forum/t...ps-with-banano-for-dummies.124548/post-783201
Regards
TheMash
Probably in the fact that the error is not in B4X but in the PHP Script.What have I gotten lost in?
Probably in the fact that the error is not in B4X but in the PHP Script.
Upload your php-Script bvad3.php
Public AppName As String = "bvad3"
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 Part35The 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: *")
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="© 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
And why the error mentions some lines from the PHP-Script then when it is not found at all?The only reason I can think of that this is happening is because the app cannot find the php file.
My bad, I meant mysqlconfig.php. Thanks @DonManfred. I have updated the thread.And why the error mentions some lines from the PHP-Script then when it is not found at all?