How can I populate a Form field and hide it?

In the ops case that is going to be on the hosting company. It is the hosting companies responsibility to protect servers/hardware not the customers.

Thanks for the replies.

So, if I changed all the mysql related code, for example, code like this:

$sql1 = "SELECT * FROM member_profile WHERE user_id = $id";
$query1 = mysql_query($sql1) or DIE(mysql_error());
$result = mysql_fetch_array($query1);
$query = mysql_query($sql) or DIE(mysql_error());
$channel 		= mysql_real_escape_string($channel);
$id_sql		= "SELECT channel_id FROM channels WHERE channel_name_seo = '$channel' LIMIT 1";
 $id_query 		= @mysql_query($id_sql);
 $row 			= mysql_fetch_array($id_query);

in the installed php script, and replaced it with the proper PDO code, and then my web host replaced the PHP5+ with PHP7, the mySQL db names or tables wouldn’t need to change? and in theory the script should work and be more secure?

The databases and tables will remain the same. Just the way your scripts will cimmunicate with them will change.

And the host acting upon that responsibility would involve upgrading the PHP version. Which would require updating of the script.

Since this is diverging from the original topic, I’ve moved the last 10 posts to a new topic: What are the advantages/disadvantages for hosts to migrate to PHP 7

So, obviously I’m using this old PHP script for a you-tube clone web site.
If you know of a you tube clone script, or equivalent, with a more up-to-date code and works with PHP7, I’d be interested in any suggestions.I’ve only found a couple with 5.6 and lower

Why don’t you just modify the existing script to work with php 7. Most features of 7 are backward compatible with 5.x. Just set-up a local environment with 7 and fix as you come across broken features. You could also use this as an opportunity to define and automate test cases.

1 Like

It’s PHP 5.3 with what seems like it would be a huge task, I’m guessing at least 100 files.
Does that seem like a lot?

Not really.

It’s unlikely to be cake walk but if you have the time available than it is something that is worth exploring. You could also use this as an opportunity to migrate to a newer, modern platform compatible with 7.

I would have to hire someone, which seems like it could be pricey. I’d be interested in how much someone might guess what that might cost?

oh… I thought you were doing the work yourself.

If you have a stable website, running on a 5.x server I don’t think there is any reason to rush migrating to 7.

With that said, there are really two major extremes. One extreme is the transition is seamless (unlikely). The other is that the entire site blows up and costs to modify the existing script outweigh that of just completely redeveloping the site.

The first step though would be to audit of the website on 7 to figure out what breaks. Without any type of automated test cases the process is pretty much just manual QA of all the pages/features.

Well, I can do some coding, but that seems like too big of a task for me.

You can’t know that until you try it. You could always pick one of the smaller scripts, work through it methodically until it’s fully 7-compliant, then review how much work it was and how long it took you, remembering that the first time will involve more research and you’ll get quicker as you go on.

It would just be a guess. You’re only guessing how many files there are, but we’ve no idea of whether that’s an accurate number or not, and it doesn’t really matter - what matters is how many lines of code need to be reviewed, and how badly-written (or highly optimised, either can make it harder to read) the code is.

Where has the script come from? Do they have an updated version, and if you’re hoping to use it as part of a site that you might make income from, are there any restrictions on it?

Thanks for your reply. Someone else looking at the code said this:

"I have looked at this code more thoroughly, the DB connection, using the mysql extension, is apparently being made in the encrypted logic, so, this code will fail with a runtime error on any system that doesn’t have the mysql extension present. The encrypted code is also querying the general settings db table and is where the built-in pagination() function is at, which is also running a query. Until the author updates it to use any other database extension, this won’t change, no matter what you do to the code.

What’s really sad about this, someone updated the code to php5.3 level, but didn’t bother to update the database extension. There is a database abstraction class being used in the setup code, that if all the code used, changing the database extension would have been simple, just update the extension the class is using". So, based on that, I’m not sure if there is any way to upgrade this. Any feedback will be appreciated.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.