vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Forum and Server Management (https://vborg.vbsupport.ru/forumdisplay.php?f=232)
-   -   Stop PHP executing on a (or multiple) sub-domain(s) (https://vborg.vbsupport.ru/showthread.php?t=226841)

James Birkett 10-26-2009 11:01 PM

Stop PHP executing on a (or multiple) sub-domain(s)
 
Server: Fedora 7 i686 virtuozzo
cPanel 11.24.5-R38506
WHM 11.24.2 - X 3.9

I'm trying to stop PHP from parsing (executing) on sub domains so that I can offer my VIP members a free sub-domain for their portfolio's (I run a GFX-related forum).

Is this possible?

I don't want it globally disabled for obvious reasons - just for specified sub-domains.

Thanks in advance.

P.S: It's my own VPS.

RenatoMN 10-27-2009 08:19 PM

What you mean by "PHP executing"?

vBulletin don't allow PHP code to be executed in the frontend. The [PHP] bbcode is there just for code highlighting.

James Birkett 10-27-2009 10:39 PM

This isn't forum-related it's server-related. I posted it here because it's "Forum and Server Management" and this comes under server management.

I want to stop PHP from parsing or executing on sub-forums on my server - not my forum. I know I can globally stop PHP - but I just want to stop it on certain sub-forums.

I am aware of the BBCodes ;)

Woops.. title said sub-forums. Dammit. I've done that so many times on Google searches ;(.

Sorry guys.

TurkeySub 10-28-2009 03:01 PM

Quote:

Originally Posted by James Birkett (Post 1907181)
This isn't forum-related it's server-related. I posted it here because it's "Forum and Server Management" and this comes under server management.

I want to stop PHP from parsing or executing on sub-forums on my server - not my forum. I know I can globally stop PHP - but I just want to stop it on certain sub-forums.

I am aware of the BBCodes ;)

Woops.. title said sub-forums. Dammit. I've done that so many times on Google searches ;(.

Sorry guys.

Are you asking if you setup new accounts as sub-domains off your primary domain if you can manage whether or not they have access to PHP?

Are you using a control panel or manual editing apache?

James Birkett 10-28-2009 04:32 PM

I have a VIP feature which is the ability to have a sub-domain set up for their own personal use - as I explained in the first post.

Of course, I don't want that to be abused in any way so I would like to disable PHP on that sub-domain so that they cannot run PHP scripts on their sub-domain.

I am using cPanel and WHM - that is all I am using to run my server. I am hoping there's a configuration option.

snakes1100 10-28-2009 05:19 PM

You try this in a php.ini in their public folder?
engine = Off

Then chown to root & chmod the php.ini to 000 so they cant see or access it.

James Birkett 10-28-2009 05:25 PM

I'll try it.

I'm not familiar with chowning, got any idea what command i'd use?

Also, would this be in effect only for that sub-forum or throughout everything?

EDIT: I created a file named "php.ini" and put in it "engine = Off" and it hasn't worked.

snakes1100 10-28-2009 08:09 PM

chown -h

chown root:root php.ini

It should only be in that users sub-domain folder
xxxx.xxxxx.xxx/username

When apache/php was compiled, was rights given to allow php.ini overwirte by users?

James Birkett 10-28-2009 08:54 PM

The sub-domain is:
../public_html/{sub-domain} which is where I placed the php.ini.

I'm not sure if the rights were given - the installation of everything was there before I bought the server. Any way I can check?

snakes1100 10-28-2009 11:49 PM

try a simple php flag like memory_limit and view a phpinfo file from that location and see if it raises the limit, you should have the two columns in phpinfo and the memory limit for the local side should rise, if not you will need to recompile apache/php.


All times are GMT. The time now is 01:36 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01045 seconds
  • Memory Usage 1,733KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete