Welcome Guest, Not a member yet? Register   Sign In
A HUGE WTF?????? with CI!!!
#1

[eluser]cbmeeks[/eluser]
Ok, for the last 2 HOURS I could not get a basic install of CI to work. I've done it a ZILLION times.

But this time, I kept getting 500 errors.

I am using Arch Linux and normally I always install with this directory structure:

/home/httpd/system
/home/httpd/html/index.php

The index.php is the only file (other than .htaccess) that is in the web root. This works.

Well, I needed to work from my home directory because I've got Samba running on the machine. So, I installed CI (from a FRESH install of Arch) to:

/home/cbmeeks/projects/system
/home/httpd/html/index.php

The index.php was pointing to the correct /home/cbmeeks/projects/system path.

This did NOT work! Seriously, I spent 2 hours trying to get it to work. PHP was working (via phpinfo), apache was working. I restarted, rebooted, etc. I've done this before...at least I think I have.

But anyway, why would that not work?

Thanks

cbmeeks
#2

[eluser]xpix[/eluser]
I had a similar problem in Ubuntu.
I had to activate error logging to work. At least that is what I've done before it started working.
Go to your php.ini and make sure that:

log_errors = On

display_errors = On

I hope this helps. Let us know how it goes

PS: I was getting a blank page
#3

[eluser]Randy Casburn[/eluser]
Chill. You're clearly frustrated, but these are two very entertaining questions that kinda made me giggle...

Quote:I’ve done this before...at least I think I have.

But anyway, why would that not work?

Just a little though. I wasn't giggling at you, I was giggling because you didn't include any indication of what the problem really was. Yup, see that Apache and PHP are working, but you didn't MOVE those out of your DOCROOT that Apache was configure to work with.

So now that the rant is over, can you include some errors that may have shown up, some errors from your logs, some indications that we can start to help you with?

Be glad to...

Randy
#4

[eluser]George Ornbo[/eluser]
What's the ouput of

Code:
tail /var/log/httpd/error_log
#5

[eluser]cbmeeks[/eluser]
Yeah, sorry. It was definitely a rant. It was late, I had been up for about 20 hours and was tired.

Here is what error_log was putting out:

[Sat Jul 12 21:48:47 2008] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sat Jul 12 21:48:47 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/bin/suexec)
[Sat Jul 12 21:48:48 2008] [notice] Digest: generating secret for digest authentication ...
[Sat Jul 12 21:48:48 2008] [notice] Digest: done
[Sat Jul 12 21:48:49 2008] [notice] Apache/2.2.8 (Unix) DAV/2 mod_ssl/2.2.8 OpenSSL/0.9.8h configured -- resuming normal operations
[Sat Jul 12 21:49:14 2008] [error] [client 192.168.222.12] script '/home/httpd/html/index.php' not found or unable to stat

This is just repeated over and over. Except the last line. That has been fixed.

Actually, the whole thing is working now. I just had to move the system folder "closer" to the htdocs folder (html in this case).

@Randy: >you didn’t include any indication of what the problem really was.

Yes, it was included: "But this time, I kept getting 500 errors. "

That was the problem I was getting.

Anyway, everything is working. I will go back into the php.ini and be sure that error logging is turned on the dev box. Right now, it's not important enough for me to try to move everything back. It's actually working in the same way a production box would be anyway.

Thanks again guys for all of your help.

cbmeeks
#6

[eluser]Randy Casburn[/eluser]
@cbmeeks -- yes you are right. I missed the 500 error thing. That's probably because I was still giggling....jk

But really...500 Internal Error. You have to admit isn't real helpful.

Glad you got it sorted out.

Randy
#7

[eluser]cbmeeks[/eluser]
You're right. 500 errors are hard to track down and I couldn't find any real indication of what was wrong in any log file.

Bottom line is that CI didn't work because the system folder was in a path it didn't like.

When I said I've done it before, I meant that I've installed and used CI with the system folder "far" away from the index.php and htdocs folder.

In other words, I've had the system folder in my personal home folder. But, this has been on a CentOS machine. Maybe Arch's install of apache/php doesn't like includes in any folder except httpd? Who knows.
#8

[eluser]Randy Casburn[/eluser]
My system folder is outside the docroot on at least 5 installs right now for security reasons. If php.ini doc_root or user_dir are not blank they can cause problems if you're using CGI redirection. On any Debian based system Apache tends to switch up which php.ini file it decides to use. And that seems to depend on the distribution. So if you've fiddled with your php.ini thinking you've got it fixed up, maybe you're 'still' fiddling with the wrong php.ini file. Go back and re-run php_info() over and over again to ensure you're reading the source of the php.ini line correctly.

Now the other major problem you may not be considering here is that when Apache runs it starts up as the root user on a Linux box but immediately chroots to a user with limited privileges. Who that user is depends on the distribution of Linux. There is a 97.98764% chance that user has no privileges to reach into your home directory, access your php scripts, and execute them.

So when a service running on your box (Apache) doesn't know how to respond to an Operating System access denied error (you will find this error in your Apache logs) it pukes out a "500 -- Internal Server Error" because it doesn't have all the artificial intelligence needed to diagnose the problem.

So I'm guessing it's because the Apache user (nobody or web maybe) did not have privileges to your home directory. To prove this, [install CI] in your /tmp directory and I bet it runs flawlessly.

[edit] PUT the system folder in you /tmp directory [/edit]

Randy
#9

[eluser]cbmeeks[/eluser]
Man, I bet you're right! I forgot about the nobody account. Probably is restricted from my /home/cbmeeks folder.


DUUUURRR!!!!

I told you I was tired.

LOL

Thanks!!!
#10

[eluser]Randy Casburn[/eluser]
Bad bet -- I already gave you the odds -- 97.98764 to 1 you'll lose. I'll take the bet :lol:




Theme © iAndrew 2016 - Forum software by © MyBB