php 7.4 errors

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
idnrscom
New php-forum User
New php-forum User
Posts: 2
Joined: Sun Mar 28, 2021 4:42 am

Sun Mar 28, 2021 4:54 am

Hello,
My URL is https://www.5starastrology.com/contact.php
I am running 'Simple PHP Form Mailer' script made in 2006 by a Srilankan.
My Host updated to PHP 7.4 and since I amgetting following error: 'Sorry, Image Validation Failed !'
--------
[28-Mar-2021 07:50:04 America/Chicago] PHP Warning: Use of undefined constant img - assumed 'img' (this will throw an Error in a future version of PHP) in /home2/arunpjcr/public_html/5starastrology.com/img_include.php on line 43
[28-Mar-2021 07:50:04 America/Chicago] PHP Warning: session_start() expects parameter 1 to be array, string given in /home2/arunpjcr/public_html/5starastrology.com/img_include.php on line 43
[28-Mar-2021 07:50:04 America/Chicago] PHP Warning: Use of undefined constant img - assumed 'img' (this will throw an Error in a future version of PHP) in /home2/arunpjcr/public_html/5starastrology.com/img_include.php on line 55
[28-Mar-2021 07:50:04 America/Chicago] PHP Warning: session_start() expects parameter 1 to be array, string given in /home2/arunpjcr/public_html/5starastrology.com/img_include.php on line 55
[28-Mar-2021 07:50:18 America/Chicago] PHP Warning: A non-numeric value encountered in /home2/arunpjcr/public_html/5starastrology.com/config.php on line 39
[28-Mar-2021 07:50:18 America/Chicago] PHP Warning: A non-numeric value encountered in /home2/arunpjcr/public_html/5starastrology.com/config.php on line 39
[28-Mar-2021 07:50:18 America/Chicago] PHP Warning: Use of undefined constant img - assumed 'img' (this will throw an Error in a future version of PHP) in /home2/arunpjcr/public_html/5starastrology.com/webmail.php on line 7
[28-Mar-2021 07:50:18 America/Chicago] PHP Warning: session_start() expects parameter 1 to be array, string given in /home2/arunpjcr/public_html/5starastrology.com/webmail.php on line 7
--------

This is config.php line 39:
$sec_local = md5($_SERVER['SERVER_SIGNATURE'] + $_SERVER['HTTP_USER_AGENT']);

This is webmail.php line 7:
session_start(img);

This is img_include.php line 43 to 57:
session_start(img);

if ($_SESSION['sec_code'] == "NO") {

# Remove the session is there was an error
session_destroy();
# Reload the form if there was an error to make sure the image validation works rirght
echo "<meta http-equiv='refresh' content='0'>";
die("Reloading Form....");
}
else {

session_start(img);
$sec_code = md5($key);
$_SESSION['sec_code'] = $sec_code;

Please help me to fix the issue.
Thanks and best regards,
Arun
User avatar
Strider64
php-forum GURU
php-forum GURU
Posts: 419
Joined: Sat Mar 23, 2013 8:24 am
Location: Livonia, MI
Contact:

Sun Mar 28, 2021 1:20 pm

My advice where ever you found that script throw it in file 13 as that is so obsolete that you would be writing or finding a more up-to-date script. Just my opinion.
Life is a fig newton of your imagination! https://www.phototechguru.com/
simonbrahan
php-forum Fan User
php-forum Fan User
Posts: 137
Joined: Mon Jun 08, 2020 2:00 am
Contact:

Sun Mar 28, 2021 11:54 pm

I'll fix it for £50.
idnrscom
New php-forum User
New php-forum User
Posts: 2
Joined: Sun Mar 28, 2021 4:42 am

Mon Mar 29, 2021 5:28 pm

Strider64 wrote:
Sun Mar 28, 2021 1:20 pm
My advice where ever you found that script throw it in file 13 as that is so obsolete that you would be writing or finding a more up-to-date script. Just my opinion.
Could you please suggest a better free script?
Post Reply