Jump to content

Archived

This topic is now archived and is closed to further replies.

Psytanium

htaccess, Internal server error

Recommended Posts

Hello,

 

I have installed an addon but didn't worked properly, when I update it return "Internal Server Error".

 

I renamed the .htaccess to something else, the error solved.

 

I get into the .htaccess and removed this code:

 

suPHP_ConfigPath /home/username/

 

the problem solved.

 

Does someone know what this code mean ? is it safe to remove it ? should I change it to its current directory ? suPHP_ConfigPath /home/username/public_html/

Share this post


Link to post
Share on other sites

That command tells the system where to find the php.ini file. See if your system is responding to changes in php.ini by using

 

<?php phpinfo(); ?>

 

suPHP_ConfigPath should indicate the directory (folder) where php.ini actually is. If it's in the public_html directory, then public_html should be in the given path name.

 

Presumably your host requires suPHP_ConfigPath because it has certain security software installed. If it can find the php.ini file OK without that command, then you don't need to use it. Ask your host if in doubt.

Share this post


Link to post
Share on other sites

@@MrPhil thank you for your reply, the system is responding to phpinfo() and php.ini is located in the public_html directory.

 

I have removed the suPHP_ConfigPath /home/username/ copletely, do you know if there is some consequences if it is removed ?

Share this post


Link to post
Share on other sites

You need it if your host requires it for the server to find the php.ini file. In that case, phpinfo() would not show the system responding to changes in php.ini. Since you say it is apparently finding and reading php.ini even without that command, I would say you don't need it. If it's not needed, it may not even be properly handled by the server (.htaccess), resulting in a 500 error when it's seen in .htaccess. Was it put there by an add-on? An add-on has no business doing something like that.

Share this post


Link to post
Share on other sites

Apparently the system don't need this code to locate the php.ini

 

The addon is quick update 2.9 for osc2.3

 

The problem is odd,

if i choose "Max. # of lines per page" below 60 and then i click the Update button, it works fine. But if the "Max. # of lines per page" is over 60, i get the 500 error.

 

Maybe it is related to the amount of data uploaded to the database at once, the .htaccess or php.ini is defining the limit of this amount.

Share this post


Link to post
Share on other sites

Is this "Max. # of lines per page" a separate (new) problem, or part of the original 500 error? That setting is part of the add-on? That would best be taken up in that add-on's support discussion. Off the top of my head, I can't imagine some setting value <60 is fine and >=60 triggers and Internal Server error, unless it goes to a different page, and that page's file has extra blank lines at beginning or end. Just for grins, you might throw all the files added or modified by this add-on into an editor, and look for empty/blank lines at beginning or end (trim them off). Use a real editor, not a word processor. If a file is edited in UTF-8 mode, make sure you save it without Byte Order Mark.

Share this post


Link to post
Share on other sites

×