Jump to content

Recommended Posts

here is the crap:

 

changes I make the php.ini file are not reflected on the phpinfo() display.

php does not recognize mysql function calls

 

here is my configurations:

 

So I downloaded php 5.2.6, apache 2.2.9 and mysql 5.0.67. I just reformatted my computer today and I'm on a Window XP service pack 3.

I downloaded all of these individually and attempted to install PHP manually.

 

Apache is in C:\WAMP\Apache

PHP is in C:\WAMP\PHP

MySQL is in C:\WAMP\MySQL

 

I'm trying to install all these components as I've done 2/3 times before with previous versions and I've spent about 6 hours scowering the internet trying to figure out what I'm doing wrong.

 

I've done these changes to php.ini (the recommended version)

-re-named the php.ini-recommended to php.ini

-changed the extension_dir to C:\WAMP\PHP\ext

-uncommented the extension = php_mysql.dll

-changed error_reporting to E_ALL & ~E_NOTICE

-changed display_errors to On

 

I've added these lines to httpd.conf

LoadModule php5_module "C:/WAMP/PHP/php5apache2_2.dll"

PHPIniDir "C:/PHP"

<IfModule dir_module>

DirectoryIndex index.php index.html

</IfModule>

<IfModule mime_module>:

AddType application/x-httpd-php .php

</IfModule>

 

MySQL is running as a service, Apache is running as a service

 

PHP appears to work...

 

mysqllib.dll is in the C:\WAMP\PHP folder

php.ini is in the C:\WAMP\PHP folder

php_mysql.dll is in the C:\WAMP\PHP\ext folder

 

I have an environment variable PHPRC set to C:\WAMP\PHP

I have an envrionment variable PATH set to C:\WAMP\PHP

 

I've tried putting all the dlls and ini files in the windows and system32 folders but it doesn't appear to work

I've always restarted apache after making changes.

 

Sorry for the huge post, I just hope that's enough info to help me out, I'm totally stumped at this point...

 

Thanks you awesome dude that responds to me :)!

 

I said I just reformatted my computer so I did install it from scratch. I don't know about a phpinfo file but I did change the php.ini file. I uncommented the mysql line and changed the ext dir and restarted apache...that's all in what I wrote above,

 

please help

 

Thanks

Another thing about phpinfo() is that it says:

 

  System  Windows NT JAKIV 5.1 build 2600 

 

for the first line...I'm on Windows XP...

 

it also has

 

  Configuration File (php.ini) Path  C:\WINDOWS 

 

How do I change that path? (and yes I did add the environment variable path to have C:\WAMP\PHP)

Another thing about phpinfo() is that it says:

 

System Windows NT JAKIV 5.1 build 2600

 

for the first line...I'm on Windows XP...

 

it also has

 

Configuration File (php.ini) Path C:\WINDOWS

 

How do I change that path? (and yes I did add the environment variable path to have C:\WAMP\PHP)

When the Configuration File (php.ini) Path displays C:\WINDOWS it does not mean PHP is reading the php.ini from that directory. What it means is C:\WINDOWS is the last place PHP searches for the php.ini (PHP does search for the php.ini in three key places, the PATH, PHPRC and the system folder (C:\WINDOWS)).

 

The line you should take notice of is the Loaded Configuration File line, this line should state the full path to the loaded php.ini. if it displays (none) then no php.ini is currently being loaded.

Ok, I finally figured it out and unfortunately it was stupid. I just had a typo in my httpd.conf file

 

PHPIniDir "C:/php" instead of PHPIniDir "C:/WAMP/PHP"

 

which I wish Apache would have recorded in it's error log that it couldn't find the directory C:/php, but whatever.

 

Anyway, I still have a question. To get Apache to recognize libmysql.dll and libmycrypt.dll I had to either put them in Apache's bin folder or the system32 folder. Shouldn't I be able to just leave them in the C:/WAMP/PHP folder?

 

Thanks

Perhaps I'm not doing something right in my httpd.conf file, all I did was append this to the end of the file:

 

LoadModule php5_module "C:/WAMP/PHP/php5apache2_2.dll"

PHPIniDir "C:/WAMP/PHP"

<IfModule dir_module>

DirectoryIndex index.php index.html

</IfModule>

<IfModule mime_module>:

AddType application/x-httpd-php .php

</IfModule>

Anyway, I still have a question. To get Apache to recognize libmysql.dll and libmycrypt.dll I had to either put them in Apache's bin folder or the system32 folder. Shouldn't I be able to just leave them in the C:/WAMP/PHP folder?

 

Thanks

Yes as long as the PHP folder has been added to the PATH Environment Variable, which you have. Make sure Apache is stopped and open your php.ini and turn display_startup_errors on. Save the php.ini and start Apache. This time errors should be displayed when Apache starts up.

 

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.