473,836 Members | 1,525 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 12768
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
6953
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
12040
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
74732
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
161317
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
2006
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
1211
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
24403
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
28622
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
8357
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
4872
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
9813
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10832
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
10539
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...
1
10584
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10248
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...
0
9367
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
4446
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4006
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3108
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.