The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Undefined variable warning
tudsy
post Nov 29 2024, 12:48 AM
Post #1


Serious Coder
*****

Group: Members
Posts: 252
Joined: 30-September 14
Member No.: 21,611



Hi

I am getting this undefined variable warning in my error.log file.

The flow is as follows:

yourart.txt ->jquery -> watermark.txt

The error may come from watermark.txt (?).

Any help would be appreciated.


Attached File(s)
Attached File  watermark.txt ( 1.06k ) Number of downloads: 6
Attached File  yourart.txt ( 16.73k ) Number of downloads: 7
Attached File  error_log.txt ( 1.05k ) Number of downloads: 4
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Nov 29 2024, 02:08 PM
Post #2


Jocular coder
********

Group: Members
Posts: 2,480
Joined: 31-August 06
Member No.: 43



QUOTE(tudsy @ Nov 29 2024, 02:48 PM) *

Hi

I am getting this undefined variable warning in my error.log file.

The flow is as follows:

yourart.txt ->jquery -> watermark.txt

The error may come from watermark.txt (?).

Any help would be appreciated.


Well, as always, you have to debug your program. PHP gives these errors:

CODE
[29-Nov-2024 05:27:55 UTC] PHP Warning:  Undefined variable $file in /home/ecovibdc/public_html/workfromhome/yourart/watermark.php on line 24
[29-Nov-2024 05:27:55 UTC] PHP Warning:  Undefined variable $person in /home/ecovibdc/public_html/workfromhome/yourart/watermark.php on line 30
[29-Nov-2024 05:27:55 UTC] PHP Warning:  Undefined variable $file in /home/ecovibdc/public_html/workfromhome/yourart/watermark.php on line 30


So if you look at the watermark.php file, you should see these variables, and now you know they are undefined. So you look for where you thought you defined them, and if it isn't there, you define them as whatever you meant them to be. Or if they are GET arguments for example, you work out why they are not being passed to the program.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 4th December 2024 - 05:38 AM