473,624 Members | 2,508 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem run php scripts on localhost using iis

24 New Member
hi
i have a problem with my iis it doesnt want to open up my php file and it did work in the pas but now al of a suden it doesnt want to open.I didnt make any changet or nothing

Can you hlp
Jan 24 '07 #1
14 12748
radcaesar
759 Recognized Expert Contributor
With out making any changes (With out ur knowledge), hows it possoble. Chack with PHP.ini file and iis extensions.

Else its simple, Reinstall PHP parser.

:)
Jan 24 '07 #2
hdf
24 New Member
With out making any changes (With out ur knowledge), hows it possoble. Chack with PHP.ini file and iis extensions.

Else its simple, Reinstall PHP parser.

:)
hi

i did a reinstall of php and still does the same thing
Jan 24 '07 #3
radcaesar
759 Recognized Expert Contributor
What version of PHP you are using and what is IIS Version ?

U manually installed PHP or used install shield ??

Did u seen a file structure like this in ur system ? (PHP Installed folder)

c:\php
|
+--dev
| |
| |-php5ts.lib
|
+--ext -- extension DLLs for PHP
| |
| |-php_bz2.dll
| |
| |-php_cpdf.dll
| |
| |-..
|
+--extras
| |
| +--mibs -- support files for SNMP
| |
| +--openssl -- support files for Openssl
| |
| +--pdf-related -- support files for PDF
| |
| |-mime.magic
|
+--pear -- initial copy of PEAR
|
|
|-go-pear.bat -- PEAR setup script
|
|-fdftk.dll
|
|-..
|
|-php-cgi.exe -- CGI executable
|
|-php-win.exe -- executes scripts without an opened command prompt
|
|-php.exe -- CLI executable - ONLY for command line scripting
|
|-..
|
|-php.ini-dist -- default php.ini settings
|
|-php.ini-recommended -- recommended php.ini settings
|
|-php5activescrip t.dll
|
|-php5apache.dll
|
|-php5apache2.dll
|
|-..
|
|-php5ts.dll -- core PHP DLL
|
|-...
Jan 24 '07 #4
radcaesar
759 Recognized Expert Contributor
If its Manual installation on IIS 5.1

Then theck these steps.

The first step is to extract all of the files from the downloaded zip file into C:PHP (create the folder if it doesn’t already exist).
You may choose a different location, although it is not recommended. The path must NOT have spaces, for example, you cannot use C:Program FilesPHP. Some web servers may not be able to handle the path name and will fault. PHP 5 includes a CGI executable, a CLI executable as well as the server modules. The DLLs needed for these executables can be found in the root of the PHP folder (C:PHP). php5ts.dll needs to be available to the web server. To do this, you have 3 options:

1. Copy php5ts.dll to the web server’s directory (C:inetpubwwwro ot).

2. Copy php5ts.dll to the Windows system directory (C:windowssyste m32).

3. Add the PHP directory path to the environment variables PATH.

We will go with option 3, because we would like to keep all of our PHP install files in the same location, for easier cleanup later, if needed. Let’s proceed…

Instructions on how to put C:php in env variables PATH.

First we want to open System Properties. There are two ways to get to System Properties. Either way will work.

1. Right-Click on My computer and choose “properties”.

2. Go to Control Panel, and select “System”.

Once here, we want to select the Advanced tab. In the Advanced tab, click the “Environment Variables” button. There are two sections in the Environment Variables window, User Variable and System Variables. We will be using System Variables. Scroll down in System Variables until you find the variable PATH. Highlight that line and the select Edit below the System Variables window. We will only be adding to the Variable Value. BE CAREFUL HERE. You do not want to delete anything on this line. Simply find the end of the line and add a semi-colon ( ; ) if there is not one already. After the semi-colon, type: C:PHP and then hit OK. Now click OK on the Environment Variables window. Finally click OK on the System Properties window and we are done with this part.

Now we must restart the computer to make the Environment Variables changes come into play. We cannot simply log off and log on, you must restart.

The next step is to set up a config file for PHP, php.ini. In C:PHP you will find two files named php.ini-dist and php.ini-recommended. We will use php.ini-recommended for this install, and all you need to do is rename it from php.ini-recommended to php.ini.

1. doc_root = C:inetpubwwwroo t

2. cgi.force_redir ect = 0

Now PHP is installed, lets move on to preparing our IIS to use PHP.

Configure IIS to use PHP.

1. Open IIS

2. Under Home Directory: Set “Execute Permissions” to “Scripts Only”

3. Click on configuration..

a. Click Add

b. Set “executable” to C:PHPphp5isapi. dll

c. Set “extension” to .php (don’t forget to include the . )

d. Click OK

e. Click Apply, then OK.

Under ISAPI Filters

a. Click “Add”

b. Set Filter Name to PHP

c. Set Executable to C:PHPphp5isapi. dll

d. Click OK.

e. Click Apply, then OK.

Restart the Web Server
Now we want to test PHP on our system. To do this, we will create a file called phpinfo.php and it will be used to display all of the PHP info from our system in our web browser.

1. Open Notepad and type:

