PHP version...

Discussion in 'Installation/Configuration' started by ctroyp, Oct 9, 2005.

Thread Status:
Not open for further replies.
  1. ctroyp

    ctroyp New Member HowtoForge Supporter

    What do you mean Apache is dying?
     
  2. falko

    falko Super Moderator ISPConfig Developer

    It stops working...
     
  3. ctroyp

    ctroyp New Member HowtoForge Supporter

    I meant, what indicated that it stopped working? I must have missed that in the info I posted...
     
  4. falko

    falko Super Moderator ISPConfig Developer

    In the log it reads
     
  5. ctroyp

    ctroyp New Member HowtoForge Supporter

    I would like to stick with Fedora if at all possible...

    That said, I may try to use a different version of PHP for the Main Apache. But, before I do anything, I need to check for some hardware problems, namely memory. After googling, I found many different solutions for the segfault. I will reseat the memory sticks to see if it helps, but I am not too sure that is the problem. The second most popular solution was a mod_php4 issue. I'm not too sure what to do there beyond up/downgrading the PHP version again.

    If I don't have any success there, who knows, I will either have to stick with PHP5 and find other solutions besides PHPBB2 and osCommerce, or let one of you guys SSH into my system to try and locate the problem. I feel that I am a good at troubleshooting problems, but it is hard when I only have a couple weeks of experience with Linux itself...
     
  6. ctroyp

    ctroyp New Member HowtoForge Supporter

    I ran Apache in debug mode and found that the error (SegFault) occurs only when I try to access a page from either of my ISPConfig websites. I can successfully access anything on port 81 (CP, PHPMyAdmin, etc).

    Here is the error that comes up:
    Code:
    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread -1208805696 (LWP 32588)]
    php_apache_sapi_get_stat () at /StrecDownloads/php-4.4.0/sapi/apache2handler/sapi_apache2.c:173
    173             ctx->finfo.st_uid = ctx->r->finfo.user;
    
    and here is the backtrace for it:
    Code:
    (gdb) bt
    #0  php_apache_sapi_get_stat () at /StrecDownloads/php-4.4.0/sapi/apache2handler/sapi_apache2.c:173
    #1  0x010375bb in php_statpage () at /StrecDownloads/php-4.4.0/ext/standard/pageinfo.c:73
    #2  0x0103761b in php_getuid () at /StrecDownloads/php-4.4.0/ext/standard/pageinfo.c:99
    #3  0x0107411f in php_checkuid_ex (filename=Variable "filename" is not available.
    ) at /StrecDownloads/php-4.4.0/main/safe_mode.c:150
    #4  0x010743e6 in php_checkuid (filename=0x95b096c "/home/www/web1/phptmp/", fopen_mode=0x0, mode=3)
        at /StrecDownloads/php-4.4.0/main/safe_mode.c:191
    #5  0x01000bb4 in OnUpdateSaveDir (entry=0x95996d0, new_value=0x95b096c "/home/www/web1/phptmp/", new_value_length=22,
        mh_arg1=0x0, mh_arg2=0x110a420, mh_arg3=0x0, stage=16) at /StrecDownloads/php-4.4.0/ext/session/session.c:123
    #6  0x0109f816 in zend_alter_ini_entry (name=0x9551c90 "session.save_path", name_length=18,
        new_value=0x9458f20 "/home/www/web1/phptmp/", new_value_length=22, modify_type=4, stage=16)
        at /StrecDownloads/php-4.4.0/Zend/zend_ini.c:232
    #7  0x010b21d5 in apply_config (dummy=0x9458e00) at /StrecDownloads/php-4.4.0/sapi/apache2handler/apache_config.c:167
    #8  0x010b1686 in php_handler (r=0x95fae38) at /StrecDownloads/php-4.4.0/sapi/apache2handler/sapi_apache2.c:457
    #9  0x00759f3c in ap_run_handler () from /usr/sbin/httpd
    #10 0x0075a2d7 in ap_invoke_handler () from /usr/sbin/httpd
    #11 0x00756e11 in ap_process_request () from /usr/sbin/httpd
    #12 0x00751693 in _start () from /usr/sbin/httpd
    #13 0x00764afb in ap_run_process_connection () from /usr/sbin/httpd
    #14 0x00764e30 in ap_process_connection () from /usr/sbin/httpd
    #15 0x00757d9e in ap_graceful_stop_signalled () from /usr/sbin/httpd
    #16 0x0075800e in ap_graceful_stop_signalled () from /usr/sbin/httpd
    #17 0x0075812a in ap_graceful_stop_signalled () from /usr/sbin/httpd
    #18 0x00758b0b in ap_mpm_run () from /usr/sbin/httpd
    #19 0x0075f88e in main () from /usr/sbin/httpd
    
    At first sight, does this mean anything to you?

    I notice that the "StrecDownloads" directory is still being accessed. Should the PHP-4.4.0 directory have been placed in another location? This is the directory where I download installation files from the internet.

    Someone reported this as a bug here and Ramsus Lerdorf supplied a fix here.

    I am going to try and apply the patch to see if it helps...
     
    Last edited: Oct 25, 2005
  7. ctroyp

    ctroyp New Member HowtoForge Supporter

    Great news! I figured it out! It was a bug within PHP4...

    Of course there is always something else, but at least my problems have been scaled down. When I access the home page for one of my websites, it displays properly, with the exception of an error message at the top that reads:
    Code:
    Warning: Unknown(): SAFE MODE Restriction in effect. The script whose uid is 0 
    is not allowed to access /home/www/web1/phptmp owned by uid 10001 in Unknown on 
    line 0
    Any ideas?

    -
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, the PHP script is owned by root but it must be owned by the administrator user of the web.
     
  9. ctroyp

    ctroyp New Member HowtoForge Supporter

    Which script though? How do I fix this?
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    The script that you called when you got this error.

    Use the chown command or simply use FTP to upload the PHP files!

    The parameters of the chown command are as follows:

    chown -R nameofwebadminuser:groupoftheweb /directory/of/the/website/
     
  11. ctroyp

    ctroyp New Member HowtoForge Supporter

    That makes sense, but all I did was pull up www.mydomain1.com and it displayed the message. I presume it is referring to an internal script. So if I chmod the /home/www/web1/ directory for my relevant ISPConfig site admin, it should work?

    I'll give it a try, just wanted to assure I understand...thanks!
     
  12. falko

    falko Super Moderator ISPConfig Developer

    Then you should look for a script called index.php, index.php3, index.php4, default.php, etc. in your /home/www/web1/web directory. That's the one that has been called.
     
  13. ctroyp

    ctroyp New Member HowtoForge Supporter

    Well, I don't have any form of 'php' in the web directory. The only thing in that directory is: error and stats directories, and index.html.

    I did the chmod and it didn't help either. :confused:
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    The error is definetly from a PHP script and ISPConfig does not install any PHP script in the web directory when a new web is created.

    So I assume that the script must be in any other directory. Do you have any PHP applications installed in the default web (/var/www) ?
     
  15. ctroyp

    ctroyp New Member HowtoForge Supporter

    I have one php file (contact.php) in my web2 directory. I removed it and searched the /var/www directory as well as the others with a fine tooth comb. I cannot find anything with php in the file/directory names except the 'phptmp' directories.

    Question, if safe mode is disabled in my /etc/php.ini, would this error still show up? I have it turned off...
     
    Last edited: Oct 25, 2005
  16. ctroyp

    ctroyp New Member HowtoForge Supporter

    I received a localhost email that alerted me that some services were not running. I first checked the netstat:
    Code:
    [root@server1 web]# netstat -tap
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name
    tcp        0      0 *:imaps                     *:*                         LISTEN      2004/xinetd
    tcp        0      0 *:32769                     *:*                         LISTEN      1619/rpc.statd
    tcp        0      0 *:pop3s                     *:*                         LISTEN      2004/xinetd
    tcp        0      0 server1.strec.com:32775     *:*                         LISTEN      2699/nautilus
    tcp        0      0 *:mysql                     *:*                         LISTEN      2095/mysqld
    tcp        0      0 *:netbios-ssn               *:*                         LISTEN      31168/smbd
    tcp        0      0 *:pop3                      *:*                         LISTEN      2004/xinetd
    tcp        0      0 *:imap                      *:*                         LISTEN      2004/xinetd
    tcp        0      0 *:sunrpc                    *:*                         LISTEN      1601/portmap
    tcp        0      0 *:81                        *:*                         LISTEN      27551/ispconfig_htt
    tcp        0      0 *:ftp                       *:*                         LISTEN      20723/proftpd: (acc
    tcp        0      0 server1.strec.com:ipp       *:*                         LISTEN      15612/cupsd
    tcp        0      0 server1.strec.com:5335      *:*                         LISTEN      1899/mDNSResponder
    tcp        0      0 *:smtp                      *:*                         LISTEN      20752/master
    tcp        0      0 *:microsoft-ds              *:*                         LISTEN      31168/smbd
    tcp        0      0 localhost:netbios-ssn       localhost:4024              ESTABLISHED 5199/smbd
    tcp        0      0 server1.strec.com:42157     server1.strec.com:5335      ESTABLISHED 2699/nautilus
    tcp        0      0 server1.strec.com:5335      server1.strec.com:42157     ESTABLISHED 1899/mDNSResponder
    tcp        0      0 *:http                      *:*                         LISTEN      10987/httpd
    tcp        0      0 *:ssh                       *:*                         LISTEN      1995/sshd
    tcp        0      0 *:https                     *:*                         LISTEN      10987/httpd
    
    Then opened the ISPConfig CP and went to the ISP Services page, under management:
    Code:
    Web-Server: Offline 
    FTP-Server: Offline 
    SMTP-Server: Offline 
    POP3-Server: Offline 
    BIND-Server: Offline 
    mySQL-Server: Online 
    
    Why would they be offline? I wasn't successful trying to restart them.
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    When yu cant stert them, you should either get error messages on the shell during restart or in the error logs.
     
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    That depends on you php.ini. Maybe you have enabled safemode as default as you configured and compiled your PHP.
     
  19. ctroyp

    ctroyp New Member HowtoForge Supporter

    No, it is turned off in php.ini and I did not enable it when configuring/compiling:
    Code:
    ./configure --with-apxs2=/usr/sbin/apxs --enable-debug --enable-track-vars --enable-sockets --with-config-file-path=/etc/php.ini --enable-ftp  --with-mysq
    ...unless debug turns it on.

    This wouldn't be the ISPConfig php5, right?
     
  20. ctroyp

    ctroyp New Member HowtoForge Supporter

    Here is what was entered into the error log for ISPConfig Apache after a command line restart:
    Code:
    [Tue Oct 25 15:25:35 2005] [notice] SIGHUP received.  Attempting to restart
    [Tue Oct 25 15:25:35 2005] [notice] Apache/1.3.33 (Unix) PHP/5.0.4 mod_ssl/2.8.23 OpenSSL/0.9.8 configured -- resuming normal operations
    [Tue Oct 25 15:25:35 2005] [notice] Accept mutex: sysvsem (Default: sysvsem)
    Checked the ISPConfig CP and it still says Offline for Web-server.

    Wither way, the netstat says it is running:
    Code:
    tcp        0      0 *:81                        *:*                         LISTEN      27551/ispconfig_htt
    
     
    Last edited: Oct 25, 2005
Thread Status:
Not open for further replies.

Share This Page