Configuring wamp with Zend Studio / Platform
Posted by: bobobo (---.server.ntli.net)
Date: October 23, 2006 03:59PM

ok, i've searched the net for hours and tweaked every setting for about another 8, and i am desperate to set up my development environment: wamp, with zend studio and zend platform.

Can someone who has done this please write a short tutorial on how to do this?

I have wamp 1.6.5 installed with the following add-ons: php4.4, mySQL admin toolkit and zend optimiser. Wamp is installed at standard c:\wamp directory, with document root being c:\wamp\www.

I have virtual hosts configured so that dev.mysite.com points to c:\wamp\www\mysite\www.

I would like to use zend studio with the wamp installation of php, so it will basically use whichever version of php is selected (4 or 5, i assume from the apache/bin directory?). Yet ZS is determined to use its own local installation of php.

Has anyone successfully wired ZS and wamp together?

I'd greatly appreciate any advice.

Options: ReplyQuote
Re: Configuring wamp with Zend Studio / Platform
Posted by: CyberSpatium (71.237.217.---)
Date: October 23, 2006 04:28PM

ok, since you stated that you have been editing conf files and other settings the easiest way to get everything working nicely together, you need to completely uninstall Zend studio and WAMP. after you have uninstalled those programs make sure that you delete the entire c:\wamp folder and the folder where Zend studio was installed to.

now, restart your computer. now install wamp. then install the wamp php 4 add on. next, you dont need to but if you want to download and install the mysql admin add on do it now. do not download and install the Zend optimizer add on. when you install Zend studio, it will install and conf Zend optimizer for you.

now, run the Zend studio installer. now it has been quite a while since I installed Zend. so i cannot give you a step by step install procedure. during install Zend studio will ask if you want to use your own installed apache server or have Zend studio install the server for you. select to use your own server. it will then ask you to for the location to
apache. use C:\wamp\Apache2

when it asks for the location of localhost:
C:\wamp\www

once Zend studio is installed, edit your httpd.conf file and add your virtual hosts settings. save the file and restart apache for the new setting to take effect.

if you have any more questions please let me know.

Options: ReplyQuote
Re: Configuring wamp with Zend Studio / Platform
Posted by: yfastud (72.236.169.---)
Date: October 23, 2006 04:32PM

So what the different b/w Zend Studio and Zen Optimizer?

Options: ReplyQuote
Re: Configuring wamp with Zend Studio / Platform
Posted by: bobobo (---.server.ntli.net)
Date: October 23, 2006 04:32PM

thanks for your quick reply. I'll give it a go now...

Options: ReplyQuote
Re: Configuring wamp with Zend Studio / Platform
Posted by: CyberSpatium (71.237.217.---)
Date: October 23, 2006 04:59PM

Zend studio is a full featured php editor. Zend optimizer is a application that allows you to run scripts encrypted with the Zend encoder. Zend optimizer also adds a small performance increase for all your php scripts.

www.zend.com

Options: ReplyQuote
Re: Configuring wamp with Zend Studio / Platform
Posted by: bobobo (---.server.ntli.net)
Date: October 24, 2006 07:48PM

ok, here's the steps i took. Is this how it's supposed to be done Cyber?

Installed the latest wamp at c:\wamp.
Document root is C:\wamp\www

Installation of Zend Studio (5.2)
------------------------------------------
Select to install: Zend Development Environment, PHP Manual, Zend IE Toolbar, Zend Platform
Installed at C:\Program Files\Zend\ZendStudio-5.2.0
Product Icons created in new program group
php, php3, inc and tpl file extensions associated with ZS
Default php setting: php4

[...begins to install ZS...]
Downloads Zend Platform (2.2.2)


Installation of Zend Platform (2.2.2)
--------------------------------------------------
Choice:
+Zend Platform for Windows
+Zend Platform for Zend Studio - Remote Debugging Support
->Zend Platform for Windows selected

Choice:
+Express
+Custom
->Custom selected

Destination folder for Zend Platform:
"C:\program files\zend\ZendPlatform-2.2.2"

Choice: Select web server for Zend Platform to be Installed on:
+Apache 2x
+Apache 1x
+IIS
+Install Apache 2x for me
->Apache2x selected

Choose root folder of web server:
"C:\wamp\Apache2"

[Asked to turn off apache]

Choose web servers document root:
"C:\wamp\www"

[asked again to turn off server]
[asked to turn on server]

Confirm URL that corresponds to c:\wamp\www
url: "[127.0.0.1"];

Notice: Installation detected the URL you entered doesn't correspond to IP of computer. Are you sure you want to continue?
->clicked Yes

