Welcome Guest, Not a member yet? Register   Sign In
Problem with application
#1

[eluser]1234qwer[/eluser]
Hello

We have developed a big real estate site on our localhost ussing php5 (and everything is well here), now we just upload it to the server (php4 by defautl but changing the .htaccess they provide php5 -we test it with a simple function only for php5-) and nothing... all displayed is a white page, no error, no problem, no warnings, we modify the .htaccess like the following:

Code:
Options +FollowSymlinks
RewriteEngine on

addtype application/x-httpd-php5 .html .htm
AddType application/x-httpd-php5 .php
AddHandler application/x-httpd-php5 .php

Rewritecond %{REQUEST_FILENAME} !-f
RewriteRule \.php$ /error404.html


RewriteBase /

RewriteCond $1 !^(\/|index\.php|system|_common|application|greybox|mod_galeria|basura|temp_img|support|mod_bienes_raices|blog|mod_css|mod_img|mod_scripts|includes|adm_img|adm_css|resize|views|templates|img|js|css|images|tester|system\/plugins|robots\.txt|language|css\/)

RewriteRule ^(.*)$ http://www.site.com/dir/index.php/pz/index/$1 [L]

and we add a file called php.ini on the folder where the script is with the following:

cgi.fix_pathinfo = 0;


We can figure out where is the problem, please give us some light.

Thanks.
#2

[eluser]Colin Williams[/eluser]
Even with a blank screen, you'll get an error message in your server's error logs. Have you checked those?
#3

[eluser]1234qwer[/eluser]
update..

No, when we add the php5 line on the .htaccess the index page display 404 page, but without this lines the script works but the script don`t works properly since we use many php5 commands.

Then, seems that the .htaccess file is bad, but what??

thansk
#4

[eluser]1234qwer[/eluser]
we just change this last line:

Code:
RewriteRule ^(.*)$ http://www.site.com/dir/index.php/pz/index/$1

to

Code:
RewriteRule ^(.*)$ http://www.site.com/dir/index.php?/pz/index/$1


in other words we add ? and now is working, the only one problems is in the admin side, and we can add the ? sign and everything will works well, but I`m afraid that this "work around" can place a vulnerability on the script or may be a not good idea to use, what do you think?

thanks.
#5

[eluser]Popcorn[/eluser]
Why are you rewriting all your requests to the index function of the "pz" controller. Seems a bit strange to me.
#6

[eluser]1234qwer[/eluser]
this is the only one way to put it working, do you have any other idea?

thanks
#7

[eluser]Popcorn[/eluser]
Well first of all, all those requests are parameters passed into the index function, so I'm sure your code could be a lot cleaner than it probably is right now.

What you ideally want to do, is pass all requests to the index.php file. That way /controller and /another are actually different controllers in your application.

Makes it a lot easier to handle.
#8

[eluser]1234qwer[/eluser]
we are doing this because we need friendly url in a very customized way, something like:

www.site.com/cars/bmw/trucks/truck-bmw-for-sale-in-texas.html
#9

[eluser]1234qwer[/eluser]
is there other way?

thanks
#10

[eluser]Popcorn[/eluser]
I already told you.




Theme © iAndrew 2016 - Forum software by © MyBB