<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.iis.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:cs="http://blogs.iis.net/"><channel><title>Search results matching tag 'php error'</title><link>http://forums.iis.net/search/SearchResults.aspx?o=DateDescending&amp;tag=php+error&amp;orTags=0</link><description>Search results matching tag 'php error'</description><dc:language>en-US</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>PHP EXCEL EXPORT error!!</title><link>http://forums.iis.net/p/1161273/1918596.aspx#1918596</link><pubDate>Mon, 28 Sep 2009 15:32:37 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1918596</guid><dc:creator>gvardan</dc:creator><cs:applicationKey>php_community-49</cs:applicationKey><description>&lt;p&gt;&amp;nbsp;Hi,&lt;/p&gt;&lt;p&gt;We just moved all our php based web applications to windows server running IIS 6.0. &lt;br /&gt;Exporting to Excel function is unfortunately not working in the applications &lt;b&gt;only in Internet Explorer&lt;/b&gt;.&lt;br /&gt;I believe its something to do with IIS MIME types after i went through some forums. I set the MIME type for .xls and .xla as application/vnd.ms-excel in IIS. &lt;br /&gt;But still I&amp;#39;m getting error attached below..&lt;/p&gt;&lt;p&gt;This is my header details in php&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; header(&amp;quot;Content-Disposition: attachment;filename=QueryExport-NRBN&amp;quot;.date(&amp;quot;Y-m-d_hms&amp;quot;).&amp;quot;.xls&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; header(&amp;quot;Content-Type = application/download&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; header(&amp;quot;Content-Transfer-Encoding: binary&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; header(&amp;#39;Cache-Control: must-revalidate, post-check=0, pre-check=0&amp;#39;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; header(&amp;quot;Expires: 0&amp;quot;);&amp;nbsp; &lt;br /&gt;&lt;/p&gt;&lt;p&gt;i hope someone can help me out.&lt;/p&gt;&lt;p&gt;Thank you, &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;img src="http://www.connexservice.ca/untitled.jpg" width="837" height="300" alt="" /&gt;&lt;/p&gt;</description></item><item><title>IIS 6; PHP 5; MSSQL 2000; PHP exec() command</title><link>http://forums.iis.net/p/1153580/1886808.aspx#1886808</link><pubDate>Fri, 05 Dec 2008 02:10:55 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1886808</guid><dc:creator>jdarbyshire</dc:creator><cs:applicationKey>php_community-49</cs:applicationKey><description>I am running a Win2k3 server with IIS 6 with PHP 5 installed as a CGI executable.&lt;br /&gt;&lt;br /&gt;

I have the following code:&lt;br /&gt;&lt;br /&gt;

&lt;font face="Lucida Console" size="2"&gt;
&amp;lt;?php&lt;br /&gt;
  exec(&amp;quot;c:\windows\system32\schtasks.exe /Query&amp;quot;, $output);&lt;br /&gt;
  print_r($output);&lt;br /&gt;
?&amp;gt;
&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;

In &amp;#39;schedule.php&amp;#39;, which runs fine on my local test server (Win XP, Apache, PHP 5) returning an array containing all the scheduled tasks on this computer.&lt;br /&gt;&lt;br /&gt;

When migrated to the server the page loads with no PHP errors, however returns an empty array. It also appears that schtasks is not run.&lt;br /&gt;&lt;br /&gt;

I suspect this is to do with windows user permissions. So added %COMPUTERNAME%/IUSR_%COMPUTERNAME% to the security tag of the C:\ and D:\ drives and the C:\PHP folder, C:\WINDOWS, C:\WINDOWS\System32 and also SCHTASKS.exe. No avail - still no exec() command.&lt;br /&gt;&lt;br /&gt;

I have queried the server using the php system() command which returns no username, but implies that the default user profile is being used to run the page. Code used as follows:&lt;br /&gt;&lt;br /&gt;

