I think I found something for you to try when you ge tthe time.

There is a bug about cakephp and cgi on apache servers.  Here is the
link: https://trac.cakephp.org/ticket/66

The problem doesn't seem exactly like yours but, maybe the fix can
help get rid of the cgi link replacements.

The problem:
---------------------
I've finally uploaded cake to my server and now I'm desperately trying
to get it to work:

When I remove the .htaccess files and uncomment the lines in core and
index.php (BASE_URL) my cake urls (as genertaed by the helpers all
look like:

http://www.pauljholden.com/cgi-sys/php4/skunkworx/comments

Which pulls up a screen like:

Security Alert! The PHP CGI cannot be accessed directly. This PHP CGI
binary was compiled with force-cgi-redirect enabled. This means that a
page will only be served up if the REDIRECT_STATUS CGI variable is
set, e.g. via an Apache Action directive.

For more information as to why this behaviour exists, see the manual
page for CGI security.

For more information about changing this behaviour or re-enabling this
webserver, consult the installation file that came with this
distribution, or visit the manual page.

Any ideas?

Here is the instruction:
------------------------------------
I've solved this problem by changing a couple of lines of the cake
index file and the core file, which allowed me to revert to using
index.php?url= which works fine.

In cake/index.php $elements = explode('/index.php?url=',$uri); //
added ?url=

In core.php define('BASE_URL', $_SERVER['PATH_INFO'].'?url=');

(There's an identical line in cake/index.php - but I think the core
overwrites it, though it should really only be defined in one place)

Deleted the .htaccess, etc.


On Feb 8, 12:54 am, "apalankat" <[EMAIL PROTECTED]> wrote:
> hi,
> i think it's installed as a CGI, and this is why it does the /cgi-bin/
> cgiwrap/ thing. So the only thing I need is to know what variable (and
> in what file) uses cake to determine the root of the app.
> I have been looking through the files, but i saw ROOT, WWW_ROOT, and
> so many other variables, i need to know which one I have to hardcode
> to make it work.
> Thanks!
>
> On Feb 8, 2:43 am, "[EMAIL PROTECTED]"
>
> <[EMAIL PROTECTED]> wrote:
> > What is your directory structure?  How was cake installed onto the
> > server?  Is PHP installed as a module or as cgi?
> > To me, it looks like PHP is installed as CGI and the server itself is
> > running Virtual Hosting.  Can you confirm these?
>
> > On Feb 7, 2:17 pm, "apalankat" <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
> > > I configured a cake app in my university server, and I have a problem:
> > > all the links created by the application (links to actions,
> > > stylesheets, javascripts) have a "/cgi-bin/cgiwrap/" prepended.
> > > Here's an example from the page /mycakeapp/posts on the server.
> > > Instead of linking the posts with <a 
> > > href="/mycakeapp/posts/view/2">post2</a> it links them with <a 
> > > href="/cgi-bin/cgiwrap/mycakeapp/
>
> > > posts/view/2" >post2</a>
>
> > > I don't think anyone ever saw that, so I lost all hope of finding a
> > > solution... but here it is,
> > > Thanks for reading!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to