PHP won't work for sub-servers?

6 posts / 0 new
Last post
#1 Mon, 01/13/2014 - 11:33
BrandonJ179

PHP won't work for sub-servers?

Basically I have a php script in a sub server (sub domain), and I upload a php script and try to run it but it doesn't run? It just shows me the php code, how to fix that? Thanks!

Mon, 01/13/2014 - 12:19
andreychek

Howdy,

If you go into Server Configuration -> Website Options for that Sub Server, what is the PHP Execution Mode set to?

-Eric

Mon, 01/13/2014 - 20:14
BrandonJ179

PHP Script execution mode is set to : Apache mod_php (run as Apache's user)

Mon, 01/13/2014 - 22:15
andreychek

What if you set it to FCGI or CGI, do PHP scripts begin to work as expected at that point?

-Eric

Mon, 01/13/2014 - 23:20
BrandonJ179

If I set it to CGI wrapper, it loads slow but works. If I set it to FGCId, it loads fast and well.

(My main domain is auto-set to FGCId, does that explain it?)

Tue, 01/14/2014 - 09:58
andreychek

Howdy,

Ah, yeah, it sounds like the Sub-Server Template may be configured to set new Sub-Servers to "mod_php".

To correct that for new domains, go into System Settings -> Server Templates -> Settings for Sub-Servers -> Apache Website, and there, make sure "Default PHP execution mode" is set to FCGID.

-Eric

Topic locked