Question

I've installed: Zend Server 6.0 -- Apache 2.2.22 -- Zend Studio 9.0.3

All located in their own sub-folders, inside *C:\Program Files (x86)\Zend*


4 line test script

<php
    echo phpinfo();
?>
hello 

When I go to: localhost:10081

I am directed to a file located at C:\Program Files (x86)\Zend\ZendServer\gui\public\index.php

The PHP file has my 4-line test... and it executes as expected


When i go to: 127.0.0.1

I am directed to a file located at C:\Program Files (x86)\Zend\Apache2\htdocs\index.php

This PHP file also has the same 4 line test, but only ouputs 'hello'.


When I edit the index.php files to have a PHP error, Zend Server only logs the error from the index.php file inside \ZendServer\gui\public.

I would like to have my local web application reside inside \Apache2\htdocs\

How can I accomplish this? I can provide any other information necessary to assist.

Thank you!

~~~~ edit ~~~~

Here are various files which may be necessary pieces of information. Or, they may just be excessive clutter to this post so I will keep them at the bottom.

C:\Program Files (x86)\Zend\Apache2\conf\zend.conf

<Location /server-info>
    SetHandler server-info
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
</Location>

<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
</Location> 

LoadModule zend_enabler_module "C:\Program Files (x86)\Zend\ZendServer\bin\ZendEnablerApache.dll"
ZendEnablerConfig "C:\Program Files (x86)\Zend\ZendServer\etc\ZendEnablerConf.xml"
AddHandler zend-enabler-script .php 
AddType application/x-httpd-php .php   

<Location /phpMyAdmin>
  Order deny,allow
  Allow from all
</Location>

Alias /phpMyAdmin "__HTTPD_PHPMYADMIN_PATH__"


Listen 10081
AllowEncodedSlashes On
Win32DisableAcceptEx

NameVirtualHost *:10081
<VirtualHost *:10081>
Alias /ZendServer "C:\Program Files (x86)\Zend\ZendServer\gui\public"
DocumentRoot "C:\Program Files (x86)\Zend\ZendServer\gui\public"
RewriteEngine On 
RewriteRule ^/$ /ZendServer/ [R]
RewriteRule ^/Login$ /ZendServer/Login [R]
  <Directory "C:\Program Files (x86)\Zend\ZendServer\gui\public">
   AllowOverride All
   Allow from all
  </Directory>
</VirtualHost>


Listen 10083
NameVirtualHost 127.0.0.1:10083
<VirtualHost 127.0.0.1:10083>
CustomLog "C:\Program Files (x86)\Zend\Apache2\logs\access.log" common env=logme
Alias /UserServer "C:\Program Files (x86)\Zend\ZendServer\UserServer"
DocumentRoot "C:\Program Files (x86)\Zend\ZendServer\UserServer"
  <Directory "C:\Program Files (x86)\Zend\ZendServer\UserServer">
   AllowOverride All
   Allow from all
  </Directory>
</VirtualHost>
Was it helpful?

Solution

The php code is broken. The open tag has to be <?php. Echo on phpinfo is redundant since phpinfo outputs directly and does not return anything.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top