2. Save the file as phpinfo.php and select the file type ‘All Files’ (Important: do not save the file as .txt, as it will not work).

3. Move the file into C:inetpubwwwroo t

4. Open your web browser and type: http://localhost/phpnfo.php

5. Your browser should display a lot of PHP information.
Jan 24 '07 #5
hdf
24 New Member
hi
thanx its showing the php info, but i have a problem connectiong to my Mysql database ( im using SQLyog v 4 for database).
and it guves me the following error:
Fatal error: Call to undefined function mysql_connect() in C:\Inetpub\wwwr oot\multisure.c o.za\www\test.p hp on line 10
Jan 24 '07 #6
radcaesar
759 Recognized Expert Contributor
To fix this, find the line:

;extension=php_ mysql.dll inyour php.ini file and remove the leading semicolon to uncomment it like so:

extension=php_m ysql.dll

You might also want to uncomment the extension to php_gd2.dll (for graphics purposes).

Next, ensure that the files php_mysql.dll and libmysql.dll can be reached by php by modifying and uncommenting the line:

extension_dir = "C:\php\ext \"

to something more appropriate to your system. Verify this by looking at the value returned by:

< ?php phpinfo() ? >

:)
Jan 24 '07 #7
hdf
24 New Member
i have done the changet to the php.ini file but it still have the same effect
Jan 24 '07 #8
hdf
24 New Member
hi the page is displaying but i getting the following code:
MemberId,1, $db)); echo (" ".deactdate($ob jSalesPsn->
Jan 24 '07 #9
radcaesar
759 Recognized Expert Contributor
This will be caused when you use some invalid PHP keywords which are unable to identified by the parser.

Check that particular line in ur PHP file.
:)
Jan 25 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

2
6905
by: Dale | last post by:
I'm (trying) to help a friend setup a MySQL db and use some simple scripts on a site hosted with GoDaddy. I note that GoDaddy appears to use Microsoft. I have done this: $connection = mysql_connect("localhost","mydatabase","password") or die ("Couldn't connect to server."); $sql = mysql_query("SELECT * FROM dummy"); $row = mysql_fetch_array($sql); echo $row; ?>
0
12025
by: Ike_strong | last post by:
Can anyone help me to figure out why each time I try to access my database using: c:\mysql\bin\inmysql -root -p and afterwards:(i.e. after inputting my at the password prompt) Enter Password: '******' I get the following:
2
74673
by: SKB | last post by:
Hi, I am absolutely new to this area. I am getting the following difficulty : Access denied for user 'ODBC'@'localhost' (using password: NO) when I try the mysql command from within the C:\Program Files\MySQL\MySQL Server 5.0\bin on the command window. Please note that the MySQL is runnging as I have tried the command NET START MySQL and it gives the following output: The requested service has already been started. More help is...
7
161299
by: rajbala.3399 | last post by:
Hi , I want to download sql in my linux system........... # rpm -ivh MySQL-server-5.0.24a-0.glibc23.i386.rpm MySQL-cl ient-5.0.24a-0.glibc23.i386.rpm Preparing... ########################################### package MySQL-client-5.0.24a-0.glibc23 is already installed package MySQL-server-5.0.24a-0.glibc23 is already installed
0
1999
by: cty | last post by:
Title: Problem in session using php5 Good day, I use php5+mySQL4+IIS5.x Previuosly i use php4 and no error occur,
0
1199
by: xpcer | last post by:
hi friends, can you help me..? if i want to copi file from localhost to localhost, i can use the scripts like this: copy("d:/picture1.jpg","c:/picture1.jpg"); but when i wanna to copy file from website, i use like this: copy("www.me.com/picture1.jpg","c:/picture1.jpg");
1
24294
usafshah
by: usafshah | last post by:
Hi I'm using linux with mysql , when i type mysql in terminal it says like: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) i'm logged in as root but it works when i type mysql -u root -p and then type root password.
8
28525
by: ajos | last post by:
hi frnds, im trying to convert my servlets database configuration from ms access to mysql database.however im getting some error like no driver found exception. to verify this error ive made a simple database in jsp(just to check if my mysql is working smoothly otherwise) which access' the username.....but in the process im getting a error--> java.sql.SQLException: Access denied for user ''@'localhost' (using password: NO) i have...
4
8338
by: pearl15 | last post by:
Hello All I have successfully installed the following IIS ver 6 php ver 4.4.9 MYSQL ver 5.0.67 when i tested through command line i get no error and i am view the php pages on the browser without any hitch. In the beginning when i was trying to connect to MYSQL through simple php script i was getting an authentication error which i could resolve by using OLD_PASSWORD.
1
4847
by: pearl15 | last post by:
Hello All I have successfully installed the following IIS ver 6 php ver 4.4.9 MYSQL ver 5.0.67 when i tested through command line i get no error and i am view the php pages on the browser without any hitch. In the beginning when i was trying to connect to MYSQL through simple php script i was getting an authentication error which i could resolve by using OLD_PASSWORD.
0
8168
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8672
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8614
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8471
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6107
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5561
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4075
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4167
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.