The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

php5/php4 woes

Discussion in 'General Discussion' started by hbidad, Mar 24, 2008.

  1. hbidad

    hbidad Well-Known Member

    Joined:
    Apr 16, 2005
    Messages:
    74
    Likes Received:
    1
    Trophy Points:
    8
    I'm having an issue with using php5 (dso) and php4 (cgi as a secondary)

    php5 works fine, but when switched to php4 in cPanel or through .htaccess the following error is displayed.

    Code:
    Warning: Unexpected character in input: '' (ASCII=21) state=1 in /usr/local/cpanel/cgi-sys/php4 on line 382
    
    Warning: Unexpected character in input: ' in /usr/local/cpanel/cgi-sys/php4 on line 382
    
    Parse error: syntax error, unexpected T_STRING in /usr/local/cpanel/cgi-sys/php4 on line 382
    I recompiled a few times, removed /usr/local/cpanel/cgi-sys/php4 and ran /usr/local/cpanel/bin/rebuild_phpconf

    Any insight?
     
  2. chizran

    chizran Registered

    Joined:
    Jan 16, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I have the same problem.
    Any ideas?
     
  3. hbidad

    hbidad Well-Known Member

    Joined:
    Apr 16, 2005
    Messages:
    74
    Likes Received:
    1
    Trophy Points:
    8
    Have you had any Luck with this?
     
  4. jdlightsey

    jdlightsey Perl Developer III
    Staff Member

    Joined:
    Mar 6, 2007
    Messages:
    126
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Houston Texas
    cPanel Access Level:
    Root Administrator
  5. meeti

    meeti Well-Known Member

    Joined:
    Dec 25, 2007
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16
  6. vinisha_g

    vinisha_g Registered

    Joined:
    Mar 2, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    fix

    Hello,

    You can fix it by enabling the option cgi.fix_pathinfo=0 in the php.ini. It worked out for me.:)
     
  7. Webfreak

    Webfreak Registered

    Joined:
    Nov 21, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Uitenhage, Eastern Cape, South-Africa
    Yes, it worked

    Yes, this worked for me.

    In /usr/local/php4/lib/php.ini

    Under
    ;;;;;;;;;;;;;;;;;;;;;;;;;
    ; Paths and Directories ;
    ;;;;;;;;;;;;;;;;;;;;;;;;;

    UNCOMMENT this line
    Code:
    ;cgi.fix_pathinfo=0
    (i.e. remove the ";" infront)

    and

    CHANGE 0 to 1:
    Code:
    cgi.fix_pathinfo=1
    Save and that's it. Instant fix!

    See: http://forums.cpanel.net/showthread.php?p=399697

    Thanks...
     
  8. katz_global

    katz_global Well-Known Member
    PartnerNOC

    Joined:
    Oct 18, 2003
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Hosting from: Panama, Hong Kong, Singapore, Malays
    That made the error go away, but the database now says that it is broken.


    Database error
    The database has encountered a problem.

    hmmmm
     
  9. tuxicans

    tuxicans Active Member

    Joined:
    Oct 16, 2008
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    If you are running 2 versions of php and you try to change php4 to run n cgi handler this issue has been reported. Another solution would be to use suphp which will have almost the same effect. But then you will have to clear the cache and session information for all the domains to function properly.

    The database issue you mentioned does no seems to be related to this issue. Please make sure mysql modules on php has been enabled properly.
     
Loading...
Similar Threads - php5 php4 woes
  1. durangod
    Replies:
    2
    Views:
    218

Share This Page