472,988 Members | 2,389 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,988 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 7428
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: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
3
SueHopson
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

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.