PDA

View Full Version : 500 internal server error !


jackdaniels
01-15-2007, 06:40 PM
Hello,
I've installed phpld 2.0 on my (verio.com) hosting !

I had some problems accessing the admin panel but after I changed the code in init.php and /admin/init.php everything worked fine.

Now my biggest problem is the 500 internal server error ! After I turn the "Enable URL rewrite:" option to yes and try to hit a category this error shows up !

Now my .htaccess looks like this :

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* index.php [QSA,L]

If I add the "RewriteBase /" code after "RewriteEngine On" I don't get the 500 internal server error anymore but my page loads without any graphics and the directory dosen't work !

Now if I hit "category1" 3 times the url in IE looks like this : http://wwww.mydirectory.com/category1/category1/category1/ !

Have you guys seen anything like this before ? Can you help me please ?

James
01-15-2007, 06:49 PM
..... changed the code in init.php and /admin/init.php

and you changed what? Hard to troubleshoot without knowing what you changed there

jackdaniels
01-15-2007, 07:34 PM
1. Edit file 'init.php', find following line (~37 line):

Code:
define ('DOC_ROOT', substr ($_SERVER["SCRIPT_NAME"], 0, strrpos ($_SERVER["SCRIPT_NAME"], '/')));
2. Replace it with next code:

Code:
define ('DOC_ROOT', substr ($_ENV["SCRIPT_URL"], 0, strrpos ($_ENV["SCRIPT_URL"], '/')));
3. Edit file 'admin/init.php', find following line (~69 line):

Code:
define ('DOC_ROOT', substr ($_SERVER["SCRIPT_NAME"], 0, strrpos ($_SERVER["SCRIPT_NAME"], '/')));
4. Replace it with next code:

Code:
define ('DOC_ROOT', substr ($_ENV["SCRIPT_URL"], 0, strrpos ($_ENV["SCRIPT_URL"], '/')));
5. Edit file 'admin/init.php', find following line (~106 line):

Code:
$f = $_SERVER['SCRIPT_NAME'];
6. Replace it with next code:

Code:
$f = $_ENV["SCRIPT_URL"];
7. Edit file 'admin/init.php', find following line (~227):

Code:
$f = $_SERVER['SCRIPT_NAME'];
8. Replace it with next code:

Code:
$f = $_ENV["SCRIPT_URL"];

I didn't changed this line because it is not includet in version 2.0 :

3. Edit file 'admin/init.php', find following line (~69 line):

Code:
define ('DOC_ROOT', substr ($_SERVER["SCRIPT_NAME"], 0, strrpos ($_SERVER["SCRIPT_NAME"], '/')));