Welcome Guest, Not a member yet? Register   Sign In
Developing with CI on GoDaddy Servers
#1

[eluser]Craig300[/eluser]
Hi All,

I have seen similar posts on the CI forums regarding CI and GoDaddy servers but wasn't sure if there was a sure fire way of fixing the problem.

The problem I'm having is running any sort of queries to the database whether they be inserts, updates or just general selects. I have seen examples that play around with the .htaccess file but it didnt work.

Any advice would be very much appreciated.

Thanks in advance,

Craig
#2

[eluser]theprodigy[/eluser]
What problems are you having with your queries? Are you not connecting to your database, are the values in your variables not showing up, etc?
#3

[eluser]Craig300[/eluser]
I had trouble connecting to the database but when I got that sorted, it won't run any queries. If I echo out the queries, they look like they should work and if I run them through PHPMyAdmin they work but the code just won't work on the server, although they work locally.
#4

[eluser]d1a8lo24[/eluser]
I use godaddy and I haven't had such a problem I am using the latest CI on my app.

Now you might be having a problem when you're setting up your MySQL database when setting permissions to allow different operations. At the moment that is the only thing that I can think of.

As far as connecting to the database is very straight forward it shouldn't be that hard you can check really quick by going to your database clicking edit and choosing configuration you will get a sample code you can try that in one of your controllers and see what happens.

Now I'm using their linux hosting I have never try their windows hosting which I don't think it should be a problem but you never know.

I hope this helps.
#5

[eluser]R_Nelson[/eluser]
I use go daddy myself and i have never had any problems with my DB maybe if you show us some of the code that is failing we can help you better!
#6

[eluser]Craig300[/eluser]
It seems to be even simple things like posting variables from a form. There is nothing special about the forms just a simple email signup form and it won't post the variables across to insert into the db. I'm using an HTML5 boilerplate version which includes CI so it might be something to do with that but it shouldn't be.
#7

[eluser]d1a8lo24[/eluser]
I think I had a problem similar to this but lets start testing.

Ok I use boilerplate to and I don't think thats your problem either, although it might be your htaccess but that is an easy test, all you have to do is remove it unless you have some really costume htaccess file if not then remove it an try to use your forms.

So i had a problem my self where somehow one day my apps forms stop working I wasn't able to submit the information, I couldn't get around it after a few weeks of consulting the forums and my host I finally found the problem and I only had one solution.

The problem was that my host no godaddy in this case had change their apache servers security filtering configuration and it was causing my form only on certain parts of my app not to submit and the weird part was that it was onnly when some symbols where in the form and those where the following "<>" when that symbol chracter was present more than 2 times the form would would do anything it seem like it submitted but nothing was being pass for the database to insert. SO i got firebug to see what was happening and thats when i discover that it was throwing a 403 error trange isn't. Another strange thing was that this only happen when my simple htaccess file was present and I had removed the index.php from the app but when the index.php was present I had no problems the whole situation was just weird.

Anyway my host did find the problem but they could only fix one domain out of 20 and thn i had to request for them to do it to all of them which was not something I wanted to do since the apps that build have to compatible with most servers since my clients don't know anything about coding with php and they would have never figure this out and would have had a bad reputation so my next best thing was that I knew that the forms did work when the index.php was present and I use the form_open() function all the time so I just did a small mod by extending the helper and adding the index.php to the form open this made my apps once again compatible to host that decide to do some weird configuration on the security filtering configuration thing.

On the internet you can find a lot of this problems happening with different frameworks and they all have different errors, like 404 errors when submitting the form or the characters could be something else.

Use firebug and test your form see whats really being submitted see if the whole frm is being submited or ust part of it, use the profiler class to help in this.




Theme © iAndrew 2016 - Forum software by © MyBB