1

I have a CodeIgniter app that I deployed to a server with php 5.2 and my dev box has 5.3, and some stuff doesn't work anymore. I didn't want to upgrade php and risk the other app on the server having issues. Anyway I compiled a custom PHP and added the following to a single .conf file in /etc/httpd/conf.d/zcid.conf with all the other conf files.

<VirtualHost *:80>
        DocumentRoot /var/www/cid/app
        ServerName sub.example.co.nz
</VirtualHost>

<Directory "/var/www/cid/app">
        authtype Basic
        authname "oh dear how did this get here i am no good with computer"
        authuserfile /path/to/auth
        require valid-user
        RewriteEngine on
        RewriteCond $1 !^(index\.php|robots\.txt|createEvent\.php|/cgi-bin)
        RewriteRule ^(.*)$ /index.php/$1 [L]
        AddHandler custom-php .php
        Action custom-php /cgi-bin/php53.cgi
</Directory>

In /var/www/cid/app I have the cgi-bin folder and the php53.cgi that I copied from /usr/local/php53/bin/php-cgi

But now when I navigate to the subdomain it says:
The requested URL /cgi-bin/php53.cgi/index.php/ was not found on this server.

And if I try to browse to /cgi-bin it says (what it is supposed to?):
You don't have permission to access /cgi-bin/ on this server.

Quite confused now. Anyone know what to do here? Thanks :)

Gerald Schneider
  • 19,757
  • 8
  • 52
  • 79
hamstar
  • 685
  • 3
  • 8
  • 19
  • You're trying to run codeigniter against a cgi connected PHP??? You should really have a look at php-fpm – symcbean Mar 25 '12 at 22:39

2 Answers2

1

Maybe have a look at this thread: http://codeigniter.com/forums/viewthread/96347/

-5

chmod 777 cgi-bin

  • 2
    -1. You should only use `777` if you really need *any* system user to have write access. If your problem is "the Apache user needs access to a directory", create a group with that user in, give that group ownership of that directory and set permissions accordingly. – nickgrim Jan 19 '12 at 10:04