CodeIgniter Forums
mysql connection issues - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: mysql connection issues (/showthread.php?tid=28526)



mysql connection issues - El Forum - 03-13-2010

[eluser]jaystang[/eluser]
Ok so I've been developing an application using CI for the past couple months. Today I wanted to setup my apache/php/mysql environment on my laptop (been using my desktop until now). I've installed all three and configured. I next setup my CI application project on the laptop, try to access it and I get nothing, just a blank browser window (no source code, no errors). I check the log files and see nothing. From here I started in my controller method and started outputting text and killing the app (example: echo('test'); dieWink. I can then see the outputted data. From here I keep drilling deeper and deeper into the CI framework outputting and killing, outputting and killing since I have no type of errors to go off of. After a couple hours I finally have the issue narrowed down to one line...

(mysql_driver.php line 88)
Code:
return @mysql_pconnect($this->hostname, $this->username, $this->password);

All params setup in the database.php are correct and I have no problem making this connection through the mysql administrator app. I'm assuming my issue is not a CI issue but rather an environment issue. If anyone has any thoughts on what it may be let me know.

Thanks!


mysql connection issues - El Forum - 03-13-2010

[eluser]theprodigy[/eluser]
Check your php.ini file and see if you have display_errors = On;

if you do, try taking out the @ sign (which suppresses errors) and see what happens.
(Once you figure out what is going on, make sure you put it back since it is part of the core code.)


mysql connection issues - El Forum - 03-13-2010

[eluser]jaystang[/eluser]
Ah I had no idea the "@" sign suppressed errors. Thanks! The issue was the mysql extension was not being loaded.