Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


whmcs help
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

whmcs help

cosmicgatecosmicgate Member
edited May 2012 in General

hi guys i moved my whmcs from one host (running nginx) to another (apache httpd) but now im having some problem. Whmcs keep throwing up the msg that i need to chmod 777 to the templates_c directory. Now if i put my templates_c directory in the www folder of httpd, everything is fine and dandy but i want to move it to somewhere else, like /home/blablabla but it won't allow me to do so. I'm not having any problems on nginx, as a matter of fact i can even move my templates_c folder to the /root directory. However in apache, i can't do so. Is this an apache restriction/setting?

Before you all direct me to whmcs, i already tried contacting them but with the recent hack, support has been really slow! So yeah, i need your help now LET, please.

Comments

  • Have you added the full path to the configuration.php, such as

    $templates_compiledir = "/home/username/templates_c/";
    $attachments_dir = "/home/username/attachments/";
    $downloads_dir = "/home/username/downloads/";

  • yes i did, path is correct in configuration.php. Chmod 777 as well.

  • Is PHP running as cli or suPHP?

  • jarjar Patron Provider, Top Host, Veteran
    edited May 2012

    I believe you need to alter the default file in /etc/apache2/sites-enabled to change the default folder. Be sure to restart apache whatever you do.

    Edit: I think you're ahead of me there, need to work on my reading skills ;)

  • @onepound said: Is PHP running as cli or suPHP?

    how do i tell if its running cli/suphp? Perhaps its cli because i have not installed suphp.

  • @jarland said: I believe you need to alter the default file in /etc/apache2/sites-enabled to change the default folder. Be sure to restart apache whatever you do.

    Edit: I think you're ahead of me there, need to work on my reading skills ;)

    The default folder for my www files are correct.(i have a few vhosts so yeah) If i move templates_c out of the www folder, whmcs is broken. If i put templates_c on in the www folder, everything works.

  • rds100rds100 Member

    Your apache probably has no permissions to access the directory where you create the templates_c subdir.

  • @rds100 said: Your apache probably has no permissions to access the directory where you create the templates_c subdir.

    Yeah, that's what i thought too. How to give permission to apache to access it? Sorry i'm a noob.

  • rds100rds100 Member

    @cosmicgate chmod 755 or at least 711 the dir in question.

  • phpinfo file will give you full details of your php installation. Certainly sounds like is running as CLI, running as suPHP any folder within the public_html chmoded above 755 will give an 'Internal Server Error'

    Check your apache logs, that should give more info on this error.

  • @rds100 said: @cosmicgate chmod 755 or at least 711 the dir in question.

    He's already chmod'd them to 777 according to the 3rd post

  • rds100rds100 Member

    @onepound he is chmodding 777 /home/whatever/templates_c
    But if /home/whatever is 700 - apache will have no access to the templates_c subdir, regardless of it's 777 mode.

  • @rds100 said: But if /home/whatever is 700 - apache will have no access to the templates_c subdir, regardless of it's 777 mode.

    Yep, good call. Hopefully the logs will confirm permissions issue

  • still doesn't work.

    I have chmod-ed 777 /home/whatever -R

    i have chown-ed apache /home/whatever

    Nothing wrong on the accesslog of apache.

    still stuck.

  • rds100rds100 Member

    You'd want to check the error log too.

  • there is no error log because it is only a permission error. I have already set the error log level to log everything.

  • mrl14mrl14 Member

    You need to add this to your config file

    $templates_compiledir = "templates_c/";

    *note the path and chmod it 777.

  • klikliklikli Member

    open_basedir?

  • @mrl14 said: You need to add this to your config file

    $templates_compiledir = "templates_c/";

    *note the path and chmod it 777.

    Done that, doesn't work. WHMCS only works if i put it on my www document directory. Anything outside of that directory doesn't seem to work on apache.

    @klikli said: open_basedir?

    erm, can you elaborate on what's that?

  • vedranvedran Veteran

    If open_basedir PHP directive is set and your templates_c/ is outside of specified path, PHP will not open it. Although that "You need to chmod to 777" error is a bit misleading then.

    Anyway, check phpinfo() and see what does it say under open_basedir

  • cosmicgatecosmicgate Member
    edited May 2012

    @vedran said: If open_basedir PHP directive is set and your templates_c/ is outside of specified path, PHP will not open it. Although that "You need to chmod to 777" error is a bit misleading then.

    Anyway, check phpinfo() and see what does it say under open_basedir

    open_basedir is disabled from phpinfo. I went to check at php.ini as well just to be sure, and yes it is disabled.

Sign In or Register to comment.