Jump to content

PHP upgraded to 4.4.4, script not working any more since then


Corobori

Recommended Posts

I am not at all PHP/Apache fluent and I am having an issue with the only PHP script we have running on an Apache box.

We have a PHP script which as been running fine for a few months.

Suddenly the script stopped working. After a few hours of investigation I found out that something (but what ?) as changed on the server and it seems that script, which creates a file can't get access to it. If you look at the image below you'll see that the "owner" changes from 32044 to 99 between 20/12 and 21/12. Strange enough it is since then that we're having this issue.

Anybody knowing what does this mean and I should do?

[IMG]http://www.corobori.com/sos/picFileOwner.jpg[/img]

This is part of the script:

[code]
/* Creación del Archivo */
$filename="tmp/log$TBK_ID_TRANSACCION.txt";
$fp=fopen($filename,"w");
reset($HTTP_POST_VARS);

fwrite($fp,$graba);
fclose($fp);
 
  if (valmac($filename)==0)
  {
    echo "Mac KO";
exit;
  }else{
  echo "Mac OK";
    exit;
  }
   

function valmac($filename)
{
    $cmdline = "cgi-bin/tbk_check_mac.cgi $filename";
  //echo $cmdline;
  exec($cmdline,$result,$retint);
  if ($result[0]=="CORRECTO")
  {
return 1;
  }
  else {
return 0;
  }
}

[/code]

I am getting an error which says

Notice: Undefined offset: 0 in /home/mejoresd/public_html/check_param_mac_tmp.php on line 55

Corresponding to the line
[code]if ($result[0]=="CORRECTO")[/code]

I dumped the variables:
$cmdline: string(47) "cgi-bin/tbk_check_mac.cgi tmp/log6581439049.txt"
$result: array(0) { }
$retint: int(126)

What does "owner" means as shown in the pic  ? Why did it changed from 32044 to 99 corresponding to the date when the system stopped working properly ?

Jean-Luc
www.corobori.com
After some testing and checking we found out that our hosting company changed the PHP version and it looks like since then the system stopped working. In http://www.mejoresdatos.net/p.php it says Build Date Dec 21 2006 08:53:06 and since then it's not working.

Anyone around knowing a solution ?

Jean-Luc
www.corobori.com
I would say the reason the owner ID has changed is because the system user that is executing the script has changed as a result of the PHP upgrade.

Does your application have any problems accessing/writing to files with a date >= 20.12.2006 or do you only get the error on files < 20.12.2006.



Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.