Jump to content

Apache cannot parse MySql php functions


cynicus

Recommended Posts

Hello,

I have been reading around the forum for some answers but cannot solve my problem.

I have installed:

PHP 5.2
MySql 5.0
Apache 2.2

on windows XP pro

Everything works.  Apache parses std php, php executes, mysql works. Php is also succefully connecting to the database when I run from the command line:

>php mysql.php

however, my problem is when I try to parse mysql.php from apache

It does not recognise the mysql_connect function.

I have set up the libmysql.dll file in widows\system32.  I have configure php.ini according to the following thread

http://www.phpfreaks.com/forums/index.php/topic,95378.0.html

but that I have a feeling it is the httpd.conf file that needs something else.  This is what I have at added to it to get it to parse php code:

#php module
PHPIniDir "C:/php5.2/"
LoadModule php5_module "C:/php5.2/php5apache2_2.dll"
AddType application/x-httpd-php .php .php5
AddType application/x-httpd-php-source .phps

can anyone see anything obvious as to why apache would not be able to parse mysql php fuctions?

thanks for any pointers

Vrata
Link to comment
Share on other sites

It is not the Apache configuration that is at stake but PHPs.

Find and open you php.ini and make sure you have enabled the mysql extension and setup the extension_dir directive too. If already have done that then make saure php is reading the php.ini you are editing. You can easily do that by creating a file called info.php and add the following to it:
[code]<?php

phpinfo();

?>[/code]

Now load that file into your browser and look for the following line:
[b]Configuration File (php.ini) Path[/b] to the right of that it should state the full PATH to the php.ini. Is the Path that is stated correct?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.