urgent help please

Hi guys

I have finally completed my first working (as i seems) platform, in my lab it works a treat but am having some issues with the live uploaded version.

The problems I am having:

1: File upload - works in lab perfectly
-I have changed the file folder to 777 and also triple checked the php values, as files are only images they are not being uploaded. providing a standard error message. upload failed.
are there other folders I need to change to 775 or 777 here? or maybe a php value other than memory_limit, post_max_size I may be missing?

2: Images in grids are not displaying the image, yes path if correct within app scriptcase and are also displayed in my lab correctly.

  • ha solved this one, scriptcase adds a / to the path… I am guessing this is the same for the file upload, weird as it I would expect that to error even in lab, no?

3: update uploads are not being applied, seems that some grids end up missing styling, they look all weird and well un-styled :slight_smile:

4: php timeout, when no activity,I have added a php time out 0 value thinking it would solve it but it doesn’t, is there a way at least I ca redirect the user back to the login if this happens instead of a horrid blank time out error?

If there are any tricks to this I could really do with knowing them, this is final chance with this before i decide i wasted my money, which would be a shame because it works great in my lab…

thanks in advance

managed to fix the file upload, the had to assign 777 to the tmp folder also. thankfully have that solved and yay my first platform with scriptcase live, about time only taken a year lol

any ideas with the updates would be good

When you deploy you can choose not to take the default action, but choose advanced. then you are able to set all paths for uploads etc. I don’t understand what you mean with update uploads. You mean that overwriting doesn’t go well? Sometimes ftp clients tend to ‘find out’ which files are already there and don’t need to be overwritten. That often fails. I use Filezilla which had this issue once, but currently I choose to overwrite all. I must be honest I have a lot of SC apps in production and I never have had issues like you describe. I did have had some issues with a certain Australian provider which generated a lot of errors when using containers. Could only be solved by choosing another provider. But that was only once… PHP timeout. I assume you don’t mean that php is running to long and aborts, but the timeout within scriptcase itself? I recommend to put a test in the menu to see how long the latest action was. Then you can decide to jump to the loginscreen when necessary. Otherwise you can get uncertain results where the form seems to operate, but actually is doing nothing.

Hi Albert, hows it going.
What I mean with the update uploads is when I deploy only selected apps, so those which have or are to be updated.
I upload the zip file and extract all files overwriting, but for some reason most of the time the latest updates are not present when viewing the app. Of course I am clearing my cache and what not with no changes. at the moment I have to wipe the current installation, ie delete all files and folders and then re-upload and re-configure, which isnt something I can continue to do now that its fully live.

Also I am wondering if you can answer another question, regarding the email in scriptcase.
Does the platform created use php send mail or do I have to use the email settings when deploying the app?

I have created a form for email server configuration with the tool, as I will be selling the same platform to multiple people of course all with unique server/email settings, so if php send mail works it will save alot of messing around.

thanks

First I deploy differently. I always do a full deploy to my local engine, then I upload only the changed applications on folder level. That way things upload pretty fast as I don’t have to upload the full _lib story.

Regarding email, I have made a small library and it’s retrieving the data from a preferences table. In this table all the mailserver settings are set. See example code:


<?php
function sendmail($shopid, $mailto, $mailsubject, $body)
{
 $bodytext=$body;
 
	
 $check_sql = "SELECT mailserver, mailfrom, mailuid, mailpwd, mailheader, mailfooter, companylogo from ndshoppreferences where shopid='".$shopid."'";
 sc_select(rs, $check_sql);	
 
 $mail_smtp_server=$rs->fields[0];
 $mail_to=$mailto;
 $mail_from=$rs->fields[1];
 $mail_smtp_user=$rs->fields[2];
 $mail_smtp_pass=$rs->fields[3];
 	   
 $headertext=$rs->fields[4];
 $footertext=$rs->fields[5];
 $logo= '<img src="/scriptcase/file/img/'.$shopid.'/'.$rs->fields[6].'"> ';
 
 $emailtext = $headertext . $bodytext . $footertext;
 $emailtext = str_replace('%logo%',$logo, $emailtext);
	
// now send mail
													
$mail_subject     = $mailsubject;
$mail_message     = $emailtext; 		// Message body
$mail_format      = 'H';                // Message format: (T)ext or (H)tml

echo $emailtext;

// Send email";
sc_mail_send($mail_smtp_server,
			 $mail_smtp_user,
             $mail_smtp_pass,
			 $mail_from,
			 $mail_to,
			 $mail_subject,
			 $mail_message,
			 $mail_format);
	   
	
}
?>