NYCPHP Meetup

NYPHP.org

[nycphp-talk] Server switch

Hans Zaunere hans at nyphp.org
Thu Dec 12 13:54:33 EST 2002


--- Jim Musil <jim at nettmedia.com> wrote:
> Hi,
> 
> I'm trying to move a group of sites from an internal overburdened server to
> a new colocated server.
> 
> I'm having a few problems with some PHP commands that don't want to work on
> the new environment.
> 
> 1. The mail() command no longer works. Although I can send mail using
> popen() to communicate directly with sendmail.

Search phpinfo() output for sendmail and smtp.  Make sure sendmail_path is
correct, and that the UID PHP/Apache is running as can execute it.  And watch
sendmail's logs to see what's going on.  /var/log/maillog and the -X switch
to sendmail can be helpful.

> 2. My fsockopen() behaves differently. For certain reasons, I need to
> connect to a mail server and an ftp server via a socket. These
> communications no longer work.

In what way?  What do errno and errstr say?

> It appears to have something to do with the line endings.

Hmm, odd, maybe:
http://www.php.net/manual/en/ref.filesystem.php#ini.auto-detect-line-endings

> 3. When connecting via FTP (not through PHP), it takes 20-30 seconds to
> connect. Once connected everything works great and I can navigate through
> directories as quickly as shell. I included this oddity because it seems
> related.

Yeah, maybe everything is just timing out.  Check DNS responsiveness, rDNS
setup, and /var/log/messages and /var/logl/maillog.  Do you see this behavior
with all protocols? (ie lynx http://google.com)

> The server configuration is similar but not identical. I realize this isn't
> enough information to work with, but I'm hoping that maybe someone has
> dealt
> with this situation before. Or maybe someone could just give me some
> general
> areas to inspect.
> 
> Here's some info on the servers:
> 
>             OLD             NEW
> System      SunOS 5.8       Linux 2.4.2-2
> PHP         4.1.2           4.2.2

I'd try to run with a newer kernel, uhh, like 2.4.18.  Or maybe your colo
facility's link is just saturated :)

H


=====
Hans Zaunere
New York PHP
http://nyphp.org
hans at nyphp.org



More information about the talk mailing list