Forum Moderators: phranque

Message Too Old, No Replies

.htaccess problems with godaddy

         

frenzix

8:48 am on Mar 13, 2007 (gmt 0)

10+ Year Member



Nice forum, i'm really new to this stuff..

I upgraded my godaddy hosting to config 2.0 if that makes sense to anyone.. since then the PHP doesnt work on the site.

I have been told to just create a .htaccess file with this in it.

****************************************************************

AddHandler x-httpd-php5 .php
AddHandler x-httpd-php .php4

# -FrontPage-

IndexIgnore .htaccess */.?* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName www.example.com.au
AuthUserFile /var/chroot/home/content/f/r/e/frenzix1/html/_vti_pvt/servic e.pwd
AuthGroupFile /var/chroot/home/content/f/r/e/frenzix1/html/_vti_pvt/servic e.grp

****************************************************************

So that it can read just php..

Is that fine?

I had a search through and couldn't find any topics that could help me! sorry..

Tim

[edited by: jdMorgan at 2:20 pm (utc) on Mar. 13, 2007]
[edit reason] Example.com - Please see Terms of Service. [/edit]

jdMorgan

2:51 pm on Mar 13, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This code enables the server to parse, that is to say, to "process" or "run" php code, so that the response to a client request is the result of processing the php code, and not just a dump of the php source code itself. Because all servers are configured slightly-differently, there's no way for us to tell if this code is "right" without testing it on your server -- something that you'll have to do. If you have any problems during testing, then post details here, and we will try to help.

Jim

phranque

3:15 pm on Mar 13, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



by the way, welcome to WebmasterWorld, frenzix!
i'm sure jdM would have done so if he had noticed it was your first post. =8)
go ahead and give that .htaccess file a try.
this stuff is trial and error even for the best and most experienced.
if you have problems make sure you describe what you tried, what you expected and what result you got instead.
you'll get a better answer after you have some results to report.
eventually someone will come here with a problem similar to what you now have and will learn something from your experience.

frenzix

6:33 am on Mar 14, 2007 (gmt 0)

10+ Year Member



Thanks for the help.. I have tried it and it doesn't work.. also the original doesnt work though :( .

seems as though i can browse html files but not php!

Thanks, Tim

phranque

8:01 am on Mar 14, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



if you have problems make sure you describe what you tried, what you expected and what result you got instead.
you'll get a better answer after you have some results to report.

i'll bet there are clues for your missing php in the log file...

jdMorgan

3:33 pm on Mar 14, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The following two lines are an incorrect mixture of AddHandler [httpd.apache.org] and AddType [httpd.apache.org] syntax.

AddHandler x-httpd-php5 .php
AddHandler x-httpd-php .php4

The php team produced a "hack" when first installing php on Apache, and we've lived with it ever since in the sense of "bad code" posted all over the Web. The correct notation (although it may not work either) is:

AddType application/x-httpd-php5 .php
AddType application/x-httpd-php .php4
#
AddHandler server-parsed .php
AddHandler server-parsed .php4

You may need only one of the two 'sets' above, and I'm not sure which. The "AddHandler" set is the technically-correct way to do it, but as I said, the php team used a "hack" and you may need to use the "AddType" set instead -or in addition to- the AddHandler set.

The thread Installing a new web server: Apache2, PHP5, MySQL4 and PHPmyAdmin [webmasterworld.com] and others in our PHP Forum Library [webmasterworld.com] may be helpful to you.

Jim

coopster

3:48 pm on Mar 14, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



This discussion helps clear some of the confusion on the whole AddHandler versus AddType issue as well:

[webmasterworld.com...]

jdMorgan

3:54 pm on Mar 14, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for that link, coopster. There's a lot of confusion -- and a lot of threads to search through!

Jim

frenzix

7:39 am on Mar 15, 2007 (gmt 0)

10+ Year Member



I am stuffed, my brain hurts. I have read all this.. and tried all this.. Still doesn't work.. Spake with slowdaddy for the last hour on the phone (from australia).. they dont even know whats wrong. I am pretty that is not the problem, something went wrong when i clicked the upgrade button. It's like the site cant read older php files.

Check this out ..

<snip>

Can anyone give me some ammunition to fire back at godaddy when they say the problem is at my end.. Cause I havn't changed a thing..

Thanks,! Tim

[edited by: jdMorgan at 3:17 pm (utc) on Mar. 15, 2007]
[edit reason] No URLs, please, see TOS. [/edit]

phranque

9:55 am on Mar 15, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



you should probably still look in your log files for more clues.
i am guessing you installed your update in the wrong place or the update changed a path in the config somewhere.
since your 404 page is broken, i am able to see that you are perhaps doing some type if internal redirect to /cgi-bin/sbox:
The requested URL /cgi-bin/sbox/dsk/forum/index.php was not found on this server.

was that your plan?
did you already see this error in your log files?
are there other errors there that i can't see?
pretty soon your url will be gone (see TOS #21 [webmasterworld.com]), so you are better off providing clues than urls next time.