Koozali.org: home of the SME Server

Changed PHP settings, can't connect to webpages...

Offline haymann

  • *
  • 212
  • +0/-0
Changed PHP settings, can't connect to webpages...
« 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, 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

Offline haymann

  • *
  • 212
  • +0/-0
Re: Changed PHP settings, can't connect to webpages...
« Reply #1 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...
« Last Edit: October 12, 2007, 05:51:42 PM by haymann »

Offline haymann

  • *
  • 212
  • +0/-0
Re: Changed PHP settings, can't connect to webpages...
« Reply #2 on: October 12, 2007, 06:25:35 PM »
I did find this post once I found the error message, but I am still not getting it to start...

Offline haymann

  • *
  • 212
  • +0/-0
Re: Changed PHP settings, can't connect to webpages...
« Reply #3 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 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

Offline Normando

  • *
  • 841
  • +2/-1
    • Unixlan
Re: Changed PHP settings, can't connect to webpages...
« Reply #4 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