Choose location to install Zend Platform GUI under document root c:\wamp\www
GUI: "ZendPlatform" [i think this is the directory name]

Choose PHP version you wish Zend Platform to use:
+use existing php (install detected: 4.4.2 as apache module)
+install zend core (php5)
->Use existing PHP selected

[Asked to stop server]

[installs]

Please enter path for cache storage directory:
C:\Program Files\Zend\ZendPlatform-2.2.2\tmp\cache

Please enter path to Java binary:
C:\Program Files\Java\j2re1.4.2_03\bin\java.exe

[asked to stop server]
[asked to start server]

Installation detected the URL doesn't correspond to IP of computer. Wish to continue?
->Yes

[password defined]

[configures]

[asked to stop server]
[asked to start server]

[asked to stop server again]
[asked to start server]

[asked to restart computer]

->zend studio installation complete.


Configure Zend Studio
--------------------------------------------------
tools->preferences->debug tab
Debug mode: Server
Debug Server URL: [localhost]
client IP: 127.0.0.1


debug->debug URL
open browser at : [localhost]
check Debug all Pages
The source file to be used:
local copy

click OK - it seems to work ok, opens up an external IE page, and pauses on first line of execution
------------------------------------------------

I then tested how dependant on wamp it was, by having a file with simply phpInfo() and running that. First i had wamp on php4.4.4, and the phpInfo reflected this. Then, from wamp, i changed to php5.1.2, then again run the same script. The phpInfo() showed php5 ! It seems to be working!!!


So within ZA, i start a new project, called "Discovery", save the project file in C:\Documents And Settings\User\ZDE\ZDEProjects\Discovery. I already have a project created in wamp called Disovery (also defined in virtual host as dev.discovery.com). The project is at c:\wamp\www\discovery with document root being c:\wamp\www\discovery\www. Within this document root, i created one file called index.php, and another called index2.php with the following code in them:

index.php
-----------------
<?php
session_start();
$_SESSION['var'] = "booga";
echo '<a href = "index2.php">link</a>';
?>

index2.php
-----------------
<?php
session_start();
echo $_SESSION['var'];
?>

So now if i run the project by clicking Tools -> Debug URL, it opens an IE window, and sets focus on the first line of my code in index.php, and i can step through it and watch it generate the values. Clicking the link will show index2.php with the value "booga" in it!

That appears to be fine!

However, when the second page is displayed, the URL is [localhost]. And this is what i mean by configuring it use wamps's apache virtual hosts - isn't there any way to run the project through the virtual hosts? So that in the above example, the initial url *should* be [dev.discovery.com] (for index.php) then [dev.discovery.com] (for second page, index2.php), the same way it would run if i were to simply click run->[prompt] "[dev.discovery.com"];?


Phew. Thanks for reading this far, any help or advice with the above would be greatly appreciated and i hope a reference for someone else in the future.



Post Edited (10-24-06 19:50)

Options: ReplyQuote
Re: Configuring wamp with Zend Studio / Platform
Posted by: CyberSpatium (71.237.217.---)
Date: October 24, 2006 09:06PM

did you install the wamp php 4 addon? if you did, then zend is only setup in one of your php.ini files. start wamp and use php5, then edit the php.ini file and scroll down to the bottom. if there is a zend section copy it. now change wamp to php4 mode. open your php.ini file and scoll down to the bottom and paste the zend settings. if zend was installed to php4, then do the steps above for php4.

Options: ReplyQuote
Re: Configuring wamp with Zend Studio / Platform
Posted by: bobobo (---.server.ntli.net)
Date: October 24, 2006 09:59PM

Sorry yes i forgot to add that i installed the WAMP php4 add-on after i'd installed WAMP itself. But i think you've just found me a bug.

During the ZS setup i selected to use php 4 (not sure if its relevant).

At the bottom of my php5 ini is:


[eaccelerator]
;eaccelerator.shm_size = "64"
eaccelerator.cache_dir = "c:/wamp/tmp/eaccelerator"
;eaccelerator.enable = "1"
;eaccelerator.optimizer = "1"
;eaccelerator.debug = "0"
;eaccelerator.check_mtime = "1"
;eaccelerator.filter = ""
;eaccelerator.shm_max = "0"
;eaccelerator.shm_ttl = "0"
;eaccelerator.shm_prune_period = "0"
;eaccelerator.shm_only = "0"
;eaccelerator.compress = "1"
;eaccelerator.compress_level = "9"
;eaccelerator.keys = "shm_and_disk"
;eaccelerator.sessions = "shm_and_disk"
;eaccelerator.content = "shm_and_disk"
;eaccelerator.admin.name="yourusername"
;eaccelerator.admin.password="yourpassword"

