473,396 Members | 1,975 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

IIS7 Vista ISAPI,CGI mysql , session, variable big prolem

1. Does anyone run ASAPI and mysql succesfully on Vista /IIS7?
2. Does anyone run CGI and display all SESSION errors on Vista /IIS7?

php ASAPI doesn't works with MYSQL.

And CGI doesn't show any SESSION error message.

PHP had so much bugs on windows vista.
I using php-5.2.1-Win32


<?php
if (!isset($_SESSION)) session_start();

unset($TEST);
echo $TEST; //line 4

unset($_SESSION['UserName']);
echo $_SESSION['UserName']; //line 7
echo "<br>Hello there";
echo 'IF you don't see the next line, then php is bugs.';

$xxxxxx = mysql_connect('localhost') or die (mysql_error());
echo 'mysql okay' ;
?>

I posted my question on experts-exchange.com but seem like I don't have the solution yet.
http://www.experts-exchange.com/Web_..._22440660.html
Mar 13 '07 #1
8 7459
Hello about the ASAPI thing, I mean ISAPI
Mar 13 '07 #2
ronverdonk
4,258 Expert 4TB
The MySQL does not work probably because you did not specify the userid and password, like in
[php]mysql_connect("localhost", "userid", "password")[/php]

Is the ";error_log = filename" in php.ini commented out?

What error messages do you not get? Are you sure you have errors to be shown?

Ronald :cool:
Mar 13 '07 #3
For the mysql with isapi seem like it doesn't communicate with the mysql.
I had the same set up of the php.ini for cgi and isapi.

I can use cgi with mysql okay but it just doesn't give my any warning for the SESSION and Variable.

If use cgi then I don't see any error message when I call the unavailable SESSION.
Normally if there is an unavailable SESSION the php should display something like
Notice: Undefined index: UserName in H:\xxxx\xxxx\test.php on line 3
Of if the VIRIABLE is unavailable then it should display like
Notice: Undefined variable: TEST in H:\xxx\xxxx\test.php on line 4

About the error log file, I did remove the; and put the writing directory to
log_errors = C:\PHP\log.txt

I just rewrite my code below.[php]
<?
if (!isset($_SESSION)) session_start();

echo "IF you don't see the next line, then php is bugs with mysql";
//set up the names of the database and table

$db_name ="xxx";
$table_name ="xxxxxxxx";
$server = "localhost";
$dbusername = "root";
$dbpassword = "zxxxxxxxxxxxxxxxxx";

//make the connection to the database
$connection = mysql_connect($server, $dbusername, $dbpassword) or die(mysql_error());
$db = mysql_select_db($db_name,$connection)or die(mysql_error());
echo 'GOOD CONNECT';
?>


<?php
//TEST WARNING ON CODING SCRIPT.
unset($TEST);
echo $TEST; //line 4

unset($_SESSION['UserName']);
echo $_SESSION['UserName']; //line 7

echo "<BR> test ISapi";
phpInfo();

?>[/php]
Mar 13 '07 #4
When I switched to isapi I had this error on myscript.
Fatal error: Call to undefined function mysql_connect() in S:\xxxxx\xxx\test.php on line 14

The cgi is doing fine on with the mysql, in fact I had a database and tested it, I can retrieve info from the database okay.
Again except the warning message
Mar 13 '07 #5
ronverdonk
4,258 Expert 4TB
I do not know anything about isapi. But obviously isapi does not recognise the PHP mysql_connect command as a valid asapi command. Are you sure that you can write PHP code in isapi?

As for your errors: they are written to the log file you specified, instead of the screen. For that you set the file off and display_errors = On

Ronald :cool:
Mar 13 '07 #6
I do not know anything about isapi. But obviously isapi does not recognise the PHP mysql_connect command as a valid asapi command. Are you sure that you can write PHP code in isapi?

As for your errors: they are written to the log file you specified, instead of the screen. For that you set the file off and display_errors = On

Ronald :cool:
the asapi.dll just the different way to connect to php.exe instead using cgi.exe so I don't think my code is matter.

I did do the display_errors = On but i recieve no error.
Mar 13 '07 #7
I solved a problem with PHP PHP Version 5.2.1 with mysql.
but my the way thank you for replies ronverdonk.

If any body interest reading thing problem please follow the instruction below.
Download the php-5.2.1-win32-installer.msi
Dowload the mysql server - very easy to install

Run the PHP 5.2.1 setup
Make sure select the entension for mysql.

the php.in should be like below.

[PHP]
error_reporting = E_ALL
cgi.force_redirect=0
;I install in the PHPCGI folder
extension_dir="C:\PHPCGI\ext"
[PHP_MYSQL]
extension=php_mysql.dll
[PHP_MYSQLI]
extension=php_mysqli.dll
[PHP_OPENSSL]
extension=php_openssl.dll
[/php]
Mar 13 '07 #8
ronverdonk
4,258 Expert 4TB
Thank you for sharing your solution with our members.

Ronald :cool:
Mar 13 '07 #9

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

Similar topics

3
by: Vlad Hrybok | last post by:
Hi all, I recently installed 64 bit version of Vista hoping to make it my primary development setup. I was able to do work with IIS7 and ASP.NET 2.0/Visua Studio 2005 combo, but hit a roadblock...
3
by: Brad | last post by:
In a Vista/IIS7 asp.net app, a coded crystal report export is crashing IIS7....but it works just fine in visual studio's cassini web server. And if I create a web form and use the crystal...
14
by: Brad | last post by:
I have a .net 2.0 web application project that creates a pdf file, saves the pdf to disk (crystal reports does this part), and then my code reads the pdf file and writes it to the httpresponse ...
5
by: =?Utf-8?B?bXVzb3NkZXY=?= | last post by:
Hi, I wonder if someone could shed some light on this one for me. I have developed a web app in VS2005 with the built in server. It uses an sql database, everytihng works. I need to test it...
0
by: Erwin Moller | last post by:
Hi, I am one of those questionable people that started with Vista (Home Premium). Not because I think it is a ready/steady OS, but partly out of curiousity, and partly because I needed to work...
0
by: RYAN RIEHLE | last post by:
Using Vista and PHP ISAPI and everything is installed and works, except with one account on my computer. If I log in as the local administrator, local php pages work; I also created a new...
4
by: turnstyle | last post by:
Hi all, I seem to be having some weird problems with PHP on IIS7, and now I wonder -- is anybody here running PHP on IIS7? Thanks! -Scott
6
by: ma | last post by:
Hello, I am new to IIS and ASP.NET. I wrote my first ASP.NET and I want to deploy in to a system which has Vista Business and IIS7. I copied my files to the target computer and created a virtual...
11
by: =?Utf-8?B?QXNhZg==?= | last post by:
Hello, I have just installed VISTA Enterprise and VS.NET 2008. When pressing F5 to debug my test ASP.NET website, IE 7 display the message "Internet Explorer cannot display the webpage". The...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
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...
0
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...
0
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...

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.