?
Solved

php install wampserver

Posted on 2010-01-10
26
Medium Priority
?
575 Views
Last Modified: 2013-12-13
windows server 2008

plesk installed and have one php.ini file
C:\SWsoft\Plesk\Additional\PleskPHP5\php.ini

attempted to install wampserver and installation was not complete because i am forced to used one php.ini
I can see this by going to localhost
phpinfo()


how could i use another php.ini
0
Comment
Question by:rgb192
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 11
  • 8
  • 2
  • +3
26 Comments
 
LVL 48

Expert Comment

by:hernst42
ID: 26280896
0
 
LVL 8

Expert Comment

by:kumaranmca
ID: 26286468
0
 

Author Comment

by:rgb192
ID: 26306420
my windows is only reading one php.ini

it doesnt matter what i set another php.ini

what file determines WHICH php.ini to use
0
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 

Author Comment

by:rgb192
ID: 26342064
my windows is only reading one php.ini

it doesnt matter what i set another php.ini

what file determines WHICH php.ini to use
0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 26378926
Are the versions of PHP the same? (V5.2.0, V5.2.1, V5.3.3-dev, etc.)

Are you using the same SAPI? (cli, isapi, cgi-fcgi, etc.)

You can have separate ini files if you are using different versions and/or different SAPIs.

If you are using the same version and sapi, then things get a little difficult.

Ultimately, it comes down to a simple registry entry.

HKLM\Software\PHP\[Version]
IniFilePath = C:\PHP\[Version]\INI

replace [Version] with the appropriate version (or part of version).


[HKEY_LOCAL_MACHINE\SOFTWARE\PHP\5.2.3]
"IniFilePath"="C:\\PHP\\V5.2.3\\INI"


Now, in C:\PHP\V5.2.3\INI you can have ini files ...

php-cli.ini
php-isapi.ini
php-cgi-fcgi.ini

for each sapi for V5.2.3

I initially thought that HKCU was also searched. It is not, so the settings are at the machine level only.

http://docs.php.net/manual/en/configuration.file.php (as shown by Hearnst) is the place to start reading.
0
 
LVL 19

Expert Comment

by:v2Media
ID: 26385411
Did the wamp installer add "C:\SWsoft\Plesk\Additional\PleskPHP5\" to the system PATH properties?
0
 
LVL 82

Expert Comment

by:hielo
ID: 26385874
>> plesk installed and have one php.ini file
>> C:\SWsoft\Plesk\Additional\PleskPHP5\php.ini
Plesk is your problem. I ran into this issue before. It will only allow you to use the php.ini that comes with plesk. From my investigations, the only way to use a custom php.ini is if you run it in CGI mod with php4 only!

>>my windows is only reading one php.iniit doesnt matter what i set another php.ini
Exactly

>>what file determines WHICH php.ini to use
The one from plesk is your only option unless you want to use cgi with php4. I wouldn't!
0
 
LVL 82

Expert Comment

by:hielo
ID: 26385885
0
 

Author Comment

by:rgb192
ID: 26390714
>>http://kb.parallels.com/en/1770

i noticed i can install a website (domain name or subdomain) with iss, cgi, fscgi

I installed all three and I still cant get a second php.ini file
0
 

Author Comment

by:rgb192
ID: 26390718
>>Ultimately, it comes down to a simple registry entry.

HKLM\Software\PHP\[Version]
IniFilePath = C:\PHP\[Version]\INI




wouldnt this break the plesk installation and make the website dont work
0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 26391926
Not if they were on different versions.

The idea here is that you can indicate which ini file to use for which version of PHP.

What version(s) of PHP are you using?

What SAPI's are you using (cli, cgi, isapi, cfgi-fcgi)?
0
 

Author Comment

by:rgb192
ID: 26424860
Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\Users\Administrator>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

C:\Users\Administrator>
0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 26425997
You say you have 2 versions of PHP installed. What are they?
0
 

Author Comment

by:rgb192
ID: 26451219
>>You say you have 2 versions of PHP installed. What are they?

one is plesk
c:\swsoft\plesk


the other is wamp
c:\wamp
0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 26451252
What _VERSIONS_?

Not "Where have you installed PHP?".

CD C:\wamp
php -n -v
CD C:\swsoft\plesk
php -n -v

0
 

Author Comment

by:rgb192
ID: 26451462
i can only find one version

because when plesk is installed on windows server 2008
only allows one php to run
0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 26453003
What do you get for ...


CD /D C:\
DIR php.exe /s /b
0
 

Author Comment

by:rgb192
ID: 26495966
Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\Users\Administrator>CD /D C:\

