Jump to content

Clean Install "An Error was encountered" [SOLVED]


Mysterious Pilot

Recommended Posts

I separated this thread from the other one because the other thread has gone in some other direction. First of all I am not a software newbie, 20 years of experience and I am trying to start my VA but I don't have time to browse through PHP code.

So, I use the same control panel (webhost4life?) as in the dummies guide. I did a clean installation as follows:

1. Created subdomain and subdirectory where subdomain points

2. Uploaded all files of phpVMS to the subdirectory of #1

3. Created a MySQL database 5.0.45 and noted its administrative username and set permissions (all as shown in the dummies guide)

4. Ran the /install/install.php script, it showed ALL GREEN, no red issues. This created my main user with ID XXX0001.

5. Ran the /install/checkdb.php and everything was OK there

6. Ran the /install/checkinstall.php and everything was OK there too

Since this is a CLEAN install (not an update) I wanted to check things further.

7. The main page shows in the New Users section the same user that was created during #4

8. Went to the admin page /admin/

At this point I got the dreaded "An Error Was Encountered. Please login first". That is sensible, so far so good. I went to log in with the XXX0001 username and the password I gave during installation but after a short time (I see the "transferring data" message on the status bar of the browser) it comes back to the home page, gives no error and does not log me in either!.

I tried the login link on the main page instead of the login textboxes at the top right but it just takes me back to the main page. In fact ALL links on the main page just take me back to the home page (something users would find very confusing, there must be some info that is visible to anonymous users.

So, I checked the database with MySQL Admin and it shows the user credentials (password is hashed) so the user is there, obviously it can also write to the database. If I attempt to login with the email address instead of the user ID the same problem, no login, no error message, no fun. In FireBug I see it is trying to get the /index.php/registration URL when I click on registration but it redirects back to the home page because nothing happens. I also see it trying to authenticate something with Google APIS (???)

It just doesn't do anything.

Link to comment
Share on other sites

My host is WebHost4Life running the same control panel shown in the dummies guide. They have a good PHP version and I have hosted PHP sites there before.

The error page is from the VA software itself and it simply says that "An error has been encountered. Please login first". And if I click on any of the URLs on the main page or even try to login from there I am just brought back to the home page without any error indication whatsoever.

I enabled DEBUG mode but the logs are still empty.

Link to comment
Share on other sites

To begin with, the (temporary) site is NOT a free host, it is paid. I deleted the previous installation and uploaded ALL files again, created a new database as well.

Now the whole install process went ok, only at the end of the install I received these warnings

Warning: imagettfbbox() [function.imagettfbbox]: Could not find/open font in \path\siteVA\core\common\PilotData.class.php on line 1041

Warning: imagettftext() [function.imagettftext]: Could not find/open font in path\siteVA\core\common\PilotData.class.php on line 1059

Your site is all setup! You can login to your site from the front-page, and then procede to the admin panel here

Also, don't forget to register at vaCentral, the best place for VA ranks and news. Join the virtual airline world, and pit your virtual airline against the many others.

Other than that all ok, checkinstall.php and checkdb.php report no problems. Unfortunately the outcome is just as my previous installation: A front page where one cannot do anything :-(

BTW, they are hosted in a regular (not free) webhost where I have hosted various PHP applications in the past. The php vms is hosted in a directory and there are NO .htaccess anywhere in the hierarchy.

Link to comment
Share on other sites

  • Administrators

Will it allow you to login now?

The error of "Could not find/open font in path" makes me think that the file got dropped or corrupted by the ftp client or it is a folder permission error.

Is this the beta version or the last stable version you are trying to install?

Link to comment
Share on other sites

I just installed the latest beta here - beta test and can't reproduce the error.

Do any other applications install cleanly and function? A forum or cms maybe?

I downloaded and performed a clean install twice of the latest version (2.1.934). I am still unable to login. During the first install (the first time I downloaded) I also got that font error, I wonder if perhaps the app. is trying to use a TTF that is not standard in the host (Windows 2003)? otherwise I don't know why it would complain about being unable to load a True Type Font. Also, it is a warning rather than an error.

I also set DEBUG to true in the local.config.php but I don't see any debug information being outputted. The host (webhost4life.com) has PHP v4.4. Like I said, in the past I have run forum software as well as PHP software written by myself and never experienced any unusual problem.

Link to comment
Share on other sites

Sorry I said error.

You must be running at least PHP 5.2 for phpVMS to function correctly.

Sorry, mistake on my part, my webhost account is running PHP 5.2.5 so that is allright too. And by the way, does every user gets access to /admin??? I was hoping it would ask me to create an administrator account first rather than a pilot account.

As an experiment I have modified the login() function of the Login class in the Modules/Login directory by introducing a hard error a statement like xxxx; which should have triggered some syntax error but nothing happened, it just came back happily to the same home page. I think it might be some of that AJAX or javascript stuff (???) I reuploaded the js directory but made no difference.

They webhost people can't find anything wrong with the PHP installation either.

Link to comment
Share on other sites

  • Administrators

The first account is creates is an admin account. Only admin users have access to the /admin area.

Are you installing the latest beta or the latest release version? The beta - I know there are a few issues.

How is PHP installed? As a CGI? In the phpvms_groupmembers table, does your user have an entry in there? How about cookies? PM me a link to your site, let me see what I can find

Link to comment
Share on other sites

I installed it on a free webhost and there seems to work fine (except for a message with registration form). I am configuring that one and then will export to the other site.

My webhost provider (the paid one) has moved my PHP application to some other configuration and now it appears to work. There is however a problem with the registration form (script error) that says:

Invalid argument supplied for foreach() in \\myhost\home\users\web\b2326\whl.meofcourse\core\templates\registration_mainform.tpl on line 45

I see the same error appearing on the alternate install (free host).

Link to comment
Share on other sites

This error that appeared in both installs in two separate hosting platforms is due to the fact that when I go and view the only airport (KJFK) and pop up the edit window it does NOT have the HUB checkmark checked.

The code that renders the registration page should check whether there are any hubs defined and do something about it rather than letting the form "crash". Better yet, since hubs are needed the checkdb.php script (or checkinstall.php) should check that there is at least one hub defined. If by default it is actually marked as hub then that would indicate that there is a bug somewhere else.

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...