Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Member
    Join Date
    Apr 2005
    Posts
    73

    Default php5/php4 woes

    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. #2
    Registered User
    Join Date
    Jan 2007
    Posts
    2

    Default

    I have the same problem.
    Any ideas?

  3. #3
    Member
    Join Date
    Apr 2005
    Posts
    73

    Default

    Have you had any Luck with this?

  4. #4
    cPanel Staff
    Join Date
    Mar 2007
    Posts
    113

    Default

    This is frequently caused by DiscardPath. Read the "CGI Considerations" section here:

    http://www.cpanel.net/support/docs/e..._requests.html

  5. #5
    Member
    Join Date
    Dec 2007
    Posts
    119

    Default

    Quote Originally Posted by jdlightsey View Post
    This is frequently caused by DiscardPath. Read the "CGI Considerations" section here:

    http://www.cpanel.net/support/docs/e..._requests.html
    Hi,

    by the way

    1) how can we fix it ?

    2) which one will be better?


    thanks

  6. #6
    Registered User
    Join Date
    Mar 2008
    Posts
    1

    Default fix

    Hello,

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

  7. #7
    Registered User
    Join Date
    Nov 2004
    Location
    Uitenhage, Eastern Cape, South-Africa
    Posts
    4

    Thumbs up 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. #8
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Oct 2003
    Location
    Hosting from: Panama, Hong Kong, Singapore, Malaysia, China, India, USA and Australia
    Posts
    68

    Default

    That made the error go away, but the database now says that it is broken.


    Database error
    The database has encountered a problem.

    hmmmm
    International Offshore Hosting from Hong Kong, Singapore, Panama, Malaysia, India, China, Australia and the USA.

    Authorized cPanel PartnerNOC in 8 countries.

    www.katzglobal.com

  9. #9
    Member tuxicans's Avatar
    Join Date
    Oct 2008
    Posts
    38

    Default

    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.
    Tuxicans
    24x7 Webhosting Support
    24x7 Server Administration

Similar Threads & Tags
Similar threads

  1. php4 + php5
    By BlakeM in forum cPanel and WHM Discussions
    Replies: 19
    Last Post: 10-01-2007, 11:57 AM
  2. How to php4 and php5 (.php5) in same server?
    By strikinado in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 06-09-2007, 12:01 PM
  3. PHP4 or PHP5
    By geraldo in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 11-03-2004, 12:59 PM
  4. PHP4 to PHP5
    By iti in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 09-04-2004, 03:15 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube