Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: haymann on October 12, 2007, 05:24:12 PM

Title: Changed PHP settings, can't connect to webpages...
Post by: haymann on October 12, 2007, 05:24:12 PM
I don't know why this is a problem, but maybe someone will be able to help...

I was changing some PHP settings so that I could upload some large images to my server. All was going fine until I tried to increase the memory limit.
I had set the Max Execution Time to 300
Code: [Select]
db configuration setprop php MaxExecutionTime 300The Upload Max Filesize to 50
Code: [Select]
db configuration setprop php UploadMaxFilesize 50And I ran the following between the two commands that I just mentioned
Code: [Select]
expand-template /etc/php.ini
Code: [Select]
/etc/init.d/httpd-e-smith restartI tried the web page after each step and it loaded fine.

Then I ran
Code: [Select]
db configuration setprop php MemoryLimit 64
Code: [Select]
expand-template /etc/php.ini
Code: [Select]
/etc/init.d/httpd-e-smith restartand now I can't get to any webpage on that server. I don't get an error, just a page cannot be displayed in IE, and unable to connect in Firefox... I have since went back and changed the PHP settings to their default values (http://wiki.contribs.org/DB_Variables_Configuration#Php), and it has not helped at all. 

When I run
Code: [Select]
db configuration show I see
Quote
httpd-e-smith=service
    TCPPort=80
    access=public
    status=enabled
and
Quote
php=service
    AllowUrlFopen=Off
    MaxExecutionTime=30
    MemoryLimit=32
    UploadMaxFilesize=10
    status=enabled
This is a fully updated 7.2 server, and I should point out that I am able to VPN and SSH into it just fine as I am not at that location...

What other relevant information should I include?
Thanks!
Ryan
Title: Re: Changed PHP settings, can't connect to webpages...
Post by: haymann on October 12, 2007, 05:44:29 PM
OK so searching through the /var/log/httpd error logs turned this up
Code: [Select]
[crit] (28)No space left on device: mod_rewrite: could not create rewrite_log_lock
Configuration Failed
I googled it and it looks like it is something to do with apache not being able to restart...

I tried
Code: [Select]
ipcs -s | grep www
Code: [Select]
ipcs -s | grep www | perl -e 'while (<STDIN>) { @a=split(/\s+/); print `ipcrm sem $a[1]`}' based off of the Google hits, but so far it still hasn't started. I'll try a reboot when the site hits lunch hour...
Title: Re: Changed PHP settings, can't connect to webpages...
Post by: haymann on October 12, 2007, 06:25:35 PM
I did find this post (http://forums.contribs.org/index.php?topic=33171.0) once I found the error message, but I am still not getting it to start...
Title: Re: Changed PHP settings, can't connect to webpages...
Post by: haymann on October 12, 2007, 08:19:38 PM
Arrrg...

Well, after trying everything I have mentioned before and getting nowhere. I finally looked a little closer at the error log and saw that I was getting an out of memory error when the server was re-generating the certificates. So I kept increasing the PHP memory limit all the way to 128 and I kept getting the errors... I then looked closely and realized that I had the PHP memory limit set to 128 bytes!

I had assumed there was a typo in the documentation (http://wiki.contribs.org/Useful_Commands#PHP_Related_Commands) and that Mb was really supposed to be MB. Now I am confused though, should the documentation say bytes instead of Mb? :-? I have been looking at this for too long and my head huts...

So to summarize, it looks like I tried to up the PHP Memory Limit to 64MB, I had actually set it to 64bytes...
Ryan
Title: Re: Changed PHP settings, can't connect to webpages...
Post by: Normando on October 12, 2007, 11:55:40 PM
Yes, you must specify "M". I have fixed the wiki page.
Sorry for that.

See my bug comment.
http://bugs.contribs.org/show_bug.cgi?id=2035#c38