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?
Apache, php and mysql
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Apache, php and mysql
Sound like Apache is not telling PHP where it is located. What are the lines in your httpd.conf file?
(#10850)
Re: Apache, php and mysql
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/"
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/"