C:\>DIR php.exe /s /b
C:\Program Files (x86)\NuSphere\PhpED\php\php.exe
C:\Program Files (x86)\NuSphere\PhpED\php5\php.exe
C:\SWsoft\Plesk\Additional\Php\php.exe
C:\SWsoft\Plesk\Additional\Php\cli\php.exe
C:\SWsoft\Plesk\Additional\PleskPHP5\php.exe
C:\SWsoft\Plesk\admin\bin\php.exe
C:\wamp\bin\php\php5.3.0\php.exe

C:\>
C:\>
0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 26496030
Aha!

So you have 7 PHP installations.

Can you now ...


"C:\Program Files (x86)\NuSphere\PhpED\php\php.exe" -n -v
"C:\Program Files (x86)\NuSphere\PhpED\php5\php.exe" -n -v
"C:\SWsoft\Plesk\Additional\Php\php.exe" -n -v
"C:\SWsoft\Plesk\Additional\Php\cli\php.exe" -n -v
"C:\SWsoft\Plesk\Additional\PleskPHP5\php.exe" -n -v
"C:\SWsoft\Plesk\admin\bin\php.exe" -n -v
"C:\wamp\bin\php\php5.3.0\php.exe" -n -v

You only need 1 installation of PHP.

I would put it in C:\PHP5

Everything else can point to it.

But I don't use wamp, NuSphere or plesk.

Maybe it would be worth removing all the installations and making a clean one.

0
 

Author Comment

by:rgb192
ID: 26497018
do those commands edit anything

i have dedicated hosting of windows server 2008 using remote desktop
i am using plesk because I am stupid
i cant use windows server 2008 alone (without plesk)


nusphere is a php editor

I noticed windows xp, windows server 2003 (without plesk)
I can have wamp installed, go to http://localhost , using wamp php.ini
and I can have nusphere php using php.ini from nusphere
and can use php.ini from windows server 2003


nusphere phped has a php debugger where I can run the code line by line
but when run with windows server 2008 with plesk
nusphere phped asks me to install debugger remotely (because I am forced to use plesk php.ini)
I cant do this, I also asked nusphere phped for help but they dont know the answer.

Maybe the easiest answer is finding a php editor that can debug line by line of code.  But the new php editor may also try to use php.ini from plesk
0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 26499814
No. The commands list the versions.

If you are running different versions and different SAPIs, then you can have different INI files.

So, please run the commands.



I think the issue is that you've installed a LOT of tools which require PHP and that the tools haven't allowed you to specify where the PHP installation is.

It may be easier if you put the "server" version on a server or a separate PC or Virtual Machine.

In fact, using Windows 2008 Server for your desktop development is pretty much overkill.


What does Plesk do? I thought it was something like CPanel. A web based tool set for users to administer their domains.

0
 

Author Comment

by:rgb192
ID: 26527430
Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\Users\Administrator>
C:\Users\Administrator>"C:\Program Files (x86)\NuSphere\PhpED\php\php.exe" -n -v

PHP 4.4.8 (cgi-fcgi) (built: Feb 12 2008 05:02:34)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

C:\Users\Administrator>"C:\Program Files (x86)\NuSphere\PhpED\php5\php.exe" -n -
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

C:\Users\Administrator>"C:\SWsoft\Plesk\Additional\Php\php.exe" -n -v
PHP 4.4.7 (cgi-fcgi) (built: May  4 2007 13:30:00)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

C:\Users\Administrator>"C:\SWsoft\Plesk\Additional\Php\cli\php.exe" -n -v

C:\Users\Administrator>"C:\SWsoft\Plesk\Additional\PleskPHP5\php.exe" -n -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

C:\Users\Administrator>"C:\SWsoft\Plesk\admin\bin\php.exe" -n -v
PHP 5.2.6 (cli) (built: Nov 13 2008 12:56:23)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
    with eAccelerator v0.9.5.2, Copyright (c) 2004-2006 eAccelerator, by eAccele
rator

C:\Users\Administrator>"C:\wamp\bin\php\php5.3.0\php.exe" -n -v
PHP 5.3.0 (cli) (built: Jun 29 2009 21:25:23)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies

C:\Users\Administrator>



one of the commands created a php dialog box and said php stopped working
0
 
LVL 40

Accepted Solution

by:
Richard Quadling earned 2000 total points
ID: 26533073
Aha. You are mixing a LOT of versions there. Also, the ini file for V4 is not compatible for V5 have _SIGNIFICANT_ differences in it. Especially for some of the defaults.

And extensions for V4.4.x, V5.2.x and V5.3.x are not compatible across versions.

Do you REALLY need different versions?

I guess this is now just a mess.

Personally, I'd start again.

Install PHP and get it working as you want.

If you need to use a separate instance for debugging, then I would recommend using a separate box (either a VM or a physical box).

0
 

Author Closing Comment

by:rgb192
ID: 31675298
good idea.. I will use a vm
0

Featured Post

Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question