Reply to Re: Newbie: MySql is loaded when PHP runs from command line, but not through IIS

Your name:

Reply:


Posted by Alan Silver on 08/21/07 11:26

In article <n5OdnTxAB9fnWlfbnZ2dnUVZ_umlnZ2d@comcast.com>, Jerry Stuckle
<jstucklex@attglobal.net> writes
>Alan Silver wrote:
>> In article <qOv3MNfwfryGFwmJ@nospamthankyou.spam>, Alan Silver
>><alan-silver@nospam.thanx.invalid> writes
>>> Hello,
>> Quick follow-up to my question...
>> I noticed that the phpinfo() shows you the path that PHP uses to
>>look for the php.ini file. This currently shows as C:\Windows, which
>>is where php.ini lives, but when run from IIS, the next line down says:
>> Loaded Configuration File (none)
>> ...which looks like it is the problem. If IIS isn't loading php.ini
>>when it runs PHP, then it will use the default configuration, which
>>doesn't load the MySql extension.
>> When I run phpinfo() from a command line, the configuration file is
>>loaded OK, which is presumably why PHP can connect to MySql from
>>command line scripts.
>> So, I think I've found the problem, but I'm not sure how to fix it.
>> TIA again for any help
>>
>
>It should be loaded as long as C:\Windows is in your path. Is that the
>case?

Yup, it's the first entry in the PATH variable.

>The reason I ask - C:\Windows is not necessarily the default path for a
>Windows installation. And if it isn't on your system, that could be
>your problem.

Good point, but not the case here.

>If it is in your path, does the IIS user have permission to access the file?

Not sure, but as I mentioned in my second reply to myself (which you
probably hadn't see when you posted), it turned out that I needed to set
the PHPRC variable to get the config file loaded under IIS. As that
fixed it, I guess IIS had the right permissions!

Thanks for the reply

--
Alan Silver
(anything added below this line is nothing to do with me)

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация