|
Posted by pangea33 on 12/04/06 04:17
Tom wrote:
> On 3 Dec 2006 10:37:01 -0800, MarkP wrote...
> >
> >HI,
> >
> >Just swapped over from using php running under IIS, to php running
> >under apache. Finally got apache running and recognising my php files,
> >but now I can't connect to my MySQL database. Haven't changed my
> >php.ini file since swapping over, and I'm now getting the following
> >error :
> >
> >Fatal error: Call to undefined function mysql_connect() in C:\Program
> >Files\Apache Software
> >Foundation\Apache2.2\htdocs\fashion\inc\startup.inc.php on line 32
> >
> >Is there anything I need to change now that I'm running from apache ??
> >
> >currently have :
> >
> >extension_dir = "c:\php\ext"
> >extension=php_mysql.dll
> >
> >in php.ini
> >
> >Mark.
> >
>
>
> Since you're switching web servers and PHP is parsed on the server end, I wonder
> how much you might have to re-install. From my understanding MySQL is an
> optional install with PHP and may need to rebuild your PHP, MySQL, and other
> components if you're changing the ingredients. Probably have to refresh work
> through a new ini file too.
>
> Tom
> --
> Help a Community by Participating in Ours
> We donate your subscription fees to the charity you choose
> 100% of your first month, 10% thereafter.
> http://newsguy.com/charity.asp
I've never had a problem using the same php installation when switching
from IIS to Apache. The major difference is that Apache uses modules
with a *.so extension. In this case the relevent line in php.ini would
be "extension=mysql.so". Create a php page to run the function
"phpinfo();" and search the output for "extension_dir". Go check that
directory and make sure the "mysql.so" file exists. If not, just place
it there and update the php.ini file. Restart Apache which will restart
PHP essentially and try it out.
Navigation:
[Reply to this message]
|