[Zend]
zend_extension_manager.optimizer_ts="c:/wamp\optimizer\lib\Optimizer-3.0.1"
zend_extension_ts="c:/wamp\optimizer\lib\ZendExtensionManager.dll"


So i copied this, switched to php4 through wamp and apache said:

"warning: rename apache2/bin/php.ini ... apache2/bin/php4.ini doesn't exist no such file or directory in wamp\scripts\switch.php on line 64"

Although it still switches (i think) to php4, when i go to [wamp menu]->congig files->php.ini, an empty notepad document opens with:

"cannot find c:\wamp\apache2\bin\php.ini file. Do you want to create it?"[Yes/No/Cancel]

What happened to my php4 ini?

Options: ReplyQuote
Re: Configuring wamp with Zend Studio / Platform
Posted by: CyberSpatium (71.237.217.---)
Date: October 24, 2006 10:44PM

check your phpinfo for the location of your php.ini file. if i remember right zend moves your php.ini file

Options: ReplyQuote
Re: Configuring wamp with Zend Studio / Platform
Posted by: bobobo (---.server.ntli.net)
Date: October 25, 2006 03:47PM

the php.ini location from my php5 phpInfo (as php4's ini doesn't exist at the moment) is:

C:\Program Files\Zend\ZendPlatform-2.2.2\etc\php.ini

You're recommending i copy this back to apache2/bin? But isn't it the php5 ini?

Options: ReplyQuote
Re: Configuring wamp with Zend Studio / Platform
Posted by: CyberSpatium (71.237.217.---)
Date: October 25, 2006 07:29PM

no, leave it where zend puts it.

Options: ReplyQuote
Re: Configuring wamp with Zend Studio / Platform
Posted by: bobobo (---.server.ntli.net)
Date: October 25, 2006 07:34PM

hmmmm...

i had a peek at the php.ini at C:\Program Files\Zend\ZendPlatform-2.2.2\etc\php.ini (which is what my phpinfo outputs) and it looks like its the php4 ini: it says php4 at the top, plus it has a lot more at the bottom of the file that you asked me to look at. It has the following:

[Zend]
zend_extension_manager.optimizer_ts="C:\Program Files\Zend\ZendPlatform-2.2.2\lib\Optimizer-3.0.1"
zend_extension_ts="C:\Program Files\Zend\ZendPlatform-2.2.2\lib\ZendExtensionManager.dll"
zend_extension_manager.platform_ts="C:\Program Files\Zend\ZendPlatform-2.2.2\lib\Platform-2.2.0"
zend_extension_manager.java_bridge_ts="C:\Program Files\Zend\ZendPlatform-2.2.2\lib\JavaMW-1.1.2"
zend_extension_manager.mysql_ts="C:\Program Files\Zend\ZendPlatform-2.2.2\lib\MySQL"
zend_extension_manager.gd_ts="C:\Program Files\Zend\ZendPlatform-2.2.2\lib\GD"
zend_extension_manager.debug_server_ts="C:\Program Files\Zend\ZendPlatform-2.2.2\lib\Debugger-5.2.1"
zend_ini_file="C:\Program Files\Zend\ZendPlatform-2.2.2\etc\zend.ini"
zend_gui_password=9f9f68ffcca821600f234c4b51238228
zend_platform.version=2.2.2
zend_optimizer.enable_loader=1

Now what confuses me, is that the above php.ini that zend is using is php4, whereas my wamp is currently running php5. Running phpinfo outputs the php5 spec, so i'm totally confused how to continue.

???

Options: ReplyQuote
Re: Configuring wamp with Zend Studio / Platform
Posted by: CyberSpatium (71.237.217.---)
Date: October 25, 2006 10:12PM

post your question in the zend support forum. just be patient because it may take a few days to get a reply from zend support.

Options: ReplyQuote
Re: Configuring wamp with Zend Studio / Platform
Posted by: bobobo (---.server.ntli.net)
Date: October 26, 2006 12:14AM

haha!

I posted a question in there all right, about a week ago. No zend support staff or representatives use the forum any more! It's page after page of unanswered questions and unhappy customers, which is why i ended up posting in here in vain, in case someone had already gone through the motions and got it configured ok.

They've recently put a link to a "download stack" which is a free evaluation of ZS, platform, core, apache (1.3??) and sugarCRM. If anyone wants to download them and have a tinker, it would be great.

[www.zend.com]

I suppose they're focusing their efforts on the eclipse plugin. >.<

Options: ReplyQuote


Sorry, only registered users may post in this forum.