Hello. I am trying to use a PHP script in a page content. The problem is that this script is biig, about 180ko, and after some tries, it seems that there is a max size after which it does not work any more.
More precisely, I put it between {php} {/php}. It connects to a db and I make it echoing something when it connects in the beginning of the script. First I let the first blocks of the script, then added blocks more and more, until it does not echo anything. I found that when the script is more that about 116ko it does not work. Oh, and I checked in the CMSMS database, the PHP script is there in totality in a cms_content_props field. I feared that it was crashed when being registered in the db, but this is not the case.
Please help, how can I force CMSMS to make it work ? Is there any parameter that I can use so that bigger PHP scripts can be used ?
Thank you for your help...
PHP script max size ?
Re: PHP script max size ?
Any errors in the server error log?eric wrote: and after some tries, it seems that there is a max size after which it does not work any more.
Check server settings like max_execution_time and memory_limit.
Regards,
D
Re: PHP script max size ?
Unfortunatly I don"t have access to this, I make it work on a provider mutualised host server.
EDIT: well, I found the parameters with the system check inside CMSMS :
Temps Maximum d'éxecution (max_execution_time): 30s.
php_memory_limit: "nothing written"
However, I don't think that max_execution_time is concerned as I don't see the client navigator working for some time before failing, it just prints instantaneously a blank page. Maybe the php_memory_limit, I d'on t know and nothing is printed on the system check page ...
EDIT: well, I found the parameters with the system check inside CMSMS :
Temps Maximum d'éxecution (max_execution_time): 30s.
php_memory_limit: "nothing written"
However, I don't think that max_execution_time is concerned as I don't see the client navigator working for some time before failing, it just prints instantaneously a blank page. Maybe the php_memory_limit, I d'on t know and nothing is printed on the system check page ...
Last edited by eric on Tue Oct 21, 2008 3:35 pm, edited 1 time in total.
Re: PHP script max size ?
What happens when you place the Script into a UDT and call it from your template/content? Would that help? Probably the content/template area is not the right place for such scripts.
Best
Nils
Best
Nils
Re: PHP script max size ?
Ok I got the answer for the size problem : indeed I placed the file as a php include :
{php}
include 'uploads/php/calendar.php';
{/php}
The size problem is now gone : however I still have a db problem now : here it is :
http://le-valombre.fr/cms/index.php?page=reservation
And if I use the same file directly out of CMSMS I get a good answer :
http://le-valombre.fr/fr/calendartest.php
What's the problem now
? nhaack what do you call an UDT ?
{php}
include 'uploads/php/calendar.php';
{/php}
The size problem is now gone : however I still have a db problem now : here it is :
http://le-valombre.fr/cms/index.php?page=reservation
And if I use the same file directly out of CMSMS I get a good answer :
http://le-valombre.fr/fr/calendartest.php
What's the problem now

Last edited by eric on Tue Oct 21, 2008 9:30 pm, edited 1 time in total.
Re: PHP script max size ?
ERROR in: select valpersonalizza_num from where idpersonalizza = 'giorno_vedi_ini_sett' and idutente = '1'eric wrote: The size problem is now gone : however I still have a db problem now : here it is :
http://le-valombre.fr/cms/index.php?page=reservation
It looks like somehow the name of the table is missing in the SQL statement?
Regards,
D
Re: PHP script max size ?
Hi and thank you for your help. I still did not understand why it does not work, but finally found a solution to my problem
.
I call the php file calendar.php inside an iframe like that :
That way, it works and I think this is the way to go in such a situation. Thank you again
...
Eric

I call the php file calendar.php inside an iframe like that :
That way, it works and I think this is the way to go in such a situation. Thank you again

Eric
Re: PHP script max size ?
User Defined Tag, balise définie par l'utilisateur.eric wrote: what do you call an UDT ?
Pierre M.