Page 1 of 2
PHP Upload errors
Posted: Thu 09 Mar 2023 4:51 pm
by forestedge
I have updated to 3.24.0 and made all the required changes as far as I can see to use the php upload method. My website server error log does not like part of the the secret code generated for line 15 so no uploads at the moment!
I have checked the code in line 15 matches the ini file and CMX internet settings.
Are there specific requirements for this code?
09-Mar-2023
09-Mar-2023 16:34:18 Europe/London] PHP Parse error: syntax error, unexpected 'cce031' (T_STRING) in /home/tottonwe/public_html/upload.php on line 15
[09-Mar-2023 16:34:18 Europe/London] PHP Parse error: syntax error, unexpected 'cce031' (T_STRING) in /home/tottonwe/public_html/upload.php on line 15
[09-Mar-2023 16:34:28 Europe/London] PHP Parse error: syntax error, unexpected 'cce031' (T_STRING) in /home/tottonwe/public_html/upload.php on line 15
[09-Mar-2023 16:34:28 Europe/London] PHP Parse error: syntax error, unexpected 'cce031' (T_STRING) in /home/tottonwe/public_html/upload.php on line 15
Re: PHP Upload errors
Posted: Thu 09 Mar 2023 5:23 pm
by HansR
As far as I could find you will need to check what is illegal in the string you chose.
Is this a self chosen string or the CMX generated string?
Re: PHP Upload errors
Posted: Thu 09 Mar 2023 5:25 pm
by HansR
You could try post the string here, provided that you enter a different string in CMX so that nobody else can upload.
That way we could all learn.
Edit: And Note that the quotes cannot be part of the string you use.
Re: PHP Upload errors
Posted: Thu 09 Mar 2023 5:49 pm
by forestedge
HansR wrote: ↑Thu 09 Mar 2023 5:23 pm
Is this a self chosen string or the CMX generated string?
I assumed it was CMX generated as a lot of dots filled the code box when I selected Option 3 php upload, however the Avast Security Key symbol appeared next to it offering to save it, which I refused.
Hopefully Mark can confirm the expected format and how to regenerate another code.
Re: PHP Upload errors
Posted: Thu 09 Mar 2023 5:53 pm
by forestedge
HansR wrote: ↑Thu 09 Mar 2023 5:25 pm
You could try post the string here, provided that you enter a different string in CMX so that nobody else can upload.
Edit: And Note that the quotes cannot be part of the string you use.
I think we need to know the format otherwise I could be completely stuck! No doubt other users will be trying this method as well.
Yes, quotes were removed.
Re: PHP Upload errors
Posted: Thu 09 Mar 2023 6:00 pm
by HansR
OK. Afaik it is just a string: letters, numbers, dash etc... no specifics.
If you click in the key field you see what the string is built of.
But OK, Probably Mark's topic.
Re: PHP Upload errors
Posted: Thu 09 Mar 2023 6:32 pm
by mcrossley
The auto generated codes are just GUIDs with the dashes removed. So the characters 0-9A-F
You must know what it is though as you copied it to upload.php file?
Re: PHP Upload errors
Posted: Thu 09 Mar 2023 6:54 pm
by HansR
mcrossley wrote: ↑Thu 09 Mar 2023 6:32 pm
The auto generated codes are just GUIDs with the dashes removed. So the characters 0-9A-F
You must know what it is though as you copied it to upload.php file?
There are dashes in my string @Mark
Re: PHP Upload errors
Posted: Thu 09 Mar 2023 7:24 pm
by forestedge
mcrossley wrote: ↑Thu 09 Mar 2023 6:32 pm
The auto generated codes are just GUIDs with the dashes removed. So the characters 0-9A-F
I removed the dashes that were there and stil no joy;
09-Mar-2023 19:20:17 Europe/London] PHP Parse error: syntax error, unexpected 'cce031349914d568d854882fe7bb75' (T_STRING) in /home/tottonwe/public_html/upload.php on line 15
[09-Mar-2023 19:20:39 Europe/London] PHP Parse error: syntax error, unexpected 'cce031349914d568d854882fe7bb75' (T_STRING) in /home/tottonwe/public_html/upload.php on line 15
[09-Mar-2023 19:20:39 Europe/London] PHP Parse error: syntax error, unexpected 'cce031349914d568d854882fe7bb75' (T_STRING) in /home/tottonwe/public_html/upload.php on line 15
[09-Mar-2023 19:20:40 Europe/London] PHP Parse error: syntax error, unexpected 'cce031349914d568d854882fe7bb75' (T_STRING) in /home/tottonwe/public_html/upload.php on line 15
[09-Mar-2023 19:20:49 Europe/London] PHP Parse error: syntax error, unexpected 'cce031349914d568d854882fe7bb75' (T_STRING) in /home/tottonwe/public_html/upload.php on line 15
Re: PHP Upload errors
Posted: Thu 09 Mar 2023 8:16 pm
by mcrossley
HansR wrote: ↑Thu 09 Mar 2023 6:54 pm
There are dashes in my string @Mark
Sorry, I did leave them in the end!
forestedge wrote: ↑Thu 09 Mar 2023 7:24 pm
I removed the dashes that were there and stil no joy;
[09-Mar-2023 19:20:17 Europe/London] PHP Parse error: syntax error, unexpected 'cce031349914d568d854882fe7bb75' (T_STRING) in /home/tottonwe/public_html/upload.php on line 15
Well line 15 is a simple assignment of a string to a variable...
Code: Select all
$secret = 'change_this_to_the_value_in_CMX';
The error reads like you have not enclosed the secret in quote marks?
Re: PHP Upload errors
Posted: Fri 10 Mar 2023 1:57 pm
by forestedge
The error reads like you have not enclosed the secret in quote marks?
That seemed to work with no more server errors thanks.
Ran CMX again and a lot of data errors in the attached mxdiags with nothing being updated yet.
Re: PHP Upload errors
Posted: Fri 10 Mar 2023 2:03 pm
by freddie
Some dayfile errors to be corrected:
Code: Select all
2023-03-09 22:44:00.108 LoadDayFile: Error at line 2550 of data\dayfile.txt : Error at record 4 = "12.00" - Input string was not in a correct format.
2023-03-09 22:44:00.108 Please edit the file to correct the error
2023-03-09 22:44:00.108 LoadDayFile: Error at line 2579 of data\dayfile.txt : Error at record 4 = "10.00" - Input string was not in a correct format.
2023-03-09 22:44:00.108 Please edit the file to correct the error
Your PHP key is different between MX and website. See the following from the logs:
Code: Select all
2023-03-09 22:44:14.846 PHP[0]: realtime.txt: Response code = 422: 422
2023-03-09 22:44:14.846 PHP[0]: realtime.txt: Response text follows:
Error: Invalid signature
Data Sig = <redacted>
Server Sig = <redacted>
Server sig data = 1678401854realtime.txt09/03/23 22:44:14 9.8 93 8.7 6 6 156 1.6 9.0 980.2
Re: PHP Upload errors
Posted: Fri 10 Mar 2023 2:25 pm
by forestedge
For some reason the upload file still had the dashes in! Now corrected and the realtime stuff is working.
However I use a php webtag file to update the site and that is not being processed now.
2023-03-10 14:17:05.382 PHP[8]: /wpnf/Cumulus/Cutags.php: Response code = 500: InternalServerError
2023-03-10 14:17:05.382 PHP[8]: /wpnf/Cumulus/Cutags.php: Response text follows:
Error: Cannot create the target file /wpnf/Cumulus/Cutags.php with this user
2023-03-10 14:17:10.164 SendLoopCommand: Starting - LOOP 50
2023-03-10 14:17:15.531 PHP[9]: /wpnf/Cumulus/Cutags.php: Response code = 500: InternalServerError
2023-03-10 14:17:15.531 PHP[9]: /wpnf/Cumulus/Cutags.php: Response text follows:
Error: Cannot create the target file /wpnf/Cumulus/Cutags.php with this user
Re: PHP Upload errors
Posted: Fri 10 Mar 2023 2:38 pm
by HansR
forestedge wrote: ↑Fri 10 Mar 2023 2:25 pm
For some reason the upload file still had the dashes in! Now corrected and the realtime stuff is working.
However I use a php webtag file to update the site and that is not being processed now.
2023-03-10 14:17:05.382 PHP[8]: /wpnf/Cumulus/Cutags.php: Response code = 500: InternalServerError
2023-03-10 14:17:05.382 PHP[8]: /wpnf/Cumulus/Cutags.php: Response text follows:
Error: Cannot create the target file /wpnf/Cumulus/Cutags.php with this user
2023-03-10 14:17:10.164 SendLoopCommand: Starting - LOOP 50
2023-03-10 14:17:15.531 PHP[9]: /wpnf/Cumulus/Cutags.php: Response code = 500: InternalServerError
2023-03-10 14:17:15.531 PHP[9]: /wpnf/Cumulus/Cutags.php: Response text follows:
Error: Cannot create the target file /wpnf/Cumulus/Cutags.php with this user
I presume that file is an Extra Webfile being processed. That means you will most likely have to adjust the destination of that file to where you want it relative to the location of upload.php.
Re: PHP Upload errors
Posted: Fri 10 Mar 2023 3:02 pm
by forestedge
I presume that file is an Extra Webfile being processed. That means you will most likely have to adjust the destination of that file to where you want it relative to the location of upload.php.
Yes, I had adjusted the path but added one / too many! All seems to be ok now thanks