colin71 Posted February 8, 2007 Share Posted February 8, 2007 this PHP script recieves some variables from a SWF, swaps out some chars and writes it to a file: <? $exhibitionsText1 = str_replace ("%","%25",$exhibitionsText); $pressText1 = str_replace ("%","%25",$pressText); $dvdText1 = str_replace ("%","%25",$dvdText); $exhibitionsText2 = str_replace ("&","%26",$exhibitionsText1); $pressText2 = str_replace ("&","%26",$pressText1); $dvdText2 = str_replace ("&","%26",$dvdText1); $string = "exhibitionsText=$exhibitionsText2&pressText=$pressText2&dvdText=$dvdText2&loaded=$loaded"; $fp = fopen("sm_text.zip","w+"); $htmlstring = stripslashes ($string); fputs($fp,$htmlstring); fclose($fp); ?> This script works fine on a Linux test server, but when I moved it to the client's UNIX server, the script writes the variable names but not the contents of the variable. It is recieving these variables via a SWF: working version (on linux server) here: http://www.memeticmedia.com/extranet/miller/beta/cms/ They are running PHP4; is it possible that you need PHP 5 for this ? Permissions have been set, and it *is* writing to the file, so I am not sure what the problem is. Please reply offlist if you can offer any further assistance. I can provide the FLA if needed. It is writing to a textfile labeled as a .zip to send the data across as binary vs. text. I am not sure what the issue could be. Here is the UNIX server PHP info : http://stevemiller.com/beta/cms/inch.php Any assistance would be greatly appreciated. Best, Colin Link to comment https://forums.phpfreaks.com/topic/37663-php-under-unix-vs-linux/ Share on other sites More sharing options...
ShogunWarrior Posted February 8, 2007 Share Posted February 8, 2007 From the small snipper of code here it is possible register_globals is on in the Linux server but not the Unix server. (register_globals should be off for security). Link to comment https://forums.phpfreaks.com/topic/37663-php-under-unix-vs-linux/#findComment-180148 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.