php.ini effects and setup

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am

php.ini effects and setup

Post by Gregor »

Hello,

While installing cmsms I got a message that three values are not meeting the required value:
upload_max_filesize
post_max_size
max_execution_time
I created a php.ini with the appropriate values

Code: Select all

upload_max_filesize = 10M
post_max_size = 10M
max_execution_time = 60
and ran phpinfo() This script was telling these values where set. Than I looked at CMSMS SI:
----------------------------------------------

Cms Version: 1.9.2

Installed Modules:

    * Album: 0.9.3
    * CMSMailer: 2.0
    * FCKeditorX: 1.1.0
    * Guestbook: 1.3.0
    * MenuManager: 1.7.4
    * ModuleManager: 1.4
    * News: 2.11
    * NMS: 2.3.2
    * nuSOAP: 1.0.2
    * Search: 1.6.8
    * ThemeManager: 1.1.3
    * TinyMCEAdv: 2.2.2
    * AjaxMadeSimple: 0.3.1
    * FrontEndUsers: 1.12.6
    * Captcha: 0.4.3
    * FormBuilder: 0.6.4
    * Comments: 1.9.2
    * FileManager: 1.0.3
    * Printing: 1.1.1
    * CGExtensions: 1.22.1
    * Questions: 1.0.3
    * RateThis: 1.0
    * Uploads: 1.11.5
    * CGFeedMaker: 1.0.11
    * HitCounter: 1.1
    * Banners: 2.3.6
    * NFS: 1.0
    * Polls: 0.3.2
    * Slide: 1.0
    * iCal: 0.1
    * TinyMCE: 2.8.2
    * FormBrowser: 0.3.2
    * CGCalendar: 1.5.6


Config Information:

    * php_memory_limit: 120M
    * process_whole_template: true
    * output_compression: false
    * max_upload_size: 1000000
    * default_upload_permission: 664
    * url_rewriting: none
    * page_extension:
    * query_var: page
    * image_manipulation_prog: GD
    * auto_alias_content: true
    * locale:
    * default_encoding: utf-8
    * admin_encoding: utf-8
    * set_names: false


Php Information:

    * phpversion: 5.2.14
    * md5_function: On (True)
    * gd_version: 2
    * tempnam_function: On (True)
    * magic_quotes_runtime: Off (False)
    * E_STRICT: 0
    * memory_limit: 32M
    * max_execution_time: 30
    * output_buffering: On
    * safe_mode: Off (False)
    * file_uploads: On (True)
    * post_max_size: 8M
    * upload_max_filesize: 2M
    * session_save_path: /tmp (1777)
    * session_use_cookies: On (True)
    * xml_function: On (True)


Server Information:

    * Server Api: cgi
    * Server Db Type: MySQL (mysql)
    * Server Db Version: 5.0.91


----------------------------------------------
Here you can see other values. After a chat with the provider, I came to know that these are the values set for the whole server.

So what next? I searched the forum and found a post telling to put the php.ini into the admin-folder. Did so and ran SI again. Values are set according to php.ini However, Imagemanager was showing a logon screen and no thumbs where created when using Album. This used to work before moving php.ini to the admin-folder.

Before I figured out what was wrong, a lot of time was spent, also by one of the people from the Dutch forum. This was a quite frustrating process.

What I don't understand, is why SI does not take the values from php.ini when the file is in the root and phpinfo() does show the set values. Second, what makes Imagemanger showing the logon screen when php.ini is in the admin-folder?

Hope some of the system engineers are willing to help me on this one.

Gregor
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: php.ini effects and setup

Post by Rolf »

Hello Gregor,

You can also add the following lines in the config.php to change the values:

Code: Select all

ini_set("memory_limit", "120M");
ini_set('max_execution_time', 60);
And also check this:

Code: Select all

#---------------
#Upload Settings
#---------------

#Maxium upload size (in bytes)?
$config['max_upload_size'] = 50000000;
grtz. Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: php.ini effects and setup

Post by Dr.CSS »

Did it just give warnings, mine always do during install, I just keep going and everything works fine, did you try it w/o that php file in there?...
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am

Re: php.ini effects and setup

Post by Gregor »

@Rolf I'll give that try as soon as I'm behind my Mac.

@Dr.CSS IT only gives warnings. I did not try an install while php.ini is in the admin folder. I did test SI with php.ini in different folders. But where does SI gets its information from?

Gregor
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am

Re: php.ini effects and setup

Post by Gregor »

Rolf wrote: Hello Gregor,

You can also add the following lines in the config.php to change the values:

Code: Select all

ini_set("memory_limit", "120M");
ini_set('max_execution_time', 60);
grtz. Rolf
Hello Rolf,

Just tried the above two setting by adding them to the config.php, however the valus shown by SI remain the same  :-\

Gregor
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: php.ini effects and setup

Post by Rolf »

Gregor wrote: Just tried the above two setting by adding them to the config.php, however the valus shown by SI remain the same  :-\
You better talk with your host then.
He has probably set some values, which can't be overruled by the user.

grtz. Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am

Re: php.ini effects and setup

Post by Gregor »

Thanks for your reply Rolf.

I did have a chat with my provider. The provider has, what he called, a server wide php-setting installed. He gave me a copy of the file to edit and put in the root of the site. I set the values based on the required cmsms setting. However, this does not effect the setting using SI. If I look with phpinfo() than I see the adjusted values. This I cannot explain, other than getting to the conclusion that SI is 'seeing' different settings, unless php.ini is put in the admin-folder. Confusing.....

Grtz, Gregor
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: php.ini effects and setup

Post by Rolf »

Gregor wrote: This I cannot explain, other than getting to the conclusion that SI is 'seeing' different settings, unless php.ini is put in the admin-folder.
In the .htaccess and in the config.php aren't other values set?
If you are able to change all values with your own php.ini file, you better remove all other options to change it...

Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am

Re: php.ini effects and setup

Post by Gregor »

Rolf wrote:
In the .htaccess and in the config.php aren't other values set?
Rolf
Nope, checked it and the values are set once. Situation remains the same.

"If you are able to change all values with your own php.ini file, you better remove all other options to change it..."
Good suggestion, will do so.

Gregor
JohnnyB
Dev Team Member
Dev Team Member
Posts: 731
Joined: Tue Nov 21, 2006 5:05 pm

Re: php.ini effects and setup

Post by JohnnyB »

With some php environments, the following has to be added to the .htaccess file to make custom php.ini settings applied in sub directories.

suPHP_ConfigPath /home/your-username/public_html

I don't know why that works but it did for a couple hosts I worked with.
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am

Re: php.ini effects and setup

Post by Gregor »

Thanks for your tips. Meanwhile the host changed settings so I was finally able to make the settings needed.

Gregor
Post Reply

Return to “CMSMS Core”