Welcome Guest, Not a member yet? Register   Sign In
Strange installation problem
#1

[eluser]ryantxr[/eluser]
I use a separate LINUX server to run Apache/PHP/Mysql. I decided to install Apache+PHP on my workstation for quicker experimentation. Code Igniter displays blank pages. Here is what I know so far.

OS: Windows XP
apache 2.2.4
PHP 5.2.3

I verified that PHP is functioning.

I traced through the Code Igniter code and it gets all the way to CodeIgniter.php where it is trying to instantiate the class. From there, it seems to just go nowhere. The following shows where it got to.
Code:
print("<br>CodeIgniter.php ["."Before instantiating the controller for class $class.$method"."]");

// Instantiate the Controller
$CI = new $class();
// DOES NOT GET HERE
print("<br>CodeIgniter.php ["."After instantiating the controller for class $class.$method"."]");
Has anyone ever seen this before?
#2

[eluser]Sean Murphy[/eluser]
Would you mind posting the actual error generated by the PHP engine? Check your PHP error logs.
#3

[eluser]ryantxr[/eluser]
PHP is not producing any logs.

I have turned on 'log_errors', 'display_errors'. I set error_log to "c:\Programs\PHP\logs\php.log".

CI is producing debug logs. It shows all the CI modules getting loaded.

I verified that PHP properly instantiates a class file. I created a test class for this.

I may just blow this whole thing away and reinstall all over or just resort back to the LINUX server installation that works.
#4

[eluser]Sean Murphy[/eluser]
Try running this in your CI directory:
Code:
find . -name \*.php \! -exec php -l {} \;
#5

[eluser]ryantxr[/eluser]
This is running on Windoes XP. Fortunately I have cygwin. It requires a slight modification on the command line. php -l complained about one line in system/libraries/Profiler.php. It apparently did not like this line:
Code:
$output .= "<tr><td width='50%' style='color:#000;background-color:#ddd;'>$_POST[".$key ."]  </td><td width='50%' style='color:#009900;font-weight:normal;background-color:#ddd;'>";

I changed it to this:
Code:
$output .= "<tr><td width='50%' style='color:#000;background-color:#ddd;'>\$_POST[".$key ."]  </td><td width='50%' style='color:#009900;font-weight:normal;background-color:#ddd;'>";
Now it does not complain. But still no cigar.
#6

[eluser]ryantxr[/eluser]
I traced the problem down to the mysql driver.

Code:
log_message('debug', 'Reaches here');
return @mysql_pconnect($this->hostname, $this->username, $this->password);

I removed the '@' so I could see the errors generated if any. This is what printed out.

Quote:Fatal error: Call to undefined function mysql_pconnect() in C:\Ryan\php\CodeIgniter_1.5.3\system\database\drivers\mysql\mysql_driver.php on line 63
So it seems I am missing the mysql driver.

Mystery solved.
#7

[eluser]alpar[/eluser]
try turning persistent connections off from the config/database file, and see if that works.

(You should try Linux, i am using it exclusively(no dual boot) for development and i have no problem at all! I even got adobe DW (i use it for CSS+XHTML) install and runs perfectly )
#8

[eluser]ryantxr[/eluser]
[quote author="alpar" date="1187740745"]try turning persistent connections off from the config/database file, and see if that works. [/quote]

I did this. It did not work. Apparently, php_mysql.dll relies on another DLL (MPR.DLL) which requires MSJAVA.DLL and some other DLL (ADUxxx.DLL) which are not always installed by Windows. MSJAVA is the old Microsoft JVM. Therefore, php_mysql indirectly requires these DLLs. Because they are missing, php_mysql.dll cannot load. The short answer is that PHP MySQL does not just work out of the box on all Windows installations. I'm sure I can eventually get it to work but who has the time to figure that out? I need to work on my application.

[quote author="alpar" date="1187740745"]
(You should try Linux, i am using it exclusively(no dual boot) for development and i have no problem at all! I even got adobe DW (i use it for CSS+XHTML) install and runs perfectly )[/quote]

I do have a LINUX system. That is where I have Apache/PHP/MySQL running. This operates more like a server. My workstation is a Windows system and I wanted a local installation to make debugging faster. I'm not ready to give up the items I use that are only available on Windows. I have one or two more things I will try tonight until I let it simmer for a while.

This all came from trying to switch from Dream Weaver to Eclipse for PHP development. DW has such an easy way to push files out which eclipse does not have. I use Eclipse for Java development and I thought that if I could use one development environment for everything, life might be easier. Oh well.
#9

[eluser]alpar[/eluser]
you do have eclipse for linux, i would be glad to have a talk on tools that you can use on linux, i also have a linux server and switched my workstation to linux as well, for like 6 months now, but this is probably not the place to talk about it.
#10

[eluser]ryantxr[/eluser]
Here is the latest and final word on this. I took the libmysql.dll from the zip file and put it into Windows\System32.

It Works! :-)

I guess it needed to find this dll on the path but not the others.




Theme © iAndrew 2016 - Forum software by © MyBB