WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-18-2007, 04:35 AM
WebProWorld Member
 

Join Date: Nov 2006
Location: London
Posts: 60
seorocks RepRank 0
Default PHP Hnadlers - php.ini and .haccess files

Hi All,

i am new to all of this, so my questions might sound silly.

When I was trying to work on my CMS, i needed access to the php.ini and .haccess files to apply the mod re-write and other php handlers. Now some hosting compaines do not allow access to these two files. what i want to know, if i had access JUST to the .haccess file,would i be able to setup the handlers for my php CMS?

or will I need to have access to both files?
also is there any other file i need access to ? i dont wanna join a hosting company and get stuck because i cant do my database/php work on
Many thanks
J
Reply With Quote
  #2 (permalink)  
Old 05-18-2007, 10:08 AM
WebProWorld Veteran
 

Join Date: Aug 2003
Location: Cornwall, UK
Posts: 833
speed RepRank 1
Default

What do you need access to php.ini for and what handlers are you trying to add, with more information it's easier to say if it could all be done via .htaccess or if there's something special you should be looking for.

You should have no problems applying mod_rewrite through .htaccess, we do it all the time for our scripts and our customers.
__________________
TOLRA Micro Systems Limited US & UK Web Hosting with Continuous Data Protection
Web Directory 2 for 1 Offer : Web Directory Script
Reply With Quote
  #3 (permalink)  
Old 05-18-2007, 10:11 AM
WebProWorld Member
 

Join Date: Nov 2006
Location: London
Posts: 60
seorocks RepRank 0
Default

thanks, thats my main concern i guess. the mod rewrite stuff.
Reply With Quote
  #4 (permalink)  
Old 05-18-2007, 10:18 AM
WebProWorld Veteran
 

Join Date: Aug 2003
Location: Cornwall, UK
Posts: 833
speed RepRank 1
Default

In that case if your host allows .htaccess then they usually allow use of mod_rewrite within it.

I say if and usually as just recently with some of our script customers we've come across a couple of hosts that don't allow .htaccess, therefore I would send them a presales request with your requirements and include the mod_rewrite information. Saves signing up and having to cancel and move.
__________________
TOLRA Micro Systems Limited US & UK Web Hosting with Continuous Data Protection
Web Directory 2 for 1 Offer : Web Directory Script
Reply With Quote
  #5 (permalink)  
Old 05-18-2007, 10:18 AM
wige's Avatar
Moderator
WebProWorld Moderator
 

Join Date: Jun 2006
Location: United States
Posts: 1,765
wige RepRank 4wige RepRank 4wige RepRank 4wige RepRank 4
Default

It sounds likely that the documentation was written assuming you own the server and are just installing PHP, but the suggested changes may have already been made by your hosting company, other than mod_rewrite. Although you can't change php.ini, there are scripts you can download that will show the current php.ini settings, to compare to your documentation.
__________________
The best way to learn anything, is to question everything.
Interestingly Average Security Blog
Reply With Quote
  #6 (permalink)  
Old 05-18-2007, 10:31 AM
WebProWorld Veteran
 

Join Date: Aug 2003
Location: Cornwall, UK
Posts: 833
speed RepRank 1
Default

Depending on the host you may be able to change PHP values using php_value and php_flag directives in .htaccess.

There is also the possibility of the host allowing you a custom php.ini depending on how they run PHP and your needs.
__________________
TOLRA Micro Systems Limited US & UK Web Hosting with Continuous Data Protection
Web Directory 2 for 1 Offer : Web Directory Script
Reply With Quote
  #7 (permalink)  
Old 05-21-2007, 05:01 AM
WebProWorld Member
 

Join Date: Nov 2006
Location: London
Posts: 60
seorocks RepRank 0
Default Re: PHP Hnadlers - php.ini and .haccess files

Thanks everyone for their comments - this is really helpful indeed. I have been struggling to find a good Hosting company that would allow me access to the .haccess file. majority who do, tend to have very little space or low GB for transfers.
Reply With Quote
  #8 (permalink)  
Old 05-21-2007, 03:47 PM
Vectorman211's Avatar
WebProWorld Member
 

Join Date: Jul 2006
Posts: 89
Vectorman211 RepRank 2
Default Re: PHP Hnadlers - php.ini and .haccess files

Also, you can change PHP directives without access to the default php.ini file by one of 2 ways the easiest way is to use the set_ini() function within your own script:

Code:
Example:

set_ini("include_path",".;/var/www/scripts");
The other way is the php_value apache directive which you can put into a .htaccess file:

Code:
Example:

php_value include_path ".;/var/www/scripts"
Either way you do it, your webhost has to allow the changing of whichever directive you're trying to change.
__________________
http://www.wis-tech.net
Reply With Quote
  #9 (permalink)  
Old 05-21-2007, 11:44 PM
WebProWorld Pro
 

Join Date: May 2007
Location: DataCenter
Posts: 174
hostBrain RepRank 1
Default Re: PHP Hnadlers - php.ini and .haccess files

Quote:
Originally Posted by seorocks View Post
Thanks everyone for their comments - this is really helpful indeed. I have been struggling to find a good Hosting company that would allow me access to the .haccess file. majority who do, tend to have very little space or low GB for transfers.
What kind of requirements do you have?
__________________
----Don't Call Me Brian----
Reply With Quote
  #10 (permalink)  
Old 05-31-2007, 11:37 PM
WebProWorld Member
 

Join Date: Dec 2006
Location: Indianapolis
Posts: 41
modrewrite RepRank 0
Default Re: PHP Hnadlers - php.ini and .haccess files

Custom php.ini / php with htaccess tips and tricks

Just make sure your host provider runs BSD or linux.
__________________
de // AskApache.com blog
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: , , , ,



Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0