.htaccess & php.ini problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
adsegzy
Forum Contributor
Posts: 184
Joined: Tue Jul 28, 2009 9:26 am

.htaccess & php.ini problem

Post by adsegzy »

Hello there, please i am having problem with my .htaccess file on my site. whenever I upload the .htaccess file, and try to visit the site but the site is showing me error "500 Internet Error" but if i remove the htaccess file, the site will open normally. I have some files that include "header" function which requires htaccess file.

When I contacted the hosting company, i was told that The Server this site is located on has never had PHP4 to start with, when PHP is running with SUEXEC support are to be placed within a php.ini file and not .htaccess. So, it appears that what i need is php.ini fill instead of .htaccess file. I do not know how to code the php.ini file. pls help me out.

regards
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: .htaccess & php.ini problem

Post by requinix »

What's in your .htaccess now?
adsegzy
Forum Contributor
Posts: 184
Joined: Tue Jul 28, 2009 9:26 am

Re: .htaccess & php.ini problem

Post by adsegzy »

what am having in my .htaccess is

Code: Select all

<?
PHP_FLAG output_buffering on
?>
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: .htaccess & php.ini problem

Post by requinix »

Then for your php.ini

Code: Select all

output_buffering = on
Take that as an example for similar problems in the future.

(By the way, relying on output buffering is a bad choice. You should try to code for it being turned off.)
adsegzy
Forum Contributor
Posts: 184
Joined: Tue Jul 28, 2009 9:26 am

Re: .htaccess & php.ini problem

Post by adsegzy »

Thanks a lot tasairis, it works and i really appreciate that.
regards
Post Reply