PHP
--
Questions
--
Followers
Top Experts
I have a Windows 2003 Server with PHP 5.2.6 for Apache installed (I installed using the MSI file). Â I have recently installed PHP for IIS on the same server. Â I used the zip file, which I extracted to c:\PHP
PHP now works under IIS, but to make my site work I need to enable CURL, which means editing the php.ini file. Â I checked phpinfo (attached), which told me it was looking for php.ini under c:\windows. Â There was no file there, so I copied php.ini.recommended from c:\php to c:\windows and renamed it to php.ini, then made the necessary change to enable CURL. Â However after restarting IIS and the server PHP will no work. Â When I rename the php.ini file and restart the server it works again.
I have attached my php.ini file to this question if it will help.
I'm really new to PHP so assume I know nothing and you won't be far off.
Cheers,
Geoff
phpinfo.jpg
php.txt
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
"
* If you are e.g. using MySQL you will have to edit php.ini. In order for it to be found, you must set the PHPRC system environment variable or the registry entry. Note that if you edit the registry using regedit.exe, the PHP key should be placed under the [HKEY_LOCAL_MACHINE\SOFTWA
"
Ray_Paseur - Thanks for your reply. Â I followed the steps in this link to install PHP for Apache:-
http://www.iis-aid.com/articles/how_to_guides/installing_php_5_on_iis_in_5_simple_steps
Couldn't see anything in there about CURL. Â However I think the problem is more general than that. Â When there is no php.ini file PHP runs OK. Â However, when I put a php.ini file in c:\windows and restart IIS PHP will not run at all.
Thanks, Geoff.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
To deal with different INI files I have the following Registry entries.
Rename and load.
Restart web service.
You can also check via the command line ...
\php\php --ini
My output for that command is ...
Configuration File (php.ini) Path: C:\WINDOWS
Loaded Configuration File: Â Â Â Â C:\PHP_INI\PHP5\php-cli.in
Scan for additional .ini files in: (none)
Additional .ini files parsed: Â Â Â (none)
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\PHP]
"IniFilePath"="C:\\PHP_INI"
[HKEY_LOCAL_MACHINE\SOFTWARE\PHP\5]
"IniFilePath"="C:\\PHP_INI\\PHP5"
[HKEY_LOCAL_MACHINE\SOFTWARE\PHP\6]
"IniFilePath"="C:\\PHP_INI\\PHP6"
php -m
My output is ...
[PHP Modules]
bcmath
bz2
calendar
com_dotnet
ctype
curl
date
dom
ereg
filter
ftp
gd
haru
hash
iconv
json
ldap
libxml
lzf
mhash
mysqli
mysqlnd
odbc
pcre
PDO
Phar
printer
Reflection
session
SimpleXML
soap
sockets
SPL
SQLite
standard
tidy
tokenizer
wddx
win32service
xml
xmlreader
xmlrpc
xmlwriter
xsl
zip
zlib
[Zend Modules]
Zend Extension Manager
If no curl, then edit the ini file (which I hope you realised needs to be in C:\PHP_INI\PHP5) and look for ...
extension=php_curl.dll
If you have ...
;extension=php_curl.dll
then remove the leading ;
If nothing at all, then look for ...
; Dynamic Extensions ;
and add ...
extension=php_curl.dll
somewhere underneath.
For curl to work (from the manual http://docs.php.net/manual/en/curl.installation.php) ...
Note: Note to Win32 Users
In order to enable this module on a Windows environment, libeay32.dll and ssleay32.dll must be present in your PATH. You don't need libcurl.dll from the cURL site.
These files are supplied as part of PHP.
I would add C:\PHP5 to your path. If you already have libeay32.dll on your machine, it may not be the same version and that could be an issue if you upgrade (or not - depending upon what breaks).
I haven't had a chance to look at this today. Â I will spend some time on it tomorrow and post my results on here.
Cheers, Geoff.

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
Currently the only registry entries I have HLM\SOFTWARE\PHP relate to my Apache install:-
[HKEY_LOCAL_MACHINE\SOFTWA
"ApacheDir"="C:\Program Files\Apache Software Foundation\Apache2.2\conf\
[HKEY_LOCAL_MACHINE\SOFTWA
"InstallDir"="C:\Program Files\PHP\"
[HKEY_LOCAL_MACHINE\SOFTWA
"WebServerType"="apache22"
I added the following:-
[HKEY_LOCAL_MACHINE\SOFTWA
"IniFilePath"="C:\PHP"
and restarted IIS. Â Now PHP is not running.
Executing c:\php\php --ini from the command line I get:-
C:\>c:\php\php --ini
PHP Warning: Â PHP Startup: Unable to load dynamic library './php_curl.dll' - The
 specified module could not be found.
 in Unknown on line 0
Configuration File (php.ini) Path: C:\WINDOWS
Loaded Configuration File: Â Â Â Â C:\php\php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed: Â Â Â (none)
I can see the dll file under here:-
C:\PHP\ext\php_curl.dll
What else do I need to do? Â (apologies for newbiness)
Cheers, Geoff
So this is telling me that the php.ini file is recognised from the Registry ...
Loaded Configuration File: Â Â Â Â C:\php\php.ini
So, the next thing to do is to edit this ini file.
Look for the line starting with ...
extension_dir
Mine is ...
extension_dir = "C:\PHP5\ext"
Yours looks like it should be ...
extension_dir = "C:\PHP\ext"
Save the file.
At the command line type ....
php --ini
and then
php -v
extension_dir = "C:\PHP\ext"
Running those commands:-
C:\>c:\php\php --ini
Configuration File (php.ini) Path: C:\WINDOWS
Loaded Configuration File: Â Â Â Â C:\php\php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed: Â Â Â (none)
C:\>c:\php\php -v
PHP 5.2.6 (cli) (built: May  2 2008 18:02:07)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
PHP doesn't seem to be running still.
Thanks again for your help.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
The page that I am trying to get working (which uses CURL) is not working.
However, I can browse /phpinfo.php (results attached). Â Does this mean PHP is working?
Cheers, Geoff
I see from the PDF you've supplied, that the Apache installation of PHP is also finding the INI file AND that curl is loaded.
So, this means the issue is now with Curl and not the INI file.
So. What errors does your code create?
If you have suppressed errors, then unsuppress them.
<?php
error_reporting(E_ALL); // Report EVERYTHING.
ini_set('display_errors', 1); // Display the errors as part of the output.
set_time_limit(0); // Don't timeout after the default 30 seconds.
// Carry on with your code.
If it is not required, remove it.
Also, look in C:\PHP for any DLL files. See if you have any of the same file names anywhere else in the path.
I've attached my PHP script called WhereIs which you can run from the command line to help.
I have a directory called C:\Utils, so ...
DEL C:\PHPDLLs.log
for %f in (C:\php\*.dll) do C:\php\php.exe -n C:\Utils\WhereIs.php %~nf.*>> C:\PHPDLLs.log
My log file is ...
WhereIs : (C) UK 2005 Richard Quadling
Directory Found (Date and Size)
========= ==========================
C:\PHP5 Â fdftk.dll 2008-06-12 417,792
WhereIs : (C) UK 2005 Richard Quadling
Directory Found (Date and Size)
========= ==========================
C:\PHP5 Â fribidi.dll 2008-03-04 90,112
WhereIs : (C) UK 2005 Richard Quadling
Directory Found (Date and Size)
========= ==========================
C:\PHP5 Â gds32.dll 2008-06-12 346,624
WhereIs : (C) UK 2005 Richard Quadling
Directory      Found (Date and Size)
=================== ==========================
C:\PHP5 Â Â Â Â Â Â libeay32.dll 2008-06-12 1,097,728
c:\ruby\bin     libeay32.dll 2007-03-16 1,077,248
C:\WINDOWS\system32 libeay32.dll 2004-12-07 638,976 Â
WhereIs : (C) UK 2005 Richard Quadling
Directory Found (Date and Size)
========= ==========================
C:\PHP5 Â libmcrypt.dll 2008-06-12 166,912
WhereIs : (C) UK 2005 Richard Quadling
Directory Found (Date and Size)
========= ==========================
C:\PHP5 Â libmhash.dll 2008-06-12 165,643
WhereIs : (C) UK 2005 Richard Quadling
Directory                  Found (Date and Size)
==========================
C:\PHP5 Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â libmysql.dll 2008-06-12 2,076,672
D:\Program Files\MySQL\MySQL Server 5.0\bin libmysql.dll 2008-01-18 2,076,672
C:\Program Files\CVSNT\ Â Â Â Â Â Â Â Â Â Â libmysql.dll 2005-10-20 233,472 Â
WhereIs : (C) UK 2005 Richard Quadling
Directory Found (Date and Size)
========= ==========================
C:\PHP5 Â libpq.dll 2008-08-08 464,172
WhereIs : (C) UK 2005 Richard Quadling
Directory Found (Date and Size)
========= ==========================
C:\PHP5 Â libswish-e.dll 2008-07-28 385,024
WhereIs : (C) UK 2005 Richard Quadling
Directory Found (Date and Size)
========= ==========================
C:\PHP5 Â msql.dll 2008-07-28 57,344
WhereIs : (C) UK 2005 Richard Quadling
Directory      Found (Date and Size)
=================== ==========================
C:\PHP5 Â Â Â Â Â Â ntwdblib.dll 2008-06-12 278,800
C:\WINDOWS\system32 ntwdblib.dll 2005-05-04 290,816
WhereIs : (C) UK 2005 Richard Quadling
Directory Found (Date and Size)
========= ==========================
C:\PHP5 Â php5apache.dll 2008-06-12 36,924
WhereIs : (C) UK 2005 Richard Quadling
Directory Found (Date and Size)
========= ==========================
C:\PHP5 Â php5apache2.dll 2008-06-12 36,925
WhereIs : (C) UK 2005 Richard Quadling
Directory Found (Date and Size)
========= ==========================
C:\PHP5 Â php5apache2_2.dll 2008-06-12 36,927
WhereIs : (C) UK 2005 Richard Quadling
Directory Found (Date and Size)
========= ==========================
C:\PHP5 Â php5apache2_2_filter.dll 2008-03-04 36,934
WhereIs : (C) UK 2005 Richard Quadling
Directory Found (Date and Size)
========= ==========================
C:\PHP5 Â php5apache2_filter.dll 2008-03-04 36,932
WhereIs : (C) UK 2005 Richard Quadling
Directory Found (Date and Size)
========= ==========================
C:\PHP5 Â php5apache_hooks.dll 2008-06-12 57,410
WhereIs : (C) UK 2005 Richard Quadling
Directory Found (Date and Size)
========= ==========================
C:\PHP5 Â php5isapi.dll 2008-06-12 28,731
WhereIs : (C) UK 2005 Richard Quadling
Directory Found (Date and Size)
========= ==========================
C:\PHP5 Â php5nsapi.dll 2008-06-12 28,731
WhereIs : (C) UK 2005 Richard Quadling
Directory Found (Date and Size)
========= ==========================
C:\PHP5 Â php5pi3web.dll 2008-06-12 24,636
WhereIs : (C) UK 2005 Richard Quadling
Directory Found (Date and Size)
========= ==========================
C:\PHP5 Â php5ts.dll 2008-06-12 5,300,280
WhereIs : (C) UK 2005 Richard Quadling
Directory  Found (Date and Size)
=========== ==========================
C:\PHP5 Â Â ssleay32.dll 2008-06-12 204,800
c:\ruby\bin ssleay32.dll 2007-03-16 200,704
As you can see, there are sometimes many instances of a file (take the last one above).
Find duplicates and resolve them. Most likely the ones in PHP are NOT getting loaded as they are present in the path.
Putting C:\PHP in the path first should help resolve that.
If you are getting PHP errors specific to Curl, ask another question as you'll get more experts looking at a new Curl question than an old php.ini question.
Regards,
Richard.
<?php
/* $Id: WhereIs.php,v 1.0.10 2008/07/18 15:02:07 RichardQ $ */
if (!function_exists('fnmatch'))
{
function fnmatch($pattern, $string)
{
for ($op = 0, $npattern = '', $n = 0, $l = strlen($pattern); $n < $l; $n++)
{
switch ($c = $pattern[$n])
{
case '\\' :
$npattern .= '\\' . @$pattern[++$n];
break;
case '.' :
case '+' :
case '^' :
case '$' :
case '(' :
case ')' :
case '{' :
case '}' :
case '=' :
case '!' :
case '<' :
case '>' :
case '|':
$npattern .= '\\' . $c;
break;
case '?' :
case '*' :
$npattern .= '.' . $c;
break;
case '[' :
case ']' :
default:
$npattern .= $c;
if ($c == '[')
{
$op++;
}
else if ($c == ']')
{
if ($op == 0)
{
return false;
}
$op--;
}
break;
}
}
if ($op != 0)
{
return false;
}
return preg_match('/^' . $npattern . '$/i', $string);
}
}
// Get the list of directories in the PATH.
if (array_key_exists('PATH', $_ENV))
{
$aPaths = array_merge(array('.'), explode(';', $_ENV['PATH']));
}
elseif (array_key_exists('Path', $_ENV))
{
$aPaths = array_merge(array('.'), explode(';', $_ENV['Path']));
}
else
{
$aPaths = array('.');
}
// List of files found.
$aFoundFiles = array();
// Get the list of extensions allowed to be autoexecuted.
$aExtensions = explode(';', $_ENV['PATHEXT']);
// Maximum path length.
$iMaxPathLen = 0;
// Maximum filename length.
$iMaxFileLen = 0;
// Maximum formatted file size.
$iMaxFileSize = 0;
$bWildcards = ((strpos($argv[1], '*') !== False) || (strpos($argv[1], '?') !== False));
// Run through the paths.
foreach($aPaths as $iPath => $sPath)
{
// Dont't bother with blank paths.
if ((strlen($sPath) == 0) || !is_dir($sPath))
{
continue;
}
// Look further if we supplied a filename.
if (isset($argv[1]) && strlen(trim($argv[1])) > 0)
{
// Are we using wildcards.
if ($bWildcards)
{
foreach(new DirectoryIterator($sPath) as $obj_File)
{
if (fnmatch($argv[1], $obj_File))
{
// Record the maximum path length.
$iMaxPathLen = max(9, strlen($sPath), $iMaxPathLen);
// Record the maximum file length.
$iMaxFileLen = max(strlen($obj_File), $iMaxFileLen);
// Get the statistics about the file.
$aFoundFiles[$sPath][$obj_File->getFilename()] = stat($obj_File->getPathname());
// Record the maximum filesize length.
$iMaxFileSize = max(strlen(number_format($aFoundFiles[$sPath][$obj_File->getFilename()]['size'], 0)), $iMaxFileSize);
}
}
}
else
{
// Use each extension to find the file.
foreach($aExtensions as $iExtension => $sExtension)
{
// Don't bother with blank extensions
if (strlen($sExtension) == 0)
{
continue;
}
// Build the filename.
$sFileName = $sPath . '/' . $argv[1] . $sExtension;
// Does the file exist?
if (file_exists($sFileName))
{
// Record the maximum path length.
$iMaxPathLen = max(9, strlen($sPath), $iMaxPathLen);
// Record the maximum file length.
$iMaxFileLen = max(strlen($argv[1] . $sExtension), $iMaxFileLen);
// Get the statistics about the file.
$aFoundFiles[$sPath][$argv[1] . $sExtension] = stat($sFileName);
// Record the maximum filesize length.
$iMaxFileSize = max(strlen(number_format($aFoundFiles[$sPath][$argv[1] . $sExtension]['size'], 0)), $iMaxFileSize);
}
}
}
}
}
// Build headers.
$sDirectoryHeading = 'Directory' . str_repeat(' ', max(0,$iMaxPathLen - 9));
$sDirectoryUnderline = str_repeat('=', max(9, $iMaxPathLen));
$sFoundHeading = "Found (Date and Size)";
$sFoundUnderline = str_repeat("=", max(21, $iMaxFileLen + $iMaxFileSize + 12));
// Output headers.
echo "WhereIs : (C) UK 2005 Richard Quadling\n\n{$sDirectoryHeading} {$sFoundHeading}\n{$sDirectoryUnderline} {$sFoundUnderline}\n";
// Output found files.
foreach($aFoundFiles as $sPath => $aFiles)
{
$sPathOutput = $sPath;
foreach($aFiles as $sFileName => $aFileStat)
{
echo
$sPathOutput . str_repeat(' ', $iMaxPathLen - strlen($sPathOutput)) . ' ' .
$sFileName . str_repeat(' ', $iMaxFileLen - strlen($sFileName)) . ' ' .
date('Y-m-d', $aFileStat['mtime']) . ' '
.
str_pad(number_format($aFileStat['size'], 0), $iMaxFileSize, ' ') ."\n";
$sPathOutput = '';
}
}

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
The page I am trying to get working is a gallery page using the Flickr API. Â With the php.ini file present, the page does not give you any error message - See "PHP not working"
When I rename php.ini to php.something and restart IIS, the page actually renders but displays a CURL error message - See "PHP working"
Does that make more sense?
Why?
How are you differentiating between them (by IP or port ? )
Only one will communicate on port 80. So unless you are disabling Apache first, you are probably finding that only one of them is actually running.
I use neither on Windows (sadly Sambar Server is now defunct).
At the command prompt, can you type ...
C:\php\php -m
Is curl present?
And can you show us the code in D:\websites\Intranet\galle
The reason why is that I have a test version of my company website running on this server which requires apache. Â However I have a half-written Intranet that runs under IIS, and this gallery application requires IIS + PHP. Â However if I'd have known it was going to be this difficult I would have moved my Intranet to a different server, or given up on my PHP gallery application.
I am differentiating by port. Â Apache runs on 8081. Â IIS has port 80.
When I run that command with php.ini file present CURL is included in the list:-
C:\>C:\php\php -m
[PHP Modules]
bcmath
calendar
com_dotnet
ctype
curl
date
dom
filter
ftp
hash
iconv
json
libxml
odbc
pcre
Reflection
session
SimpleXML
SPL
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
zlib
[Zend Modules]
I have attached preferences.php as a text file.
Cheers, Geoff






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
<html>
<head>
<title>Show extensions available and the cURL function list.</title>
</head>
<body>
<h1>Extensions loaded</h1>
<pre><?php print_r(get_loaded_extensi
<h1>Extensions loaded</h1>
<pre><?php print_r(get_extension_func
</body>
</html>
My output is below.
Sorry this is taking so long. I need to be careful about what I tell you to change, so need the info first.
Extensions loaded
Array
(
[0] => bcmath
[1] => calendar
[2] => com_dotnet
[3] => ctype
[4] => session
[5] => ereg
[6] => filter
[7] => ftp
[8] => hash
[9] => iconv
[10] => json
[11] => mysqlnd
[12] => odbc
[13] => pcre
[14] => Reflection
[15] => date
[16] => libxml
[17] => standard
[18] => tokenizer
[19] => zip
[20] => zlib
[21] => SimpleXML
[22] => dom
[23] => SPL
[24] => Phar
[25] => wddx
[26] => xml
[27] => xmlreader
[28] => xmlwriter
[29] => ISAPI
[30] => bz2
[31] => curl
[32] => gd
[33] => ldap
[34] => lzf
[35] => mhash
[36] => mysqli
[37] => PDO
[38] => soap
[39] => tidy
[40] => win32service
[41] => xmlrpc
[42] => xsl
)
Extensions loaded
Array
(
[0] => curl_init
[1] => curl_copy_handle
[2] => curl_version
[3] => curl_setopt
[4] => curl_setopt_array
[5] => curl_exec
[6] => curl_getinfo
[7] => curl_error
[8] => curl_errno
[9] => curl_close
[10] => curl_multi_init
[11] => curl_multi_add_handle
[12] => curl_multi_remove_handle
[13] => curl_multi_select
[14] => curl_multi_exec
[15] => curl_multi_getcontent
[16] => curl_multi_info_read
[17] => curl_multi_close
)
<h1>Extensions loaded</h1>
should be
<h1>cURL functions available</h1>
<? is the short_open_tag and may be disabled by your setup.
<?php will ALWAYS work - there is no way to disable it.

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
Extensions loaded
Array
(
[0] => bcmath
[1] => calendar
[2] => com_dotnet
[3] => ctype
[4] => session
[5] => filter
[6] => ftp
[7] => hash
[8] => iconv
[9] => json
[10] => odbc
[11] => pcre
[12] => Reflection
[13] => date
[14] => libxml
[15] => standard
[16] => tokenizer
[17] => zlib
[18] => SimpleXML
[19] => dom
[20] => SPL
[21] => wddx
[22] => xml
[23] => xmlreader
[24] => xmlwriter
[25] => ISAPI
[26] => curl
)
cURL functions available
Array
(
[0] => curl_init
[1] => curl_copy_handle
[2] => curl_version
[3] => curl_setopt
[4] => curl_setopt_array
[5] => curl_exec
[6] => curl_getinfo
[7] => curl_error
[8] => curl_errno
[9] => curl_close
[10] => curl_multi_init
[11] => curl_multi_add_handle
[12] => curl_multi_remove_handle
[13] => curl_multi_select
[14] => curl_multi_exec
[15] => curl_multi_getcontent
[16] => curl_multi_info_read
[17] => curl_multi_close
)
Hmm.
Add this debug to function getFileContents()
function getFileContents($url) {
if (function_exists('curl_init')){
$ch = curl_init();
$timeout = 0; // set to 0 for no timeout
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$file_contents = curl_exec($ch);
curl_close($ch);
return $file_contents;
} else {
return 'curl_init() does not exist';
}
}
Actually, in studying the options you are setting, wouldn't ...
file_get_contents($url);
be enough?
Do you use the headers?






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
If I rename php.ini to php.somethingelse and browse your script again it shows me that cURL is unavailable.
I'm sorry but I don't understand your last 2 posts. Â Like I say I'm new to PHP and curl. Â Perhaps I should just give up and move my Intranet to a different server and use the PHP installer to set it up. Â I'm starting to lose the will to live to be honest!
Thanks for your help anyways. Â It's much appreciated.
Extensions loaded
Array
(
[0] => bcmath
[1] => calendar
[2] => com_dotnet
[3] => ctype
[4] => session
[5] => filter
[6] => ftp
[7] => hash
[8] => iconv
[9] => json
[10] => odbc
[11] => pcre
[12] => Reflection
[13] => date
[14] => libxml
[15] => standard
[16] => tokenizer
[17] => zlib
[18] => SimpleXML
[19] => dom
[20] => SPL
[21] => wddx
[22] => xml
[23] => xmlreader
[24] => xmlwriter
[25] => ISAPI
)
cURL functions available
If php-SAPI.ini exists (where SAPI is used SAPI, so the filename is e.g. php-cli.ini or php-apache.ini), it's used instead of php.ini. SAPI name can be determined by php_sapi_name().
Like I said earlier, maybe using the right INI file for your sapi (server) could fix this.

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
With the php.ini file present in c:\php cURL is available (hence the first set of results). Â However my page doesn't render at all (see http://filedb.experts-exchange.com/incoming/2008/09_w36/55861/PHP-not-working.jpg)
When I rename my php.ini file to php.recommended and restart IIS, cURL is no longer available, and in that situation my page renders, but gives me an error message about cURL (see http://filedb.experts-exchange.com/incoming/2008/09_w36/55860/PHP-working.jpg).
I'm going to close this question now because we're not getting anywhere. Â You haven't fixed my problem but you've given me lots of useful info so I'm going to reward you the points.
Thanks for your time.
1 - Use <?php in your code as <? is being ignored.
2 - Use C:\php\php.ini
All will then be OK.
php.recommended isn't used. It is just a suggestion of what your php.ini could look like.
I'm going to try an alternative solution, e.g. moving my Intranet to a different server.
Thanks again for your help.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
The fact that you CAN get php to run means your webserver IS aware.
It is just using the wrong ini file. Probably using the default builtin one - not an external physical file.
So. The next step is to see what can possibly make PHP fail to run.
It is a simple setting.
Look in the C:\php\php.ini file for ...
short_open_tag = Off
This is one of the first settings.
Most likely yours is set like mine to off.
Turn it on (but read about it first so you can fix your code and then turn it off again).
The page is now rendering, and there is no error message about cURL! Â Thank God for that!
Why do I need to turn it off again? Â Is there some issue around security?
Thanks a lot - You have restored my faith in the world.
And as the default is to turn off short_open_tags, simply change your code.
It will work everywhere.
Just because you CAN drive on the wrong side of the road, it doesn't mean you should!

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
You've been very patient - More patient than me.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
PHP
--
Questions
--
Followers
Top Experts
PHP is a widely-used server-side scripting language especially suited for web development, powering tens of millions of sites from Facebook to personal WordPress blogs. PHP is often paired with the MySQL relational database, but includes support for most other mainstream databases. By utilizing different Server APIs, PHP can work on many different web servers as a server-side scripting language.