Migration Discussion

@wolfywolfy You are trying to us deprecated mysql function.
so downgrade your php version to 5.4 from “settings” – “general” – “php version”.

Thanks for your reply. I tried it but now it gives me this error :

Warning: mysql_connect(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /storage/h14/765/1508765/public_html/storescripts/connect_to_mysql.php on line 19
could not connect to mysql

@wolfywolfy Host is “localhost” .
Double check that you used correct database details.
You can find database related details in “Manage database”.

Weeks ago I began the migration process, but I stopped after the “Move website” step since some of the instructions seemed unclear and some people were having a lot of problems. Today I resumed the migration process because the email I received weeks ago said May 1st is the deadline for migrating. I accomplished some of the steps: registered my free subdomain, uploaded my backed-up files, and set the PHP version to 5.4 (due a function that doesn’t work with PHP version 7). When I tried to launch the site, I got an error message that said the site was missing an index file. The old site used ‘default.php’ as its entry point, so I renamed it ‘index.php’. Now when I launch the site it tries to load the index.php file, but it fails to execute properly. PHP code is supposed to be enclosed within the pair of tags ‘<?' (begin php code) and '?>’ (end php code), but seems to be treating the first greater-than symbol (’>’) after the ‘<?' tag as if were a '?>’ tag instead of a ‘>’ operator. (Thus the php code that follows the ‘>’ is processed as if it were html markup.) How do I get the new site to allow the greater-than operator to be used in php code?

My website is extremely simple. It just has the single .php file. No database.

One more question: The content of the .htaccess file created by the migration isn’t the same as the old .htaccess file. Should I use the old file or the new? Should I copy any of the lines from the old file to the new?

25 posts were merged into an existing topic: Migration Discussion

Seems you’re using php short tags (<? ?>)
You need to follow this tutorial in order to use php short tags.

Or you can use universal type tag to avoid the issue you faced.

Yes you can if it is required.

I don’t know if any lines from the old .htaccess file are required, since I didn’t create either the old or the new .htaccess files and I don’t know what they do.

I replaced the short ‘<?’ tag with the long ‘<?php’ tag and that helps it get further. (Thanks.)

Now it displays an “undefined variable” error message inside a data entry textbox: “Notice: Undefined variable: BallotsTable in /storage/h12/537/1509537/public_html/index.php on line 1028”

Line 1028 actually contains $BallotsTable, not BallotsTable. Here are lines 1025 through 1029:
$action = $_SERVER[“SCRIPT_NAME”];
echo “^FORM ACTION=”{$action}" METHOD=POST>\n";
echo “^TEXTAREA NAME=“BallotsTable” COLS=70 ROWS=10>\n”;
echo $BallotsTable;
echo “^/TEXTAREA>^BR>\n”;

(EDIT: The ‘^’ characters in the above code actually represent ‘<’ characters. This forum mangled the display of the code when I used the actual ‘<’ characters.)

Are there php configuration settings from my old site that need to be restored? I don’t see any in the files I backed up (which were the files in the public_html directory).

Hello? Can yo answer my problem and not ignore me? Why can’t I log in to the old pannel, the suggested link doesnt work: https://www.000webhost.com/cpanel-login?to=old this only redirects me to the new panel, when I log in there it’s completely empty.

@GeoffreyS Can you downgrade your php version to 5.4 or which ever suitable
See if this helps.

or

Double check those lines once.[quote=“GeoffreyS, post:251, topic:56245”]
I don’t know if any lines from the old .htaccess file are required, since I didn’t create either the old or the new .htaccess files and I don’t know what they do.
[/quote]
If you have not created ,any then don’t copy any.

@cascy can you PM me your issue?? It’s bit messy here.

Thanks for the reply. So today I noticed that if I want my website to be on I need to migrate. When I tried to log in, it was like a new registration, I received an email that I have to verify my account - that should not happen when I already had an account under this email.
Anyway, I logged in, verified my email and the account really is like new…there is nothing about my website which was running until yesterday (www.tourdelife. eu). The account is completely empty, like new one. So I can’t do the migration process - I don’t see and can’t access any data.

I’m not sure what you’re suggesting I do when you say “double check those lines once” since the code worked okay in the old website. (With < characters, not the ^ characters I replaced them with above, of course.) What in particular should I look for when I check those lines?

When I test the website further by typing some data into that textbox (after deleting the error message from the textbox) and click the “post” button, the resulting webpage displays a lot of errors.

Was there a php.ini file (or some other configuration file) somewhere in the old website, that didn’t get backed up because it wasn’t in my public_html directory? If so, where can I find a copy of the old php.ini file?

I had already set PHP to version 5.4 (since my code uses a function that’s not available in PHP 7).

I discovered the cause of my new site’s “Notice: Undefined …” problems. The solution was to turn off “Show Errors” in the Website Settings. Thanks akhilkumar for the time you spent working with me on this.

1 Like

@cascy As far as i see you account is auto migrated.
And the data should migrate too, which in your case has not happened.

I’ve forwarded your issue to the admin.
I’ll reply you once admin reply’s .

1 Like

@GeoffreyS Just make sure your website is working fine and is not interrupted by those hidden undefined error’s.

If you logged into the new panel and it asked for confirm email this is normal, confirm your email and you are sorted.

Time to upload the data you backed up - use the File Manager to upload your site, “Manage Databases” to make a new database, import your old data.

Now use “Set Web Address” to use any old domain you used to use.

What errors appear when you turn on show errors though?

Hiding from errors I wouldn’t recommend but feel free to.

thank you @akhilkumar332 for your answer, but I cannot understand what you mean by ‘as per the admin’
:-O. You said: “Yes, Because as per the admin there’s no use of “www” for free subdomains” But what I do understand is that www is gone from the website-name. So I have to update my links and papers :slight_smile: Thanks for helping. also thanks @Infinity. Migration went, after all, well for me :sweat: (On your advice I already took a free domain at freenom for parking, but still no www like my old name www.wiskunde1en2adek@net63.net). Below the old panel:

With freenom when setup correctly with nameservers you should get both www and non www

1 Like

Thank you @Infinity. I dared not try this because I thought de www will be applied to newname.000webhostapp.com and not to my old websitename www.wiskunde1en2adek.net63.net which is set to point to newname.000webhostapp.com. Is this thinking correct, thus of no use for me ? :sweat: