Fatal error Maximum execution time of 300 seconds

Dear friends,

I have many lines of code, at the moment to generate the app it never finish to compile and after many minutes it show me this

I already edited the php.ini file in the line that specific Resource limits “max_execution_time” increasing the time, but it doesn?t work.

Somebody can help me please because I have to add more lines of code and with this problem I can?t continue.

Regards,

error compiling.jpg

This happens to you just with one app? or with whole project?

I’m trying right now with only a blank app, but I have to pass the code to a grid to complete the process, so answering your question is only in the blank not in whole the project.

I appreciate your help

just blank app taking more than 5minutes? WTH, how many l?nes of code has?

Did you tried to copy/paste the blank code to a new blank?

Hello Giu, Yes I already tried to copy the code in another blank in a new project and it didn’t work, show me the same error. Until now I have 10027 lines of code and I need to add many more. Is an special code that I need to make for the application works.

So, is there anything else that Can I do?

try splitting the code in several parts, for example create X blank applications each one with a part of the code and then linked them all in another blank application.

Regards

I?ll try using PHP Methods but I think is incredible that in Scriptcase we can’t use the lines of code that we need and it is limited to a certain amount of lines

This is a workaround… and I do believe the problem is not related to scriptcase but to your environment… as I posted in your other thread…I would recommend to check PHP forums for solutions on this. one thing could you please generate the Diagnosis file from scriptcase (help menu>Diagnostics) and share it with us?. that might give us a hint of what your php configuration looks like so we can help you better.

Regards

Is this

Diagnostics.jpg

On top of that report you will find a link “Log file successfully created. Click here, save the file and send to NetMake!” to another full report… could you please upload it to something like one drive or something so we can take a look at it?.

Regards

[QUOTE=placks;35179]Hello Giu, Yes I already tried to copy the code in another blank in a new project and it didn’t work, show me the same error. Until now I have 10027 lines of code and I need to add many more. Is an special code that I need to make for the application works.

So, is there anything else that Can I do?[/QUOTE]

SC is a generator, not an IDE as is. Sc has to parse whole blank code to generate final app. blank app is not designed to use as a lib, for this you have tools>Libraries. This are not generated and you will not have problems with it. As kafe suggest, redesign you business logic and split into different files. I’m sure a lot of code is not needed inside this blank and can be on “lib”

https://onedrive.live.com/redir?resid=e90298fce48e084e!1189&authkey=!APyRqQATNmJYSJY&ithint=file%2Cdocx

This is the link to see the complete log in One Drive.

Thank you so much

Hey placks… Thank you for the file… Have a quick question… how did you installed scriptcase?.. windows installer or did you install a web server and set up php and scriptcase manually?..

If the latest… have you rebooted the services… I mean I’ve verified your php configuration and i should be working, unless you change the configuration and never rebooted the services.

Regards

[QUOTE=placks;35198]https://onedrive.live.com/redir?resid=e90298fce48e084e!1189&authkey=!APyRqQATNmJYSJY&ithint=file%2Cdocx

This is the link to see the complete log in One Drive.

Thank you so much[/QUOTE]

Read my latest post. You are not using SC as is designed for, and you will live more happy if you take my suggestions. A blank app is not a blank php file.

Yes Giu I?m only testing a code that I need to pass in a grid, but in both cases the error is the same, if I use the code in the blank or in a Grid is the same, never ends to compile.

Can younshare this conde?

How I said for now I have more than 10027 lines of code and I need to add many more, but I can show you some part of it, by the way I tried splitting the code in PHP methods and I think it is working.

$sql = “SELECT * FROM hojas_temp WHERE usuario =’”.[glo_usuario]."’" ;

sc_select(dsorigen,$sql) ; // selecciona el documento a asentar
foreach({dsorigen} as $camporigen) // recorre el dataset
{
switch ([glo_dia_ini])
{
case ‘Mon’:
if($camporigen[10]!= “0”)
{
$camporigen[6] = [glo_fecha_ini] ;
}
else if ($camporigen[11]!= “0”)
{
$camporigen[6] = date(“Y/m/d”, strtotime("[glo_fecha_ini] +1 day"));
}
else if ($camporigen[12]!= “0”)
{
$camporigen[6] = date(“Y/m/d”, strtotime("[glo_fecha_ini] +2 day"));
}
else if ($camporigen[13]!= “0”)
{
$camporigen[6] = date(“Y/m/d”, strtotime("[glo_fecha_ini] +3 day"));
}
else if ($camporigen[14]!= “0”)
{
$camporigen[6] = date(“Y/m/d”, strtotime("[glo_fecha_ini] +4 day"));
}
else if ($camporigen[15]!= “0”)
{
$camporigen[6] = date(“Y/m/d”, strtotime("[glo_fecha_ini] +5 day"));
}
else if ($camporigen[16]!= “0”)
{
$camporigen[6] = date(“Y/m/d”, strtotime("[glo_fecha_ini] +6 day"));
}
break;

case 'Tue':
  if ($camporigen[11]!= "0")
	 {
	$camporigen[6] = [glo_fecha_ini] ; 
	 }	
	else if ($camporigen[12]!= "0")
	 {
		 $camporigen[6] = date("Y/m/d", strtotime("[glo_fecha_ini] +1 day"));
	 }	 
	else if ($camporigen[13]!= "0")
	 {
		 $camporigen[6] = date("Y/m/d", strtotime("[glo_fecha_ini] +2 day"));
	 }
	else if ($camporigen[14]!= "0")
	 {
		 $camporigen[6] = date("Y/m/d", strtotime("[glo_fecha_ini] +3 day"));
	 }
	else if ($camporigen[15]!= "0")
	 {
		 $camporigen[6] = date("Y/m/d", strtotime("[glo_fecha_ini] +4 day"));
	 }
	else if ($camporigen[16]!= "0")
	 {
		 $camporigen[6] = date("Y/m/d", strtotime("[glo_fecha_ini] +5 day"));
	 }
     break;

case 'Wed':
  if ($camporigen[12]!= "0")
	 {
		 $camporigen[6] = [glo_fecha_ini] ; 
	 }	 
	else if ($camporigen[13]!= "0")
	 {
		 $camporigen[6] = date("Y/m/d", strtotime("[glo_fecha_ini] +1 day"));
	 }
	else if ($camporigen[14]!= "0")
	 {
		 $camporigen[6] = date("Y/m/d", strtotime("[glo_fecha_ini] +2 day"));
	 }
	else if ($camporigen[15]!= "0")
	 {
		 $camporigen[6] = date("Y/m/d", strtotime("[glo_fecha_ini] +3 day"));
	 }
	else if ($camporigen[16]!= "0")
	 {
		 $camporigen[6] = date("Y/m/d", strtotime("[glo_fecha_ini] +4 day"));
	 }
     break;

case 'Thu':
  if ($camporigen[13]!= "0")
	 {
		 $camporigen[6] = [glo_fecha_ini] ; 
	 }
	else if ($camporigen[14]!= "0")
	 {
		 $camporigen[6] = date("Y/m/d", strtotime("[glo_fecha_ini] +1 day"));
	 }
	else if ($camporigen[15]!= "0")
	 {
		 $camporigen[6] = date("Y/m/d", strtotime("[glo_fecha_ini] +2 day"));
	 }
	else if ($camporigen[16]!= "0")
	 {
		 $camporigen[6] = date("Y/m/d", strtotime("[glo_fecha_ini] +3 day"));
	 }
     break;

case 'Fri':
 if ($camporigen[14]!= "0")
	 {
		 $camporigen[6] = [glo_fecha_ini] ; 
	 }
	else if ($camporigen[15]!= "0")
	 {
		 $camporigen[6] = date("Y/m/d", strtotime("[glo_fecha_ini] +1 day"));
	 }
	else if ($camporigen[16]!= "0")
	 {
		 $camporigen[6] = date("Y/m/d", strtotime("[glo_fecha_ini] +2 day"));
	 }
     break;

case 'Sat':
 	if ($camporigen[15]!= "0")
	 {
		 $camporigen[6] = [glo_fecha_ini] ; 
	 }
	else if ($camporigen[16]!= "0")
	 {
		 $camporigen[6] = date("Y/m/d", strtotime("[glo_fecha_ini] +1 day"));
	 }
     break;

case 'Sun':
 	if ($camporigen[16]!= "0")
	 {
		 $camporigen[6] = [glo_fecha_ini] ; 
	 }
     break;
}


$insert_table  = 'hojas';      // Table name


$realmas1= date("Y/m/d", strtotime("$camporigen[6] +1 day"));
$realmas2= date("Y/m/d", strtotime("$camporigen[6] +2 day"));
$realmas3= date("Y/m/d", strtotime("$camporigen[6] +3 day"));
$realmas4= date("Y/m/d", strtotime("$camporigen[6] +4 day"));
$realmas5= date("Y/m/d", strtotime("$camporigen[6] +5 day"));	
$realmas6= date("Y/m/d", strtotime("$camporigen[6] +6 day"));

//--------MIERCOLES-----------
if (($camporigen[10]== ‘0’)and ($camporigen[11]== ‘0’)and ($camporigen[12]== ‘0’)and ($camporigen[13]==‘0’)and ($camporigen[14]==‘0’)and ($camporigen[15]==‘0’)and ($camporigen[16]==‘0’))
{
$insert_fields = array( // Field list, add as many as needed
‘fecha_reg’ => “’$camporigen[1]’”,
‘usuario’ => “’$camporigen[2]’”,
‘departamento’ => “’$camporigen[3]’”,
‘fecha_inicial’ => “’$camporigen[4]’”,
‘fecha_final’ => “’$camporigen[5]’”,
‘fecha_real’ => “’$camporigen[6]’”,
‘actividad’ => “’$camporigen[7]’”,
‘division’ => “’$camporigen[8]’”,
‘oco’ => “’$camporigen[9]’”,
‘lunes’ => “’$camporigen[10]’”,
‘martes’ => “’$camporigen[11]’”,
‘miercoles’ => “’$camporigen[12]’”,
‘jueves’ => “’$camporigen[13]’”,
‘viernes’ => “’$camporigen[14]’”,
‘sabado’ => “’$camporigen[15]’”,
‘domingo’ => “’$camporigen[16]’”,
‘total_horas’ => “’$camporigen[17]’”,
‘observacion’ => “’$camporigen[18]’”,
);

		$insert_sql = 'INSERT INTO ' . $insert_table
			. ' ('   . implode(', ', array_keys($insert_fields))   . ')'
			. ' VALUES ('    . implode(', ', array_values($insert_fields)) . ')';

		sc_exec_sql($insert_sql);	
	}