FsPassengers Forums
SOLVED - Having Trouble with FsP PHP import script version 1.5 - Printable Version

+- FsPassengers Forums (http://www.fspassengers.com/forum)
+-- Forum: FsPassengers (http://www.fspassengers.com/forum/forumdisplay.php?fid=3)
+--- Forum: FsPassengers General (http://www.fspassengers.com/forum/forumdisplay.php?fid=4)
+--- Thread: SOLVED - Having Trouble with FsP PHP import script version 1.5 (/showthread.php?tid=4490)

Pages: 1 2


SOLVED - Having Trouble with FsP PHP import script version 1.5 - ReaperAussie - 26-10-2015

PROBLEM SOLVED

FsP PHP import script version 1.5

Hi.
having trouble with :
The PHP script version 1.5 can be downloaded HERE:
FsP PHP import script version 1.5

I can put it on server, I can get to admn areas and put database information, though

when i go to create tables, it comes up with errors regarding
MariaDB, which i dont even now if mariadb is on my webite server.

any help here would be great thank you.
Warren



Post Edited ( 11-06-15 05:26 )


Re: Having Trouble with FsP PHP import script version 1.5 - gbapache - 26-10-2015

What are you trying to do? What tables are you creating?




Re: Having Trouble with FsP PHP import script version 1.5 - SamTDS - 26-10-2015

Quote:gbapache wrote:
What are you trying to do? What tables are you creating?
What I'm seeing here is that he has gotten the php and put it onto his webserver and hasn't made the SQL database that is required.




Re: Having Trouble with FsP PHP import script version 1.5 - ReaperAussie - 27-10-2015

It says it can not make flight or username tables do to errors in certain lines in mariadb

yes I made sql database, i can put all that information in admin area , then i go to create the tables and it will not due to the errors i mentioned.



Post Edited ( 10-27-15 03:51 )


Re: Having Trouble with FsP PHP import script version 1.5 - ReaperAussie - 27-10-2015

What would I do to fix this ?

It comes up with following :



Unable to create table user_profile in this database mySql error You have an error in your SQL syntax check the manual that corresponds to your
MariaDB server version for the right syntax to use near TYPEMyISAM at line 8Unable to create table flights in this database mySql error You have an
error in your SQL syntax check the manual that corresponds to your MariaDB server version for the right syntax to use near TYPEMyISAM at line 57


Re: Having Trouble with FsP PHP import script version 1.5 - ReaperAussie - 27-10-2015

[Image: NzBENzZFNDI1MEUwOTM3MEE4RDM6NTk5M2FmZjZm...03c772ab27]




Re: Having Trouble with FsP PHP import script version 1.5 - SamTDS - 27-10-2015

Let me see the command that you put in that gives you this error, if its a syntax error then I should be able to fix it.




Re: Having Trouble with FsP PHP import script version 1.5 - Charlier - 27-10-2015

Quote:ReaperAussie wrote:
[Image: NzBENzZFNDI1MEUwOTM3MEE4RDM6NTk5M2FmZjZm...03c772ab27]

You can also put the necessary data manual in the sql database by using your phpadmin.
the table flights needs 49 rows and the user_profile needs 4 rows.

The data can be found in the action_createtables.php within the FsPadmin folder.
Note that this program is written for php 5.2. and at this time the most providers having 5.5 or higher, that's where this problem starts.

Spend 5 minutes on putting this data by hand into your SQL and the problem is solved.




Re: Having Trouble with FsP PHP import script version 1.5 - ReaperAussie - 28-10-2015

Quote:SamTDS wrote:
Let me see the command that you put in that gives you this error, if its a syntax error then I should be able to fix it.

All I do is click n the create tables.

------------------------------------------------
Quote:You can also put the necessary data manual in the sql database by using your phpadmin.
the table flights needs 49 rows and the user_profile needs 4 rows.

The data can be found in the action_createtables.php within the FsPadmin folder.
Note that this program is written for php 5.2. and at this time the most providers having 5.5 or higher, that's where this problem starts.

Spend 5 minutes on putting this data by hand into your SQL and the problem is solved.

I'll try this also

Thanks


Re: Having Trouble with FsP PHP import script version 1.5 - ReaperAussie - 28-10-2015

Ok I reverted server to php 5.2 and then it would not work at all.
SO i out it back to php 5.4 and now is working, though still getting the errors as above in picture.

I will try to do manually, placing tables..


Re: Having Trouble with FsP PHP import script version 1.5 - ReaperAussie - 28-10-2015

OK added Manually the tables, now says its working.

Though Now comes the hard part - I dont know how to view flight log page, that will show logged flights
and the instructions are not very helpful for those who do not know much about scripting and so on.

I still nee a bit of help.

Here are the entire instructions you get to install these files :

******************************************
INTRO
******************************************
Those script remain very basic and simple so it's
not a pain to tune them to fit your Va need, the
drawback it that ... they are simple.


******************************************
INSTALL
******************************************

Copying file:
-------------

unzip this archive and copy all the file in your WWW directory
either online or on localhost (using PHPDEV for example)
You can copy them on a subdirectory (example: "vaFsP" or "va")

Take care about the case, many site accept only link with the correct
case:

ie: "http://mysite.com/VA/FsPgetflight.php" not egal to
"http://mysite.com/va/FsPgetflight.php"

creating a SQL DB:
--------------------
If you don't want to use an existing sql base create a DB
with any name as FsP or VaFsP for example.


Creating table managing the settings:
--------------------------------------
Now open your browser and browse to the FsPadmin directory
example: http://localhost/www/FsPadmin/
online example: http://www.mysite.com/FsPVa/FsPadmin/

user:demo
pass:demo

the admin part is self explanatory if you know a bit php/sql
anyway the admin will control your connection and if there
is no required table on your SQL db it will create them for you...

******************************************
FSP UNIT
******************************************
As translating the units is a pain FSP export the
unit ready with their unit text (ie: "193 kts" "5000 ft")
the admin let you choose wich unit you want that FsP export,
it's a good idea to fix that at start and don't change after
to not mix unit in your database.

The admin let you choose also the welcome message that will
be displayed to your users in his connect dialog.

******************************************
DEMO DB
******************************************
A demo flight database with some flight is available
in gzip format in FsPadmin folder "flights_db_example.gz"
using PhPMyAdmin you can import it in the flight database
and have some flight already showed on the flight page.


******************************************
EXPORT FROM FSP
******************************************
FsP must have a config file in is "FsPassengers/config_va"
directory, this file will tell FsP where to connect, the username
and password of your Va member as well as the name that will appear
in the "virtual airline" menu of FsP.

So you are responsible to provide this file to any of your members,
the php admin can be tuned to create this file automatically
based on user profile.

See "config_example1.cfg" and "config_example2.cfg"

those config file can be any name but must end with ".cfg"

here an explaination of CFG parameters:
------------------------------------------------
"menu_name=" the name that will appear in the FsP menu
"base_url=" the base url of your site
"path_stats=" the url to the stats page (to view flight) MINUS the base URL WITHOUT slash at start
path_export= the url to the get flight script MINUS the base URL WITHOUT slash at start and with the import script name at end.
"username=" username (you must create this user in admin !!! 3 character minimum!!!)
"password=" user password
------------------------------------------------

******************************************
SEEING EXPORTED STATS
******************************************
A basic script is included FsPListFlight.php, it remain VERY basic
will give only a rough list of the flight in the database so this
one has to be tuned... A lot can be done, you can display any value
you want and forget the others, mix value to give per pilot or user stats,
overall stats, make query by somes value etc.

THIS SCRIPT IS INTENDED TO BE INCLUDED IN ANOTHER PAGE not to be viewed
alone, at worse you just need to include header and footer to it...

if you have a site with the index that include other page you probably
just need to do something like that in index.php:

if($display=="va")
{
include "va/FsPlistFlight.php"
}

another style:

if($display=="va")
{
include "include/header.php"
include "include/FsPlistFlight.php"
include "include/footer.php"
}

or if you want to link directly to the FsPlistFlight.php or your custom script
you'll need probably to include the header and footer.

Look to the FsP demo page here: http://www.fspassengers.com/?action=va
to have a view of what can be done (remain basic but a bit better)


Happy importing !

Dan


Re: Having Trouble with FsP PHP import script version 1.5 - ReaperAussie - 28-10-2015

I am not sure how to make the page, so i can view the flight logs.


Re: Having Trouble with FsP PHP import script version 1.5 - ReaperAussie - 28-10-2015

PROBLEM SOLVED


Re: Having Trouble with FsP PHP import script version 1.5 - SamTDS - 28-10-2015

Quote:ReaperAussie wrote:
PROBLEM SOLVED
o
As it is solved please can you edit the original post and put [SOLVED] at the start of the title so others can see that it is solved easily




Re: SOLVED - Having Trouble with FsP PHP import script version 1.5 - ReaperAussie - 06-11-2015

Quote:You can also put the necessary data manual in the sql database by using your phpadmin.
the table flights needs 49 rows and the user_profile needs 4 rows.

The data can be found in the action_createtables.php within the FsPadmin folder.
Note that this program is written for php 5.2. and at this time the most providers having 5.5 or higher, that's where this problem starts.

Spend 5 minutes on putting this data by hand into your SQL and the problem is solved.

Thanks for pointing me in right direction, it helped get it working Applause