Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-15-2008, 02:32 PM
Junior Member
 
Join Date: Apr 2008
Posts: 28
Default Apache configuration wrong?

Hello,

I've been developing this web application using Zend Framework. I've been testing everything locally (XAMPP) and it all works just fine. If I upload everything to the webhost's server (linux), it loads the default index.phtml file in the IndexController.php.

As soon as I add a controller behind the base url I get a 404 page doesn't exist error.

So as far as I can see it's using the bootstrap to redirect to the correct file. But it can't seem to find the other controllers?

I'm programming on a windows XP pro machine and the server machine is running Linux. The

map structure
Code:
topfolder
|
|---html
      |---- index.php (bootstrap file)
      |---- .htacces
      |---- images
      |---- scripts
      |---- styles
|
|---library
    |---------Zend
    |---------other
|
|
|---application
    |----------classes
    |----------config
                 |-------db.ini
    |----------controllers
                 |--------AuthController.php
                 |--------ErrorController.php
                 |--------IndexController.php
                 |--------UserController.php
    |----------functions
                 |--------function classes are here
    |----------models
                 |--------db models are here
    |---------views
                 |--------filters
                 |--------helpers
                 |--------layouts
                 |--------scripts
                            |-------auth
			    |-------error
                            |-------index
                            |-------user
                                     |-----index.phtml
so If i load the main page (Test Page for the SSL/TLS-aware Apache Installation on Web Site) I go to the index.phtml file (I'm sure of this because there's a simple URL on it). This url leads to user. so the URL is " http://localhost/user ".

When I click the URL I get a page not found error. I think I named everything correct....

Code:
public class UserController extends ....

public function ini()
{ // some initialised variable here
}

public function indexAction()
{
   //nothing here
}
then my index.phtml file in view/scripts/user contains
Code:
<html>
<head><title>test</title></head>
<body>
<h1>Test!</h1>
</body>
</html>
Just so I'd know if it would get there....

Unfortunately I get a page not found error....
Does anybody know what the source of this problem could be? I can only thing it's a configuration error in apache on the server? If it was the .htaccess file that would mean it wouldn't work on my localhost either?

I checked the apache config on the server ( phpinfo() ) and it shows the mod_rewrite loaded.

.htacces file:
Code:
		RewriteEngine on
		RewriteCond %{REQUEST_FILENAME} !-f
		RewriteCond %{REQUEST_FILENAME} !-d
		RewriteRule !\.(pdf|php|js|ico|txt|gif|jpg|png|css|rss|zip|tar\.gz)$ /index.php
I really hope somebody can help me out with this!!


Regards,

Filip
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-16-2008, 04:19 AM
Junior Member
 
Join Date: Apr 2008
Posts: 8
Default try this

check my question which i solved it
i think i was having the same error of page not found
in m case the .htacces was not being considered and bypassed

just check this

i had this in my httpd.conf file of Apache server

" AllowOverride None"

which was supposed to be
AllowOverride All

and it solved my problem for complete detail chek my question whcih i solved it

need help in setting Zend localhost:8000 works but localhost:8000/index does not :(
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-16-2008, 07:19 AM
Junior Member
 
Join Date: Apr 2008
Posts: 28
Default

I don't think it's that. I put a .htaccess file on the server with a permanent redirect to "http://www.google.com" and as soon as I loaded the page I got redirected to that link. So it's not my apache bypassing the .htaccess file. I can't go check if the allowOverride is "all" but the one in charge of the server told me that it should be. I also assume that since it's redirecting through my .htaccess file that it probably is.

I'll keep digging ...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-16-2008, 11:00 AM
Junior Member
 
Join Date: Apr 2008
Posts: 28
Default

Seems like there was a mistake in the .htaccess file. it's temporarily fixed now.

sorry for the hassle
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 10:45 PM.