Jump to content

Most Common Fixes phpVMS Installation


alblua

Recommended Posts

Warning! This section is very long and may contain elements only developers understand! Please be prepared to have to search through elements for answers! I have tried my best to make this as organized as possible. It is a lively updated topic.

(Warning added on 11/12/14 at 10:03 PM)

===Introduction Letter===

Dear fellow pilots, airline managers, airline owners, whomever you are that leads you astray here,

In this maybe somewhat long thread, I will be discussing and helping you figure the most common issues of phpVMS found during installation. These issues are quite frustarating, for PHP is a very confusing language sometimes, and you'll need some help out there to get started.

Personally, I'm not experienced in PHP or web programming. However, solving bugs and already installing phpVMS about four times already gives you some knowledge.

These errors have been troublesome, and appeared all the time on my installations. Thus, I figured most of you would have these issues as well, so it's time to bring them all together!

===Introduction to Issues===

[i edited this section on Monday, January 20, 2014 at 9:31 PM to comply with correct information]

Plenty of issues have been found during phpVMS installation. Most web hosts use PHP 5, and phpVMS is developed for it, however, it seems it runs better in PHP 4. Neverless, nothing is perfect, thus, I hope these issues below solve your problems.

===Fixes to the Issues===

Please note that I personally recommend completing these changes before you do absolutely and installation of phpVMS. This reduces stress overall during installation, for you aren't bugged down by, well, bugs. I personally have not tried this strategy, however, it probably would work and hopefully my many experiences installing phpVMS come through.

You can also find even more issues found out that I personally haven't been quite affected by (yet) on the GitHub page, located by clicking here.

Bug Number 1

This is honestly a very silly issue. I would definitely suggest to the developers on fixing this right away, or fixing the installation package, for obviously it is ridiculous.

Without completing this step, you would get this right when you go to http://myairline.com...ll/install.php:

Fatal error: Class 'DB' not found in /home/myairline/public_html/phpvms/core/common/SettingsData.class.php on line 28

This is a very easy fix. Simply navigate towards /phpvms/core/local.config.php, where you then open that file with your text or code editor program and then completely delete everything in it. After saving and closing, you should check that the file size is absolutely zero.

Bug Number 2

This next issue gets a little more complicated. It happens somewhere after connecting to databases, but first, let's fix the issue before you start installing.

Here would be an example of the errors you get:

Warning: Creating default object from empty value in /home/myairline/public_html/phpvms/core/classes/Vars.class.php on line 74

The fix is quite as easy as navigating to the right line and adding the right stuff.

Navigate towards /phpvms/core/classes/Vars.class.php and go down to line 60. After line 60, add this:

self::$request = new stdClass();

So now, on lines 59 to 61, you should see this:

self::$post = new stdClass();
self::$get = new stdClass();
self::$request = new stdClass();

