Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
335 views
in Technique[技术] by (71.8m points)

php.ini - command line PHP and WAMP server access different files

I don't know if this is default behavior or not, but it seems weird to me.

I installed WAMP server v2.2e from scratch, with PHP 5.4.3, on a windows 7 machine. I get these minor bugs that i don't really care about (when I activate an extension I sometimes need to exit WAMP and start it again to see the changes),

but that's not why I'm here.

When I click on the WAMP icon -> PHP -> php.ini, the file I open is the one in the apache directory (<WAMP dir>apacheapache2.4.2inphp.ini)

The output from the windows cmd command php -i | find /i "Configuration File" outputs <WAMP dir>binphpphp5.4.3php.ini

Is this desired behavior?


What I'm actually trying to do is install phpdoc, and the output I get after opening (with my browser, not with the command line PHP) localhost/phpDocumentor/installer.php has these lines:

...
...
Problem 2
- Installation request for phpdocumentor/template-checkstyle 1.0.1 -> 
satisfiable by phpdocumentor/template-checkstyle 1.0.1.
- phpdocumentor/template-checkstyle 1.0.1 requires ext-xsl * -> 
the requested PHP extension xsl is missing from your system.
Problem 3
- Installation request for phpdocumentor/template-new-black 1.0.4 -> 
satisfiable by phpdocumentor/template-new-black 1.0.4.
- phpdocumentor/template-new-black 1.0.4 requires ext-xsl * -> 
the requested PHP extension xsl is missing from your system.
Problem 4
...
...

... you get the idea.

The php.ini file WAMP uses has:

extension=php_xsl.dll

And the php.ini the command-line php uses has:

;extension=php_xsl.dll

I could just uncomment the extension in the other .ini file but that won't solve the problem.


Any ideas?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Everything you have mentioned is expected behavior. Apache has it's own php.ini version it uses, and require an Apache restart to make any changes effective.

CLI will also have it's own php.ini.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...