PHP script max size ?

General project discussion. NOT for help questions.
Post Reply
eric
Forum Members
Forum Members
Posts: 10
Joined: Wed Oct 08, 2008 11:47 am

PHP script max size ?

Post by eric »

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...
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: PHP script max size ?

Post by Dee »

eric wrote: and after some tries, it seems that there is a max size after which it does not work any more.
Any errors in the server error log?
Check server settings like max_execution_time and memory_limit.

Regards,
D
eric
Forum Members
Forum Members
Posts: 10
Joined: Wed Oct 08, 2008 11:47 am

Re: PHP script max size ?

Post by eric »

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 ...
Last edited by eric on Tue Oct 21, 2008 3:35 pm, edited 1 time in total.
nhaack

Re: PHP script max size ?

Post by nhaack »

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
eric
Forum Members
Forum Members
Posts: 10
Joined: Wed Oct 08, 2008 11:47 am

Re: PHP script max size ?

Post by eric »

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 ?
Last edited by eric on Tue Oct 21, 2008 9:30 pm, edited 1 time in total.
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: PHP script max size ?

Post by Dee »

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
ERROR in: select valpersonalizza_num from where idpersonalizza = 'giorno_vedi_ini_sett' and idutente = '1'

It looks like somehow the name of  the table is missing in the SQL statement?

Regards,
D
eric
Forum Members
Forum Members
Posts: 10
Joined: Wed Oct 08, 2008 11:47 am

Re: PHP script max size ?

Post by eric »

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
Pierre M.

Re: PHP script max size ?

Post by Pierre M. »

eric wrote: what do you call an UDT ?
User Defined Tag, balise définie par l'utilisateur.

Pierre M.
Post Reply

Return to “General Discussion”