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.

Local php.ini not working

Discussion in 'General Discussion' started by testlog_4u, Jul 14, 2008.

  1. testlog_4u

    testlog_4u Active Member

    Joined:
    Sep 17, 2007
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    /home/username/public_html/php.ini not taking any effect for any user in the server. Server running wuth PHPsuexec enabled. Where I would have to check?

    Apache/2.2.9
    PHP 5.2.6

    Thanks
     
  2. EH-Chris

    EH-Chris Member

    Joined:
    Sep 20, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
  3. testlog_4u

    testlog_4u Active Member

    Joined:
    Sep 17, 2007
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    Thank you for this. After making codes in .htaccess and php.ini files in the particular user I am getting 500 Internal Server Error. cPanel is updated.

    Thank you,
     
  4. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,382
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
  5. testlog_4u

    testlog_4u Active Member

    Joined:
    Sep 17, 2007
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Hey..

    Thank you for this .. checking the thread ..

     
  6. testlog_4u

    testlog_4u Active Member

    Joined:
    Sep 17, 2007
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Hello sparek-3

    Hello,

    I have gone through that thread and just need to set Include I think. I have also did as per your post in the same thread but still no luck. Can you please help to where I set Include in httpd.conf and what I need to add in it. I have created an include file manually ../usr/local/apache/conf/userdata/username/addon.domain.com/test.conf

    This is VirtualHost entry in httpd.conf I have

    <VirtualHost server IP:80>
    ServerName addon.domain.com
    ServerAlias addondomainname www.addondomainname
    ServerAlias www.addon.domain.com
    DocumentRoot /home/username/public_html/addondomain.com
    ServerAdmin webmaster@addon.domain.com
    ## User username # Needed for Cpanel::ApacheConf
    UseCanonicalName off
    <IfModule mod_suphp.c>
    suPHP_UserGroup username username
    </IfModule>
    <IfModule concurrent_php.c>
    php4_admin_value open_basedir "/home/username:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"
    php5_admin_value open_basedir "/home/username:/usr/lib/php:/usr/local/lib/php:/tmp"
    </IfModule>
    <IfModule !concurrent_php.c>
    <IfModule mod_php4.c>
    php_admin_value open_basedir "/home/username:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"
    </IfModule>
    <IfModule mod_php5.c>
    php_admin_value open_basedir "/home/username:/usr/lib/php:/usr/local/lib/php:/tmp"
    </IfModule>
    <IfModule sapi_apache2.c>
    php_admin_value open_basedir "/home/username:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"
    </IfModule>
    </IfModule>
    <IfModule !mod_disable_suexec.c>
    SuexecUserGroup username username
    </IfModule>

    CustomLog /usr/local/apache/domlogs/addon.domain.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
    CustomLog /usr/local/apache/domlogs/addon.domain.com combined
    ScriptAlias /cgi-bin/ /home/username/public_html/addon.domain.com/cgi-bin/
    # To customize this VirtualHost use an include file at the following location
    # Include "/usr/local/apache/conf/userdata/username/addon.domain.com/*.conf"
    </VirtualHost>

    Thanks in advance,
     
  7. testlog_4u

    testlog_4u Active Member

    Joined:
    Sep 17, 2007
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    I tried with this also as per your post ...at here

     
  8. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,382
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    What is the contents of /usr/local/apache/conf/userdata/username/addon.domain.com/test.conf?

    Did you run:

    /scripts/ensure_vhost_includes --user=username

    as well?
     
  9. testlog_4u

    testlog_4u Active Member

    Joined:
    Sep 17, 2007
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Contents of /usr/local/apache/conf/userdata/username/addon.domain.com/test.conf :

    <IfModule mod_suphp.c>
    suPHP_ConfigPath /home/username/php
    </IfModule>

    Yes I did run /scripts/ensure_vhost_includes --user=username and there was no output for this.
     
  10. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,382
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Oh, I see the problem.

    The filename/path has to be:

    /usr/local/apache/conf/userdata/std/2/username/addon.domain.com/test.conf

    you're missing some of that
     
  11. testlog_4u

    testlog_4u Active Member

    Joined:
    Sep 17, 2007
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Sorry it didn't work, I think I have to recompile apache with mod_suphp
     
  12. angitha

    angitha Member

    Joined:
    Aug 16, 2007
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Try out this if its php5.

    mv /usr/local/cpanel/cgi-sys/php5 /usr/local/cpanel/cgi-sys/php5.bin
    create a file /usr/local/cpanel/cgi-sys/php5 and add the following:

    #!/bin/bash

    # This will fake the name & path and hide the /usr/local/cpanel/cgi-sys/php5 path!
    export SCRIPT_NAME=$REQUEST_URI
    export SCRIPT_FILENAME=$PATH_TRANSLATED
    export PWD=$DOCUMENT_ROOT

    if [ -f "$DOCUMENT_ROOT/php.ini" ]; then
    exec /usr/local/cpanel/cgi-sys/php5.bin -c $DOCUMENT_ROOT
    else
    exec /usr/local/cpanel/cgi-sys/php5.bin
    fi

    Change the permission:
    chown root:wheel /usr/local/cpanel/cgi-sys/php5*;
    chmod 755 /usr/local/cpanel/cgi-sys/php5*;

    It worked for me :)
     
Loading...

Share This Page