I've a website running a php script that displays a random photo.
On my live site everything works fine, but locally I get an error message. These are shown in the attached JPGs. A similar issue happens to the social icons on the left.
Since the sites are identical, I assume this is a problem with my local server configuration.
Can anyone help me fix this?
Any help will be appreciated.
That's a PHP error.
Looks to me that you may be using the wrong datatype. max/min work with arrays or with two separate arguments, but these have been provided with a single scalar argument. If you have 2x arguments, one low and one high, you provide both for your rand:
No, the problem is your PHP versions.
The document doesn't state a change, but its clearly there. 5.2x for sure accepts the arguments in either order. By 5.3.10 it tosses the above error if you have the maximum value before the minimum value. So your arguments are backwards.