PHP creating random, weird files (not supposed to)

Status
Not open for further replies.

emailsp3

New Member
Messages
4
Reaction score
0
Points
1
Hi everyone

For some reason, on x10 servers, my PHP files create weird random files in the home directory. Say the PHP script is called a.php, then i would have lots of a.php.1,a.php.2,a.php.3 and so on in the home directory (not public_html).

I have never had this on other servers, could someone please explain how to fix?

It is definately not my PHP code as that is not meant to create any files whatsoever.

Cheers!
 

lylex10h

Active Member
Messages
982
Reaction score
71
Points
28
Can you provide some additional information to duplicate this such as:
1. What server are you on? (ex. xo#.x10hosting.com)
2. What PHP version are you using?
3. Complete code from a file that this is happening on

I'm on xo7.x10hosting.com with PHP 7.0 and don't have a bunch index.php.1 index.php.2 index.php.3 WordPress files.
 

emailsp3

New Member
Messages
4
Reaction score
0
Points
1
Hi

Thanks.

x03
5.5

<?php
$html = file_get_contents('https://public-api.adsbexchange.com/VirtualRadar/AircraftList.json?fRegQN=');

$response_2 = strstr($html, 'acList');
$response_2 = str_replace('acList":',"",$response_2);
$response_2 = str_replace('acList":',"",$response_2);
$response_2 = str_replace('"',"",$response_2);
$response_2 = str_replace('},{Id'," <p><p> ",$response_2);
echo $response_2;

?>


See attatched screenshot

Unless you see any issue maybe I should try to upgrade php and see if it is fixed?

Cheers
 

Attachments

  • Capture.PNG
    Capture.PNG
    87.5 KB · Views: 2

emailsp3

New Member
Messages
4
Reaction score
0
Points
1
I tried removing write privileges to my php files, did not fix issue.
I tried upgrading to 7.1 but that has not solved issue either.
 

emailsp3

New Member
Messages
4
Reaction score
0
Points
1
Hi

No sorry it isn't. I found the issue though. My cron job was at fault for creating the files but not deleting them. I have added
--delete-after to the command and now no excess files are produced.

Thank your for your quick responses :)
 
Status
Not open for further replies.
Top