Resolved CPanel Access Issue

Status
Not open for further replies.

gsdirect

New Member
Messages
9
Reaction score
0
Points
1
Receive the following message upon attempting to launch CPanel:

Error: Sign in Successful
Please standby while transfer you to your web hosting account.
An error has occurred forwarding your sign in. Retry

FYI the account and the [prototype] website has not been accessed for a long time, possibly more than three years, and I understand a major migration from CPanel has occurred.

My [original] account information:

Your Website: http://gsdirect.x10host.com
Username: gsdirect
Server Name: xo7
Web Hosting Package: x10Hosting Free Account

I do have what I believe to be a complete copy of the website files that were on the server but it would be ideal to access those files first on the x10hosting server to compare.

If necessary I could open a new account and upload what I have but seeing that the account is still active I hope full access to the content can be granted/restored.

Thanks very much for your assistance.
 

Anna

I am just me
Staff member
Messages
11,768
Reaction score
590
Points
113
Between November 29th and May 7th you did not login to the account once, this lead it to be marked as inactive and purged in early March. The automated suspension system is halted during our maintenance, the login requirement (once every 30 days) has always been there however, so in end of December the account would have been eligible for a suspension, and then 21 days later, second half of January it would have been terminated by the automated system.

Due to this being halted we did run a manual purge in early March (it was started the 4th) and since your account did not have any logins the the 60 days prior to the purge it was terminated as inactive.

Due to there being no warning emails as those are part of the automated, currently halted, system we said we'd this time allow for a restore if requested within reasonable time.

Initially we said cutoff for restores would be one week, meaning in reality we should not restore anyone past Sunday 15th, though we extended it a little bit extra, but it was said that the last cutoff date would be on Sunday March 22nd.

You're lucky though that the restore is still possible for your account.
I'm running the restore now and the account should be good to go in a few minutes.
 

gsdirect

New Member
Messages
9
Reaction score
0
Points
1
Between November 29th and May 7th you did not login to the account once, this lead it to be marked as inactive and purged in early March. The automated suspension system is halted during our maintenance, the login requirement (once every 30 days) has always been there however, so in end of December the account would have been eligible for a suspension, and then 21 days later, second half of January it would have been terminated by the automated system.

Due to this being halted we did run a manual purge in early March (it was started the 4th) and since your account did not have any logins the the 60 days prior to the purge it was terminated as inactive.

Due to there being no warning emails as those are part of the automated, currently halted, system we said we'd this time allow for a restore if requested within reasonable time.

Initially we said cutoff for restores would be one week, meaning in reality we should not restore anyone past Sunday 15th, though we extended it a little bit extra, but it was said that the last cutoff date would be on Sunday March 22nd.

You're lucky though that the restore is still possible for your account.
I'm running the restore now and the account should be good to go in a few minutes.

***

Thank you so much Anna for your assistance ... CPanel access, now DirectAdmin, access is now working and all the prior website contents are intact.

There is an additional issue and didn't know if it should be posted in-reply or as a new issue, separately.

The issue appears to be access to MySQL (running on localhost), although no connection error message is received. In any case none of the MySQL results and accompanying html is being rendered via the primary PHP script that is the basis for the Home Page of the site. I am running the exact same stack of XAMMP for Apache and MySQL services that I had previously been running without issue. I have also verified the index file (RIndexHome.php) is unchanged as located in / domains/ gsdirect.x10host.com / public_html/ RIndexHome.php).
https://x11.x10hosting.com:2222/use...direct.x10host.com/public_html/RIndexHome.php
Following is a screenshot of XAMMP:

upload_2020-5-8_21-54-43.png

MySQL is running and access to the prototype instance is working as well:

upload_2020-5-8_21-55-21.png


Are there additional post-migration tasks that I need to complete to get back full function ? Apologies for anything obvious that I'm overlooking and hopefully these issues are a matter of perhaps re-installing some component or updating server information is some way.

Thanks again in advance for your help.
 

Anna

I am just me
Staff member
Messages
11,768
Reaction score
590
Points
113
The script appears to not be configured for localhost, although one would think using the domain as host would be the same, it may relate to how localhost is connected compared to how a connection to an actual url would be done. The former would bypass firewall but the later would likely connect as if it came from the outside and go through firewall, and with mySQL port being blocked from external access the connection fails.

You would need to make the host: localhost
 

waptekx3

New Member
Messages
2
Reaction score
0
Points
1
THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU

THANK YOU
 

gsdirect

New Member
Messages
9
Reaction score
0
Points
1
The script appears to not be configured for localhost, although one would think using the domain as host would be the same, it may relate to how localhost is connected compared to how a connection to an actual url would be done. The former would bypass firewall but the later would likely connect as if it came from the outside and go through firewall, and with mySQL port being blocked from external access the connection fails.

You would need to make the host: localhost

***

Thank you again Anna for your help -- I've not yet been able to resolve the issue ...

Given my very limited network/server knowledge I believe I understand the point you make regarding firewall access ... I also reviewed many other posts noting x10hosting does not support remote [database] access. Not sure when that changed but apparently AFTER I last used the current configuration which worked at the time. I attempted to make the host: localhost as follows:

