Go Back   vb.org Archive > Community Discussions > Forum and Server Management
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-26-2009, 11:01 PM
James Birkett James Birkett is offline
 
Join Date: Jun 2009
Posts: 633
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 10-27-2009, 08:19 PM
RenatoMN's Avatar
RenatoMN RenatoMN is offline
 
Join Date: Nov 2008
Location: Brazil
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 10-27-2009, 10:39 PM
James Birkett James Birkett is offline
 
Join Date: Jun 2009
Posts: 633
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 10-28-2009, 03:01 PM
TurkeySub TurkeySub is offline
 
Join Date: Jul 2009
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by James Birkett View Post
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?
Reply With Quote
  #5  
Old 10-28-2009, 04:32 PM
James Birkett James Birkett is offline
 
Join Date: Jun 2009
Posts: 633
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 10-28-2009, 05:19 PM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 10-28-2009, 05:25 PM
James Birkett James Birkett is offline
 
Join Date: Jun 2009
Posts: 633
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #8  
Old 10-28-2009, 08:09 PM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #9  
Old 10-28-2009, 08:54 PM
James Birkett James Birkett is offline
 
Join Date: Jun 2009
Posts: 633
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #10  
Old 10-28-2009, 11:49 PM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:26 AM.


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.04273 seconds
  • Memory Usage 2,251KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete