Smarty has run our site for years and I am testing on a server with upgraded php/mysql to make sure it won’t break. All looks good except for one thing, this test server has php as a CGI, so the following function:
apache_lookup_url generates an error. Is there a simple way to simulate this function on php as a cgi?
The full code being used that’s causing an error:
function _site_path($path) {
$ap = apache_lookup_uri($path);
return $ap->filename;
}
I know what the docs say, but can you explain a little more about how you intend to use it?
I’m assuming the filename property can only be populated if you’re calling this on a local Apache host.
It should be pretty trivial to obtain the filename element from the path supplied, but for this to be dynamic we’re going to need to see how your application is laid out.
So we call im_scale function which calls the function I provided at the top. So they can pull the path from the apache_lookup_uri function. I hope this helps explain the situation better.