Verified database gsdirect_100 is hosted on x10hosting

Script: RIndexHome.php

If I understood your response correctly, I changed all the database connection portions of the this script FROM:

<?php // Establish user and connection //
$host="gsdirect.x10host.com";
$uname="gsdirect_Admin";
$pass="**********";
$connection= mysqli_connect ($host, $uname, $pass);
...

TO:

<?php // Establish user and connection //
$host="localhost";
$uname="gsdirect_Admin";
$pass="**********";
$connection= mysqli_connect ($host, $uname, $pass);
...

and TO:

<?php // Establish user and connection //
$host="localhost";
$uname="root"; (NOTE: gsdirect_100 user is "root" on localhost)
$pass="**********";
$connection= mysqli_connect ($host, $uname, $pass);
...

Neither of the above attempts worked.

Are there additional changes that are needed with the hostname, database or server configurations ?

Thanks again for assistance.
 

garrettroyce

Community Support
Community Support
Messages
5,609
Reaction score
252
Points
63
Root will not work. You'll need to create a database in DirectAdmin and that will also lead you through creating a user.

DirectAdmin
-> Account Manager
-> MySQL
 

gsdirect

New Member
Messages
9
Reaction score
0
Points
1
Root will not work. You'll need to create a database in DirectAdmin and that will also lead you through creating a user.

DirectAdmin
-> Account Manager
-> MySQL

***

Thank you Garrett for reviewing.

I am not sure I understand the directions however. Currently there is a database and user hosted on x10hosting, named gsdirect_100 and gsdirect_Admin, respectively. I have verified that all the prior tables and data are intact, now at 25.22 MB. I can view and query the database structure on x10hosting as well using phpMyAdmin. Does some connection or identifying information need to be changed in order for the script to work using this database ?

I can certainly create another database and user using DirectAdmin but I do not understand why this would be required. If that is the case, can I then import all the database objects (tables, data, etc.) into the new database from gsdirect_100 ?

Thanks in advance for your help.
 

Anna

I am just me
Staff member
Messages
11,768
Reaction score
590
Points
113
You would need to use the gsdirect_Admin for access on all instances you want to access that same database.

Your user may be seen as "root" of your account, but it is definitely not a valid username for your account.

As you have it right now, I don't see an error on that site relating to the database connection.
 

gsdirect

New Member
Messages
9
Reaction score
0
Points
1
You would need to use the gsdirect_Admin for access on all instances you want to access that same database.

Your user may be seen as "root" of your account, but it is definitely not a valid username for your account.

As you have it right now, I don't see an error on that site relating to the database connection.

***

Thank so much for your assistance Anna ... after much more review all the preceding issues were caused by a sequencing issue from a newer set of development scripts that were not moved from the local environment to x10hosting. Some of the thread responses MAY apply to the new scripts being used, however, there is an immediate issue that appears much simplier.

In the primary script, index.php, the current set of paths is not rendering the objects referenced. There is (1) .css file and (4) .png files that should be rendered but are not.

Using the full path for (1) .png, singleglass.png, the image opens in a separate tab without issue but not using the script.

Full Path:
You would need to use the gsdirect_Admin for access on all instances you want to access that same database.

Your user may be seen as "root" of your account, but it is definitely not a valid username for your account.

As you have it right now, I don't see an error on that site relating to the database connection.

***

Thanks so much for your assistance Anna ... after much more review all the preceding issues were caused by a sequencing issue from a newer set of development scripts that were not moved from the local environment to x10hosting. Some of the thread responses MAY apply to the new scripts being used, however, there is an immediate issue that appears more basic.

In the primary script, index.php, the current set of paths is not rendering the objects referenced. There is (1) .css file and (4) .png files that should be rendered but are not.

Using the full path for (1) .png, singleglass.png, the image opens in a separate tab without issue but not using the script.

Full Path: https://x11.x10hosting.com:2222/CMD...irect.x10host.com/public_html/singleglass.png

Note: initially the image rendered but currently the site can't be reached "x11.x10hosting.com took too long to respond" (don't know if this a separate, server access issue at this time or related to the issue identified).

The following paths failed as well:

https://x11.x10hosting.com:2222/domains/gsdirect.x10host.com/public_html/singleglass.png
https://x11.x10hosting.com:2222/gsdirect.x10host.com/public_html/singleglass.png
https://gsdirect.x10host.com/public_html/singleglass.png

Assuming this is NOT a server access issue, could you identify the correct path that should be used ?

Thanks in advance -
 

gsdirect

New Member
Messages
9
Reaction score
0
Points
1
Thank you Anna ... the path you provided works, all paths have been updated and the script runs without issue.

However, the user login script (userloginbeta.php) is not successfully connecting to the server. Following is the related portion of the script:

<?php

$host="gsdirect.x10host.com";
$uname="gsdirect_Admin";
$pass="**********";
$connection= mysqli_connect ($host, $uname, $pass);
if (! $connection) {
die ("A connection to the Server could not be established!");
} else {
echo "";
}

Can you verify the $host and $uname ?

Thank you.
 

garrettroyce