&lt;font face="Lucida Console" size="2"&gt;
&amp;lt;?php&lt;br /&gt;
  echo &amp;#39;&amp;lt;pre&amp;gt;&amp;#39;;&lt;br /&gt;
  system(&amp;#39;set&amp;#39;, $retval);&lt;br /&gt;
  echo &amp;#39; &amp;lt;/pre&amp;gt;&amp;#39;;&lt;br /&gt;
?&amp;gt;
&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;

I am wanting to use exec() to run schtasks and query scheduled tasks, create tasks and delete them so I can do server maintenance from a web interface.&lt;br /&gt;&lt;br /&gt;

Using ASP is not really an option as there is a possibility that in the future it may need to be run on a Linux based system.&lt;br /&gt;&lt;br /&gt;

Thanks for any help in advance. Much appreciated!!</description></item><item><title>PHP-phpcfg failed</title><link>http://forums.iis.net/p/1153549/1886690.aspx#1886690</link><pubDate>Wed, 03 Dec 2008 23:29:27 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1886690</guid><dc:creator>cjnr</dc:creator><cs:applicationKey>php_community-49</cs:applicationKey><description>&lt;p&gt;Hi Everyone&lt;br /&gt;&lt;br /&gt;I run IIS7 on windows server 2008 and Plesk 8.6 Control Panel&lt;br /&gt;&lt;br /&gt;The server is returning the following error :&lt;br /&gt;Server Error&lt;br /&gt;404 - File or directory not found.&lt;br /&gt;The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.&lt;br /&gt;&lt;br /&gt;If i change the PHP version to 4.4.7, i have a error message. &lt;br /&gt;Then i change it back to 5.2.6, i have about the same error message (check below)&lt;br /&gt;If i try again change the PHP version to 4.4.7, it works. &lt;br /&gt;Then i change it back to 5.2.6, it works.&lt;br /&gt;Then the website is working.&lt;br /&gt;&lt;br /&gt;BUT, after a couple of hours, it stop working. &lt;/p&gt;&lt;p&gt;Then i have to redo the same operation to get it back !&lt;br /&gt;&lt;br /&gt;How i can fix this issue ?&lt;br /&gt;&lt;/p&gt;&lt;p&gt;----------------------------&lt;br /&gt;phpcfg failed: Execute websrvmng --set-scripts &amp;quot;--vhost-name=domainname.com&amp;quot; &amp;quot;--scripts=&amp;lt;scripts action=&amp;#39;add&amp;#39;&amp;gt;&amp;lt;script name=&amp;#39;php&amp;#39; php_version=&amp;#39;5&amp;#39; php_handler_type=&amp;#39;cgi&amp;#39; /&amp;gt;&amp;lt;/scripts&amp;gt;&amp;quot; &amp;quot;--app-name=/&amp;quot; failed: C Exception: 3221225477&lt;br /&gt;---------------------- Debug Info -------------------------------&lt;br /&gt;0: plib\class.PhpManager.php:207&lt;br /&gt;PhpManager-&amp;gt;callPHPCfg(array)&lt;br /&gt;1: plib\class.PhpManager.php:97&lt;br /&gt;PhpManager-&amp;gt;setVersion(string &amp;#39;5&amp;#39;)&lt;br /&gt;2: htdocs\domains\php_changeversion.php:30&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>mssql_connect() failed with remote SQL Server</title><link>http://forums.iis.net/p/1150485/1874272.aspx#1874272</link><pubDate>Thu, 17 Jul 2008 11:50:07 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1874272</guid><dc:creator>MainMa</dc:creator><cs:applicationKey>php_community-49</cs:applicationKey><description>&lt;p&gt;Hello.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I have a problem with mssql_connect() when connecting to SQL server over network.&lt;/p&gt;&lt;p&gt;My computer is inside a domain. There are two SQL servers: the first one on my PC (on &lt;i&gt;localhost&lt;/i&gt;), the second one on a Windows Server 2008 remote computer (&lt;i&gt;remote&lt;/i&gt;) inside the domain. Both are SQL Servers 2005.&lt;/p&gt;&lt;p&gt;On &lt;i&gt;localhost&lt;/i&gt;, I have IIS7 with PHP5 running through Isapi. When I try to connect to the SQL Server on &lt;i&gt;localhost &lt;/i&gt;with &lt;span&gt;$this&lt;/span&gt;&lt;span&gt;-&amp;gt;&lt;/span&gt;&lt;span&gt;Link&amp;nbsp;&lt;/span&gt;&lt;span&gt;=&amp;nbsp;&lt;/span&gt;&lt;span&gt;mssql_connect&lt;/span&gt;&lt;span&gt;();&lt;/span&gt;, it works great. But &lt;span&gt;$this&lt;/span&gt;&lt;span&gt;-&amp;gt;&lt;/span&gt;&lt;span&gt;Link&amp;nbsp;&lt;/span&gt;&lt;span&gt;=&amp;nbsp;&lt;/span&gt;&lt;span&gt;mssql_connect&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;#39;remote&amp;#39;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt; fails with &lt;span class="postdetails"&gt;&amp;quot;mssql_connect(): Unable to connect to server&amp;quot; error.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I tried everything described in the comments at &lt;a href="http://www.php.net/manual/en/function.mssql-connect.php" target="_blank"&gt;http://www.php.net/manual/en/function.mssql-connect.php&lt;/a&gt;. Nothing seems to work, and I cannot connect to SQL Server on &lt;i&gt;remote &lt;/i&gt;neither through Windows authentication, nor through SQL one. By the way, I can connect to &lt;i&gt;remote&lt;/i&gt; (both with Windows authentication and SQL one) with SQL Server Management Studio.&lt;/p&gt;&lt;p&gt;What&amp;#39;s the problem?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;PS. On &lt;span style="font-style:italic;"&gt;remote&lt;/span&gt;, both &lt;span class="postbody"&gt;TCP/IP and Named Pipes&lt;/span&gt; are enabled. Disabling firewalls on &lt;span style="font-style:italic;"&gt;localhost&lt;/span&gt; and &lt;span style="font-style:italic;"&gt;remote&lt;/span&gt; does not solve the problem.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: PHP.INI not picked up by IIS</title><link>http://forums.iis.net/p/1149788/1871368.aspx#1871368</link><pubDate>Tue, 10 Jun 2008 11:51:19 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1871368</guid><dc:creator>khichi</dc:creator><cs:applicationKey>php_community-49</cs:applicationKey><description>&lt;p&gt;&amp;nbsp;You have not told that you are using PHP installer or trying to install manually,&lt;/p&gt;&lt;p&gt;If you are using installer than no problem, If not than try to use installer, Its best for beginners,&lt;/p&gt;&lt;p&gt;After installing&amp;nbsp; you can find the php.ini file in&amp;nbsp; system32 (C:\WINNT\system32) directory,&amp;nbsp; where you can make any changes that works,&amp;nbsp; and&amp;nbsp; remember that&amp;nbsp; after making changes&amp;nbsp; in php.ini&amp;nbsp; please restart the IIS&amp;nbsp; to take effect.&lt;/p&gt;&lt;p&gt;Sorry for my bad english,&lt;/p&gt;&lt;p&gt; &lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>PHP5 + IIS6</title><link>http://forums.iis.net/p/1149612/1870580.aspx#1870580</link><pubDate>Fri, 30 May 2008 14:45:12 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1870580</guid><dc:creator>Ilya_Guy</dc:creator><cs:applicationKey>php_community-49</cs:applicationKey><description>&lt;p&gt;&amp;nbsp;Hello.&lt;/p&gt;&lt;p&gt;I have a following problem:&lt;/p&gt;&lt;p&gt;I configure IIS6 @ Win 2k3sp2 to use PHP5 in ISAPI mode.&lt;/p&gt;&lt;p&gt;But I can see only index page with http://host:8085/ address.&lt;/p&gt;&lt;p&gt;If I write same address as http://host:8085/index.php I receive 404 Page not found.&lt;/p&gt;&lt;p&gt;This IIS support several virtual hosts and I need PHP only in one of them.&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>HTTP 404 PHP installed with IIS7</title><link>http://forums.iis.net/p/1148866/1867250.aspx#1867250</link><pubDate>Mon, 14 Apr 2008 22:20:15 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1867250</guid><dc:creator>WhiteTimer</dc:creator><cs:applicationKey>php_community-49</cs:applicationKey><description>&lt;p&gt;Hi ... I am really new to IIS7 &amp;amp; PHP and having followed all the suggested install and congifuration tutorials, i still cant get it to work.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I am currently running Windows Server 2008 &amp;amp; IIS7.&amp;nbsp; I have PHP installed, set the Environmental Variable, have IIS7 fully installed and have set PHP as ISAPI.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Any suggestions as to why i am getting this error ... ?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Many Many Thanks ...&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;WhiteTimer&amp;nbsp;&lt;/p&gt;</description></item><item><title>Issues with php-cgi.exe</title><link>http://forums.iis.net/p/1148116/1864176.aspx#1864176</link><pubDate>Tue, 26 Feb 2008 18:39:32 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1864176</guid><dc:creator>Teryus</dc:creator><cs:applicationKey>php_community-49</cs:applicationKey><description>&lt;p&gt;Hi, im new in this forum, and my english is not to good, but i tried to comunicate with us.&lt;/p&gt;&lt;p&gt;I installed php 5.2.5 in my web farm, and i see for many days how the task manager show a task many times with the name php-cgi.exe, that task do it to my server performance is full !!!, the server present a 100% to use in the part of performance.&lt;/p&gt;&lt;p&gt;If i killed the tasks php-cgi.exe, the server estabilize&lt;/p&gt;&lt;p&gt;I check my migration to php 5.2.5 in my web farm, and i see correct, i not see any error&lt;/p&gt;&lt;p&gt;Could you please help me, i dont know what is the problem in my servers, but the migration of php to the version php 5.2.5 start the problem of performance in my server.&lt;/p&gt;&lt;p&gt;I read about the fastcgi extension, but i dont know if to migrate to that version of php fixed my problem.&lt;/p&gt;&lt;p&gt;Thanks !!&lt;/p&gt;&lt;p&gt;Teryus&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>PHP file upload on IIS 6</title><link>http://forums.iis.net/p/1147328/1860861.aspx#1860861</link><pubDate>Thu, 20 Dec 2007 11:08:36 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1860861</guid><dc:creator>axelay</dc:creator><cs:applicationKey>php_community-49</cs:applicationKey><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;This is my first post here and I am pleased to find a place dedicated to IIS AND PHP.&lt;br /&gt;My problem is one that has been going around for a long time as far as I can see by doing searches on google. I have a Windows 2003 SP2 server with IIS 6 installed and PHP 5. All is working fine, DB access, etc.... Apart from uploading large files (that is &amp;gt; 1Mb).&lt;/p&gt;&lt;p&gt;I found several people always asking the same question and I think I might have tried all the possible answers to this problem.&lt;br /&gt;I have done the following with no success:&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;changed PHP.INI &lt;b&gt;post_max_size&lt;/b&gt; and &lt;b&gt;upload_max_filesize&lt;/b&gt; variables to higher values (20M in this case)&lt;/li&gt;&lt;li&gt;edited MetaBase.xml and changed the &lt;b&gt;AspMaxRequestEntityAllowed &lt;/b&gt;variable to accept 10Mb (I think this variable is only for ASP though), added another variable &lt;b&gt;MaxRequestEntityAllowed &lt;/b&gt;also set to 10Mb&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Despite any server restart, IIS reset, server-kicking, nothing works. Any File can be uploaded without a problem as long as they are less than 1Mb. Past that size, FireFox displays&lt;i&gt; &amp;quot;The connection was reset&amp;quot; &lt;/i&gt;and IE displays &lt;i&gt;&amp;quot;&lt;span id="errorText"&gt;The page cannot be displayed&amp;quot;&lt;/span&gt;&lt;/i&gt;&lt;span id="errorText"&gt; straight after hitting the submit button (browsers don&amp;#39;t even try to think)&lt;/span&gt;&lt;br /&gt;I repeat once again that my forms and everything else works fine as long as the file being uploaded is less than 1Mb. I have the exact same script on our beta server running Windows 2000 and IIS 5 and everything work as it should.&lt;/p&gt;&lt;p&gt;I am not trying to point a dirty finger at anybody but this is a frustrating problem that just does not seem to have a solution. If any MS guru is around or if anybody sorted this issue, I would like some pointers.&lt;/p&gt;&lt;p&gt;Thanks for reading, Alex&amp;nbsp;&lt;/p&gt;</description></item><item><title>Configuring PHP on IIS7 : Newbie question</title><link>http://forums.iis.net/p/1146293/1856312.aspx#1856312</link><pubDate>Sun, 16 Sep 2007 13:50:52 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1856312</guid><dc:creator>wildthing4ever</dc:creator><cs:applicationKey>php_community-49</cs:applicationKey><description>&lt;p&gt;Hi all,&lt;/p&gt;&lt;p&gt;I&amp;#39;m pretty new to all this, so please bear with me! &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;I wanted to run PHP+MySQL on IIS7. I&amp;#39;ve installed PHP5, and configured ISAPI as the default handler (not FastCGI). I was able to get this done, but when I get a PHP error, I get the IIS7 generic error page - error 500. It doesn&amp;#39;t show me the exact error (missing ; etc). For example, I get:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;
&lt;h1&gt;Server Error in Application &amp;quot;Default Web Site&amp;quot;&lt;/h1&gt;

&lt;hr /&gt;
&lt;h2&gt;&lt;i&gt;HTTP Error 500.0 - Internal Server Error&lt;/i&gt;&lt;/h2&gt;
&lt;/span&gt;
&lt;font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif"&gt;
&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif"&gt;&lt;b&gt;Description:&lt;/b&gt; The page cannot be displayed because an internal server error has occurred.
&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif"&gt;&lt;b&gt;Error Code:&lt;/b&gt; 0x00000000
&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif"&gt;&lt;b&gt;Notification:&lt;/b&gt; ExecuteRequestHandler
&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif"&gt;&lt;b&gt;Module:&lt;/b&gt; IsapiModule
&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif"&gt;&lt;b&gt;Requested URL:&lt;/b&gt; http://localhost:80/test/test2.php
&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif"&gt;&lt;b&gt;Physical Path:&lt;/b&gt; C:\demo\test2.php
&lt;/font&gt;&lt;/p&gt;&lt;p&gt;How do I configure IIS7 to show the actual error?&lt;/p&gt;&lt;p&gt;Thanks!&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>