<div dir="ltr">Have the script print to screen the file location it is trying to open.  Compare that to the allowed / open basedir directories. <div>Or check the ownership and permissions of the file you are trying to delete. </div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Ken Marcus<div>Precision Web Hosting, Inc.</div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 6, 2022 at 8:32 AM Colin Jack <<a href="mailto:colin@mainline.co.uk">colin@mainline.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-GB" style="overflow-wrap: break-word;">
<div class="gmail-m_6093243469478910131WordSection1">
<p class="MsoNormal"><span style="color:rgb(47,85,151)">We have a customer who is suddenly getting open_basedir errors on their vsite:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(47,85,151)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(47,85,151)">PHP Warning:  unlink(): open_basedir restriction in effect. File() is not within the allowed path(s): (/var/lib/php/session/:/usr/sausalito/configs/php/:/tmp/:/home/solarspeed/php-5.4/share/pear:/home/.sites/28/site1/)
 in /home/.sites/28/site1/web/1/phserial/remove-record.php on line 23, referer:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(47,85,151)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(47,85,151)">The file in question is a PDF that is written to the phserial folder which it does correctly and is then supposed to delete it.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(47,85,151)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(47,85,151)">// DELETE PDF<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(47,85,151)">unlink($row[file]);<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(47,85,151)">echo "<p>You have deleted the crate, the components and the pdf.</p>";<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(47,85,151)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(47,85,151)">This is on an old 5207R running PHP 5 … I know … very old but this is in-house and not exposed to the internet!
</span><span style="font-family:"Segoe UI Emoji",sans-serif;color:rgb(47,85,151)">😊</span><span style="color:rgb(47,85,151)"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(47,85,151)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(47,85,151)">The question is why are they now seeing an open_basedir error when the file in question is in the allowed path and is not creating an
 error when it is written.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(47,85,151)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(47,85,151)">This has been running fine for years.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(47,85,151)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(47,85,151)">Any ideas would be great.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(47,85,151)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(47,85,151)">Thanks<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(47,85,151)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(47,85,151)">Colin<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(47,85,151)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(47,85,151)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(47,85,151)"><u></u> <u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>

_______________________________________________<br>
Blueonyx mailing list<br>
<a href="mailto:Blueonyx@mail.blueonyx.it" target="_blank">Blueonyx@mail.blueonyx.it</a><br>
<a href="http://mail.blueonyx.it/mailman/listinfo/blueonyx" rel="noreferrer" target="_blank">http://mail.blueonyx.it/mailman/listinfo/blueonyx</a><br>
</blockquote></div>