(Don't forget to save all coding changes!)

Bug Number 3

The next issue would be the one I like to call "the spammer."

Basically, it spams the whole page with errors. Then, with a simple addition of line of code, they all disappear.

Cool, eh?

Anyways, you face this issue without doing this:

Strict Standards: Accessing static property (whatever it says; quite random stuff and files)

(Then, after that one error, it causes more errors, which causes more errors, and they all kind of look the same)

To fix, navigate on over to /phpvms/core/classes/CodonModule.class.php and open it with your code editor. Right after the opening PHP tag (the tag looks like "<?php"), or hit enter to put a new line underneath it, put the following code:

ini_set('error_reporting', E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);

What I assume this is doing is telling phpVMS ignore all the errors. Might not be best choice, but it works!

Bug Number 4

This next issue comes up very secretly. Right after your finish installation, you come to the completion page. Instead of finding what you wanted, like "Success!" or whatever (I actually don't know what it looks like; I should test these fixes out to see if they actually clear everything, since I've only fixed as they came by), you get this:

Fatal error: Cannot re-assign auto-global variable _FILES in /home/myairline/public_html/phpvms/core/common/PilotData.class.php on line 436

Some of you would do this if you don't know how to fix: :angry: (maybe that exploding face on Skype as well)

Anyways, let's fix it by going to that file, /phpvms/core/common/PilotData.class.php and head on over to what line it says has an error. I've noticed that some versions of phpVMS have it on line 431, while the latest is on line 436, so see where it is. From the line that says has an error on the website you need to delete the following thing:

$_FILES

Now, that line should look like:

public static function saveAvatar($code, $pilotid) {

Or, if you are simply lazy, just copy that code and replace the whole line with it.

===Closing Remarks===

I sure do hope that phpVMS will soon be in a PHP 5. something environment (if it isn't already), and all bugs are solved to prevent us airline managers and coders and owners from going KABLAAM! from anger.

In case you haven't learned from my "letter," I am not a PHP programmer at all. Nada, zip, zilch, zero, none.

No experience at all in this field, so I don't know if these are reliable fixes. Again, Google and these forums were my best friends, so they work! :lol:

Also, if there is an edit thread function, which I don't know there is (maybe delete this line as well if there is one) since I'm quite new actually to the forums, I will provide a download link of an updated phpVMS working PHP program for you to download (maybe even become the new official download! Just kidding...).

If you find a new issue, or have another issue that you want to point out and fix, please do mention it below, and if I can edit my posts, I'll somehow stick it in the midst of this mess of words.

Keep flying! ;)

===More Issues===

[This next section pertains to issues that aren't related to installation, but kind of important. It was added on Monday, January 20, 2014 at 9:53 PM]

Important Issue 1

Some of you will experience this issue, some will not. In this issue, you will be in your admin panel after a finally working installation and then bam! Somehow, you can't see your pilots, even though you can see them in the website, can't find airports, so on and so on. You might just find some other issues as well...

There isn't really an example you would get of the error; it varies. I described some above.

To fix, head on over to /phpvms/admin/action.php and then open the coding. Scroll down until you get to:

error_reporting(E_ALL ^ E_NOTICE);

Replace that with:

ini_set('error_reporting', E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);

Another fix suggested by Nabeel would be to go to your local.config.php and see if there are any funky characters out of the ordinary, such as this: `<?php

Important Issue 2

[This issue was added on 11/12/14 at 10:01 PM]

Seeming to be a prevalent issue, the bids page will lead to these errors when clicking add bid:

Strict Standards: Accessing static property Schedules::$get as non static (etc.)
Strict Standards: Non-static method SchedulesData::setBidOnSchedule() should not be called statically (etc.)
Bid added

Note that I specifically noted that there was a "Bid added" message at the end of the errors. This shows us there were just some errors, but the function went through and it still echoed success. To fix this, let's navigate to the directory /core/modules/Schedules from the phpVMS root directory. Open schedules.php. After the opening PHP tag, input this code:

ini_set('error_reporting', E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);
ini_set('display_errors','off');

Save and refresh the page, and your results should be a success in bidding a flight. Entry #13 will help you as well in this topic.

===Fixed Package===

[This section was added on 7/3/14 at 9:58 PM]

Recently I have decided to give you guys a link to a package where I have fixed these issues described above.

Download here: http://airtranvirtua...hpvms-fixed.zip

===Update===

[This section was added on 11/12/14 at 4:58 PM]

I have been skinning as well as coding more websites with PHP, therefore, I will be able to help you more since I am more knowledgeable.

===Note for Support===

[This section was added on 11/12/14 at 4:59 PM]

When asking for help, please do be patient. I am a busy man, so I may not be able to get to you within 5 minutes. Please provide as much information as possible, so I can quickly find out what's going on. The website URL can help, the errors occurring, and where are the errors.

If you are someone who knows someone's answer in this area, feel free to answer it! Why not? It's a community! :)

  • Like 3
Link to comment
Share on other sites

If everything I posted above (took quite a while to write!) doesn't work at all, contact your hosting provider to downgrade their PHP program on your domain to some lower version (like 4). Afteward, install phpVMS, have it run for a while, then you can get back to PHP 5. Errors will pop up again, however, they will be easier to fix for the installation is already done.

Once again, if anyone has questions, please reply, I'll do my best with my vague coding knowledge.

Link to comment
Share on other sites

Let's get one with right

phpVMS was not at all made for PHP4. It is fully object orientated which was not supported in php4.

It was made for 5.2 (released in 2006). However the rest of your post is correct, there is numerous bugs that are there, that really need to be fixed. I appreciate Nabeel is busy in real life, but there is plenty of people around who could help, I have just recently fixed a big security hole in Github.

The first priority is to issue a new release, fixing this bug. I don't think they realise how big it is, I could hack any phpVMS installation right now. So can any one else that views the issue on github and knows how to exploit it.

The second priority is fixing the bugs you listed above.

Link to comment
Share on other sites

Let's get one with right

phpVMS was not at all made for PHP4. It is fully object orientated which was not supported in php4.

It was made for 5.2 (released in 2006). However the rest of your post is correct, there is numerous bugs that are there, that really need to be fixed. I appreciate Nabeel is busy in real life, but there is plenty of people around who could help, I have just recently fixed a big security hole in Github.

The first priority is to issue a new release, fixing this bug. I don't think they realise how big it is, I could hack any phpVMS installation right now. So can any one else that views the issue on github and knows how to exploit it.

The second priority is fixing the bugs you listed above.

Thanks for the information; apologize for the misinformation, I will correct it right after I post this comment. :D

Link to comment
Share on other sites

  • 2 weeks later...
  • 8 months later...

The Bug 3 fix didnt worked for me, I still get

Strict Standards: Accessing static property Schedules::$get as non static in /home/voovirtu/public_html/va/core/modules/Schedules/Schedules.php on line 106

Strict Standards: Non-static method SchedulesData::setBidOnSchedule() should not be called statically in /home/voovirtu/public_html/va/core/common/SchedulesData.class.php on line 853

Bid added

Link to comment
Share on other sites

The Bug 3 fix didnt worked for me, I still get

Strict Standards: Accessing static property Schedules::$get as non static in /home/voovirtu/public_html/va/core/modules/Schedules/Schedules.php on line 106

Strict Standards: Non-static method SchedulesData::setBidOnSchedule() should not be called statically in /home/voovirtu/public_html/va/core/common/SchedulesData.class.php on line 853

Bid added

May I ask where are you seeing this error? On the schedules page, or when you are actually installing?

Thank you!

Link to comment
Share on other sites

I've had the same exact issue, and I know exactly how to fix it. I will put this in the guide after this post.

Starting from your root phpVMS directory, go to /core/modules/Schedules.

In that directory, you should find a file called Schedules.php. Open and edit that file.

Now, those who are more knowledgeable than me in PHP, I'll admit this isn't quite the cleanest way to do it, but it sure did the trick for me.

After the opening PHP tag (<?php), hit enter and then add this code:

ini_set('error_reporting', E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);
ini_set('display_errors','off');

Lines 1-22 should then look something like this:

<?php
ini_set('error_reporting', E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);
ini_set('display_errors','off');
/**
* phpVMS - Virtual Airline Administration Software
* Copyright (c) 2008 Nabeel Shahzad
* For more information, visit www.phpvms.net
* Forums: http://www.phpvms.net/forum
* Documentation: http://www.phpvms.net/docs
*
* phpVMS is licenced under the following license:
* Creative Commons Attribution Non-commercial Share Alike (by-nc-sa)
* View license.txt in the root, or visit http://creativecommons.org/licenses/by-nc-sa/3.0/
*
* @author Nabeel Shahzad
* @copyright Copyright (c) 2008, Nabeel Shahzad
* @link http://www.phpvms.net
* @license http://creativecommons.org/licenses/by-nc-sa/3.0/
*/

class Schedules extends CodonModule
{

So, what I'm doing here is that the errors you are getting are able to be turned off. Here, we turn them off, and then since it won't show the errors, it's just going to show the add bid part.

Strict Standards: Accessing static property Schedules::$get as non static in /home/voovirtu/public_html/va/core/modules/Schedules/Schedules.php on line 106

Strict Standards: Non-static method SchedulesData::setBidOnSchedule() should not be called statically in /home/voovirtu/public_html/va/core/common/SchedulesData.class.php on line 853
Bid added

Note at the end of that, it states Bid Added. Great! We just remove the errors and we'll only get that!

I've tested this on my build of phpVMS, but if it doesn't work, please do come back. I will gladly help.

Good luck!

Link to comment
Share on other sites

  • 1 month later...

No problem!

To change the frontpage, you can create a skin, go to \core\templates, copy over the frontpage_main.tpl to your skin (skins folder in \lib\skins\whatever it is) and edit it.

Go to admin panel, settings, and change the skin to the name of the folder.

You can read more at the skins documentation.

Link to comment
Share on other sites

Hi again, sorry for all my questions but you have been a big help :) :) :) . I recently used Wix and I have made a great HTML5 template. Is there any way to transfer that over to the new phpvms based site? Thank you.

No problem! I'm willing to help you.

Unfortunately, I'm going to have to leave you hanging a bit to learn some things. The way to customize how your phpVMs looks is with skins. Skins are located in the \lib\skins\ folder. To explain it to you will take me ages, as there are unlimited possibilities on how you can make one.

Using a template that is not human generated will make the implementation process significantly difficult. I highly recommend you go read the skins forum as well as read the skinning documentation.

Yes, I would say I am decently experienced in the skinning process, however, I have only successfully made three successful ones (to show how hard it is at times), but you can make them as simple as you want. Best option is to contact a developer on here somewhere (I'm busy with someone else at the moment, so I'm quite occupied for skinning :) ).

Good luck!

Link to comment
Share on other sites

I have installed and reinstalled phpVMS numerous times in my VA and had no problems. Recently I have encountered a bug with my phpvms.

It seems pilots that do no not fly for 30 days (that is what I have set in my config) do not automatically get set as "inactive" as I want them too.

I have done a clean install of phpVMS recently from github but it doesn't seem to fix the issue. Also, the default feature of phpVMS is not allow logins from an inactive pilot. I set a test account of mine inactive manually and tested out this feature and didn't work as well.

The only solution on my mind was to use Simpilot's phpVMS. I installed it on a demo folder and ran some tests on it and it worked perfectly. I decided to replace my phpVMS with simpilots's version.

Everything went smoothly and skin was installed as well. The problem started rising in the Admin Panel where all my PIREP data was gone ! There were no PIREP data shown on the admin panel even though the database contained the tables. Another issue was that I couldn't edit schedules on ad min panel as well. It started throwing up errors.

I concluded simpilot's phpVMS is not upgrade-friendly therefore not being a solution for me. (I have contacted him and have got no reply yet).

I hope someone in the forums would reach out and help me out, I would really appreciate it !

Link to comment
Share on other sites

  • 1 month later...

Hi,

your posts were essential to me getting set up but I have one problem that wasn't in the thread. In my phpVMS Admin Panel I get the following;

"Open Flash Chart

JSON Parse Error [syntax Error]

Error at character 0, line 1:

0: <font color=ff0000>"

Any advice you could offer would be greatly appreciated.

Never mind, found the answer with a search, my bad!

Link to comment
Share on other sites

Hi,

your posts were essential to me getting set up but I have one problem that wasn't in the thread. In my phpVMS Admin Panel I get the following;

"Open Flash Chart

JSON Parse Error [syntax Error]

Error at character 0, line 1:

0: <font color=ff0000>"

I simply just block it wherever I can to hide it; it's all off due to a leak that will allow hackers to access your website.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...