Glenn

Topic: help with localhost install

hi,

could someone in the know please help me with my install. i have followed the guide to the letter, and any suggested help in the forums isn't working. i've got the index page loading with the db content & css styles, but every link leads to a 404 error.

my setup is:
Apache 2.0
PHP 5.2.5
directory is /jobs

the config.envs.php file is setup as follows:

Code:

// local (http://localhost/jobberbase/public)
$__instances['local'] = array(
    // should be a unique part of the url (or the entire url if you wish)
    'prefix' => 'localhost',
    // mysql credentials
    'db_host' => 'localhost',
    'db_port' => 3306,
    'db_user' => 'root',
    'db_password' => '',
    'db_name' => 'jobberbase',
    'db_prefix' => '',
    'app_url' => 'http://localhost/jobs/',
    'ini_error_reporting' => E_ALL,
    'ini_display_errors' => 'On',
    'location' => 'local',
    'environment' => 'dev',
    'rewrite_mode' => 'apache_mod_rewrite'
);

the .htaccess file is as follows:

Code:

AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php

RewriteEngine on
Options +FollowSymlinks

RewriteBase /jobs

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]

ErrorDocument 404 /page-unavailable/

<files ~ "\.tpl$">
order deny,allow
allow from none
deny from all
</files>

i have mod_rewrite enabled, checked through phpinfo() and i have also set the permissions to the folders as per the guide.

i've also restarted apache after any change i've tried from the forum

Any help is appreciated

Thanks

hobo

Re: help with localhost install

Windows?

Glenn

Re: help with localhost install

hobo wrote:

Windows?

yeah windows xp!

do you think thats where the problem is?

links

Re: help with localhost install

No, the problem is not there. JobberBase works ok using apache on windows.

Did you try to comment the line:

RewriteBase /jobs

from the .htaccess?

You can comment it by placing a # in front of the line.

Glenn

Re: help with localhost install

links wrote:

No, the problem is not there. JobberBase works ok using apache on windows.

Did you try to comment the line:

RewriteBase /jobs

from the .htaccess?

You can comment it by placing a # in front of the line.

yeah i've tried that with no success

with RewriteBase /jobs and with it commented i get the server 404 page
on both occasions i get the same correct filepath e.g. http://localhost/jobs/about/ when i click 'about'
i've restarted apache with every test too

links

Re: help with localhost install

You don't have to restart apache every time you modify .htaccess.

Have you also tried

RewriteBase /

?

Glenn

Re: help with localhost install

same problem with RewriteBase /

links

Re: help with localhost install

I sent you an email

hobo

Re: help with localhost install

I was thinking about line 21 in _config/config.php

Try changing it from:

Code:

$app_main_dir = rtrim(dirname($_SERVER['SCRIPT_NAME']),'/\\');    

to:

Code:

$app_main_dir = rtrim(dirname($_SERVER['SCRIPT_NAME']),'/');    

Good luck.

Glenn

Re: help with localhost install

guys, thanks for the help. it's all sorted thanks to "links"

just for info for anyone who finds this thread and is in the same prediciment:

i had to comment out 2 lines in .htaccess

Code:

#AddType x-mapp-php5 .php
#AddHandler x-mapp-php5 .php

and change AllowOverride from None to All on the listed option below within apache httpd.config file

Code:

Options Indexes FollowSymLinks
AllowOverride All

deepak.goyal

Re: help with localhost install

I installed the new version on Jobberbase, completed the process as per the guidance.
when i browse the domain, i am getting download prompt... application/x-httpd-php5 file to download. and my htaccess files as follow i am install the jobberbase on my local like http://localhost/jobberbase

ROOT .HTAcess File
*********************************************

#AddType application/x-httpd-php5 .php

RewriteEngine on
Options +FollowSymlinks

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/$ index.php?page=$1 [L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/([^/]+)/$ index.php?page=$1&id=$2 [L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/$ index.php?page=$1&id=$2&extra=$3 [L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/$ index.php?page=$1&id=$2&extra=$3&referer=$4 [L]

ErrorDocument 404 /page-unavailable/

ADMIN folder .HTAcees File
***********************************

# AddType application/x-httpd-php5 .php

RewriteEngine on
Options +FollowSymlinks

RewriteBase /admin

#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule . index.php [L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/$ index.php?page=$1 [L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/([^/]+)/$ index.php?page=$1&id=$2 [L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/$ index.php?page=$1&id=$2&extra=$3 [L]

ErrorDocument 404 /page-unavailable/

please tell how can i install it on my localhost and

putypuruty

Re: help with localhost install

Hi!

As your problem is not actually jobberbase related, I recommend that you google for instructions on installing Apache and correctly configuring mod_rewrite on localhost. You could also try installing xampp on your computer as it comes with mod_rewrite activated and correctly configured, from what I remember.