Slow Website Loading TImes With 7.0.2 PHP

#1

Hello guys. I’m using IIS with FastCGI to host multiple domains. I had PHP version 5.3.28 and my website would load in 2-3 sec on average. When i switched to latest PHP version, my site dramatically decreased in loading times. It takes about 10-20 sec to load. Does anyone know where to dig? or is it just website was poorly made. Thanks.

#2

You switched from 5.3 to what? 7 to my knowledge is not supported on windows, yet. So, it isn’t likely to be the version.

#3

I got the latest version of php 7.0.2 The thing is that my forum works fine with that version of php, slow times i experience only on my other website using the same version which is 7.0.2

#4

Big PHP updates come with a lot of side effects (configuration changes, new extensions etc.), so this doesn’t necessarily have anything to do with PHP 7 itself.

Either way, you’ll have to figure out where exactly all the time is spent. You should first measure the actual execution time of the PHP script to rule out webserver issues, network problems and whatnot. If you can confirm that it’s a PHP issue, use a profiler to get detailed information about the individual parts of the script. 10–20 seconds are a lot, so it should be fairly easy to spot the problematic functions.

#5

Also, moving form 5.3 to 7.0.2 may require changes in your code. Did you review the differences between the
two versions to see if any of your code in now invalid? Here is PHP.net’s migration info on your upgrade. You
should check out the differences.
http://php.net/manual/en/migration70.php

#6

Well, the problem is that i actually bought it. Its a donation module made for Garry’s mod called prometheus. Upon creating a support ticket and describing my problem, the author said php version has nothing to do with loading times, and it probably has something to do with my mysql connection. My mysql server is located on the same local network as my web servers, and my forum works just fine with latest PHP version. I only struggle with that donation module.

#7

Honestly sounds like a bs response. Your queries may need an overhaul, but I doubt it is the actual connection.

#8

Well, most likely it is not so much PHP 7 as some odd code that is deprecated. If you are monitoring several
other sites, perhaps you should strip out all but one of them at a time and see if it is just one site loading badly.

And, look down the lists of differences between your versions of PHP to see if you use any of those old ones.

Normally, you do not upgrade to a new PHP version until you have tested your site on a test server first. I will
assume you did not do that.

#9

The problem is that i do not know anything about php coding itself. So there is no way i could possibly find an appropriate solution. As i mentioned above, the module was bought. I also assume it has something to do with actual written code and major changes to the latest php version. Upon contacting a developer he said it has nothing to do with php version and it has to be something wrong on my end. But as i mentioned above, my forum works perfectly fine with latest php version. Anyway, if i will continue to use php version 5.5.31 , would it be safe? im just afraid there might be certain vulnerabilities that could lead to catastrophic results. Thanks.

#10

Well, most likely it is a plugin or addon that is slowing down your site. Again, you would need to know what
is installed on your site and reinstall those items. You mentioned CGI. Do you have the latest version of that
installed? Also, have you run the phpinfo() functions on both the 5.5 and 7.0 sites and compared them?
My guess is that there is some small item that has been changed.

Well, in my opinion, PHP5.5 is just fine for a couple more years. Once they finish up with the latest PHP7.0
versions and it becomes the new standard, then, you should look into updating. I am not very familiar as yet
with 7.0, but, it appears to be faster and streamlined and I can not wait to get it onto my server. But, most
likely that will be later this year after it has been out for awhile.