Community Forums
Connect with us on LinkedIn
  
+ Reply to Thread
Page 5 of 5 FirstFirst ... 3 4 5
Results 61 to 68 of 68
  1. #61
    Member
    Join Date
    Feb 2005
    Posts
    312

    Default

    Quote Originally Posted by Radio_Head
    I installed php 5.1.2 using cpanel.

    As a result when i try to open a php I have only the option to download a file.
    How to fix that ?
    Sounds like somethings wrong with the httpd.conf:
    /usr/local/apache/conf/httpd.conf

    look for the following:
    #LoadModule php5_module libexec/libphp5.so
    #AddModule mod_php5.c

    --the modules should be commented out and handlers put in (you can run the modules if you wish, but I find it's best otherwise)
    DirectoryIndex index.html index.wml index.cgi index.shtml index.jsp index.js index.jp index.php4 index.php3 index.php index.phtml index.htm default.htm default.html home.htm
    AddHandler application/x-httpd-php .php .php5 .php4 .php3
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php .php5
    AddType application/x-httpd-php .php4
    AddType application/x-httpd-php .php3
    AddType application/x-httpd-php-source .phps
    AddType application/x-httpd-php .phtml


    without the the AddTypes, apache wont know what to do with php files so it assumes it's just a file, the browser doesn't recognize the filetype so it assumes it should just save it.

  2. #62
    Member This forum account has been confirmed by cPanel staff to represent a vendor. Radio_Head's Avatar
    Join Date
    Feb 2002
    Posts
    2,064

    Default

    I tried such you suggested but nothing to do
    However after /scripts/easypache option 6 with php 5.1.2 , I found 2 copies of php but I cannot see php 5 !

    root@hostname [/usr/local/apache/conf]# /usr/bin/php -v
    PHP 4.4.2 (cgi) (built: May 3 2006 03:58:06)
    Copyright (c) 1997-2006 The PHP Group
    Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
    with Zend Extension Manager v1.0.10, Copyright (c) 2003-2006, by Zend Technologies
    with Zend Optimizer v3.0.0, Copyright (c) 1998-2006, by Zend Technologies
    root@hostname [/usr/local/apache/conf]# /usr/local/bin/php

    root@hostname [/usr/local/apache/conf]# /usr/local/bin/php -v
    PHP 4.4.2 (cli) (built: May 3 2006 03:55:46)
    Copyright (c) 1997-2006 The PHP Group
    Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
    with Zend Extension Manager v1.0.10, Copyright (c) 2003-2006, by Zend Technologies
    with Zend Optimizer v3.0.0, Copyright (c) 1998-2006, by Zend Technologies
    Stop SPAM & VIRUS :: ASSP Deluxe for cPanel http://www.grscripts.com
    █ ASSP Deluxe is supported by Fritz Borgstedt,ASSP main developer.

  3. #63
    Member This forum account has been confirmed by cPanel staff to represent a vendor. Radio_Head's Avatar
    Join Date
    Feb 2002
    Posts
    2,064

    Default

    nothing to do . I tried also to compile php 5.1.2 itselfs using the instructions here
    Php 5.1 but using latest zend 3.0

    or I receive a white page , or a download page whe I open a php page , or phpinfo shows 4.4.2 when it should show 5.1.2 !

    addhanlders and addtype are all there .

    I tried also to compile 5.1.3 , nothing to do ..

    The problem should not be zend opt , since I have latest zend 3.0.
    Last edited by Radio_Head; 05-03-2006 at 05:46 AM.
    Stop SPAM & VIRUS :: ASSP Deluxe for cPanel http://www.grscripts.com
    █ ASSP Deluxe is supported by Fritz Borgstedt,ASSP main developer.

  4. #64
    Member
    Join Date
    Feb 2005
    Posts
    312

    Default

    Quote Originally Posted by Radio_Head
    nothing to do . I tried also to compile php 5.1.2 itselfs using the instructions here
    Php 5.1 but using latest zend 3.0

    or I receive a white page , or a download page whe I open a php page , or phpinfo shows 4.4.2 when it should show 5.1.2 !

    addhanlders and addtype are all there .

    I tried also to compile 5.1.3 , nothing to do ..

    The problem should not be zend opt , since I have latest zend 3.0.
    check /usr/bin/php -v
    and /usr/local/bin/php -v
    again, to see where it installed 5.1.2--if you followed those instructions then it's there somewhere, but it may not be the one that gets executed by apache.

    also, in the buildapache area on cpanel, make sure ONLY 5.1.2 is checked and no other php versions (it is supposed to default to the higest one if multiple versions are selected, but this doesn't seem to happen all the time)

  5. #65
    Member This forum account has been confirmed by cPanel staff to represent a vendor. Radio_Head's Avatar
    Join Date
    Feb 2002
    Posts
    2,064

    Default

    on /usr/bin/php

    I have 4.4.2 cgi

    A question...

    How can I know exactly the location of php (bin location) currently used by apache ?
    Stop SPAM & VIRUS :: ASSP Deluxe for cPanel http://www.grscripts.com
    █ ASSP Deluxe is supported by Fritz Borgstedt,ASSP main developer.

  6. #66
    Member
    Join Date
    Feb 2005
    Posts
    312

    Default

    Quote Originally Posted by Radio_Head
    on /usr/bin/php

    I have 4.4.2 cgi

    A question...

    How can I know exactly the location of php (bin location) currently used by apache ?
    does that imply that /usr/local/bin/php was 5.1.2?
    if so, just copy that binary over to /usr/bin and you'l be ok (for now).

    I *think* apache uses the path from /etc/bashrc--apache runs as nobody which has shell /sbin/nologin which I THINK (I'm not positive--hopefully someone can validate this) executes processes similarly to a bash shell.

  7. #67
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Apache uses /usr/bin/php when running it with phpsuexec. You can get this from:

    strings /usr/local/apache/bin/httpd | grep php

    If you're running it as a module, then it's using:

    /usr/local/apache/libexec/libphp*.so

    Obviously, when you run a php script from shell, the binary used is the one you specifiy (or the one which first appears in your path statment):

    whereis php
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  8. #68
    cPanel Partner NOC cPanel Partner NOC Badge myusername's Avatar
    Join Date
    Mar 2003
    Location
    chown -R us.us *yourbase*
    Posts
    712
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    Quote Originally Posted by ZapX.net
    Glad to see php5.1.2 supported in CPanel n ow. I've decided to do upgrades of PHP separate from when they are available in WHM, because CPanel is just too slow with having new versions available.

    Now I have php5.1.2 and MySQL5.0.18 working wonderfully.

    Brandon
    Lucky you. This is what buildapache says for me:

    Invalid Configuration: php-504 blocks install because [MySQL 5.0.21 or later required.]
    or
    Invalid Configuration: php-505 blocks install because [MySQL 5.0.21 or later required.]
    Invalid Configuration: php-512 blocks install because [MySQL 5.0.21 or later required.]
    Invalid Configuration: php-514 blocks install because [MySQL 5.0.21 or later required.]

    Anyone know off the top of their head if this is a bug or actually the case?

    This is a stable build, which looks like mysqlup goes to 5.0.18-standard

    I couldn't find anything in the changelog regarding MySQL 5.0.21 support on later builds.
    I am guessing mysqlup uses yum which in turn is telling my system to use what CentOS considers a good version to use. No?

    Any clues?
    Last edited by myusername; 06-14-2006 at 08:08 PM.
    GlowHost.com | Professional Managed Web Hosting Since 2002.
    >> Fully Managed Dedicated, Cloud VDS, Reseller & Semi-Dedicated
    >> Cloud Servers for Enterprise

+ Reply to Thread
Page 5 of 5 FirstFirst ... 3 4 5
Similar Threads & Tags
Similar threads

  1. Individual php.ini files for PHP FCGI and PHP CGI
    By Miraenda in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 08-22-2011, 08:55 AM
  2. Two php extentions (index.php.php)
    By mcyates in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 04-02-2007, 09:30 PM
  3. Replies: 5
    Last Post: 01-05-2007, 12:41 PM
  4. New VPS site loading but clicking php link just redirect to index.php
    By ozegreatdeals in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 01-20-2006, 06:38 AM
  5. php safe_mode on and /usr/lib/php/DB.php error
    By naox in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 10-09-2005, 05:49 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube