Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

This has been and is still a painful experience

Status
Not open for further replies.

janise

Technical User
May 25, 2003
161
US
I really, really need help with my php configuration.
I uninstalled apache 2.4 because I was having all kinds of problem configuring it to talk to our sql server db.
Before uninstalling it, it works well because I would run phpinfo and it will display all summary of configuration.
The only problems I had was configuring it to talk to sql server db since that is what management decided we use.
Right now, I have installed apache 1.3.9 and tested it, it works.
But, I can't even get the php to work.
When I try running some test codes by going to the browser for instance, and typing say:
I get a download.
In order words, it acts as though I was trying to download test.php.
What am I missing?
I have been working with this freaking thing now for over a week and still nowhere near getting it to work.
Please help!!!!!!!!!!!
 
Greetings,

After you installed apache 1.3.9 did you reinstall PHP?

Apache needs to know about PHP to process.

BTW, what platform are you running on?

tgus

____________________________
Families can be together forever...
 
In Apache 1.3.x, you need three things in your httpd.conf to make PHP work:

A LoadModule directive:
LoadModule php4_module some/path/libphp4.so

An AddModule directive:
AddModule mod_php4.c

And an AddType directive:
AddType application/x-httpd-php .php


Want the best answers? Ask the best questions: TANSTAAFL!!
 
Thank you two very much for your response.

tgus - yes I reinstalled php.


sleipnir214, do I need to copy the following files to http.conf?

A LoadModule directive:
LoadModule php4_module some/path/libphp4.so

An AddModule directive:
AddModule mod_php4.c

And an AddType directive:
AddType application/x-httpd-php .php

 
No. httpd.conf contains runtime configuration directives. These directives must be included for PHP to work as an Apache module.

Open httpd.conf in a text editor, find the section which includes a bunch of LoadModule directives, and add the LoadModule text from above to the end of that bunch of LoadModule directives. You'll probably have to edit the path of libphp4.so to match your install environment.

Do the same with the AddModule and AddType directives.

Want the best answers? Ask the best questions: TANSTAAFL!!
 
I definitely must be doing something wrong because I have done all of that and I still get download dialog box when I attempt to run phpinfo.php.
 
Yes, I just got errrs.

Right now, I have got phpinfo.php to work.
I can now see summary of my php configuration.
I ran test code to see if mssql extensions are loaded and I get this message:

mssql extension not loaded - check php.ini

I checked the php.ini file in windows directory.
It reads:
"./"
I changed it to:
"d:/php/extensions" - extensions contains php_mssql.dll and extensions is a subfolder under php folder.
I also uncommented this line:
extension="php_mssql.dll"

When I tried to restart apache server, I get an error : unable to load dynamic library. The specified module could not found.
What am I doing wrong here?
 
This from the PHP online manual (
Requirements for WIn32 platforms.

The extension requires the MS SQL Client Tools to be installed on the system where PHP is installed. The Client Tools can be installed from the MS SQL Server CD or by copying ntwdblib.dll from \winnt\system32 on the server to \winnt\system32 on the PHP box. Copying ntwdblib.dll will only provide access. Configuration of the client will require installation of all the tools

Want the best answers? Ask the best questions: TANSTAAFL!!
 
Thanks for your contiued assistance.
I read the same document.
First, my php, sql server db and apache are all on the same box and there is ntwdblib.dll all over the correct places.
I am really at a loss here.
 
Do you want to know if the filename extensions is the same in php.ini as the name on the folder?
If yes, then yes!
I actually had someone who wanted to bet me that I did not have php_mssql.dll loaded and asked that I send the entire php.ini file to him.
After going through it, he said it was done correctly and had no idea why it wasn't working.
 
Not file name extension. Filename complete.

Your php.ini states:

extension="php_mssql.dll"

Your filename of the dll on your filesystem is "ntwdblib.dll"

Have you tried copying ntwdblib.dll to the filename php_mssql.dll?

Want the best answers? Ask the best questions: TANSTAAFL!!
 
Not sure that is possible; unless I am missing something.
You are suggesting to copy ntwdblib.dll into php_mssql.dll but this php_mssql.dll can't be opened or copied into.
 
No, that's not the suggestion...

php.ini has a section where you load extensions.

You will need to insert the name of the extension you would like to load into that section... be it
php_mssql.dll or
nwtwdblib.dll

-Rob
 
I have finally gotten the mssql extensions to be loaded.
look at this:
d/php/extensions.
I just realized that that line should be:
d:/php/extensions ( I just added a colon) and now all mssql extensions have been loaded but that is causing new errors.
I am going to try on my own to resolve those errors.
If not, I will post, hope you don't mind.
You have been a tremendous help, thank you very, very much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top