CodeIgniter Forums
Problem with application - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Problem with application (/showthread.php?tid=14545)

Pages: 1 2


Problem with application - El Forum - 01-06-2009

[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.


Problem with application - El Forum - 01-06-2009

[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?


Problem with application - El Forum - 01-06-2009

[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


Problem with application - El Forum - 01-06-2009

[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.


Problem with application - El Forum - 01-06-2009

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


Problem with application - El Forum - 01-06-2009

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

thanks


Problem with application - El Forum - 01-06-2009

[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.


Problem with application - El Forum - 01-06-2009

[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


Problem with application - El Forum - 01-06-2009

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

thanks


Problem with application - El Forum - 01-06-2009

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