i have a script that worked previously, and after a server migration is suddenly broken. it looks like this:
$fp2 = popen( "ls photos/$subdir 2>&1", "r" );
while ($pfile = fgets($fp2, 60))
{
// do stuff to each file
}
the goal is to scan a directory for photos, make/identify thumbnails, and auto-build a gallery page.
like i said, it worked until my server move and now popen returns a list of nothing. with the error reporting on (as above) i get "Resource id #7; resource" as the only output.
i've checked that all dir's and files are 755, anything else i could think of.
any suggestions on what configuration might prevent this sort of access to the filesystem? my webhost is willing to check the httpd.conf for me if i tell them what i'm looking for (no guarantee they'll change it, tho).
PHP v 4.3.2
FreeBSD 4.8
Apache 1.3.27