Welcome, Guest. Please login or register.
Did you miss your activation email?
05/22/12, 05:37
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  Recent Tutorial Support
| |-+  Flash Ecards (Moderators: Flash-db, vesa kortelainen, Ronald Wernecke, Mohsin Sumar, Jorge Solis)
| | |-+  Is it possible to run the Ecards on a shared hosting server?
0 Members and 2 Guests are viewing this topic. « previous next »
Pages: 1 2 [3] Print
Author Topic: Is it possible to run the Ecards on a shared hosting server?  (Read 10577 times)
allhop
Server what's that
*
Posts: 21


View Profile
« Reply #30 on: 10/29/07, 16:26 »

Here is the PHP information:
http://pinkyandpeanut.com/PHPinfo.php

Do you see anything in the mail configurations that would prevent the script from working?

Also, I receive this error log in the Ecards directory when I try to test the cards:
[29-Oct-2007 16:07:37] PHP Warning:  Module 'xsl' already loaded in Unknown on line 0

The .txt file that is produced in the dBText folder looks like this:
ToName=&ToEmail=&FromName=&FromEmail=&Greeting=&IntroMessage=&Created=Ecard Created on Monday 29th of October 2007 ( 04:08:36 PM )

The dBText directory is currently assigned 777 permissions.

Thank you,
Angela
Logged
allhop
Server what's that
*
Posts: 21


View Profile
« Reply #31 on: 10/29/07, 16:52 »

Update:
The Ecards are now working with the dBText set to 777 permissions. However, when I set the permissions to 766, the cards are sent, but there is not text written to the cards. The variables are being collected in the .txt document.

Is there an error in my code? I am still receiving the error log in the Ecards directory.

Here is the SendEcard.php code that I'm using:
<?

$CreateEcard = date(U);

$filename = $CreateEcard.".txt";

$ToEmail = $_POST["ToEmail"];
$FromEmail = $_POST["FromEmail"];
$ToName = $_POST["ToName"];
$FromName = $_POST["FromName"];
$Greeting = $_POST["Greeting"];
$IntroMessage = $_POST["IntroMessage"];
$EndMessage = $_POST["EndMessage"];
$EcardSelect = $_POST["EcardSelect"];

$ToName = stripslashes($ToName);
$FromName = stripslashes($FromName);
$Greeting = stripslashes($Greeting);
$IntroMessage = stripslashes($IntroMessage);
$EndMessage = stripslashes($EndMessage);

$Today = (date ("l dS of F Y ( h:i:s A )",time()));

$Created="Ecard Created on $Today";

$EcardNum = $EcardSelect;

$EcardText = "ToName=$ToName&ToEmail=$ToEmail&FromName=$FromName&FromEmail=$FromEmail&Greeting=$Greeting&IntroMessage=$IntroMessage&Created=$Created";

$fp = fopen( "./dBText/$filename","w");
fwrite($fp, $EcardText, 10000);
fclose( $fp );

$ToSubject = "You have received a Pinky and Peanut E-card from $FromName";
$Message = "$ToName,\nYou have received a Pinky and Peanut E-card from $FromName. \nClick the following link to view your E-card:\n\n http://www.pinkyandpeanut.com/Ecards/SelectCard.php?EcardText=$CreateEcard&ENum=$EcardNum\n\n-----------------------------------\nHere is the message that was sent:\n$ToName,\n$Greeting\n$IntroMessage\n\n-$FromName\n\n\n-----------------------------------\nThis E-card was sent from www.pinkyandpeanut.com.";

mail($ToName." <".$ToEmail.">",$ToSubject, $Message, "From: ".$FromName." <".$FromEmail.">");

print "_root.Status=Your Pinky and Peanut E-card Has Been Sent!";

#### End #########
## By: Jeffrey F. Hill
## www.flash-db.com

?>

Here is the SelectCard.php code:
<HTML>
<HEAD>

<TITLE>Here's your Pinky and Peanut Ecard!</TITLE>

<?
$ENum = $_GET["ENum"];
$EcardText = $_GET["EcardText"];

switch ($ENum) {

   case '1':
   $goto = "Ecard1.swf?EcardText=".$EcardText;
   $gotoFooter = "EcardFooter.swf?EcardText=".$EcardText."&EcardSelect=1";
   $Dimensions = "WIDTH=550 HEIGHT=450";
   $DimensionsFooter = "WIDTH=450 HEIGHT=350";
   break;

   case '2':
   $goto = "Ecard2.swf?EcardText=".$EcardText;
   $gotoFooter = "EcardFooter.swf?EcardText=".$EcardText."&EcardSelect=2";
   $Dimensions = "WIDTH=550 HEIGHT=450";
   $DimensionsFooter = "WIDTH=450 HEIGHT=350";
   break;

   case '3':
   $goto = "Ecard3.swf?EcardText=".$EcardText;
   $gotoFooter = "EcardFooter.swf?EcardText=".$EcardText."&EcardSelect=3";
   $Dimensions = "WIDTH=550 HEIGHT=450";
   $DimensionsFooter = "WIDTH=450 HEIGHT=350";
   break;

   case '4':
   $goto = "Ecard4.swf?EcardText=".$EcardText;
   $gotoFooter = "EcardFooter.swf?EcardText=".$EcardText."&EcardSelect=4";
   $Dimensions = "WIDTH=550 HEIGHT=450";
   $DimensionsFooter = "WIDTH=450 HEIGHT=350";
   break;

}

?>
</head>

<body bgcolor="#FFFFFF" topmargin="0" leftmargin="0" rightmargin="0" marginheight="0" marginwidth="0">

<center>

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
 codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
 <? print "$Dimensions";?>>
 <PARAM NAME=movie VALUE="<? print "$goto";?>"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="<? print "$goto";?>" quality=high bgcolor=#FFFFFF  <? print "$Dimensions";?> TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
</OBJECT>

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
 codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
 <? print "$DimensionsFooter";?>>
 <PARAM NAME=movie VALUE="<? print "$gotoFooter";?>"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="<? print "$gotoFooter";?>" quality=high bgcolor=#FFFFFF  <? print "$DimensionsFooter";?> TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
</OBJECT>
</center>
</BODY>
</HTML>

Thank you for your help!
Angela
Logged
allhop
Server what's that
*
Posts: 21


View Profile
« Reply #32 on: 10/29/07, 17:46 »

It finally works! Grin

I used Jorge's .php script to create a folder:
<?php
if(mkdir("dBText", 0733)) echo "Folder created";
else echo "Fails on creating folder";
?>

766 permissions wouldn't work on my webhost which has an Apache Server running PHPsuexec. I tried tonyteach's 733 permissions and now it works. I had to use the PHP script to create the 733 folder, otherwise my FTP client wouldn't let me change the permissions.

Thank you Jorge, Ronald and tonyteach!!!
Logged
Pages: 1 2 [3] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
anything