Community Support
Community Support
Messages
5,609
Reaction score
252
Points
63
Try with the host "localhost". It's a minor difference, but it could be a firewall setting or a routing problem where gsdirect.x10host.com != localhost, and it's being blocked.

Check your user here:

DirectAdmin
-> Account Manager
-> SQL
-> [Click your database]
-> Users
-> [Might as well check the privileges and give them everything, because most software needs it]

Screenshot_20200513_210112.png
 

gsdirect

New Member
Messages
9
Reaction score
0
Points
1
Thank you Garrett for reviewing ...

I have changed the script userloginbeta.php to:

<?php

$host="localhost";
$uname="gsdirect_Admin";
$pass="**********";

Upon running script index.php which then invokes userloginbeta.php the server connection error has apparently been resolved but then the script it redirects to:

http://gsdirect.x10host.com/home.php

Not sure why as the next script that should run, assuming user login is correct, is loginsuccessbeta.php. Any insights appreciated.

Separately, I did review/verify the domain/database/user information - thanks.
 

Anna

I am just me
Staff member
Messages
11,768
Reaction score
590
Points
113
Without seeing the code, there's likely no one that can tell why it doesn't redirect as you expect. Is this something that worked before, or is it new code? Scripting issues is typically not something that our support handles other then if we changed something that made it break, we can usually help with basic troubleshooting though.

I know some php, but I'm by no means a coder.
 

gsdirect

New Member
Messages
9
Reaction score
0
Points
1
Without seeing the code, there's likely no one that can tell why it doesn't redirect as you expect. Is this something that worked before, or is it new code? Scripting issues is typically not something that our support handles other then if we changed something that made it break, we can usually help with basic troubleshooting though.

I know some php, but I'm by no means a coder.

***

Thanks again Anna.

Significant progress on resolving issues with first three scripts, including the login scripts mentioned -- all of which were related to references and paths of files post-migration. To be sure, all of the scripts deployed to x10hosting were extensively-tested and were working without issue prior to the migration so unfortunately it's just going to be a full round of post-migration debugging to get back to square one. I'll certainly try not to put-forth any issues that end-up being code-related, I understand that's not in support scope, and appreciate all efforts.

That in mind, encountering an issue with the fourth script, RIndexHome.php, an HTTP Error 500:

upload_2020-5-15_18-48-44.png

Each piece of the script has been testing successfully individually and runs correctly, including all HTML rendered, the .jpg file paths and (3) SQL queries against the local gsdirect_100 database that return the correct results when run in phpMyAdmin. But, when the SQL is run in-line, in the php script, the HTTP ERROR 500 occurs. It certainly appears the issue is not code-related. There must be some difference post-migration with how the script is connecting to MySQL. The connection information in script used for all (3) queries is:

<?php // Establish user and connection //
$host="gsdirect.x10host.com";
$uname="gsdirect_Admin";
$pass="**********";
$connection= mysqli_connect ($host, $uname, $pass);
if (! $connection) {
die ("A connection to the Server could not be established!");
} else {
echo "";
}

$result=mysqli_select_db ($connection,"gsdirect_100");
if (! $result)
{
die ("database could not be selected");
}

Two questions: For database that has been created on x10hosting, in this case gsdirect_100, how does the owner find/change the password (which has not changed since the database and script were created) ? Does the database password change in relation to the x10hosting account password (which has changed recently) ?

Thanks again -
 

garrettroyce

Community Support
Community Support
Messages
5,609
Reaction score
252
Points
63
The password is independent. You can change it from the same place that I put in the picture a few posts ago.

Your host should be "localhost". It's a trivial difference, but it may be a problem.

Check your error log in DirectAdmin. It specifically says what the PHP error is.
 

Anna

I am just me
Staff member
Messages
11,768
Reaction score
590
Points
113
It has to be localhost, that means the connection is handled internally and not subject to any firewall rules.

Using the domain means it will be treated as a connection coming from the outside and is therefor subject to firewall rules, and since we do not allow connections to our database server from a third party location the firewall blocks the connection (the port is closed).

If you need a full internal path for a script it would be like: /home/USER/domains/DOMAIN/public_html/script.php

I would however suggest using relative paths as much as possible as that would not change with different environments.
 

gsdirect

New Member
Messages
9
Reaction score
0
Points
1
It has to be localhost, that means the connection is handled internally and not subject to any firewall rules.

Using the domain means it will be treated as a connection coming from the outside and is therefor subject to firewall rules, and since we do not allow connections to our database server from a third party location the firewall blocks the connection (the port is closed).

If you need a full internal path for a script it would be like: /home/USER/domains/DOMAIN/public_html/script.php

I would however suggest using relative paths as much as possible as that would not change with different environments.

***

Thanks so much Anna (and Garrett).

It appears the immediate access and connection issues have been resolved via a combination of localhost and internal paths as well as connection string testing.

Appreciate the assistance on this thread which may be closed.

Thank You
 

Anna

I am just me
Staff member
Messages
11,768
Reaction score
590
Points
113
Glad to hear you got it working.

Closing thread as requested.
 
Status
Not open for further replies.
Top