Re: Changes to php code not being reflected in results.

Jeffry E Killen <[email protected]> Sun, 12 Jan 2025 15:05:10 -0800
Newsgroups gmane.comp.php.general
Message-ID <[email protected]>
There are other pieces of info that may make a difference: the php version used by MAMP, here, is 8.2.20
it is running Apache. Port is set to 80 (I turned off the resident apache). PHP cache is set to OPcache

> On Jan 12, 2025, at 2:55 PM, Jeffry E Killen <[email protected]> wrote:
> 
> Hello;
> 
> I am using MAMP on MacOS Sequoia and am working on a project on
> localhost that writes to files from user input.
> 
> This is intended for private use without any outside input.
> 
> But I am trying to make revisions to code to correct issues that are cropping up:
> 
> Here are the complaints:
> 
> <b>Warning</b>:  Undefined array key "NE-date" in <b>/Applications/MAMP/htdocs/newJournal/php/journalProc.php</b> on line <b>131</b><br />
> <br />
> <b>Deprecated</b>:  explode(): Passing null to parameter #2 ($string) of type string is deprecated in <b>/Applications/MAMP/htdocs/newJournal/php/journalProc.php</b> on line <b>131</b><br />
> <br />
> <b>Warning</b>:  Undefined array key 1 in <b>/Applications/MAMP/htdocs/newJournal/php/journalProc.php</b> on line <b>133</b><br />
> <br />
> <b>Warning</b>:  Undefined array key "" in <b>/Applications/MAMP/htdocs/newJournal/php/journalProc.php</b> on line <b>133</b><br />
> <br />
> <b>Warning</b>:  Undefined array key "started" in <b>/Applications/MAMP/htdocs/newJournal/php/journalProc.php</b> on line <b>54</b><br />
> <br />
> <b>Warning</b>:  Trying to access array offset on value of type null in <b>/Applications/MAMP/htdocs/newJournal/index.php</b> on line <b>43</b><br />
> 
> You will see in the first line of the warnings: NE-date. I have changed that to NE_date. But several tries have produced the same result.
> Is there some php cache that is not being cleared?
> I have a basic setup with Fetch as the FTP client and BBEdit as my text editor. I use an FTP client on local host because I want copies of placed
> files and not the files themselves and Mac leaves finder related files in directories it is used to read. With and
> FTP client that does not happen.
> Here is a snip of the code that is generating the first 4 warnings
> file_put_contents('test.txt', 'This date submission: '.$_a['NE_date']); // line 131
> $_parts = explode(' ', $_a['NE_date']);             // line 131
> $_dirName = self::$_archDir.'/journal_'.$_parts[0]; // line 133
> $_fileName = $_dirName.'/mon_'.self::$_monTranslater[$_parts[1]].'.js'; // 133
> This is async submission
> 
> Thank you for time and attention
> JK