Page 1 of 1

Apache, php and mysql

Posted: Wed Feb 06, 2008 10:38 pm
by go5NuuhxS
Hello

I am having an odd problem, i've installed php,mysql and apache, everything works fine except mysql.
Its not the usual problem though, if i run C:\dev\Apache2.2\php\php.exe C:\dev\Apache2.2\htdocs\index.php, php will execute the code and run the mysql query.

however if i am to load http://localhost/index.php, i get:
Fatal error: Call to undefined function mysql_connect() in C:\dev\Apache2.2\htdocs\index.php on line 5

So mysql does work with php, and php does work with apache, but mysql doesnt work with apache :S

anyone had a similar problem?

Re: Apache, php and mysql

Posted: Wed Feb 06, 2008 11:37 pm
by Christopher
Sound like Apache is not telling PHP where it is located. What are the lines in your httpd.conf file?

Re: Apache, php and mysql

Posted: Thu Feb 07, 2008 1:31 am
by go5NuuhxS
ScriptAlias /php/ "C:/dev/Apache2.2/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"
AddType application/x-httpd-php-source .phps
LoadModule php5_module "C:/dev/Apache2.2/php/php5apache2_2.dll"
PHPIniDir "C:/dev/Apache2.2/php/x/"