Page 1 of 1
Moving Application
Posted: 2021-02-03 16:26
by udennison
Good day,
I'm attempting to move an application from my local computer to a web server.
I've followed the instructions in this post
https://bigprof.com/blog/appgini/moving ... ew-server/ a few times and this is the error msg I'm continuously getting. I couldn't apply a couple steps; step 7 to delete the .maintenance, because the application is not in production and does not require a maintenance mode. Below are the error msgs I'm getting. Assistance appreciated, thank you.
Warning: include(C:\xampp\htdocs\legalmatters/updateDB.php): Failed to open stream: No such file or directory in C:\xampp\htdocs\legalmatters\setup.php on line 139
Warning: include(): Failed opening 'C:\xampp\htdocs\legalmatters/updateDB.php' for inclusion (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\legalmatters\setup.php on line 139
Fatal error: Uncaught Error: Call to undefined function get_magic_quotes_gpc() in C:\xampp\htdocs\legalmatters\setup.php:32 Stack trace: #0 C:\xampp\htdocs\legalmatters\setup.php(144): undo_magic_quotes('localhost') #1 {main} thrown in C:\xampp\htdocs\legalmatters\setup.php on line 32
Re: Moving Application
Posted: 2021-02-04 23:05
by hgarbe
Hi,
as you probably seen this blog entry aims at move a productive app with productive data to another server without inconsistencies. As you self wrote it's not productive why would you want to move it? Can't you just directly deploy the appgini files to that server?
Re: Moving Application
Posted: 2021-02-05 07:14
by SkayyHH
Hi,
you don't need a "Maintenance mode" if you don't have any users on the system
Normally it should work like this:
1.) Copy the app directory with the generated files and directories to the server. Make sure to transfer the files in ascii or binary mode.
Ascii:
*.php
*.css
*.js
*.txt
*.htm
*.html
*.htaccess
*.md
*.json
Hope these are all...
2.) If available delete config.php and setup.md5
3.) Run setup and enter the database data.
4.) Set file permissions (dir 755, files 644 i think)
5.) Delete setup.php
6.) If you want to transfer the data from the database run a sql dump local and import the dump on the server. With PHPmyAdmin or the AppGini backup function.
I hope this works for you.
Re: Moving Application
Posted: 2021-02-05 16:14
by udennison
Hi, thanks for taking time to respond. Yes, these are the steps taken, except for no 4.) above, set file permissions. Please elaborate on this step.
I did delete the config.php and setup.md5 and ran the setup.
Re: Moving Application
Posted: 2021-02-05 16:19
by SkayyHH
Are you sure that you specified the server correctly during setup? You have something from "localhost" in the error message.
Re: Moving Application
Posted: 2021-02-05 17:00
by udennison
Yes, on the web server it is localhost. It is a web server that is located on the internal network.
Re: Moving Application
Posted: 2021-02-06 09:51
by SkayyHH
Localhost (127.0.0.1) is your own local computer. Have you ever tried the IP number of the web server?
Re: Moving Application
Posted: 2021-02-06 11:52
by udennison
On the Setup Data page, with the IP address I get a connection error. Using localhost it is successful.
Re: Moving Application
Posted: 2021-02-06 12:44
by jsetzer
For narrowing down I recommend verifying the serverside database connection parameters by using a different tool than AppGini setup.
Recommendation
- Download Adminer
https://www.adminer.org/de/#download
Direkt download link:
https://github.com/vrana/adminer/releas ... -mysql.php
- Upload the file to your server
For example create a directory "db" under your web-root directory
- Open that tool in your browser
For example navigate to https://www.myserver.xyz/db
The adminer-VERSION.php file will be listed. Open it.
- In the login form, try to connect to your database with localhost and your db-administrative credentials. Leave the database-field empty for now.
- If login fails, there is a problem with your database setup, permissions or credentials
In this case it does not make sense to play around with AppGini setup parameters but to find the correct connection settings, credentials and permissions serverside.
- If you can connect, find your database name in the upper left dropdown list. Your database should be present.
- for security reasons: remove Adminer (or protect it against unauthorized access)
It would help us helping you if you could report back the results of your database connection test.
Re: Moving Application
Posted: 2021-02-06 12:46
by SkayyHH
Hi,
I have looked into the Setup.php.
In 136 to 139 it says
Code: Select all
/* if db test is successful, output success message and exit */
if($test) {
echo 'SUCCESS!
exit;
That means you will get a "success" at the setup screen if the database details are correct.
Is that so?
Re: Moving Application
Posted: 2021-02-08 09:45
by onoehring
Hi,
I strongly suggest you try Jans "connect to database" tip above.
Did you try the "real" server with a plain html or php document? Like
index.php
? Does that work?
I am just wondering as your "real" server seems to be Windows based which is ... uncommon.
Olaf
Re: Moving Application
Posted: 2021-02-08 12:30
by udennison
Apologies for the delay, the laptop took the weekend away from me.
I've tried the tip from @jsetzer, downloaded Adminer and was successful connecting to the database.
I tried the tip from @hgarbe by installing appgini on the webserver and running the project file from there, no success. I may have to recreate the project from scratch going down this route. It wasn't difficult with the gini, took a day or so.
@Skayhh, I did get success connecting to the database on the setup page.
@oneehring, it is Windows based and there is another plain php project that is connecting.
Various attempts keep pointing to this line in the setup.php code on line 32
/* some function definitions */
function undo_magic_quotes($str) {
return (get_magic_quotes_gpc() ? stripslashes($str) : $str);
}
Thanks for the help, any further tips?
Re: Moving Application
Posted: 2021-02-19 15:47
by udennison
Sorry for the long delay, only made time today to advance this concern.
I resorted to using a lower version of xampp and the Appgini applications worked seemlessly.
The webserver's OS is Windows 2008 R2. The version of xampp was x64-8.0.0-3-VS16 and I uninstalled it and instated version 7.2.33.
Thanks again for all who assisted.
Re: Moving Application
Posted: 2021-02-20 08:24
by SkayyHH
I can confirm that. AppGini does not seem to run under the latest Xaamp 8. Maybe Xaamp 8 needs to be configured first. With Xaamp 7.x it runs well.
Re: Moving Application
Posted: 2021-02-20 08:46
by onoehring
Hi,
maybe it'php 8 ... and there is a problem?

- xammp.png (60.51 KiB) Viewed 12241 times
Olaf