Link to home
Create AccountLog in
Avatar of blue-genie
blue-genieFlag for South Africa

asked on

different behaviour on different servers

i've created a simple flash file that uploads images to server, reads the images from the server, allows you to delete from the server, zip up all the images and have them mailed to yourself etc.
on my localhost xampp setup - everything works 100% and i didn't have php_zip.dll enabled, or even existing in the ext folder.

on my one live test server, i get the Class ZipArchive not found error, i have my server administrator - service provider looking into trying to fix this for me. my forced no cache headers in the php file work fine.

on my clients live test server - i don't get the ZipArchive error, however I get the headers errors and even if i check that there's no white space - this still happens. if i take the no-cache script out then i dont' get errors, but then the php returned data is caching even if the browser is set to not cached.

a count of files in a folder returns 1 on my clients server although the folder is empty. WTF!!!

i don't know what version is runing on the clients server.
on my localhost - running xampp 1.7.4 beta 2, php version 5..3.3. on windows 7
on my live server - apache  2.2.16  PHP version      5.2.9

if anyone could shed some light on this i would be very grateful.


ASKER CERTIFIED SOLUTION
Avatar of CyberGhost
CyberGhost
Flag of Czechia image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Please show us the scripts, thanks.
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of blue-genie

ASKER

@Ray ok cool my live server is 5.2.9 - so i guess that makes sense - hope the server administrators come through on that part. then what code do you need to see - which one?

@cyberghost - i'm hoping the server admins will sort it out for me

@te-edu - no there are no hidden files, i'm creating the file at runtime.

thank you all - have a fabulous Christmas.
I'd like to see the script that barks about the headers, thanks.

Merry Christmas to all, ~Ray
here u go ray

<?php
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
$dateStr =  date("Ymd");
$dir = './images'; 
$foldername = $_GET['uid'];

$files = glob($dir.'/'.$dateStr.'/'.$foldername."/*.*"); 
$imageDir = glob($dir.'/'.$dateStr.'/'.$foldername."/");
echo count($imageDir);


?>

Open in new window

SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
i created this file to test.
the header bits i got off a forum to force browser not to cache.

if i run this file on my server with an empty folder, the count returns 0
when i run it off my clients server with an empty folder, it returns 1

this is after another file does a unlink to toss an image based on parameters sent through the flash.
oh i'm heading out into the bush for a few days today so wont' be back till the 30th, but anything you can think of to help me out will be great.
if the bugs were all consistent at least I'd feel better but right now with things behaving differently i'm really stumped.
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
hey Ray. got back today. did what you said.
on my clients sever the var_dump does return that there's something there although i don't physically see a file.
on my server, when doing the unlink the file is not returned.
permissions maybe?

array(1) { [0]=> string(22) "./images/20101229/345/" }
Permissions and cacheing could both be involved.
Ray this seems to be a dead end - :-(
i'm going to close this so long as i'm getting nagged by the admins so I'll open a new thread when my client is back so i can check and confer with him.
tx and all the best for 2011.
Same to you - Happy New Year, ~Ray