MySQL, $query->result_array, and NginX |
[eluser]cmd276[/eluser]
I have a project I'm working on developing. I'm using Reactor 2.0.2. I've had two main problems with CodeIgniter so far. (One I did a half fix on, it was URL problem. Not concerned.) The other problem, I have the following code in my News file. Code: /* Thigs before now ... */ I know the foreach is the line causing the death of my server, because I put in Code: die(print(__LINE__)); What I would like to know, is what is it I need to supply for help. Or, what can I do, to bypass the irreplaceable Database setup that CodeIgniter has? I've talked to my host, he doesn't have a clue as to what is going on with this. (hes a system admin, and a coder. He's checked the code, as did I, for wondering white space, and haven't found anything) I've looked into other frameworks, and find CodeIgniter to be the easiest for me to work with, and setup, and get going. I'd be awesome if I could get this problem fixed, so I could move on. Thanks for your time! ~cmd276
[eluser]osci[/eluser]
Have you forgotten the get? Code: $query = $this->db->query("Get The News.")->get();
[eluser]danmontgomery[/eluser]
[quote author="osci" date="1308750272"]Have you forgotten the get? Code: $query = $this->db->query("Get The News.")->get(); query() executes the query, get() is only used with AR syntax
[eluser]cmd276[/eluser]
[quote author="osci" date="1308750272"]Have you forgotten the get? Code: $query = $this->db->query("Get The News.")->get(); Going off of the User's Guide for Database Class, it doesn't mention anything about the '->get()' section. Also, going with I forgot to check for an empty result, it still returns a Server 500 with both things in place. [quote author="noctrum" date="1308755270"][quote author="osci" date="1308750272"]Have you forgotten the get? Code: $query = $this->db->query("Get The News.")->get(); query() executes the query, get() is only used with AR syntax[/quote] Not using the Active Record things.
[eluser]toopay[/eluser]
[quote author="cmd276" date="1308745408"]I've had two main problems with CodeIgniter so far. (One I did a half fix on, it was URL problem. Not concerned.)[/quote] Oh dear. Sounds like htaccess crap for me.
[eluser]jmadsen[/eluser]
@cmd276 - it sounds like a server configuration issue to me, although I can't be too precise -- does the same user for nginx also have permissions to run mysql? -- are you able to run anything successfully on that server. For example, can you set up a simple php page that connects via php functions to the DB, completely without CodeIgniter?
[eluser]cmd276[/eluser]
@jmadsen - As for the user for nginx using mysql, I'm not sure how to answer this. -- For the use of db stuff with out CodeIgniter, I can indeed run those functions, and connect with out it.
[eluser]jmadsen[/eluser]
@cmd276 - I was talking about the linux user assigned to running those two processes. it sounds like you are ok, but your sys admin would be able to tell you right away. toopay might be right about your .htaccess, or your routing might have some problem on the live server. this just doesn't sound like a CodeIgniter specific problem to me. Can you look in Firebug or your log info and tell us anything more? This may be of help: http://ellislab.com/forums/viewthread/90231/
[eluser]cmd276[/eluser]
I'll ask the host about the user permissions on running nginx, and mysql. As far as I know, nginx doesn't use htaccess files. (How would this effect the SQL part? Am I not seeing a link?) I'm using the query string set up right now, and was/is fine with it that way for now. I already figured this was a nginx set up problem. Here are logs from the CodeIgniter set up, for ALL. (Removed the Time zone setting *required* errors.) Entire file included, except for the php snip at the top. Server Logs: Code: DEBUG - 2011-06-23 07:49:10 --> Config Class Initialized Locahost Logs: Code: DEBUG - 2011-06-22 23:05:57 --> Config Class Initialized |
Welcome Guest, Not a member yet? Register Sign In |