Home

Reference Manual

image

Contents

1. O Restart PHP PA 28 Zend Server Reference Manual Deactivating Zend Server Feature Content You have the option to deactivate tabs containing feature content available only in Zend Server Ja H To deactivate Zend Server feature content tabs 1 In your product go to Administration License and Password Zend Server Feature Content Turn Zend Server feature information offto hide tabs containing only features available in Zend Server zend Server feature information displayed Update 2 Inthe Zend Server Feature Content Area select No and click Update All tabs containing Zend Server feature content are deactivated and hidden The tabs can easily be displayed again by completing the same procedure and selecting Yes 29 Zend Server Community Edition Reference Manual Update Notifications The Update Notifications page is accessed from Administration Update Notifications The Update Notifications page displays important product update notifications from Zend You can read brief information about each update from Zend Server s administration interface along with a link to the detailed release notes and to download the update Zend Server checks for updates each time you log in to Zend Server or every 72 hours provided that you are connected to the Internet When new update notifications are available you will see a message at the bottom of the screen with a yellow warning triangle next to it Zend Se
2. lt zendServerAPIResponse gt 236 Web API Reference Guide The codetracingCreate Method Create a new code tracing entry Required Permissions Full HTTP method POST Supported Editions Zend Server Zend Server Cluster Manager Request parameters SV mis Do encoded URL to call the code tracing request Expected Response Code 200 OK For more information see Response Format Response Format A code tracing entry with full details or an error message explaining the failure Possible Action Specific Error Codes HTTP Error Code Description Code internalServerError The code tracing action failed i Example Request Post ZendServerManager Api codetracingCreate Response lt xml version 1 0 encoding UTF 8 gt lt zendServerAPIResponse xmlns http www zend com server api 1 1 gt lt requestData gt lt apikKeyName gt lt CDATA Admin gt lt apikKeyName gt lt met hod gt codet racingCreate lt met hod gt lt requestData gt lt responseData gt EE le 123 5 lt iel gt 237 Zend Server Community Edition Reference Manual lt date gt 123412341234 lt date gt lt url gt http localhost test php lt url gt lt createdBy gt Monitor Event lt createdBy gt lt fileSize gt 12341234 lt fileSize gt lt applicationId gt 1 lt applicationId gt lt codeTrace gt lt responseData gt lt zendServerAPIResponse gt 238 Web API Reference Guide The codetracingDele
3. Manage Directs the user to an additional page inside the Administration Interface to manage and fine tune a component The basic definitions that are defined by directives are set by clicking Configure ORestart Server based components can be restarted using this action for example the Java Bridge Adding New Components The installation process determines which components are installed in your environment Depending on your operating system you can choose to customize your installation Windows or to work with a basic set of components that you can add to later on DEB RPM We provide all Zend components with loader binary when ZAMP is installed however in examples like php ini its entry is commented upon and therefore is not loaded In this case no additional installation is required but only configuration change For installation specific instructions on how to add additional components see Choosing Which Distribution to Install and click on your installation type for instructions 49 Zend Server Community Edition Reference Manual Working with Directives This tab is accessed from Server Setup Directives The initial display shows the most commonly used directives Click All for the full list of directives or use the Search component to locate a specific directive Users are also directed to this page from the Extensions and Components pages when they click Configure for an extension or a component
4. Available since version 4 0 Description void page_cache_disable_compression void 145 Zend Server Community Edition Reference Manual page_cache_remove_cached_contents Clears cached contents for all requests that match a specific URL or regular expression Available since version 4 0 Description void page_cache_remove_cached_contents string SURL Parameters URL The URL or regular expression page_cache_remove_all_cached_contents Clears all cached contents Available since version 4 0 Description void page_cache_remove_all_cached_contents void 146 Web API Reference Guide Zend Job Queue PHP API Table of Contents e ZendJobQueue The ZendJobQueue class O ZendJobQueue construct Creates a ZendJobQueue object connected to a Job Queue daemon ZendJobQueue createHttpJob Creates a new URL based job to make the Job Queue Daemon call given script with given vars ZendJobQueue getJobStatus Retrieves status of previously created job identified by job_id ZendJobQueue removeJob Removes the job from the queue Makes all dependent jobs fail In case the job is in progress it will be finished but dependent jobs won t be started anyway For non existing jobs the function just returns false Finished jobs are simply removed from the database ZendJobQueue restartJob Restart a previously executed Job and all its followers ZendJobQueue isSuspended Checks if Queue is suspended and returns tr
5. lt Example Request headers removed for the purpose of clarity POST ZendServerManager Api monitorChangelssueStatus Content type application x www form urlencoded issueld 1 amp newStatus Closed Response not all headers are shown IIe O 200 OK lt xml version 1 0 encoding UTF 8 gt lt zendServerAPIResponse xmlns http www zend com server api 1 1 gt lt requestData gt lt apikKeyName gt lt CDATA Admin gt lt apikKeyName gt lt method gt monitorChangelIssueStatus lt method gt lt requestData gt lt responseData gt lt issue gt 263 Zend Server Community Edition Reference Manual 264 lt id gt 11 lt id gt lt rule gt PHP Error lt rule gt lt count gt 1 lt count gt lt lastOccurance gt 123412341234 lt lastOccurance gt lt severity gt Warning lt severity gt lt status gt Closed lt status gt lt generalDetails gt lt url gt http localhost test php lt url gt lt sourceFile gt var www test php lt sourceFile gt lt sourceLine gt 302 lt sourceLine gt lt function gt fopen lt function gt lt aggregat ionHint gt 123412341234 lt aggregationHint gt lt errorString gt Permission Denied lt errorString gt lt errorType gt E_WARNING lt errorType gt lt generalDetails gt lt routeDetails gt lt routeDetail gt lt key gt controller lt key gt lt value gt test lt value gt lt routeDetail gt lt routeDetails gt lt issue gt lt
6. 1 1 1 orderNumber String 1 The license order number which is empty if there is no license validUntil TimeStamp NN The license expiration date which is empty if there is no license serverLimit Integer For a Zend Server Cluster Manager license this is the number of servers allowed by the license For a license other than Zend Server Cluster Manager the value is always 0 192 Web API Reference Guide requestSummary A list of O or more events Number of events in the events element 193 Zend Server Community Edition Reference Manual issue List of basic issues properties rule String 1 Issue s rule name url String Issue s creating URL string Path to the file where the issue manifested 7 function String sourceLine Integer Line number where the issue manifests within the SourceFile Name of the function that caused the issue to manifest aggregationHint String 1 A unique identifier that groups all events under this issue The error string generated for the events An routeDetails List of 0 Route details for the issue and the request that created routeDetail i 194 Web API Reference Guide issueDetails Detailed view of a single issue issue Element of 1 Issue identifier type issue eventsGroups List of 1 Details about event groups in the current issue eventsGroup 195 Zend Server Community Edition Reference Manual routeDetail Hints provided by the monitor t
7. 34 zs manage Commands The list of available commands can be viewed by running the command lt install path gt zs manage h All commands are also available in the Web API Reference Guide ly app get status app deploy app synchronize app remove app update app rollback cluster list servers cluster add server cluster remove server cluster enable server cluster disable server cluster reconfig server config export config import restart php system info Example Request zs manage cluster add server Zend Server Reference Manual 012345678 9012345678901234567890123456789012345678901234567890123 a deb62 u http 10 1 9 24 10081 ZendServer a 1234 Response The response will be 7 deb62 mecos E te 100I 4emelseinvere Ors 35 Zend Server Community Edition Reference Manual Tasks Working with Zend Server Community Edition The following text describes how to work with Zend Server Community Edition Each of the tasks in this section describes a different procedure that can be used to facilitate your PHP development process The following table lists the different tasks their descriptions and the expected outcome of each task Task Description Outcome Getting Started Review all the post installation tasks before working with Zend Server Community Edition Access the Administration Interface Working with Extensions How to enable and disable extensions The
8. d Success Messages Messages that are Green indicate the success of an action If you receive a message like this it means that your last action was completed successfully and no additional actions are required such as Restart This is an info message Server 104 Zend Server Reference Manual Info Messages Messages that are Blue indicate that there is an important message If you receive a message like this in most cases no action is required apart from reading the information re This is an info message For example Log file C Program Files Zend Apachea logs error log does not exist or missing read permissions When this Server Error Log Info Message is displayed one of the following has occurred No log files are available a Files have been moved Permissions have been tampered with 105 API REFERENCE 106 Web API Reference Guide Introduction The API reference includes reference information for working with the API s Each page includes a description of the component along with the functions for interacting with the component and the directives for configuring the component s behavior as follows Zend Debugger Configuration Directives Zend Optimizer Directives Zend Optimizer PHP API Zend Guard Loader Configuration Directives Zend Guard Loader PHP API Zend Data Cache Configuration Directives Zend Data Cache PHP API Zend Java Bridge Configuration Dir
9. lt routeDetail gt lt key gt controller lt key gt lt value gt test lt value gt lt routeDetail gt lt routeDetails gt lt issue gt lt eventsGroups gt lt eventsGroup gt 256 Web API Reference Guide lt eventsGroupId gt 134 lt event sGrouplId gt lt eventsCount gt 1 lt eventsCount gt lt startTime gt 20 Sep 2011 18 45 lt startTime gt lt serverId gt 0 lt serverId gt lt class gt lt class gt lt userData gt lt CDATA gt lt class gt lt javaBacktrace gt lt CDATA gt lt javaBacktrace lt execTime gt 0 lt execTime gt lt avgExecTime gt 0 lt avgExecTime gt lt memUsage gt 0 lt memUsage gt lt avgMemUsage gt 0 lt avgMemUsage gt lt avgOutputSize gt 0 lt avgOutputSize gt lt load gt 0 lt load gt lt eventsGroup gt lt eventsGr lt issueDetails gt lt responseData gt lt zendServerAPIResponse gt oups gt 257 Zend Server Community Edition Reference Manual The monitorGetEventGroupDetails Method Retrieve an events list object identified by an events group identifier The events group identifier is retrieved from an Issue element s data Required Permissions Read only HTTP method GET Supported by Editions Zend Server Zend Server Cluster Manager Request Parameters tege Issue identifier provided in the issue element eventsGroupld eae Event group identifier provided in the issue element Expected Response Code 200 OK
10. lt superGlobals gt lt get gt lt parameter gt lt name gt all lt name gt KWAI E lt value gt lt parameter gt lt parameter gt lt name gt php_warn lt name gt lt value gt 1 lt value gt lt parameter gt 259 Zend Server Community Edition Reference Manual 260 lt get gt lt post gt lt post gt lt cookie gt lt parameter gt lt name gt ZDEDebuggerPresent lt name gt KVEUUMES gooo e lt value gt lt parameter gt lt cookie gt lt session gt lt session gt Server lt parameter gt lt name gt HTTP_USER_AGENT lt name gt lt value gt Wget 1 12 linux gnu lt value gt lt parameter gt lt parameter gt lt name gt HTTP_ACCEPT lt name gt lt value gt lt value gt lt parameter gt lt parameter gt lt name gt REQUEST_TIME lt name gt lt value gt 1315396868 lt value gt Web API Reference Guide lt parameter gt lt server gt lt superGlobals gt lt debugUrl gt lt debugUr1 gt lt severity gt normal lt severity gt lt backtrace gt lt step gt lt number gt 0 lt number gt lt object gt lt object gt lt class gt lt class gt lt function gt bt_generator lt functio n gt lt file gt var www test php lt file gt lt line gt 293 lt line gt lt step gt lt backt race gt lt event gt lt codeTracing gt lt CDATA 10 2 555 gt lt codeTracing gt lt eventsGroupDetails gt lt responseData gt lt ze
11. notLicensed The system is not licensed In Zend Server Cluster Manager this means the Zend Server Cluster Manager is not licensed but the nodes may be licensed and operating pendingRestart The system is pending a PHP restart In Zend Server Cluster Manager this will never be set The full version of Zend Server e g 5 0 4 A comma separated list of the supported content types versions of the Zend Server Web API The full PHP version e g 5 3 3 supportedApiVersions operatingSystem deploymentVersion serverLincenselnfo licenselnfo managerLicenselnfo licenselnfo messageList messageList A string A string identifying the operating system the operating system Ee aa representing the schema version of the aa feature Information about the Zend Server license If it is running in a cluster it will contain the node license information Information about the Zend Server Cluster A list of messages reported by this server which is 191 Zend Server Community Edition Reference Manual licenselnfo Information about a Zend Server or Zend Server Cluster Manager license The licensing status which can be one of the following notRequired This edition does not require this license type OK The server cluster is licensed and working invalid The license is invalid expired The license has expired serverLimitExceeded The Zend Server Cluster Manager server limit has been exceeded
12. 6 Click Finish to complete the Wizard Zend Server Community Edition runs with the Administration Interface Dashboard displayed server Logout sli Monitor amp Applications Rule Management Server Setup amp Administration Dashboard Events Jobs Queue Statistics CodeTracing Serverinfo PHPInfo Logs Tasks System Overview View PHPinfo page PHP Version 5 2 17 Load or Unload PHP Extensions Zend Framework Version 1 11 10 Configure Zend Server Components more Change PHP directive Values Zend Server Community Edition Open phpMyAdmin Zend Data Cache Learn how to start with Zend Server and PHP Zend Debugger Zend Guard Loader Zend Java Bridge Zend Optimizer y Ready for the advanced features of Zend Server Automated application deployment cuts out errors Monitoring gives insight into application performance and errors Code tracing lets you resolve problems faster PHP cachingand job queuing optimize application performance Clustering support provides scalability and high availability 24x7 support and access to security and other hotfixes Restart PHP VA To get started with Zend Server Community Edition see Working with Zend Server Zend Server Community Edition Reference Manual Upgrading from Zend Server Community Edition to Zend Server Some features are not available for users of the Zend Server Community Edition You have the option to enable all features by
13. Server Cluster Manager with no valid license this operation fails Required Permissions full HTTP method POST Supported by Editions Zend Server Cluster Manager Request Parameters es force Boolean No Force remove the server skipping graceful shutdown process Default is FALSE Expected Response Code 200 OK The server removal process was completed successfully This status is expected if there is no need to perform a graceful shutdown process or if the Force option was set to TRUE 202 Accepted The removal process has started but not completed yet The user may want to check the server status within a few seconds using the clusterGetServerStatus method to verify that the operation was completed Response Type serverInfo with the status of the server being removed The status is expected to be either shuttingDown or removed Possible Action Specific Error Codes HTTP Error Code Description Code 4 There is no server with the provided server ID 500 cantConnectT oServer Zend Server Cluster Manager is unable to connect to the specified server 500 invalidServerResponse An invalid or unexpected response from the server 503 temporarilyLocked The server cannot be removed because another server in the cluster is performing a graceful startup shutdown 214 Web API Reference Guide 405 notImplementedByEdition The method is not implemented by this edition of Zend Server 500 serverNotLicensed Zen
14. The exact value of the Host HTTP header In most cases this will be a string in the form lt host gt lt port gt In some cases the colon and port are omitted In any case if the port is included in the Host header sent in the request it must be included in the generated string b The Request URI which is the path part of the full request URL without the query string or host name The exact value of the User Agent request header The exact value of the Date request header 181 Zend Server Community Edition Reference Manual 2 Hash the generated string with the HMAC SHA 256 function using the secret API key to obtain the request signature Examples Creating a Signature lt To create a signature lt php a Ceulewulenc param param param header param header Zend Server Web API request signature string Shost Exact value of the string Spath Request URI integer Stimestamp Timestamp used for the string SuserAgent Exact value of the Host HTTP header fue Ve User Agent HTTP param string Sapikey Zend Server API key return string Calculated request signature A function generateRequestSignature Shost Spath Stimestamp SuserAgent Sapikey Eileen See s Ys Seca o Yel SuserAgent 3 Gucece D C M y sis Ss eo tmest amp ECMT return hash_hmac sha256 Sdata Sapikey 182 Web API Reference Guide Additional Values E Whe
15. generated 283 Zend Server Community Edition Reference Manual Security In the Security section you will find information on how to configure and optimize the Zend Server and components to function more securely This document includes information on the following information Allowed Hosts This section describes the Allowed Hosts lists and offers recommendations on which hosts to add to the Allowed Hosts list for development and production environments Securing the Administration Interface This section provides information on how to set an IP address based access control list on the Web server running the Administration Interface for the Windows Linux operating systems Configuring PHP for Security This section explores how you can add an additional security boost to your PHP applications by properly configuring your PHP runtime environment settings Configuring Debugger Access Control The how when and why you should limit IP permissions 284 Index Configuring Debugger Access Control The allowed hosts list is a list of IP addresses that are permitted to initiate a Debugger session on the Web server on which Zend Server is installed The default value for zend_debugger allow_hosts intentionally covers a wide range of IP addresses This is to make the initial installation of Zend Server compatible for a large selection of environments However this also can be a security risk as you are permitting a w
16. is user root and without a password A link to this phpMyAdmin installation is added in the Zend Server Community Edition dashboard If you already have MySQL If you have a local installation of MySQL it will be automatically detected during the installation process If you want to set phoMyAdmin to a remote MySQL server running on a separate machine see the phpMyAdmin online documentation Apache Note When running phpMyAdmin on Apache the URL is case sensitive If you don t have anything phpMyAdmin or MySQL When you install Zend Server Community Edition you can use the full or custom installation types to choose to install phpMyAdmin and MySQL Both phpMyAdmin and MySQL are installed on your local machine under the default location lt install_dir gt phpMyAdmin and lt install_dir gt MySQL A link to the phpMyAdmin installation is added in the Zend Server Community Edition Dashboard 73 Zend Server Community Edition Reference Manual Reference Information This section contains reference information for PHP developers Here you will find information about using the Java Bridge the extensions included in this release and other system related information The list of extensions provides an overview of all the extensions that are included and their status On Off Disabled A description of what each status means can be found in the PHP Extension List In this section Components Adding Extensions Compili
17. lt zendServerAPIResponse xmlns http www zend com server api 1 1 gt lt requestData gt lt apikKeyName gt lt CDATA Admin gt lt apikKeyName gt lt method gt studioStartDebug lt method gt 266 Web API Reference Guide lt requestData gt lt responseData gt lt debugRequest gt lt success gt 1 lt success gt lt message gt Debug session completed successfully lt message gt lt debugRequest gt lt responseData gt lt zendServerAPIResponse gt 267 Zend Server Community Edition Reference Manual Method studioStartProfile Method Start a profiling session with Zend Studio s integration using an event group s identifier Required Permissions Full HTTP method POST Supported Editions Zend Server Zend Server Cluster Manager Request parameters Parameter Type Required Description ae a ee The issue event group identifier overrideHost String Override the host address sent to Zend Server for initiating a Debug session This is used to point Zend Server at the right address where Studio is executed Expected Response Code 200 OK For more information see Response Format Response Format Response successful message or error message Possible Action Specific Error Codes This action has no specific error codes Example LG Request POST ZendServerManager Api studioStartProfile Content type application x www form urlencoded eventsGroupld 36 Response lt
18. responseData gt lt zendServerAPIResponse gt Web API Reference Guide Studio Integration Methods The following is a list of methods available for the Studio Integration feature studioStartDebug studioStartProfile studioShowFile Possible Deployment Action Specific Error Codes HTTP Code Description 404 noSuchFilterld The requested filter does not exist 265 Zend Server Community Edition Reference Manual The studioStartDebug Method Start a debug session for a specific issue Required Permissions Full HTTP method POST Supported Editions Zend Server Zend Server Cluster Manager Request parameters eventsGroupld Yes The issue event group identifier noRemote Boolean No Use server s own local files for debug display Default true Setting to false will use local files from studio if available overrideHost String No Override the host address sent to Zend Server for initiating a Debug session This is used to point Zend Server at the right address where Studio is executed Expected Response Code 200 OK For more information see Response Format Response Format Response successful message or error message Possible Action Specific Error Codes This action has no specific error codes i Example Request POST ZendServerManager Api studioStartDebug Content type application x www form urlencoded eventsGroupld 36 Response lt xml version 1 0 encoding UTF 8 gt
19. servers it is recommended to increase this value based on your performance requirements and other hardware software limitations such as memory CPU etc Requirements IIS7 Resource Kit x86 http www iis net downloads default aspx tabid 34 amp i 1682 amp g 6 x64 http www iis net downloads default aspx tabid 34 amp i 1683 amp g 6 Once installed you can administer your FastCGi settings from the Internet Information Services IIS Manager From here you can configure your Maxinstances and InstanceMaxRequests To tune FastCGi configuration for IIS7 1 Goto Start All Programs Administrative Tools Internet Information Services 7 Application Server Manager 2 Select the server to manage from the left tree FastCGI Settings 3 Click and select lt install_dir gt bin php cgi exe 301 Zend Server Community Edition Reference Manual 4 Inthe Actions section on the right click Add Application The Add FastCGI Application dialog opens Add FastCGI Application Ed ka Full Path Ir Si Arguments FastCGI Properties E General EnvironmentYariables Collection InstanceMaxRequests 200 MaxInstances 4 EI Process Model ActivityTimeout 30 Advanced IdleTimeout 300 QueueLength 1000 RapidFailPerMinute 10 RequestTimeout 90 Activity Timeout Specifies the time in seconds that a FastCGI process For this application is allowed to run without communicating with IIS ent 5 Twe
20. xml version 1 0 encoding UTF 8 gt lt zendServerAPIResponse xmlns http www zend com server api 1 1 gt lt requestData gt lt apikKeyName gt lt CDATA Admin gt lt apikKeyName gt lt method gt studioStartProfile lt method gt lt requestData gt lt responseData gt lt debugRequest gt 268 Web API Reference Guide lt success gt 1 lt success gt lt message gt Debug session completed successfully lt message gt lt debugRequest gt lt responseData gt lt zendServerAPIResponse gt 269 ZEND SERVER BEST PRACTICES Zend Server Community Edition Reference Manual Introduction Welcome to the Zend Server Community Edition Best Practices Guide The following content is a collection of knowledge and information based on the experience of Zend s Development and Product Management team and the PHP community In this document you will find reference information on the following development issues The Performance section describes how to increase performance using Zend Server The Security section lists several additional security precautions you can take to secure your Zend Server installation and Web application The Development section includes instructions and tips for developers The Deployment section describes the different deployment options to remote servers hosting etc and how to go live with your Web application The IIS Best Practices includes instruction
21. 1 libtool mode compile gcc I I tmp pear download newt 1 2 1 DPHP_ATOM_INC I var tmp pear build root newt 1 2 1 include I var tmp pear build root newt 1 2 1 main I tmp pear download newt 1 2 1 I usr local zend include php IT usr local zend include php main T usr local zend include php TSRM I usr local zend include php Zend T usr local zend include php ext I usr local zend include php ext date lib I usr local zend include php DHAVE_CONFIG_H g O2 c tmp pear download newt 1 2 1 newt_vcall c o newt_vcall lo gcc I I tmp pear download newt 1 2 1 DPHP_ATOM_INC I var tmp pear build root newt 1 2 1 include I var tmp pear build root newt 1 2 1 main I tmp pear download newt 1 2 1 I usr local zend include php I usr local zend include php main T usr local zend include php TSRM I usr local zend include php Zend T usr local zend include php ext IT usr local zend include php ext date lib T usr local zend include php DHAVE_CONFIG_H g 02 c tmp pear download newt 1 2 1 newt_vcall c EPTC DPIC 0o libs newt veall o bin sh var tmp pear build root newt 1 2 1 libtool mode link gcc DPHP_ATOM_INC I var tmp pear build root newt 1 2 1 include I var tmp pear build root newt 1 2 1 main I tmp pear download newt 1 2 1 I usr local zend include php 93 Zend Server Community Edition Reference Manual T usr local zend include php main T usr local zend include php TSRM I usr l
22. 2 an additional sub directory for cached content under the cache directory 66 Zend Server Reference Manual Data Cache Lock On Expire The Data Cache Lock On Expire feature reduces the load spike of a busy application by guaranteeing that an application gathers an expired piece from the data source only once and by avoiding a situation where multiple PHP processes simultaneously detect that the data in the cache has expired and repeatedly run high cost operations How does it work When a stored Data Cache entry expires the following process takes place The first attempt to fetch it will receive a false response 2 All subsequent requests will be receiving the expired object stored in the Data Cache for the duration of 120 seconds 3 During this time period the php script that received the false response generates an updated data entry and stores it in the Data Cache with the same key 4 As soon as the updated data entry is created it is returned to the subsequent fetching requests If this does not occur within the time period of 120 seconds the entire process 1 4 will repeat itself This feature is controlled by directive zend datacache lock on expire in datacache ini The accepted values for this directive are 0 and 1 where 1 Enabled default 0 Disabled If set to 0 any request for an expired data entry will receive a false response until a new value is set To ensure enhanced performance
23. API Reference Guide Signing API Requests Importance of the Date Header The value of the Date HTTP header is used as part of the request signing process to enforce the temporary state of signed requests For this reason the system clock on the client and server sides must be synchronized up to an allowed time skew of 30 seconds If the server receives an API request with a Date header value that represents more than 30 seconds of time difference either before or after the server clock the request will not be accepted The X Zend Signature HTTP Header In order to send authenticated API requests you are required to send the X Zend Signature HTTP header with each request It must be in the following format X Zend Signature lt key name gt lt signature gt Where lt key name gt is replaced with the key name and lt signature gt is replaced with the calculated request signature There can be any number of whitespace characters before or after the separating semicolon Sei Example X Zend Signature Arch Stanton alr Qoleole2ie I6Cl sclecekel 352 ig 2 CCAS 5 5 5 The signature is expected to be 64 characters long and is cut here for readability purposes Calculating the Request Signature The request signature is a 64 digit long hexadecimal number with digits a f in lower case calculated using the following method 1 Concatenate the following values in order separated by a colon into a single string a
24. Configuration screen and in the php ini file the next time the server is restarted Directives of extensions that are turned off can also be configured through the Extensions page Added extensions that are not part of the original Zend Server Community Edition list of extensions cannot be configured on the Extensions page 45 Zend Server Community Edition Reference Manual Working with Logs The Logs page is a log viewer for developers to view log information directly from the Administration Interface From this page you can view filter navigate and refresh logs Advanced users can also add logs to the list of logs to display in the Log View list View a Log This procedure describes how to view a log file J To view a log file 1 Goto Monitor Logs 2 Select a log from the View Log list 3 The log information is displayed in the main display area Use the Show option 5 nes located below the main display to determine how many lines to display To use this option enter a number between 5 and 200 and click Go to apply the setting Filter Log Information This procedure describes how to filter a log file to fine tune the information to display specific results E To filter a log file 1 Select a log to display 2 Goto the Filter area and enter the text to use for the filter You can use any text 3 Click Refresh or Find The results are displayed in the main display area To run another query change the
25. Deploying Code with Zend Server This procedure describes how to deploy your PHP code to run with Zend Server Zend Server provides all the components for creating an environment suitable for developing and deploying PHP applications In order for a PHP Application to run you need a Web server Apache is bundled by default with Zend Server and is used to run your PHP code This option may vary depending on your operating system for instance MS Windows also supports an existing IIS installation so you can choose either Apache or IIS and in Mac Zend Server uses the distribution s Apache The process of writing PHP applications is separated into two distinct sections Development and Production Development includes developing and debugging your code In most cases this is done on a developer s machine or on a remote server with limited or password protected access Production is when the Web application has reached a level of maturity that allows it to be exposed to its target audience The only tasks that should be done are debugging remote and uploading changes It is against best practices to make changes to code running on a Production server and the preferred method is to use FTP SFTP to upload changes Development Where to Put the Code In order to run a PHP application your PHP files must be placed in a specific location that indicates to the Web server what files to service When you are ready to run your PHP code on a
26. Directives column Clicking this link leads you to the directives pre sorted to display the relevant directives The Directives page is accessed by clicking Server Setup Directives Here you find all the directives relating to the extensions and components loaded in your PHP If you cannot find a directive in the directives page look in Server Setup Extensions or Server Setup Components to check that the extension or component is turned on See Adding Extensions for instructions on how to manually add an extension In Server Setup Components define the Zend Server Community Edition components that should be turned on or turned off If you are planning to use functions related to Zend Server Community Edition components in your code such as the Optimizer Data Cache Debugger Guard Loader or Java Bridge verify that the extensions are turned on If your Zend Server Community Edition component has additional directives used for configuring the component s behavior a configure link is included in the Directives column Clicking this link leads you to the relevant directive in the Directives page In Server Setup Debugger define which hosts are allowed to connect to the server to use the Zend Debugger for debugging and which hosts are not allowed Zend Server Reference Manual Restart PHP Message The Restart PHP message appears whenever a change is made to settings in your php ini file in order to apply the settings cli
27. Each key in the array is name of an accelerated script Values are an array with information about the script with the following keys full_path string the full path to the script hits integer number of cache hits for this script memory_consumption integer bytes of memory used to cache this script last_used string string representation of the last time this script was fetched from cache For example Thu Jan 31 13 37 40 2008 last_used_timestamp integer UNIX timestamp of the last time this script was fetched from cache timestamp integer UNIX timestamp of when the script was cached 121 Zend Server Community Edition Reference Manual Zend Guard Loader Configuration Directives Configuration Directives Summary Modification Directive Type Scope Description zend_loader enable boolean PHP_INI_LSYSTEM SEET encoded scripts The default value is On zend_loader disable licensing boolean PHR INI SYSTEM EE performance reasons The Obfuscation level supported by Zend Guard Loader The levels are zend loader obfuscation level support integer PHP_INI_SYSTEM detailed in the official Zend Guard Documentation 0 no obfuscation is enabled lt br gt Path to where licensed Zend products should look for the product zend_loader license path string PHP_INI_SYSTEM license For more information on how to create a license file see the Zend Guard User Guide 122 Web API Reference Guide Configuration Directive Det
28. Edition Reference Manual Example 1 A Case Study in Java Bridge Performance Java The Forever Times newspaper maintains a PHP based website let s call it ForeverOnline com The newspaper has been searching for a real time Stock Ticker application to add to their already successful and heavily visited website The Forever Times Newspaper feels that real time financial information is the one thing their website is lacking Forever Times believes they have found exactly the Stock Ticker application they need The application provides up to date quotations from all the major markets currency rates and even links to some of the local exchanges However the application is written in Java and uses existing Java libraries Forever Times realizes that a PHP based Web implementation that handles Java requests a Java Bridge is their best bet At the same time they are concerned that the performance of their Website remains optimal To Forever Times horror in testing the new application they find that loading the site with user requests for the Stock Ticker slows down the performance of the whole website The following code example illustrates how the Java Bridge applies to this business scenario and others like it lt Example lt create Java object Sstock new Java com ticker JavaStock Ji Call the oject Snews Sstock gt get_news S_GET ticker display results foreach Snews as Snews_item EE gt
29. For more information see Response Format Response Format Response successful message or error message Possible Action Specific Error Codes This action has no specific error codes lt Example Request GET ZendServerManager Api monitorGetEventGroupDetails issueld 1 amp eventsGroupld 2 Content type application x www form urlencoded Response lt xml version 1 0 encoding UTF 8 gt lt zendServerAPIResponse xmlns http www zend com server api 1 1 gt lt requestData gt lt apikKeyName gt lt CDATA Admin gt lt apikKeyName gt lt method gt monitorGetEvent sDetails lt method gt lt requestData gt lt responseData gt lt eventsGroupDetails gt 258 Web API Reference Guide lt issueld gt 1 lt issueld gt lt eventsGroup gt lt eventsGroupIld gt 134 lt event sGroupId gt lt eventsCount gt 1 lt eventsCount gt lt startTime gt 20 Sep 2011 18 45 lt startTime gt lt serverld gt 0 lt serverId gt lt class gt lt class gt lt userData gt lt CDATA gt lt class gt lt javaBacktrace gt lt CDATA gt lt javaBacktrace gt lt execTime gt 0 lt execTime gt lt avgExecTime gt 0 lt avgExecTime gt lt memUsage gt 0 lt memUsage gt lt avgMemUsage gt 0 lt avgMemUsage gt lt avgOutputSize gt 0 lt avgOutputSize gt lt load gt 0 lt load gt lt eventsGroup gt lt event gt lt type gt PHP Error lt type gt KES Cre WIC HOME 5 oo 0 A lt description gt
30. HOO HOOK 4096 Mar 30 20 45 var tmp pear build root install newt 1 2 1 usr 574120 d beer G HOO LOCI 4096 Mar 30 20 45 var tmp pear build root install newt 1 2 1 usr local 574121 Al beer SF OOC MOOI 4096 Mar 30 20 45 var tmp pear build root install newt 1 2 1 usr local zend 574122 d be S OO MOOIE 4096 Mar 30 20 45 var tmp pear build root install newt 1 2 1 usr local zend lib 574123 Al Eloni mx 2 OGG LOOL 4096 Mar 30 20 45 var tmp pear build root install newt 1 2 1 usr local zend lib php_extensions 574118 244 rwxr xr x 1 root root 241717 Mar 30 20 45 var tmp pear build root install newt 1 2 1 usr local zend lib php_extensions newt so Build process completed successfully Installing usr local zend lib php_extensions newt so install ok channel pear php net newt 1 2 1 5 The Extension has been successfully compiled using PECL To load the extension in the php ini or in a separate file under the scan dir insert extension lt my_extension_name gt so and replace lt my_extension_name gt with your extension s binary name such as extension newt so 7 If you re using the DEB and RPM versions of Zend Server Community Edition the best practice is to place a file called newt ini under usr local zend etc conf d 8 Restart your webserver Ensure the extension is properly loaded by checking the output of PHP Info This can be viewed in the Zend Server Community Edition PHP Info page The extension will now appear in your Admini
31. JMPs bit 3 Enables disables optimization step 4 e PRINT and ECHO optimization bit 4 Enables disables optimization step 5 e block optimization the most expensive optimization pass which perform many different optimization patterns based on CFG control flow graph bit 8 Enables disables optimization step 9 e register allocation allows re usage of temporary variables bit 9 Enables disables optimization step 10 e remove NOPs zend_optimizerplus enable_slow_optimizations Enables or disables the optimization passes that may take significant time based on an internal runtime calculation Type boolean Default Value 1 Available since version 4 0 119 Zend Server Community Edition Reference Manual Zend Optimizer PHP API PHP Functions accelerator_reset Resets the contents of the Optimizer shared memory storage Note This is not an immediate action The shared memory storage is reset when a request arrives while the shared memory storage is not being used by a script Available since version 3 6 Description boolean accelerator_reset void Return Value Returns TRUE unless the Optimizer is disabled accelerator_get_status Provides information on Optimizer memory usage and cache statistics and the list of cached PHP scripts Available since version 4 0 Description array accelerator_get_status void Return Value The returned array will contain the following elements accelerat
32. JRE location Therefore you should already have JRE installed 64 bit JRE is not supported More information about JREs and the latest updates can be obtained from the SUN Microsystems Website Configuration This procedure describes how to configure the target Java runtime environment Configuring the runtime environment Use the following command to run JavaMW java com zend javamw JavaServer For correct execution the classpath should include the javamw jar file in the directory where JavaMW is installed Example UNIX Linux IBM i and Mac lt install_dir gt bin javamw jar Windows lt install_dir gt bin javamw jar 55 Zend Server Community Edition Reference Manual Testing the Bridge Connection The following code sample shows how you can as an initial step test the connection between your PHP and Java environments to ensure that the Java Bridge is defined properly and communicates with the correct Java This code demonstrates the interaction between a PHP application and Java objects that occurs in the Java Bridge implementation To test the Java Bridge connection 2 Create a new PHP script to create a Java object as in the example below PRR create Java object Sformatter new Java java text SimpleDateFormat EEEE MMMM dd yyyy at h mm ss a ess we Print date through the object prine EE EE Wava ara ae a lea Date yea ia You can also access Java system classes Ssystem new Java
33. OJ apple fruits 1 orange fruits 2 banana Since request parameter names must be URL encoded the above parameter will actually be sent as fruits 5B0 5D apple fruits 5B1l 5D orange fruits 5B2 5D banana Hashmap A hash map associative array of values Hashmaps are encoded using square brackets after the parameter name with a key name inside the square brackets unlike the Array type in which a number based index is used For example the hash map UserInfo name Tuco lastname Ramirez will be represented as follows UserInfo name Tuco amp UserInfo lastname Ramirez Since request parameter names must be URL encoded the above parameter will actually be sent as UserInfot5Bname 5D Tuco amp UserInfo t5Blastname 5D Ramirez Web API Reference Guide Response Data Types Response data types are represented in XML format This allows for more complex object types to be represented in the response data The following response types are possible in addition to the basic types defined for request data types Boolean Integer String TimeStamp Each complex type is represented as an XML element with properties represented as sub elements XML element names always use camelCase notation first character is lower case The following is a list of the available response data types e messageList e Setverlnfo e serversList e systemInfo e licenselnfo e requestSummary e issue e issueDetails e routeDetai
34. PHPRC value C Program Files x86 Zend ZendServer etc gt lt environmentVariable name PHP_FCGI_MAX_REQUESTS value 10000 gt lt environmentVariables gt lt application gt lt fastCgi gt And change the following values activityTimeout lt Number of Seconds gt requestTimeout lt Number of Seconds gt 303 Zend Server Community Edition Reference Manual PHP Settings This procedure describes how to configure your PHP s execution time E To configure your PHP s execution time 1 In Zend Server go to Server Setup Directives Edit the value of the following directives Change max_execution_time to lt Number of Seconds gt and max_input_time to lt Number of Seconds gt 4 Restart PHP Scripts that run more than 30 seconds but less than lt Number of Seconds gt should now run See below for instructions on how to test this Testing the Changes The following procedure shows how to run a short script that checks if the settings have been properly applied E To test your settings 1 Open a text editor and insert the following code lt php sleep 40 echo If you see this text the script completed and the defaults were changed gt 2 Run the script from your docroot if the script suceeded to run you will see the following message in your browser If you see this text the script completed and the defaults were changed If the test failed you will not see a message in your brow
35. Properties 2 Click the Start Menu tab and click the radio button next to Classic Start menu 3 Click the Customize button and then the Add button 4 Click the Browse button and locate the exe file The default location is lt install_ dir gt bin ZendController exe 5 Highlight the program and click OK Then click Next Highlight the folder in which you want the application to appear or click New Folder to create a new folder Click Next 7 Select a name for the shortcut and click Finish Note In Windows XP 2003 Vista and 2008 you may need administrative rights to make changes to the Start menu depending on the existing user profiles and privileges 32 Zend Server Reference Manual Mac OS X 1 Go into the System Preferences Click on Accounts and select your account Click on Startup Items bk oO bh Click the sign next to the Zend Controller file The next time the system is restarted the Zend Controller runs at startup 33 Zend Server Community Edition Reference Manual CLI Tools CLI Tools is a utility that allows easy automation for Zend Server and Zend Server Cluster Manager on Mac or Linux Using the command line or an automated script you can perform common setup operations as well as Web API operations The CLI Tools are controlled via two wrapper scripts each one exposing a specific set of commands zs setup Configure basic Zend Server options necessary to make Zend Serve
36. Retrieve a list of code tracing files available for download using codetracingDownloadTraceFile Required Permissions Full HTTP method GET Supported Editions Zend Server Zend Server Cluster Manager Request parameters ee E applications Array No List of application IDs If specified code tracing entries will be returned for these applications only Default all applications Row limit to retrieve defaults to value defined in zend user user ini The page offset to be displayed defaults to 0 No orderBy String Column to sort the result by Id Date Url CreatedBy Filesize defaults to Date Sorting direction defaults to Desc Expected Response Code 200 OK For more information see Response Format Response Format Response successful message or error message Possible Action Specific Error Codes This action has no specific error codes i Example Request GET ZendServerManager Api codetracinglsEnabled Response lt xml version 1 0 encoding UTF 8 gt lt zendServerAPIResponse xmlns http www zend com server api 1 1 gt lt requestData gt lt apiKeyName gt lt CDATA Admin gt lt apikKeyName gt lt met hod gt codet racingIsEnabled lt method gt 241 Zend Server Community Edition Reference Manual lt requestData gt lt responseData gt lt codeTracingStatus gt lt componentStatus gt Active lt component Status gt lt alwaysDump gt On lt alwaysDump gt lt traceEnabled
37. Server PHP extensions are sets of instructions that add functionality to your PHP Extensions can also be employed to recycle frequently used code You can place a set of functions into one extension and instruct your projects to utilize the extension Another use for PHP extensions is to improve efficiency and or speed Some processor intensive functions can be better coded as an extension rather than as straight PHP code If your PHP application is business critical you may wish be alerted to database access failures Zend Server can monitor your application in production alert you to failures or Q performance degradation and provide you with diagnostic information for rapid root cause determination This feature is available only in the commercial version of Zend Server The Extensions page is list of the extensions included with the Zend Server Community Edition installation and extensions added to the php ini by the user Use the Extensions page to view the status of all your extensions and to quickly and easily load and unload extensions You can also configure directives associated with certain extensions Extensions with directives that can be configured have a Configure link next to them Clicking the link opens the PHP Directives page filtered to the exact directives associated with the particular extension Click the All option in the PHP directives page to see a complete list of directives From this page when applicable f
38. TRUE on success FALSE on failure zend_disk_cache_delete Finds and deletes an entry from the cache using a key to identify it The key can be prefixed with a namespace to indicate that the key can be deleted within that namespace only If a namespace is not provided the Data Cache searches for the key in the global namespace Available since version 4 0 Description boolean zend_disk_cache_delete string Skey 136 Web API Reference Guide Parameters key The data key or an array of data keys Optional for key s name prefix with a namespace Return Value TRUE on success FALSE on failure or when entry doesn t exist zend ehm cache dear Deletes all entries from all namespaces in the cache if a namespace is provided only the entries in that namespace are deleted Available since version 4 0 Description boolean zend_shm_cache_clear string Snamespace Parameters namespace The data key Optional prefix with a namespace Return Value If the namespace does not exist or there are no items to clear the function will return TRUE The function will return FALSE only in case of error zend_disk_cache_clear Deletes all entries from all namespaces in the cache if a namespace is provided only the entries in that namespace are deleted Available since version 4 0 Description boolean zend_disk_cache_clear string Snamespace Parameters namespace The data key Optional prefix with a namespace Re
39. The example code can be understood as follows The code example is written in PHP and forms part of a PHP Web application The PHP code creates the Java object com ticker JavaStock which is the PHP proxy Requests come into the PHP based Website ForeverOnline com which then references the Stock Ticker application Stock Ticker references a custom object get_news in the JVM library This is all in native Java 100 Zend Server Reference Manual The PHP code then outputs the results on the Website As opposed to a typical Java Bridge Implementation the Zend Server Community Edition Java Bridge implementation addresses performance issues through the Java Bridge architecture Implementing the Java Bridge is a way to address scalability issues by using the Java Bridge to handle all communication in a single JVM instance instead of in several instances While the single JVM constitutes a single point of failure the fact is Zend s PHP Java connection is the most robust on the market Failures in systems of this type generally tend to occur when the Java Server is overloaded rather than as a result of glitches in the applications Zend Server Community Edition s system architecture insures performance by diminishing overhead However in the event of failure the Java Bridge supports a restart feature that makes monitoring the status of the Java Server and restarting quick and simple One last point if the failure was cau
40. URL URL string that created the trace that created the trace CONE Eom Method of creation E Request Manual Request Monitor Event Integer File size in File size in bytes applicationld SE Application context for the trace file 204 Web API Reference Guide Available API Methods The following section describes the specific operations that can be performed using the Web API Each method carries a different operation or is designed to retrieve specific information from Zend Server or Zend Server Cluster Manager You an use the information described for each method together with the structure defined in Generic Request Response Format to execute the available API methods The following information is described for each method Required permissions The API key access level required to perform this action HTTP method Defines whether HTTP GET or POST should be used for this action Supported by editions Lists the Zend Server editions that can perform this action Request parameters The list of required and optional parameters accepted by this action The type of each parameter corresponds to one of the types defined in Request Data Types Expected response code Lists the HTTP response code that can be returned in case of a successful operation Response type Defines the response type expected in case of successful operation This corresponds to one of the types defined in Response Data Types Pos
41. a Administration Dashboard Events Jobs Queue Statistics Code Tracing Server Info PHP Info Logs Recent Events System Overview Tasks PHP Version Learn how to start with Zend Server and PHP Zend Framework Version Configure Zend Server Components Zend Server Zend Code Tracing Zend Data Cache Zend Debugger Zend Deployment Zend Download Server Zend Guard Loader Zend Java Bridge Zend Job Queue Zend Monitor Zend Optimizer Zend Page Cache Zend Session Clustering O Restart PHP NA 27 Zend Server Community Edition Reference Manual To get started with the newly available Zend Server features see Getting Started and Working with Zend Server Changing your Password To change or reset your password follow the instructions in Password Management Zend Server Feature Content In Zend Server Community Edition all Zend Server advanced features are disabled and the tabs containing these features contain feature content server E Help About Logout 5 Applications ei Rule Management Monitoring Caching Recurring Jobs 5 Job Queue Being able to execute PHP tasks asynchronously and in parallel can significantly reduce application bottlenecks and improve the end user experience With the Zend Server Job Queue you can create and schedule Programmatically created jobs that are launched dynamically by your application Scheduled jobs meant to run at a pre specified time TRY ZEND SERVER FREE P gt
42. coding standards to call the correct objects because the Java Bridge does not perform dynamic data conversion You must perform the type conversion in your PHP code For example n e Example If you call a Java method that looks like this public void doSomething int i Using what you would expect to work in PHP Svar j SjavaObject gt doSomething Svar The Java Bridge throws an exception To avoid this use the following line of code to convert the parameter from a string to a numeric value before the Java Bridge passes it SjavaObject gt doSomething Svar 0 For more information see the API or Java Bridge Use Cases 57 Zend Server Community Edition Reference Manual Debugger Working with Local Debugging Local debugging occurs when your entire environment Zend Studio for Eclipse Debugger and Zend Server Community Edition is located on a single machine When working with an IDE such as Zend Studio for Eclipse your project files are in most cases placed in a location that you have defined To run the files on the Web Server you must first move the files to the Web Server s document management directory called htdocs Working with the Debugger The Debugger API that is included in Zend Server Community Edition is a remote debugging tool for developers who work with Zend Studio If the Debugger Component is not set to On in the Components page you are not able to run remote debug session
43. data items or output If you are not using the Data Cache API in your code for partial content caching 274 Index Java Bridge Calls Java classes and Required only If you call If you are not a Java code from PHP Java code or objects user either remove this from your PHP component or do not install optional component Monitor Identifies performance Turn off temporarily issues only for performance testing reasons Not recommended to remove this component however it is best to configure accordingly see Working with Monitoring Page Cache A URL based HTML Always If you decide not to use output cache for PHP scripts If you are not using URL based Caching this component ZDS Zend Download Server Passing heavy download requests to a dedicated process to off load Apache For testing reasons only Or if you have a dedicated server for static content If you do not need to off load large download traffic 275 Zend Server Community Edition Reference Manual Optimizing Monitoring Developing and maintaining Web applications is an intricate and highly demanding process Zend Server facilitates the intricacies of the development process by employing an efficient problem resolution infrastructure This infrastructure s main goal is to help make the most out of challenging environments and tight schedules and prevent problematic issues from falling between
44. environment is customized to suit your requirements Working with Logs How to view and add logs View and define which logs are displayed Working with Components How to enable and disable components Debugger Data Cache Guard Loader Java Bridge The environment is customized to suit your requirements Working with How to enable and disable directives The environment is customized to e suit your requirements Working with How to use the Optimizer Improve performance by Optimizer running the Optimizer Working with How to use the Guard Loader component Run code encoded with Zend Zend Guard Guard Loader Working with Java Bridge How to use the Java Bridge Extend your PHP code to reach out to Java functionality in runtime Working with the How to configure the Debugger to debug and Use the local and remote Debugger profile code running with Zend Server debugging features in Zend Studio Community Edition for Eclipse Working with How to configure the Debugger to debug and Use the local debugging feature in Local Debugging profile code running with Zend Server Community Edition Zend Studio for Eclipse 36 Zend Server Reference Manual Working with Firewall Tunneling How to configure communication between Zend Server Community Edition and Zend Studio for Eclipse when there is a firewall Debug PHP applications through a fire
45. estes R neste eed 190 System MOs E tev E A E A a E ees 191 le ET ut KEE 192 Ee ET inn ue EE 193 ISSUC niiin kias ena ai an eaa Aas eaa aaae denia ains naaa A aa eaii eninin ipsini asiaa iina ienie 194 ERT EE 195 el 196 EVENTS GOW vac sete E T E isc A ces eget auede E T E bank esccheescate tesa a teated 197 evens Ee le 198 QVOIM tices cccceceveceigsspcschechseasnansscuasaesvens sie si EES DEES ees 199 PAFAMOELSN EEE 200 superGlobals EE 201 EIER eta lata eege EE Ee 202 ENN ele E TEE 203 eeler 204 Available API Methods inc einai aii eile ein enh A es nae eaten Ae ene eee lee and 205 Server and Cluster Management Methode 206 The getSystemInfo Meibod AA 207 The clusterGetServerStatus Method 210 The clusterAddServer Method Anke 212 The clusterRemoveServer Method 214 The clusterDisableServer Method 216 The clusterEnableServer Method 218 The clusterReconfigureServer Method 220 The restartPHP Method E 222 Configuration Management MethodS ssssesesesssessnssrrestrssersstnssrnsstensttnsrtnstnnstnnstnnstnnttnnntnnnnnnneen nenn nenn 224 The configurationExport Method 225 The configuration Mport Method 227 Code tracing Methods acridians aaea naaa aeai adiar sabina raddiana daradara aaoi 230 The codetracingDisable Method 231 The codetracingEnable Method 233 The codetracinglsEnabled Method 235 The codetracingCreate Method 237 The codetracingDelete Method ceeeeececeeesceeeesneeeeeeeneeseeeaneeseeaaeeeseaaeeeseea
46. fails or you run out of allocated memory 64 Zend Server Reference Manual The following example shows the different storage options lt a Example A simple key with no namespace stored on disk if zend_disk_cache_store hellol 1 false len lees Aine exile Op Shared memory if zend_shm_cache_store helloi 1 false echo iere ney Se OF Store with namespace on disk if zend_disk_cache_store nsl hellol 1 false CRORE nominee exit Shared memory if zend_shm_cache_store nsl hello1 1 false eee Merion er exit Store with namespace on disk with limited lifetime 3 she inel_elisic zeline scone TiS33 sicecic_ wcll 2 3 SS salsa if eee Verio 2 ats exit Shared memory if zend_shm_cache_store ns3 test_ttl 2 3 false 1G HO mae trata ae are exit 65 Zend Server Community Edition Reference Manual namespace Support Using namespaces for caching provides the ability to define a key that can serve as an identifier to delete select items from the cache rather than unnecessarily removing shared instances namespace support is intended for environments that run large applications that are separated into modules Applying a namespace to each module provides the identification necessary to pinpoint all the cached items that belong to a given module and remove only those specific items This doe
47. focus on a specific rule type each time or set high thresholds and gradually modify them In production it is preferred that you already come with an estimate of the thresholds that are necessary The difference between development and production is that usually in development environments you have to work very hard in order to have such an overflow development environments are low traffic low load systems Additionally the performance impact is negligible in development environment In production as a contrast tuning is very important because of two reasons 1 High traffic systems tend to generate hundreds and thousands of events per day if not properly tuned even with aggregation this tends to be more than what a development team can handle 277 Zend Server Community Edition Reference Manual 2 The more events you have and the broader your thresholds are for example the more functions you watch for Slow Function Execution events the bigger the performance impact on your system is going to be While under normal circumstances this impact is usually negligible under high stress circumstances it could have an effect Given this the best practice for tuning Zend Monitor thresholds is to start from relatively high thresholds and lower them over time as old issues are fixed and the capacity for handling fine grained errors grows This is mostly true in production environments 278 Index Fine Tuning Optimizer The performa
48. in the Administration Interface Ensure that the extension is properly loaded by checking the output of PHP Info in the Administration Interface 85 Zend Server Community Edition Reference Manual If you try to load a PHP extension as a Zend extension in Linux you may receive the following error message in your server s error log lt extension_name gt doesn t appear to be a valid Zend extension If this occurs remove it and add it as a PHP extension following the instructions under To Add PHP Extensions below To add PHP extensions i Download the third party extension Many third party extensions can be found at http pecl php net Extensions are obtained directly from external web repositories Place the PHP extension in your extensions directory To locate the extensions directory open your php ini and check the value for the directive extension _dir By default your extensions directory is located in lt install_path gt lib php_extensions Add the following line to your php ini extension lt my_extension_name gt so Ensure that you replace lt my_extension_name gt with your extension s name Restart your Web server Ensure that the extension is properly loaded by checking the Administration Interface See Monitor PHP Info for the output of PHP Info The extensions appear in your Administration Interface under the Extensions tab and you can use the Administration Interface to load and unload t
49. it is recommended that the default settings not be changed 67 Zend Server Community Edition Reference Manual phpMyAdmin Working with phpMyAdmin to Manage MySQL phpMyAdmin is a tool written in PHP which is intended to handle the administration of MySQL over the Web Currently it can create and drop databases create drop alter tables delete edit add fields execute any SQL statement manage keys on fields manage privileges export data into various formats and is available in 55 languages The Zend Server Community Edition Installer includes this component as part of the installation process in Windows and Zend Server Community Edition Download the Linux and Mac version from http Awww phpmyadmin net They are available as RPM and DEB packages from your distribution s repository See the Installation Guide for additional operating system and Installer specific information The following types of Installations are available Linux s Mac OS X Windows 68 Zend Server Reference Manual Working with MySQL Server Linux This procedure is relevant for users who manually downloaded and installed phoMyAdmin This procedure describes how Unix users with root privileges can use the phpMyAdmin tool to set up their environment to work with a MySQL server Before following these instructions verify that your MySQL server is installed and running If you do not have an Internet connection make sure you have access to the php
50. java lang System print Sayysicom yap 7 will use COST Eeer Sia IPOS print Java version Ssystem gt getProperty java version Coes ia print Java vendor Ssystem gt getProperty java vendor o gt E print OS Ssystem gt getProperty os name Ssystem gt getProperty os version on H Ssystem gt getProperty os arch lt br gt n gt If the Java Bridge is correctly installed and running you should receive the following response Epa Gl aly tte EE en Et Eet SUES tt ng Atten lee java lang System Java version 1 6 0_06 Java vendor Sun Microsystems Inc Ee 2oOo2Do 9 18 EE AE OM ASS This output shows the date Java version vendor and operating system and indicates that the connection is complete 56 Zend Server Reference Manual If you receive an error message instead of the expected output information one of the following problems may have occurred 1 The Java Bridge is not installed 2 The Java Bridge extension is not running Server Setup Components 3 The Java Bridge Server needs to be restarted Server Setup Components 4 The requested jar file does not appear in the environment s classpath Once the connection is established you can start using the API to call Java objects from your PHP Before using the Java Bridge API Before you start incorporating the Java Bridge API in your code you must be aware that when you call Java from PHP you must use Java
51. job_id Available since version 5 0 Description array ZendJobQueue getJobStatus int S job_id Parameters job_id a job identifier Return Value The array contains status completion status and output of the job ZendJobQueue removeJob Removes the job from the queue Makes all dependent jobs fail In case the job is in progress it will be finished but dependent jobs won t be started anyway For non existing jobs the function just returns false Finished jobs are simply removed from the database Available since version 5 0 Description boolean ZendJobQueue removeJob int job_ id Parameters job_id A job identifier Return Value The job was removed or not removed ZendJobQueue restartJob Restart a previously executed Job and all its followers Available since version 5 0 154 Web API Reference Guide Description boolean ZendJobQueue restartJob int Sjob_id Parameters job_id A job identifier Return Value If the job was restarted or not restarted ZendJobQueue isSuspended Checks if Queue is suspended and returns true or false Available since version 5 0 Description boolean ZendJobQueue isSuspended void Return Value A Job Queue status ZendJobQueue isJobQueueDaemonRunning Checks if the Job Queue Daemon is running Available since version 5 0 Description static boolean ZendJobQueue isJobQueueDaemonRunning void Return Value Return true if the Job Queue Deamon is r
52. paging limits The response is a list of issue elements with their general details and event groups identifiers Required Permissions Read only HTTP method GET Supported by Editions Zend Server Zend Server Cluster Manager Request Parameters Parameter Description EE Beete String The predefined filter s id Can be the filter s name or the actual identifier randomly created by the system This parameter is case sensitive aaa The number of rows to retrieve Default lists all events up a eee Column identifier for sorting the result set id repeats date eventType fullUrl severity status Default is date direction String Sorting direction Ascending or Descending Default is Descending Expected Response Code 200 OK For more information see Response Format EI A paging offset to begin the issues list from Default is 0 Response Format Response successful message or error message Possible Action Specific Error Codes HTTP Code Description aa noSuchFilterld The ee filter does not exist 252 E Web API Reference Guide Example Request GET ZendServerManager Api monitorlssuesListByPredefinedFilter filterld 1 amp limit 20 amp offset 0 amp order lastOccurance amp direction DESC Content type application x www form urlencoded Response lt xml version 1 0 encoding UTF 8 gt lt zendServerAPIResponse xmilns http www zend com server api 1 1 gt lt requestData gt l
53. read the file itself One example of enabling Zend Server to read the Apache error log on Debian Linux is provided below E To enable Zend Server to read the Apache error log on Debian Linux e 1 Open a terminal and switch to root using su or sudo s 2 Run the following command chmod 644 usr local zend var log error log On most Red Hat Fedora and CentOS systems you will need to allow access to the Apache logs directory too This can be done by running the following command as root or using sudo chmod 755 var log httpd 310 Index Zend Server Exception Caught Installing Zend Server with a bundled Apache assumes that the following port settings are used The Web server Apache is listening on port 10088 and the Zend Server Administration Interface are listening on 10081 10082 If your environment is configured differently when trying to access the Administration Interface you will receive a Zend Server Exception Caught error message DEB and RPM installations do not need to listen to port 10088 because the Apache s distribution is used To fix this the port settings must be changed To set the Administration Interface s settings to listen to a different Web server port J After changing your Apache s port setting to another port 1 Change the Administration Interface s port setting as follows Go to lt install_path gt gui application data usr local zendsvr httpd conf httpd conf Open the file zend server
54. that has directives which can be configured J To configure directives 1 4 5 Expand one of the lists use the Search All or the popular options to locate the relevant directive Configure the directive as required You can configure multiple directives before saving Click the Save Changes SE button at the top right corner of the screen to save all the changes made or leave the page without saving to discard the changes As soon as changes are made to this page a prompt to Restart Server is displayed PHP Click meng The changes are updated in the Directives page and in your php ini file 50 Zend Server Reference Manual Working with Optimizer The Optimizer runs out of the box by default after installation Optimizer allows you to gain a performance boost by reducing code compilation time When PHP code is compiled for the first time it is saved in the server s memory Each time the code is called the pre compiled version is used instead of waiting for the code to compile which causes a delay each time the code is used Using the Optimizer should not be confused with caching The Optimizer saves a compiled script to the server s memory while Caching saves the script s output to the servers memory The general recommendation is to always keep the Optimizer set to On to boost Web application performance If your PHP application is business critical you may wish be alerted to any performan
55. use Java code The Java Bridge integrates Java code in PHP by connecting the PHP object system with the Java Bridge object system The Java Bridge requires that you have SUN Microsystems JRE 1 4 or later or IBM s Java 1 4 2 or later installed on your computer During or after installing depending on the installation type you are prompted to direct the installer to the JRE location You should therefore already have JRE installed 64 bit JRE is not supported More information about JRE and the latest updates can be obtained from SUN Microsystems s website The Java Bridge PHP extension adds functions that allow you to instantiate new Java classes from inside your PHP script Once a Java class is instantiated the Java Bridge gets a message from the Zend Engine to execute the Java code The Java Bridge executes the script and returns the results to the Zend Engine Zend Server Community Edition includes the Java Bridge PHP Extension and the ability to restart the Java Bridge and configure the Java Bridge settings from Server Setup Components The Java Bridge is an optional component that is installed differently depending on the operating system WIN UNIX MAC and the installation method format EXE DEB RPM Once the extension is installed and its status is On PHP code can use the Java Bridge API to call Java objects 80 Zend Server Reference Manual The process of calling Java objects in PHP is described in the fo
56. variables passed to the HTTP job ZendJobQueue setCurrentJobStatus Reports job completion status OK or FAILED back to the daemon Web API Reference Guide The ZendJobQueue Class The ZendJobQueue is a PHP class that implements a connection to the Job Queue Daemon Available since 5 0 Class Prototype class ZendJobQueue Constants const int TYPE HTTP const int TYPE HTTP RELATIVE const int TYPE SHELL const int PRIORITY LOW const int PRIORITY NORMAL const int PRIORITY HIGH const int PRIORITY URGENT const int STATUS PENDING const int STATUS WAITING PREDECESSOR const int STATUS RUNNING const int STATUS COMPLETED const int STATUS FAILED const int STATUS OK const int STATUS LOGICALLY FAILED const int STATUS TIMEOUT const int STATUS REMOVED const int STATUS SCHEDULED const int STATUS SUSPENDED const int SORT NONE const int SORT BY ID const int SORT BY TYPE const int SORT BY SCRIPT const int SORT BY APPLICATION const int SORT BY NAME const int SORT BY PRIORITY const int SORT BY STATUS 149 Zend Server Community Edition Reference Manual const int SORT BY PREDECESSOR const int SORT BY PERSISTENCE const int SORT BY CREATION TIME const int SORT BY SCHEDULE TIME const int SORT BY START TIME const int SORT BY END TIME const int SORT ASC const int SORT DESC const int OK const int FAILED Methods void __construct string queue int createHttpJob str
57. when they are not needed This primarily happens when you install a component that you do not use For example if you do not need to call Java objects from your PHP code there is no need to have the Java Bridge running In addition it would be better not to install this optional component at all especially as you will be prompted to install a Java Runtime Environment that is not required if you are only running PHP In this section we describe each performance component including when you should install the component when to disable the component and when applicable when to remove the component Component Description Turn Off Comment Debugger A remote debugging Not recommended to If you are not going to tool for developers turn off as it is great for debug your code with working with Zend development the Debugger for Studio environments example in a production In production when not environment disabling debugging code this component may provide a slight performance gain Optimizer Speeds up PHP Disabling has a execution through opcode caching and optimization negative impact on performance Guard Loader Loads and runs encoded PHP scripts Encoded with Zend Guard Required only if you are running PHP code that was encoded with Zend Guard If you are not a Zend Guard user either remove this component or do not install it it is an optional component Data Cache Cache
58. with Zend Controller Initial Setup The following procedure describes how to configure the Zend Controller s settings to communicate with Zend Server Community Edition This procedure should be completed before using the Zend Controller B To Set up the Zend Controller d Open the Zend Controller menu right click in Windows or Unix Ctrl Click in Mac In the Zend Controller s menu click to open the Settings dialog Make sure the following settings are correct Hostname unique name or IP number of the server on which Zend Server Community Edition is running Can be a remote server on the same LAN Port The default ports are Windows 80 for HTTP Unix 10081 for HTTP and 10082 for HTTPS If you changed the port of the Web server that runs Zend Server Community Edition during the installation change this value too Password The password is automatically configured when you set your Administration Interface password Connection Scheme Your preferred method of connecting the Control Panel with Zend Server Community Edition for communication purposes where HTTPS is a secured connection protocol BB Zend Controller settin SE Zend Server settings Server comunication Prowcetings Hostname 127 0 0 1 Port D Password eocee Connection scheme HTTP k Use proxy 61 Zend Server Community Edition Reference Manual Once the Zend Controller is properly configured you can
59. 01 local 10082 ZendServer lt address gt lt status gt pendingRestart lt status gt lt messageList gt lt warning gt This server is waiting a PHP restart lt warning gt lt messageList gt lt serverInfo gt lt serveriInfo gt EEI ILLOS lt name gt www 02 lt name gt lt address gt https www 02 local 10082 ZendServer lt address gt lt status gt pendingRestart lt status gt lt messageList gt lt warning gt This server is waiting a PHP restart lt warning gt lt messageList gt 228 Web API Reference Guide lt serverInfo gt lt serversList gt lt responseData gt lt zendServerAPIResponse gt Important Note For Zend Server or Zend Server Cluster Manager on Mac or Linux this action is also available via the command line using CLI Tools For more information see CLI Tools 229 Zend Server Community Edition Reference Manual Codetracing Methods The following is a list of methods available for the Codetracing feature codetracingDisable codetracingEnable codetracinglsEnabled codetracingCreate codetracingDelete codetracingList codetracingDownloadTraceFile Possible Deployment Action Specific Error Codes HTTP Error Code Description Code internalServerError The code tracing delete action failed The requested trace could not be found 230 Web API Reference Guide The codetracingDisable Method Disable the code tracing directive two directives necessary for creating t
60. 2008 Server E To add a Web site to the Trusted sites zone 318 St ZS oO Jazz Go to Tools Internet Options Click to display the Security tab Select Trusted Zone and then Sites Click Add to include Zend Server as a trusted site Click Close and then OK to save the changes and close the dialog Index Zend Server will now be added as a trusted site and the message will not appear Depending on your security settings you may only see the following message Server Your browsers JavaScript must be enabled to use the Administration Interface This also indicates that Zend Server is not a trusted site As soon as the site is added to the trusted zone this message is no longer displayed 319 Zend Server Community Edition Reference Manual Windows IIS URL Rewrite Setup A rewrite engine does not come standard with IIS If you haven t done so already you will have to download and install one There are several online resources that can help you set this up Zend Framework users should see http framework zend com wiki display ZFDEV Configuring Your URL Rewriter For Microsoft s URL rewrite module for IIS 7 0 see http learn iis net page aspx 460 using url rewrite module 320 Index Changing the Component s Log Directory This issue is intended for advanced users who want to change the directory for storing Zend component Log files By default component logs are written to the directory
61. Apache logs Windows only Windows Zend Server isn t Running Out of The Box You ve installed Zend Server successfully but an error message is displayed in the browser when you click the short cut Windows Zend Server not Loading Zend Server or a related process causes unexpected system behavior Windows Internet Explorer Blocking Zend Server IE7 running on Windows 2008 Server blocks Zend Server and prompts you to add its URL to the Trusted Zone Windows IIS URL Rewrite Setup Recommendations on which URL rewrite engine to use and where to download from Linux and Windows Support Tool Your opportunity to enable the Support team to provide better service by allowing us to gather server configuration and setup information 305 Zend Server Community Edition Reference Manual License Not Working This issue is relevant for all operating systems Problem While running Zend Server in Community Edition enter a new license and nothing happens Expected Result Entering a valid license should reactivate Zend monitor Zend Page Cache and Zend Download Server Solution Click Restart Server to make sure the license change is applied Still doesn t Help Try to manually Restart your PHP from the command line or go to the Zend Support Center http www zend com en support center for information about our support options 306 Index Support Tool The Zend Support Tool gathers server configurations and setup info
62. AyAdmin installation package E To extract and install phpMyAdmin 1 2 Download the package from http www phpmyadmin net Extract the package with the command tar xzvf phoMyAdmin 2 1 1 7 all languages utf 8 only tar gz Move the extracted directory to zend gui lighttpd htdocs phpMyAdmin with the following command mv lt extracted dir gt lt install_path gt zend gui lighttpd htdocs ohpMyAamin Change your directory using the following command cd lt install_path gt zend gui lighttpd htdocs phpMyAdmin Create a directory called config under the phpMyAdmin directory with the following command mkdir config Open the phpMyAdmin Web Interface by following the link httos localhost 10082 phpMyAdmin scripts setup php If you are using a different port or connecting from a remote server replace the port number lt 10082 gt with the appropriate port number or replace lt localhost gt with the IP address of the remote computer Once the phpMyAdmin setup page is open you can start configuring it to manage your MySQL Server To configure phpMyAdmin to work with an existing MySQL server 1 2 In the phpMyAdmin setup page click Add to add a MySQL server In the Add section configure the following parameters Server Host Name localhost for local servers If you are not using a local server enter your machine s IP address Port socket path Most users will not have to change any settings In the Authenticat
63. EB RPM from the command line run ps ef grep E apache2 httpd Windows In the system tray hover over the Apache Monitor icon to view the Apache status If necessary click to open a dialog with the Stop Start and Restart options A notification with the Apache server status is displayed Every time the Apache is restarted the following message is displayed httpd Could not reliably determine the server s fully qualified domain name using 127 0 0 1 for ServerName To resolve this situation add a line to the Apache configuration file as follows Open the file lt install_path gt apache2 conf httpd conf and add the following line placing your server s Host name in the brackets ServerName server name 39 Zend Server Community Edition Reference Manual Check IIS Purpose To verify that the bundled webserver is installed and running Result System confirmation This procedure describes how to check if the IIS server is running E To check if the IIS server is running Use Microsoft http support microsoft com kb 314771 Look for the presence of the following registry key HKEY_LOCAL_MACHINE SOFTWARE icrosoft InetStp or Issue the following command in cmd lisreset status If the following message is received then IIS is not running iisreset is not recognized as an internal or external command operable program or batch file amp 61664 not installed If the following messages are received th
64. EE 168 AE ie stents fey Ae in es en a es es ee 169 Generic Request Response Format 170 Request Format ics end etal en ee a te A es ae ed ene ee 171 Request Method URL and Headerg nann nn nenene 171 Passing Request Parameters ccccccccceesenceeeeseeeeeeeeeeceeeeeeeeeecsaeaeseesaeeeeeeseeaeeeeseeeeeeneeaesesseneeeeenaes 172 Ile EE 172 RESPONSE elt EE 174 HTTP Response EE 174 FFT P RESpOnSe Headers EE 174 HIT RESPOnSe BOY eek crccsiscactaces seoed deeg gege EE ERA A E Ee deele ECH 174 ET TEE 175 API Versioning Negoro esseer r E ARR E EEE ETA AE A EETA AE RA AEE OTATTE 177 Authentication and Message Verification 00 2 ceeecceceeeeeeeeeeeeeneeeeeeaeeeeeeaaeeeeeeaaeeeeesaaeeeeeeaeeeeeeaeeeeeeaeeeeees 179 EE dree 180 Signing API REQUESTS eede at sage A a kaasanded aeaa ed aa a Aa d iaa reeds eerie ci daai eiaeia 181 Importance of the Date Header 0 0 0 2 eecccceececceeeeeeeceeeeneeeeeeesaeeeeeeaaeceseesaeeeseeseeeeesnneeseeneeaeeeeneeeeeeenaes 181 The X Zend Signature HTTP Header 181 Calculating the Request Signature c ccccccceeeeeceeceeeeeeeeeaeeeeeee scence ceaeeesaaesseaaeseneeeseaeeesaeeseeeseeeeee 181 EX AIT E S EE 182 BECK 185 Reguest Data We 186 Zend Server Community Edition Reference Manual Response Data TYPES eesriie e i e Ee a deve aes tibetan aeeass a etnies tee eee 187 messagekisty s tsi hein te eee eh pa esa reed a dhe en eee ee a ed 188 SAVEMORE E e R E A EE 189 SEVES LIS aa a a e N E
65. EE leen AE Mee 54 Next comes libtool creating libtool appending configuration tag CXxX to libtool configure creating config status config status creating config h The actual compilation process calls make which internally triggers GCC and LD running make bin sh var tmp pear build root newt 1 2 1 libtool mode compile gcc I I tmp pear download newt 1 2 1 DPHP_ATOM_INC I var tmp pear build root newt 1 2 1 include I var tmp pear build root newt 1 2 1 main I tmp pear download newt 1 2 1 I usr local zend include php I usr local zend include php main T usr local zend include php TSRM I usr local zend include php Zend I usr local zend include php ext I usr local zend include php ext date lib I usr local zend include php DHAVE_CONFIG_H g 0O2 c tmp pear download newt 1 2 1 newt c o newt lo mkdir libs gcc I I tmp pear download newt 1 2 1 DPHP_ATOM_INC I var tmp pear build root newt 1 2 1 include I var tmp pear build root newt 1 2 1 main I tmp pear download newt 1 2 1 I usr local zend include php T usr local zend include php main Zend Server Reference Manual I usr local zend include php TSRM I usr local zend include php Zend T usr local zend include php ext T usr local zend include php ext date lib IT usr local zend include php DHAVE_CONFIG_H g 02 c tmp pear download newt 1 2 1 newt c fPIC DPIC o libs newt o bin sh var tmp pear build root newt 1 2
66. HP has many levels of errors Using this function sets the error level for the duration runtime of your script 280 Index register_long_arrays Off Off Tells PHP whether or not to register the deprecated long HTTP_ _VARS type predefined variables When On default long predefined PHP variables like HTTP_GET_VARS are defined If you are not using them it s recommended to turn them off for performance reasons Instead use the superglobal arrays like _GET This directive became available in PHP 5 0 0 and was dropped in PHP 6 0 0 register_argc_argv Off Off Tells PHP whether to declare the argv and argc variables that contain the GET information magic_quotes_gpc The default is Off This feature is deprecated as of Sets the magic_quotes state for GPC Get Post Cookie operations When PHP 6 0 0 magic_quotes are On all single quote double quote backslash and NULLs are escaped with a backslash automatically include_path As short as path to php pear Specifies a list of directories possible where the require include depending on the application s needs fopen file readfile and file_get_contents functions look for files The format is like the system s PATH environment variable A list of directories separated with a colon in Unix or semicolon in Windows 281 Zend Server Community Editio
67. L zend The PHP Company Zend Server Community Edition 5 6 Reference Manual By Zend Technologies server www zend com Abstract This is the Reference Manual for Zend Server Community Edition Version 5 6 The information in this document is subject to change without notice and does not represent a commitment on the part of Zend Technologies Ltd No part of this manual may be reproduced or transmitted in any form or by any means electronic or mechanical including photocopying recording or information storage and retrieval systems for any purpose other than the purchaser s personal use without the written permission of Zend Technologies Ltd All trademarks mentioned in this document belong to their respective owners 1999 2012 Zend Technologies Ltd All rights reserved Zend Server Community Edition Reference Manual issued January 2012 DN ZCE RM 0301 12 5 6 01 Table of Contents ZEND SERVER REFERENCE MANUALE 1 OVEIVIOW eegne agit nd eat nk Abn eee aaa ea Meee 2 What is included in Zend Server Community Edition CEA 2 Boost Performance of your PHP Applications 00 ceccceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeseeeeeeseneeeeeseneaeeeeeneaees 2 Use a Reliable PHP Stack in Development and Production 2 Get Up and Running with a Full PHP Stack in Mimnutes cee eeeeaeeeeeeeseeeeesaeeeeneeeeeeeess 3 Le EE Grete ete ae to co add ee E i a 4 Installation Eer 4 Password Management eet adie ahaa dis den deli ee e
68. PHP may expose the fact that it is installed on the server e g by adding its signature to the Web server header It is no security threat in any way but it makes it possible to determine whether you use PHP on your server or not 288 Index display_errors This determines whether errors should be printed to the screen as part of the output or if they should be hidden from the user Value stderr sends the errors to stderr instead of stdout The value is available as of PHP 5 2 4 In earlier versions this directive was of type boolean Note This is a feature to support your development and should never be used on production systems e g systems connected to the Internet Note Although display_errors may be set at runtime with ini_set it won t have any affect if the script has fatal errors This is because the desired runtime action does not get executed register_globals Whether or not to register the EGPCS Environment GET POST Cookie Server variables as global variables Relying on this feature is highly discouraged Please read the security chapter in the PHP manual on Using register_globals for related information Note register_globals is affected by the variables_order directive 289 Zend Server Community Edition Reference Manual Configuring Debugger Access Control The allowed hosts list is a list of IP addresses that are permitted to initiate a Debugge
69. Required Permissions read HTTP method GET Supported by Editions All Request Parameters This method has no request parameters Expected Response Code 200 OK Response Type systemInfo Possible Action Specific Error Codes This method has no action specific error codes Example Request GET ZendServerManager Api getSysteminfo Response lt xml version 1 0 encoding UTF 8 gt lt zendServerAPIResponse xmlns http www zend com server api 1 0 gt lt requestData gt lt apikKeyName gt angel eyes lt apikKeyName gt lt method gt getSystemInfo lt method gt lt requestData gt lt responseData gt lt systemInfo gt lt status gt OK lt status gt lt edition gt ZendServerClusterManager lt edition gt lt zendServerVersion gt 6 0 1 lt zendServerVersion gt lt supportedApiVersions gt 207 Zend Server Community Edition Reference Manual application vnd zend serverapitxml version 1 0 application vnd zend serverapitxml version 1 1 application vnd zend serverapitxml version 2 0 lt supportedApiVersions gt lt phpVersion gt 5 4 1 lt phpVersion gt lt operatingSystem gt Linux lt operatingSystem gt lt deploymentVersion gt 1 0 lt deploymentVersion gt lt serverLicenseiInfo gt lt status gt OK lt status gt lt orderNumber gt ZEND ORDER 66 lt orderNumber gt lt validUntil gt Sat 31 Mar 2012 00 00 00 GMT lt validUntil gt lt serverLimit gt 0 lt serverLimit gt lt serverLice
70. Server Cluster Manager Request Parameters Expected Response Code 200 OK The process was completed successfully This status is expected if there is no need to perform a graceful shutdown process 202 Accepted The disabling process has started but was not completed yet You can check the server status within a few seconds using the clusterGetServerStatus method to verify that the operation is complete Response Type serverlnfo with the status of the server being disabled The status is either shuttingDown or disabled On a Zend Server Cluster Manager with no valid license this operation fails Possible Action Specific Error Codes HTTP Error Code Description Code noSuchServer There is no server with the There is no server with the provided server ID server ID a Zend Ne Cluster Manager is unable to connect to the specified server invalidServerResponse An invalid or unexpected response from the server temporarilyLocked The server cannot be disabled because another server in the cluster is performing a graceful startup shutdown 405 notImplementedByEdition The method is not implemented by this edition of Zend Server 216 Web API Reference Guide 500 serverNotLicensed Zend Server Cluster Manager is not licensed Example Request headers removed for clarity POST ZendServerManager Api clusterDisableServer serverId 5 Response Erie il 0 200 Ox lt xml version 1 0
71. The log verbosity level 0 5 zend datacache log rotation size integer PHP_INI_ALL BEEN before it is rotated Enables the lock on expire zend_datacache lock_on_ expire boolean datacache ini mechanism 130 Web API Reference Guide Configuration Directive Details zend_datacache shm memory_cache_size Amount of shared memory each data cache namespace will consume This includes the global namespace used when none are defined in cached objects Type integer Units MBytes Default Values e Windows Linux i386 Linux x86 64 Linux AMD64 32 e Mac OS X Solaris FreeBSD i386 FreeBSD x86 64 AIX PPC 2 Available since version 4 0 zend_datacache disk save_path The path for storing cached content to the disk Type string Default Value datacache Available since version 4 0 zend_datacache disk dir_level Directory depth for storing keys Type integer Default Value 2 Available since version 4 0 zend_datacache enable Enables the Data Cache The Data Cache cannot work without this directive The Data Cache can be turned on or off from the Administration Interface Type boolean Default Value 1 Available since version 4 0 131 Zend Server Community Edition Reference Manual zend_datacache apc_compatibility When enabled the Data Cache extension registers APC compatibility methods Type boolean Default Value 1 Available since version 4 0 zend_datacache log_verbosity_level The extension s log ver
72. Use Cases minnin aoea eaan pien Ea a aa aea aaa aeaeaie a da sadiaan 99 Usage Scena Le TTT 99 Ae EE 99 Info MESSAQCS ves 8 25 0 Stes Sean baie hie eevee ped ae fe eas ieee Se 104 Fror Messages TE 104 lege 104 DUECESS MESSAGES EE 104 ut E 105 APIREEEREN Ehe deed Se Eeer ee eeh at casted 106 dude Dei fe 9 EE 107 Zend Debugger Configuration Directhyes ntu nstnnntnnsttnntnnnnatnnsenn nns 108 Configuration Directives Gummarm s ssssssseeesisesinssrtssitssinssirtsttssinssttn tt nattinntnnttnn stnn ttnn unnn nenn nnnn nenun nunana 108 Configuration Directive Details 110 Zend Optimizer Configuration Directives eee ceecee eee eeeeeeereeeeesaeesaeesaaecaaessaeseaeeeaeseeseeeeseeeeeneenaes 113 Configuration Directives Gummarm ceases caaeeeeaaeseeeeecaeeesaaeseeaeeseaeeesiaeeeeaeeseeeeess 113 External Configuration File Optimizer blacklist le 114 Configuration Directive Details 115 Zend Optimizer PHP API eege deet uge Eege Ail edie all Egon aere 120 PHP Gilet LEE 120 Zend Guard Loader Configuration Directives ccccecsceceeeeeceeeeeeaeeeeeeeceeeeesaaeeecaaeseeeeseaeeesaeeseneeseaees 122 Configuration Directives Gummarm cence caaeedeaeeseeeecaeeeseaeeeeeeeseeeesiaeseeeeseeeeess 122 Configuration Directive Details z riisiin edited aaraa an eege AE Zeie deeg tainted 123 Zend Guard Loader PHP ARI EE 124 Table ee 124 PHP FUNGCUHOMS EE 125 Zend Data Cache Configuration Directives cccccceccceeeceeeeeeece
73. Web server place the files under the following directory according to your operating system and preferences Windows Apache lt install_dir gt Apache2 htdocs s IS C inetpub wwwroot DEB The distribution s default location is var www RPM The distribution s default location is var www html 297 Zend Server Community Edition Reference Manual Running the Code Application Open a browser and enter the URL http localhost lt yourPHPfile gt php Replace lt port number gt with the port you are using The defaults are port 80 for Windows and port 10088 for the other operating systems unless you changed the port by preference Replace lt yourPHPfile gt php with name of the file you want to access run Remember to use the port name according to the port number you defined C To find out how to locally debug your code once it s deployed in a Web server see Working with Local Debugging Production Deploying code to production is different than running your application in a controlled environment Such as a local server Production means publishing your application to the internet So where do you publish your application Depending on the resources available to you you either have a different server that is dedicated to servicing the web or a cluster of servers that are managed with a load balancer In both cases a firewall or some other protection is necessary An additional option is to have your app
74. aaeeseeaaeeeseegeeeeeeeseneees 239 vi Table of Contents The codetracingList Method AAA 241 The codetracingDownloadTraceFile Method 243 leit elle 245 The monitorGetRequestSummary Method 246 The monitorDownloadTraceFile Meibod AA 250 The monitorStartDebug Method ssssesseeeseessenesrnssrnsstnssinssrnsstnnsrtsstnsstusstnsstnnstnasnnastnnatunsnnn nnan tnnn nennt 251 The monitorGetlssuesListByPredefinedFilter Method 252 The monitorGetlssuesDetails Method 255 The monitorGetEventGroupDetails Method 258 The monitorExportlssueByEventsGroup Method 262 The monitorChangelssueStatus Method 263 Studio Integration Methods AA 265 The studioStartDebUg Method 266 Method studioStartProfile Method 268 vii ZEND SERVER REFERENCE MANUAL Zend Server Community Edition Reference Manual Overview Zend Server is a Web Application Server for running and managing PHP applications that require a high level of reliability performance and security What is included in Zend Server Community Edition CE The community edition of Zend Server is a free simple PHP Web Application Server environment that is ideal for running non critical PHP applications or just for experimenting with PHP Zend Server Community Edition is a fast and reliable PHP application stack It is completely free and you can use it in development testing and production Boost Performance of your PHP Applications Zend Server Community Edition provides multiple capabilities f
75. activate monitor rule settings Zend Page Cache Caching Rules Clicking this link directs you to Rule Management Caching where you can create and edit cache rules The following message appears when an option was not installed This component is not installed for instructions see the Installation Guide For Windows see Windows Installation for DEB see DEB Installation and for RPM see RPM Installation 20 Zend Server Reference Manual The following components can be turned On Off and configured as follows Component Working with Data Cache Working with the Debugger Working with Zend Guard Loader Working with Java Bridge Working with Optimizer On Activates the Data Cache Scripts that include the Data Cache API can run Off Disables the Data Cache Scripts that include the Data Cache API cannot run On Activates the Debugger for local and remote debugging with Zend Studio Off Disables the Debugger and does not permit debugging from Zend Studio On Scripts encoded with Zend Guard run Off Scripts encoded with Zend Guard cannot run On The Java Bridge runs Scripts containing the Java Bridge API can run Off The Java Bridge stops running Scripts containing the Java Bridge API cannot run On PHP is optimized Off PHP is not optimized Comments This component stores information and therefore has an additional action for clearing information The Debugger requires
76. ader to designate your supported API version s If the Accept header is missing the server will fall back to the default API version This is described in detail in API Versioning Negotiation For POST requests including any parameters or payload clients must set the Content type header to either application x www form urlencodea or multipart form data depending on the payload You must 171 Zend Server Community Edition Reference Manual specify the size of the request body as required by the HTTP 1 1 protocol that is by using the Content length header the Content transfer encoding chunked header or simply by closing the connection Passing Request Parameters API methods that require passing parameters may be passed in the following forms For GET requests parameters are passed in the URL query part following the in a URL encoded format similar to how HTML forms sent using the GET method are encoded For POST requests parameters should be passed in the request body encoded using either the application x www form urlencoded as specified by the HTML 4 01 standard or multipart form data as specified in RFC 2388 encoding methods For some methods namely methods that may transfer large amounts of binary data the multipart form data encoding method must be used Refer to specific method documentation for a list of required and optional parameters Examples lt a Example SA The followi
77. administrator console Zend Server Community Edition Reference Manual About Zend Server Community Edition includes a tested and certified version of PHP and a set of tools to set up and optimize your environment These tools are presented in an improved Administration Interface designed to provide all the tools and technology necessary to support PHP environments Special attention has been given to creating consistency across operating systems to ensure interoperability and facilitate the needs of diverse environments that use Linux and Windows and Mac operating systems The PHP versions are PHP 5 2 and PHP 5 3 which have been tested and optimized for development use Commonly used extensions and Zend Framework are included with the PHP to provide a one stop shop for all the resources that developers need to create PHP Web applications A complementary set of tools is provided with Zend Server Community Edition to optimize and extend your PHP capabilities The tools included in Zend Server Community Edition are described in detail in the Components Section Instructions on how to work with each component are provided in the Tasks section where each possible task is described in detail from start to end To get started with Zend Server Community Edition click here Installation Directories Not all users decide to install their software in the same location To reflect this actuality all paths in this document have been replaced
78. ae 5 Registering Zend Server Community Edition 6 SOUP Wiza EE EH 6 Upgrading from Zend Server Community Edition to Zend Gerver 10 SUPP OMS tesselen td veda oleate a de boned de evade 12 Ee Elei eeler CEET 12 EK nn EE 12 Zend Support Knowledge Base 12 Online DOCUMENTATION 0 2 ce eeeeeeececene cece aeeeeneeeeaeeecaaeeeeaaeeaaeeecaaeeeeaaesaaeesaeeecsaeseeaaessneeseaeeesaaeseeneesenees 12 Open a Support Ticket Only Available in Zend Gervert 12 Zend PHP Cu Ne EE 12 Zend Developer Zone Resource Center 13 OCOD ACK geet node te eegene Eege AE neben eege 13 n e 14 General Layout eg eege a ra ee EE ee Ee ee 14 MONITOR tab EE 14 Selver le tal EE 14 Administration tab E 14 Monitor Tab WEE 16 Dashboard EE 16 et EE 17 Gell ue DEEN 18 LOGS reves en E E i Re ee ee 19 Setup Tab EE 20 Gomponentss c0 uati a i i eia iaia a a aE aeae 20 STE 22 Bleu 24 Zend Server Community Edition Reference Manual DebUQGEN ege citrine E E sel diate act cit ege envi nerien 25 Administrator KC TTT 26 License and PaSSWOrd EE 26 Update Notifications s s Sinise hips divi eh Hien tienes he ete 30 Zend Controller racic be cetetsetet nee ege ath eae ae eee eee Leite ee Accent ee ed eevee eee 32 Adding the Zend Controller to the Start Menu System Trav Taekbar nees 32 Bag e Le 34 Eeleren E 34 RM Ee ul E E 35 TASKS EE 36 Working with Zend Server Community Edition 0 ccccceeeeeceeeeeeeeeeeeeeeeeeeeeceaeeeeaaeeeeeeeseaeeesaeeseeeeeeeees 36 Getting St
79. aeeesiaeeeeaeeseeeees 54 Working with Java BUITE asean renina KLEA EE Ein eNA ARRAT ATA EA POTAE IA AAL arae ELERE RENTAR in FUARA CREAT AIRA T eR RE ERAR 55 ele Ee 55 Table of Contents Testing the Bridge Connection cccccceeeeeceeeeeeeeeeeeaeeeeneeceeeeecaaeeeeaaeseeeeseaeeesaaesdeaeeseeeesiaeeesaeeseeeesaas 56 Before using the Java Bridge AT 57 Ree e EE 58 Working with Local Debugging eee eeeeeneeeeeenne ee eee ae ee eee ae ee ee ea nee e ee eaaeee etna ae ee ee taaeeeeeeaaeeeeeeaeeeeeeaeeeene 58 Working with the Debugger eecccceceecceceeeeeceeeeeeeceeeeeeeaeeeeaeaaeeeeasaaaeesaaaaeeesaaaaeeesseaaeeeseeeaeeeeneeaeenenes 58 Remote Debugging Through a Firewall c ccccecceeseeceeeeeeeeeeeeeaeeeeneeceeeeeseaeeesaaeseeeeeeeaeeesaeeneeeeseneeees 60 Working with Zend Controller cccccccccceeeeceeeeeeeeeeeaeeeeaeeseeeeeceaeeeeaaeegeeeeseeeeeseaeeeeaaeseeeeeseaeeesaeeseeeeeeeeess 61 lag E He 61 Using the Zend Controller Benchmark Tool 62 EE kee beer Eeer 64 Working with Data Cache seinan a a a a a a a a a a a aa riS 64 Disk Shared Memory Coaching 64 hamespace DEE seed See ee AE ee Abee Eege 66 Cache Folder Depth Configuration 0 cccccsceceecceceeeeeeeeeeeeeeeceeeeeeaaeeseneeseeeeeseaeessaaeseeeeeseaeeesaeeneeeeenaees 66 Data Cache Ltock On Expire merinin ANEN dE ene ea ee eat deeg 67 Eine e lu 68 Working with phpMyAdmin to Manage MySQL ccecececeeceeceeeeeeeeeeeeeeecaeeeeaaeese
80. aeeseeeesaeeesaaeeseneeeaas 68 Working with MySQL Server LINUX ccecceeeeeeeeeeeeeeeeeeeeeeceeeeeseaeeeeaaeseeeeceaeeesaaeedeaeeseeeesaeeseaaeeseneeeaas 69 Working with MySQL Server Mac OS 3 71 Working with MySQL Server Windows sense ceaeeesaaeedeaeeseaeeesaeeseaeeeeeeeeaas 73 Reference Informations isra rriti ee hep adie cede nat cede cea ened ee dee nee 74 Soa ea e ae AAT A EE E tege Eerad EE Seen dee Sebeardbalaetadbvbedeceteiedea tient erer 75 Zend E e e Le EE 76 Zend Bell EE 77 Zend Guard Loaders EE 78 Zend Data e en 79 Zend Java Ale irora nasri rna R teased TARA E EEE EEEE ARA 80 Zend Fr mew rk ietesouetiederSetestet ag gen RE ERA SAR ANSERA a AEE EE terested Eden DEER Eege E ETE 82 zend Reeg EE 84 Adding Extensions 22s sc aeieea EATA RIN ARAE ahaa eatin aiid di tidal iia 85 Adding Extensions for WindOWS cccscccceeeenneeeeeecne ee eee aeeeeeeaaeeeeeeaaeeeeeeaaeeeeeeaaeeeeesaaeeeeeeaeeeeneaeeeene 86 Compiling BEE 87 UNIX Compiling PHP Extensions cccccccceceeeeeeeneeeeeeeceeeeeceaeeeeeaeceeneeseaeeeceaeseeaaeseeneeseaeeesaeeseaaeseeneeseas 90 IC LEE 90 Scenario 1 Compile a PECL extension Called Newt 91 Scenario 2 Compile a PHP extension included in the main PHP source called PSpell 06 96 Loading the mod sel MOCUIe cceecccceeeecceeeeeeceeeeeseceeeesaeaeeesaeaaeeeesaaaaeeseeaaeesageaeeeseeaeeeseseaeeeseeeaeenenes 98 Zend Server Community Edition Reference Manual Java Bridge
81. agerLicenseInfo gt lt status gt notRequired lt status gt lt orderNumber gt lt validUntil gt lt serverLimit gt 0 lt serverLimit gt lt managerLicenseInfo gt lt systemInfo gt lt responseData gt lt zendServerAPIResponse gt Important Note For Zend Server or Zend Server Cluster Manager on Mac or Linux this action is also available via the command line using CLI Tools For more information see CLI Tools 209 Zend Server Community Edition Reference Manual The clusterGetServerStatus Method Use this method to get the list of servers in the cluster and the status of each one On a Zend Server Cluster Manager with no valid license this operation fails This operation causes Zend Server Cluster Manager to check the status of servers and return fresh non cached information This is different from the Servers List tab in the GUI which may present cached information Users interested in reducing load by caching this information should do it in their own code Required Permissions read HTTP method GET Supported by Editions Zend Server Cluster Manager Request Parameters servers Array No A list of server IDs If specified the status is returned for these servers only If not specified the status of all the servers is returned Expected Response Code 200 OK Response Type serversList Possible Action Specific Error Codes HTTP Error Code Description Code 404 noSuchServer One or more of t
82. ails zend_loader enable If you do not plan to use the Zend Guard Loader to load encoded files you can slightly improve performance by adding the zend_loader enable 0 lt br gt This disables the transparent auto loading mechanism that is built into the Zend Guard Loader Type boolean Default Value 1 Available since version 4 0 zend_loader disable_licensing If you do not need to use any licensing features you can disable the Zend Guard Loader license request Setting this option lowers Guard Loader memory usage and slightly enhances performance Type boolean Default Value 0 Available since version 4 0 zend_loader obfuscation_level_support The Obfuscation level supported by Zend Guard Loader The levels are detailed in the official Zend Guard Documentation 0 no obfuscation is enabled lt br gt Type integer Default Value 3 Available since version 4 0 zend_loader license_path Path to where licensed Zend products should look for the product license For more information on how to create a license file see the Zend Guard User Guide Type string Available since version 4 0 123 Zend Server Community Edition Reference Manual Zend Guard Loader PHP API Table of Contents 124 e Zend Guard Loader functions O zend loader enabled Checks the Zend Optimizer configuration to verify that it is configured to load encoded files zend loader file encoded Returns TRUE if the current file was encoded wi
83. ak the variables as necessary The recommended Zend default is Maxinstances 10 and InstanceMaxRequests 10000 Depending on which settings you change the Web server s memory and CPU consumption are adjusted 302 Index Configuring IIS Timeouts The following instructions are intended for running Zend Server with PHP FastCGI on Windows Issue The default timeout settings for FastCGI may cause runtime failures for scripts that run longer than 30 seconds Resolution If you Know that you have scripts that run more than 30 seconds set your FastCgi and PHP to a longer script timeout duration FastCgi Settings This procedure describes how to change your FastCgi timeout settings according to webserver type and version Apache 32bit Open C Program Files Zend ZendServer etc and in ZendEnablerConf xml the defaults should be changed to lt Timeouts connectionTimeout lt Number of Seconds gt requestTimeout lt Number of Seconds gt gt Apache 64bit Open C Program Files x86 Zend ZendServer etc and in ZendEnablerConf xml the defaults should be changed to lt Timeouts connectionTimeout lt Number of Seconds gt requestTimeout lt Number of Seconds gt gt IS In applicationHost config locate the following lt fastCgi gt lt application fullPath C Program Files x86 Zend ZendServer bin php cgi exe maxInstances 10 instanceMaxRequests 10000 gt lt environmentVariables gt lt environmentVariable name
84. ange Define which clients know zend debugger expose remotely integer PHP_INI_SYSTEM that the Zend Debugger is installed lt br gt 0 Never The 108 zend debugger passive mode timeout integer PHP_INI_ALL zend debugger xdebug compatible coverage boolean PHP_INI_ALL zend debugger use fast timestamp boolean PHP_INI_ALL Web API Reference Guide presence of the Zend Debugger is not detected by other clients lt br gt 1 Always All clients can detect the Zend Debugger lt br gt 2 Allowed Hosts Only clients listed in zend_debugger allow_hosts can detect the Zend Debugger lt br gt Any other value makes the Zend Debugger undetectable same as Never The Debugger s timeout period in seconds to wait for a response from the client Zend Studio Directive in order to mock up xdebug coverage Enables fast time sampling which is dependent on CPU cycles and frequency otherwise the directive uses operating system timing which may be less accurate 109 Zend Server Community Edition Reference Manual Configuration Directive Details zend_debugger allow_hosts Specifies the hosts that are allowed to connect hostmask list with Zend Debugger when running a remote debug session with Zend Studio Type string Default Value 127 0 0 1 32 10 0 0 0 8 192 168 0 0 16 172 16 0 0 12 Available since version 3 6 zend_debugger deny_hosts Specifies the hosts that are not allowed to connect hostmask list with
85. arted with Zend Server Community Eition cccccccceeeeseeeeeeeeceeeeeaeeeeneeseeeeesaeeeeaeeeeeeeeaas 38 What to do After Installing Zend Server Community Edition ccccceceeeeeeeeeeeeeeeeeeeeseaeeeeeeeeeeeeeeaas 38 Configuring Zend Server Community Edition 0 cccceeeesceceeeeeeeneeeeeeeceeeeeceaeeeeaaeseeeeeseeeeeseaeeseaeseeeeeeaas 42 Restart PAP Message 2 usdeee tee VEER ENEE ee ec en ce 43 Working with Gut Ee EE 44 Changing Extension Status ue nii dE ee a en ite Bide ee 44 Configuring Directives Associated with Extensions seesseesseessesssresrrstrnsttnernsrrnssrnssrnssrnssrnssrnnsnns 45 Working WiN Loge dd ed ieee i A ae eee ee eeh 46 View a LOG tepals eel ei doe eile einai oe eit i Coe nies 46 Filter Log Information i e ce Menta icin ee ed ais ed el Meco ed eda nee cea 46 Navigate Inside TEOG MEET 46 Activate RE 47 Advanced Add logs to the list of logs in the Log View let 47 Working with Components aa eenn aaa raaa aa aaa aa che dd a a Anaa a ae dr ai 48 EI ellule Bei ell e 48 Configuring Directives Associated with Components sessseesseessesssrtssrtesnnsttnetenstnsrnsrnnsrnnsrnssrnssnne 48 ele 49 Adding E elle eu 49 Working wiih lee 50 Working With Elle ET 51 When not to Use Optimizer Dlacklen nnn nnnn 51 Blackhsting EE 52 Optimizer Duplicate Functions Ei 53 Working with Zend Guard Loader ccceeceeceeceeeeeeeeeeeaeeeeeeeeceaeeeeaaeeseeeeseeeeeseaeeeeaaeseeeeese
86. at lt install_path gt mysql tmp mysql sock Starting and Stopping Generally zendctl sh is used to start and stopZend Server Community Edition modules To start and stop the MySQL server use lt install_path gt bin zendctl sh stop mysql lt install_path gt bin zendctl sh start mysq Password Default user is zend and password is left blank Change the password either at the config file my cnf or using the phpMyAdmin interface To access the phpMyAdmin interface go to the Dashboard and follow the Open phpMyAdmin link phpMyAdmin Note phpMyAdmin access is by default allowed only from the localhost To open phpMyAdmin interface to remote user comment out the following lines from gui lighttpd etc lighttpd conf 138 HTTP remoteip 127 0 0 1 139 HTTP url phpmyadmin 140 url access deny 141 server errorfile prefix usr local zend gui lighttpd share lighttpd custom errors errorcode 71 Zend Server Community Edition Reference Manual 142 143 72 Zend Server Reference Manual Working with MySQL Server Windows If you already have phpMyAdmin When you install Zend Server Community Edition you can use the custom installation type and choose not to install phpMyAdmin If you decide to install phpMyAdmin a separate version is installed and the existing phpMyAdmin configurations are retained The default location is lt install_dir gt phpMyAdmin The default authentication
87. ation includes two functions place_order receiving two numbers client ID and the item ID to add to shopping cart get cart receiving one number client ID and returning the list of the items placed in the shopping cart so far After script execution the referenced class may be disposed 103 Zend Server Community Edition Reference Manual Info Messages Zend Server Community Edition displays different types of messages that are color coded according to their level of severity The following list describes the four different options and what each color means Error Messages Messages that are Red indicate that some kind of system error has occurred If you receive message like this follow the instructions in the message This is an error message The recommended actions are Follow the instructions in the message If the message appeared after an action was performed try to redo the last action such as to click Save Add etc Visit the Support Center http www zend com en support center Open a Support Ticket Support Reinstall Zend Server Community Edition Choosing Which Distribution to Install Notices Messages that are Yellow indicate that a non critical error occurred If you receive a message like this it will contain information on how to proceed This type of error includes messages to the user about usability issues e A This is a warning message with a click here link inside
88. b API Reference Guide The codetracingEnable Method Enable code tracing component and two directives necessary for creating tracing dumps Limitations This action requires php 5 3 and will not operate on previous php versions Required Permissions full HTTP method POST Supported by Editions Zend Server Zend Server Cluster Manager Request Parameters Parameter Description Been Integer ii a php restart as part of applying the new settings defaults to true Expected Response Code 200 OK 202 Accepted For more information see Response Format Response Format The new code tracing directive s state Possible Action Specific Error Codes HTTP Error Code Description Code internalServerError The code tracing action failed i Example Request Post ZendServerManager Api codetracingEnable Response lt xml version 1 0 encoding UTF 8 gt lt zendServerAPIResponse xmlns http www zend com server api 1 1 gt lt requestData gt lt apikKeyName gt lt CDATA Admin gt lt apikKeyName gt lt met hod gt codet racingEnable lt met hod gt lt requestData gt lt responseData gt lt codeTracingStatus gt lt componentStatus gt Active lt component Status gt 233 Zend Server Community Edition Reference Manual lt alwaysDump gt On lt alwaysDump gt lt traceEnabled gt On lt traceEnabled gt lt awaitsRestart gt 0 lt awaitsRestart gt lt codeTracingStatus gt lt responseDa
89. b retry timeout Type Description A database connection string in PDO like format An address of TCP or UNIX socket to listen string for requests from clients and management GUI The maximum number of HTTP based jobs integer which can be executed simultaneously by single back end server The maximum time in days a completed failed or removed job is kept in database The maximum time in days a failed job is integer kept in database If it is not set the history value is used Number of second while daemon keeps inactive connection from client Number of second while daemon is trying to read request from client Number of seconds while daemon is trying to deliver response to client Number of seconds while daemon trying to establish a connection with back end server Number of seconds while URL based job must complete The minimal number of milliseconds between job startups integer Number of retries in case of HTTP job failure The number of seconds between retries of failed HTTP jobs Report an event when the Job Queue Daemon reaches a margin between the string integer integer integer integer integer integer integer integer zend_ jobq high concurrency margin allowed integer E e E concurrence H I number of running jobs and the maximum zend jobqueue job time skew allowed zend jobqueue max message size zend jobqueue log verbosity level zend jobqueue log rotation size zend jobqueue global directi
90. before continuing NOTE Other extensions will have other dependencies For example the Mcrypt extension will require the Mcrypt development package NOTE Since PECL will attempt to write the extension onto usr local zend lib php_extensions you will have to become a super user to perform this procedure This is only needed for the actual make install E To compile your own extension 1 Assuming you have the Newt development package installed run usr local zend bin pecl install newt The truncated output of this command along with explanations PECL retrieves the package from the repository downloading newt 1 2 1 tgz Starting to download newt 1 2 1 tgz 24 853 bytes EE done 24 853 bytes 5 source files building PUNE pPhpize corlor LS Exacte SE running phpize EE PHP Api Version 20041225 Zend Module Api No 20060613 Zend Extension Api No Ze OOO Ooo building in var tmp pear build root newt 1 2 1 91 Zend Server Community Edition Reference Manual 92 Configure comes into play running tmp pear download newt 1 2 1 configure checking for grep that handles long lines and e bin grep checking for egrep bin grep E checking for a sed that does not EE HEEN e DiMA SOC Checking IOI En e GCC Checking ror C compiler default output file name a out checking whether the C compiler works yes checking whether we are cross compiling no checking for suffix of executables GE Leer iO EE
91. bject that can be serialized ttl Time to live in seconds The Data Cache keeps an object in the cache as long as the TTL is not expired Once the TTL is expired the object is removed from the cache The default value is 0 Return Value FALSE if cache storing fails TRUE otherwise zend_disk_cache_store Stores a variable identified by a key into the cache If a namespace is provided the key is stored under that namespace Identical keys can exist under different namespaces Available since version 4 0 Description boolean zend_disk_cache_store string Skey mixed Svalue int Sttl 0 l 134 Web API Reference Guide Parameters key The data key Optional prefix with a namespace value Any PHP object that can be serialized ttl Time to live in seconds The Data Cache keeps objects in the cache as long as the TTL is not expired Once the TTL is expired the object is removed from the cache The default value is 0 Return Value FALSE if cache storing fails TRUE otherwise zend_shm_cache_fetch Fetches data from the cache The key can be prefixed with a namespace to indicate searching within the specified namespace only If a namespace is not provided the Data Cache searches for the key in the global namespace Available since version 4 0 Description mixed zend_shm_cache_fetch mixed Skey Parameters key The data key or an array of data keys Optional for key s name prefix with a namespace Return Va
92. ble for Zend Studio for Eclipse and the Apache bundled with Zend Server A similar procedure with some modifications can apply for other IDEs and web servers B To configure Zend Server to run a Zend Framework application 1 Create a new Zend Framework project If you have not already done so create a new Zend Framework project using the New Zend Framework Wizard in Zend Studio for Eclipse 2 Define a virtual host on Zend Server that will point to the new project s public directory a Find the full path to your project s public directory In Zend Studio for Eclipse go to the project browser and right click on the public directory from the menu choose Properties The full path is listed in the Resource Tab s location field b Open your Apache configuration file in most cases it will be httpd conf and located in your Apache installation directory Where is my Apache configuration file c Go to the end of the file and add the following section Listen 10089 lt VirtualHost 10089 gt DocumentRoot DOCUMENT_ROOT lt Directory DOCUMENT_ROOT gt Order allow deny Allow from all AllowOverride all lt Directory gt 293 Zend Server Community Edition Reference Manual lt VirtualHost gt 3 Replace DOCUMENT_ROOT with the full path to the public directory enclosed in double quotes DOCUMENT_ROOT Replace the port number with a unique port number dedicated to this Virtual Host The port number 10089 has to be the sam
93. bosity level Level 1 includes very important information messages errors and warnings Level 2 displays notices Greater levels up to 5 are reserved for debug purposes Type integer Default Value 2 Available since version 4 0 zend_datacache log_rotation_size The maximum size of the log file before it is rotated Type integer Units MBytes Default Value 10 Available since version 4 0 zend_datacache lock_on_expire Enables the lock on expire mechanism Type boolean Default Value 1 Available since version 4 0 132 Web API Reference Guide Zend Data Cache PHP API Table of Contents e Zend Data Cache functions o zend shm cache store Stores a variable identified by key into the cache If a namespace is provided the key is stored under that namespace Identical keys can exist under different namespaces o zend disk cache store Stores a variable identified by a key into the cache If a namespace is provided the key is stored under that namespace Identical keys can exist under different namespaces o zend shm cache fetch Fetches data from the cache The key can be prefixed with a namespace to indicate searching within the specified namespace only If a namespace is not provided the Data Cache searches for the key in the global namespace o zend disk cache fetch Fetches data from the cache The key can be prefixed with a namespace to indicate searching within the specified namespace only If a namespace is n
94. by searching for zend_optimizerplus dups_fix 53 Zend Server Community Edition Reference Manual Working with Zend Guard Loader The Zend Guard Loader is a PHP extension that is used to run code that was encoded or obfuscated using Zend Guard If you chose to install this component it is set to run by default out of the box To locate your installation package and verify if the component was installed by default or needs to be installed see the Installation Guide Choosing Which Distribution to Install PHP code that was either encoded or obfuscated using the Zend Guard or which is license restricted will only work if the Zend Guard Loader component is set to On The Zend Guard Loader component can be set to On or Off from Server Setup Components If you do not require the Zend Guard component for optimal performance either do not install it or set this component to Off 54 Zend Server Reference Manual Working with Java Bridge The Java Bridge is only active when the Java Bridge component is installed and activated see the Installation Guide The component s status and settings can be viewed and configured in the Administration Interface from Server Setup Components The Java Bridge requires that you have Sun Microsystems JRE 1 4 or later or IBM Java 1 4 2 or later installed on your computer During or after installing depending on the installation type you are prompted to direct the installer to the
95. ce slowdowns Zend Server can monitor your application in production alert you to performance Q issues or errors and provide you with diagnostic information for rapid root cause determination This feature is available only in the commercial version of Zend Server When not to Use Optimizer Blacklist There are some instances where it is preferable not to store PHP byte code for certain PHP files To do so you can make a list a blacklist of file names that you want the Optimizer to ignore or increase the Optimizer resource allocation Files and directives should be blacklisted under the following conditions Directories that contain files that are larger than the allocated memory defined in zend_optimizerplus memory_consumption or contain more files than the allocated quantity of files as defined in zend_optimizerplus max_accelerated _files Large files that have high memory consumption If you have exhausted all your allocated memory select the largest and slowest scripts blacklist them Files that have long execution times makes the compilation save irrelevant Code that is modified on the fly e g auto generated template files 51 Zend Server Community Edition Reference Manual Increasing Optimizer Resource Allocation The following procedure describes how to change Optimizer resource allocation This procedure is used as an alternative to blacklisting files and should be tried first before adding a
96. chServer GE or more of the provided server IDs does not exist In this case no servers are restarted restartFailed Restarting at least some of the servers failed This response is only possible when working with a cluster Example Request headers removed for clarity POST ZendServerManager Api restartPhp servers 5B0 5D l servers 5B1 5D 2 Response HTTP 1 0 202 Accepted lt xml version 1 0 encoding UTF 8 gt 222 Web API Reference Guide lt zendServerAPTIResponse xmlns http www zend com server api 1 0 gt lt requestData gt lt apikKeyName gt angel eyes lt apikKeyName gt lt method gt restartPhp lt method gt lt requestData gt lt responseData gt lt serversList gt lt serveriInfo gt ciciel Leo lt name gt www 01 lt name gt lt address gt https www 01 local 10082 ZendServer lt address gt lt status gt restarting lt status gt lt messageList gt lt serverInfo gt lt serverInfo gt lt id gt 2 lt id gt lt name gt www 02 lt name gt lt address gt https www 02 1local 10082 ZendServer lt address gt lt status gt restarting lt status gt lt messageList gt lt serverInfo gt lt serverinfo gt lt id gt 3 lt id gt lt name gt www 03 lt name gt lt address gt https www 03 local 10082 ZendServer lt address gt lt status gt OK lt status gt lt messageList gt lt serverInfo gt lt serversList gt lt responseData gt lt zendServerAPTIR
97. ciative array with properties of the job with the given id from the daemon database Available since version 5 0 Description array ZendJobQueue getJobInfo int Sjob_id Parameters job_id a job identifier Return Value array of job details The following properties are provided some of them don t have to always be set id The job identifier type The job type See TYPE_ constants status The job status see STATUS _ constants priority The job priority see PRIORITY_ constants persistent The persistence flag script The URL or SHELL script name predecessor The job predecessor name The job name vars The input variables or arguments http_headers The additional HTTP headers for HTTP jobs output The output of the job error The error output of the job creation_time The time when the job was created start_time The time when the job was started end_time The time when the job was finished schedule The CRON like schedule command schedule_time The time when the job execution was scheduled app_id The application name 157 Zend Server Community Edition Reference Manual ZendjJobQueue getDependentJobs Returns a list of associative arrays with the properties of the jobs which depend on the job with the given identifier Available since version 5 0 Description array ZendJobQueue getDependentJobs int S job_id Parameters job_id A job identifier Return Va
98. ck the Restart PHP button The changes will be applied to php ini file on which Zend Server is running The Restart PHP message appears whenever a change is made to setting in your clusters php ini file In order to apply the settings go to Cluster Setup Servers select the nodes to be restarted and click Restart Selected or Restart All to reset the PHP in all nodes The changes will be applied to the php ini files on your selected node s that are associated with this cluster 43 Zend Server Community Edition Reference Manual Working with Extensions The Extensions page provides a convenient way to view and configure PHP extensions Use this page to control and configure the extensions that are loaded in your environment Changing Extension Status J To change an extension s status 1 Go to Server Setup Extensions 2 Select an extension In the actions column click Turn off or Turn on Built in extensions do not have the Turn on or Turn off option After changing an extension s status a message appears to prompt you to click the Restart PHP Restart Server button at the bottom of the screen ence You can turn more than one extension on or off before you click Restart Server All the changes that are made prior to restarting the server are applied after the restart f you navigate to other tabs the changes you make are saved and applied when the server is restarted Changes are updated in the Se
99. class JavaException Methods public object getCause void Class Methods JavaException getCause Get the Java exception that led to this exception Available since version 3 6 Description public object JavaException getCause void Return Value A Java exception object if there was an exception NULL otherwise 144 Web API Reference Guide Zend Page Cache PHP API Table of Contents e Zend Page Cache functions o page cache disable caching Disables output caching for the current request This overrides any caching settings that are configured for the current request o page cache disable compression Does not allow the cache to perform compression on the output of the current request This overrides any compression settings that are configured for this request o page cache remove cached contents Clears cached contents for all requests that match a specific URL or regular expression o page cache remove all cached contents Clears all cached contents PHP Functions page_cache_disable_caching Disables output caching for the current request This overrides any caching settings that are configured for the current request Available since version 4 0 Description void page_cache_disable_caching void page_cache_disable_compression Does not allow the cache to perform compression on the output of the current request This overrides any compression settings that are configured for this request
100. config enable shared Some extensions will need additional configuration flags It is therefore advised to run configure help and review the possible flags before compiling Compile and install the extension binaries by running the following commands make make install Make install should install the new so extension binary in Zend Server Community Edition s extension directory 5 Add the following line to your php ini to load your new extension Zend Server Reference Manual xtension lt my_extension_name gt so Replace lt my_extension_name gt with your extension s binary name 6 Restart your Web server 7 Ensure that the extension is properly loaded by checking the output of PHP Info This can be viewed in the Zend Server Community Edition PHP Info page The extension appears in your Administration Interface under the Extensions page and you can use the Administration Interface to load and unload the extension 89 Zend Server Community Edition Reference Manual UNIX Compiling PHP Extensions This procedure describes how to compile a PHP extension Zend Server Community Edition includes over 77 extensions however there still may be a PHP extension that you want to compile by yourself Requirements PHP Tools e PECL PHP Extension Community Library PECL is a repository for PHP extensions providing a directory of all known extensions and hosting facilities for download and development of PHP e
101. d Server Cluster Manager is not licensed Example Request headers removed for clarity POST ZendServerManager Api clusterRemoveServer serverId 5 Response HTTP 1 0 202 Accepted lt xml version 1 0 encoding UTF 8 gt lt zendServerAPTIResponse xmlns http www zend com server api 1 0 gt lt requestData gt lt apikKeyName gt angel eyes lt apikeyName gt lt method gt clusterRemoveServer lt method gt lt requestData gt lt responseData gt lt serveriInfo gt lt 1 a lt ie lt name gt www 02 lt name gt lt address gt https www 02 1local 10082 ZendServer lt address gt lt status gt shuttingDown lt status gt lt messageList gt lt serveriInfo gt lt responseData gt lt zendServerAPIResponse gt Important Note For Zend Server or Zend Server Cluster Manager on Mac or Linux this action is also available via the command line using CLI Tools For more information see CLI Tools 215 Zend Server Community Edition Reference Manual The clusterDisableServer Method This method disables a cluster member This process may be asynchronous if Session Clustering is used If this is the case the initial operation returns an HTTP 202 response As long as the server is not fully disabled further calls to this method are idempotent On a Zend Server Cluster Manager with no valid license this operation fails Required Permissions full HTTP method POST Supported by Editions Zend
102. d User License Agreement this Agreement is a legal contract between you as either an individual or a single business entity and Zend Technologies Ltd and its affiliates Zend READ THE TERMS AND CONDITIONS OF THIS AGREEMENT CAREFULLY BEFORE DOWNLOADING OR INSTALLING ZEND S PROPRIETARY SOFTWARE THE SOFTWARE OR OBTAINING ALICENSE KEY TO THE SOFTWARE OR USING THE SOFTWARE THE SOFTWARE IS FURTHER DEFINED IN AN ORDER DOCUMENT AN ORDER ENTERED INTO BETWEEN YOU AND ZEND OR YOU AND AZEND RESELLER WHICH SETS FORTH COMMERCIAL TERMS APPLICABLE TO YOUR PURCHASE OF THE have read and agree to the end user license agreementterms Zend Server Reference Manual 2 Read and accept the agreement on the License Agreement page and click Next The Set Password page is displayed server Step 2 of 3 Ger Password Enter Password Iessen Retype Password Iesse This password is required in order to access the Zend Server Administration Interface To further secure Zend Server please refer to the User Guide section on Securing the Administration Interface 3 Enter a password for Zend Server Community Edition Your password is used to log in to the Administration Interface either from the main login page accessed from your browser or from the Zend Controller Passwords must be between 4 20 characters long and can be changed at a later stage from within the product For more information see Password Ma
103. d in this page regardless of the specific method used Request Method URL and Headers Web API HTTP requests use HTTP GET for read only API calls and HTTP POST for all state changing API calls The request URL is different for each action and is in one of the following formats Zend Server Where ACTION is the action to perform e g disableServer http example com 10081 ZendServer Api lt ACTION gt Zend Server Cluster Manager Where ACTION is the action to perform e g disableServer http example com 10081 ZendServerManager Api lt ACTION gt All HTTP requests must include the following HTTP headers Date Contains the current date and time in the GMT time zone in the format specified by the HTTP RFC for date fields e g Wed 07 Jul 2010 17 10 55 GMT This value is used to verify the authenticity of the request and is expected to be in sync with the server time within 30 seconds User agent The user agent string is logged by the server and used for message authenticity verification It cannot be empty Host The HTTP host header is expected to be present and is used for message authenticity verification X Zend Signature The API key name and calculated request signature which is used to authenticate and validate the request See Authentication and Message Verification for additional information on calculating the signature In addition you should send the Accept HTTP request he
104. d to be either Ok If the server was restarted successfully or if a restart was not needed pendingRestart If the server was re configured but not restarted and doRestart was FALSE restarting If the server was re configured and is in the process of restarting Possible Action Specific Error Codes HTTP Error Code Description Code There is no server with the provided server ID 500 cantConnectT oServer Zend Server Cluster Manager is unable to ee oe invalidServerResponse An invalid or unexpected response from the server 503 temporarilyLocked The server cannot be re configured because it is currently in the middle of another operation e g being disabled 220 Web API Reference Guide 405 notImplementedByEdition The method cannot executed by this edition of Zend Server serverNotLicensed Zend Server Cluster Manager does not have a valid license 500 restartFailed Restarting the server failed Example Request headers removed for clarity POST ZendServerManager Api clusterReconfigureServer serverID 5 Response mer 0 200 OKs lt xml version 1 0 encoding UTF 8 gt lt zendServerAPTIResponse xmlns http www zend com server api 1 1 gt lt requestData gt lt apikKeyName gt angel eyes lt apikKeyName gt lt method gt clusterReconfigureServer lt met hod gt lt requestData gt lt responseData gt lt serveriInfo gt lt id gt 5 lt id gt lt name gt www 02
105. dJobQueue SORT_BY_PERSISTENCE Sort result set of getUobsList by job persistence flag ZendJobQueue SORT_BY_CREATION_TIME Sort result set of getUobsList by job creation time ZendJobQueue SORT_BY_SCHEDULE_TIME Sort result set of getUobsList by job schedule time ZendJobQueue SORT_BY_START_TIME Sort result set of getUobsList by job start time ZendJobQueue SORT_BY_END_ TIME Sort result set of getUobsList by job end time ZendJobQueue SORT_ASC Sort result set of getUobsList in direct order ZendJobQueue SORT_DESC Sort result set of getUobsList in reverse order ZendJobQueue 0K Constant to report completion status from the jobs using setCurrentJobStatus ZendJobQueue FAILED Constant to report completion status from the jobs using setCurrentJobStatus 152 Web API Reference Guide Class Methods ZendJobQueue __ construct Creates a ZendJobQueue object connected to a Job Queue daemon Available since version 5 0 Description void ZendJobQueue __ construct string Squeue Ji Parameters queue This can be one of 1 No value specified the default binding will be used 2 A named queue as defined in the named queues directive In such a case the client will connect to the binding specified by the directive and the application name used will be the value provided 3 A literal binding URL the URL will be used to connect to the daemon directly and no application name will be defined 4 If a str
106. dd logs to the list of logs in the Log View list It is possible to add and display other logs that are specific to your environment in the Log Tail page To add other logs requires that you view and access backend application files which in normal circumstances should not be changed For this reason we request that you perform this task only if you clearly understand the instructions If for some reason the system does not load or malfunctions please re install Zend Server Community Edition Power users may edit the XML file in gu application data logfiles xml to add as many logs as they may have B To add log files to the list 1 Open the file lt install_path gt gui application data logfiles xml 2 Add the name and location full path of the log files in the same format as the existing files and save 3 Restart your PHP 47 Zend Server Community Edition Reference Manual Working with Components The Components page provides a convenient way to view and configure the Zend Components installed in your environment Use this page to control and configure components loaded in your environment Changing Component Status E To change a component s status Te 2 3 Go to Server Setup Components Select a component and click the link in the Actions column to turn the component on or off After changing the component s status a message appears prompting you to click the Restart Server button at the bottom of th
107. e issue in your own words 307 Zend Server Community Edition Reference Manual To submit the information press CONTROL D Archive created at tmp zend_server_report_bug_123008052721 tar gz Windows The Support Tool software may be found in lt install_path gt bin SupportT ool exe 1 Open the Support Tool from Start menu Zend Server Support Tool Select a directory to generate the archive file to Desktop is default 3 Click Create A Zip file is created on the desktop of the current user The file is created with a time stamp including date and time 308 Index Supported Browsers For optimal stability and performance only run Zend Server on a supported browser from the Supported Browser List Supported Browser List The following table lists the browsers that run Zend Server Browser Version s Comments Microsoft Internet 7 0 and above Explorer Mozilla Firefox 8 5 and above Only for Mac OS X Google Chrome 8 0 and above Zend Server may run on other browsers but with unpredictable behavior 309 Zend Server Community Edition Reference Manual Log File Permissions When the message Log file usr local zend var log error log does not exist or missing read permissions appears it means that Zend Server does not have permissions to read the log file or the file does not exist If the file does exist you will need to provide the zend user permissions to access the directory containing the file and
108. e response body to provide additional method specific data or specific error messages HTTP Response Codes Zend Server Web API operations will return standard HTTP response codes in order to indicate overall success or failure In case of an error the HTTP status code may further indicate the nature of the problem and a specific error code contained in the response body will indicate the specific nature of the error The following HTTP response codes may be used 200 OK The operation has completed successfully 202 Accepted The operation was accepted and is being processed but is not complete yet 4xx HTTP status codes between 400 and 499 are used to designate a client side error For example a missing request parameter or an authentication error 5xx HTTP status codes between 500 and 599 are used to designate a server side error For example a temporary locking issue or an unexpected error in the server operation Additional information about HTTP response codes for error responses is available in Error Responses as well as in the documentation for each method HTTP Response Headers The following HTTP response headers will be included in API responses Content type Unless stated otherwise these will be application vnd zend serverapi xml version lt API version gt For more information about API versions see API Versioning Negotiation HTTP Response Body The Web API HTTP response body will alm
109. e screen More than one component can be loaded or unloaded before you click Restart Server All the changes made prior to restarting the PHP are applied when the server restarts Even if you navigate to other tabs the changes are kept and are applied when the server restarts Changes are updated in the Components page and in your php ini file Changes are also applied when you manually restart your Web Server Configuring Directives Associated with Components E To configure a directive associated with a component i 2 Go to Server Setup Components If the component has directives that can be configured a link appears in the directives column Clicking the link opens the Directives page with the relevant directives already filtered Configure the directive as required You can configure multiple directives before you save your changes Click the Save Changes SSE ution to save your changes To discard changes leave the screen without clicking Save Changes Changes will be updated in the Components page and in your php ini file the next time the server restarts Directives of both loaded and unloaded components can be configured through the Components page 48 Zend Server Reference Manual Actions Actions are additional activities that can be applied to a certain component when necessary The actions are as follows clear Clears all cached information Data Caching and Optimizer bytecode caching
110. e value for Listen and VirtualHost 4 Zend Framework s MVC implementation makes use of the Front Controller pattern You must therefore rewrite all incoming requests except those for static resources which your application need not handle to a single script that will initialize the FrontController and route the request If you re using mod_rewrite for the Apache web server create the file lt Project_Name gt public htaccess with the following contents public htaccess RewriteEngine On RewriteCond REQUEST_FILENAME s OR RewriteCond REQUEST_FILENAME 1 OR RewriteCond REQUEST_FILENAME d RewriteRule S NC L RewriteRule S index php NC L Some web servers may ignore htaccess files unless otherwise configured Make sure that your web server is configured to read the htaccess file in your public directory 5 Restart your Web server from the command line windows user can use the Apache Monitor tool Your Zend Framework projects will now be accessible from a browser through http localhost 10089 the port number 10089 should be replaced with the unique port you dedicated to this virtual host Where is My Apache Configuration File Apache uses a main configuration file for all its settings typically this file is called httpd conf or apache2 conf The location of this file varies depending on your installation Windows lt install_dir gt Apache2 2 conf httpd conf If you changed
111. ectives Zend Java Bridge PHP API The Java Exception Class 107 Zend Server Community Edition Reference Manual Zend Debugger Configuration Directives Configuration Directives Summary Modification Directive Type Scope Description Specifies the hosts that are allowed to connect zend debugger allow hosts string PHP_INI_SYSTEM EE zend Debugger when running a remote debug session with Zend Studio Specifies the hosts that are not allowed to connect zend debugger deny hosts string PHP_INI_SYSTEM UE eu NE Une aor Debugger when running a remote debug session with Zend Studio A list of hosts hostmask list that can use the machine on which Zend Server is installed to create a zend debugger allow_ tunnel string PHP_INI_SYSTEM communication tunnel for remote debgging with Zend Studio This is done to solve firewall connectivity limitations The maximum message size zend debugger max msg size integer PHP_INI_SYSTEM accepted by the Zend Debugger for protocol network messages The user ID of the httpd process that runs the Zend Debugger only for tunneling A range of ports that the zend debugger tunnel min port integer PHP_INI_SYSTEM Counter ie MeN Gielen use This defines the minimum value for the range A range of ports that the communication tunnel can zend debugger httpd_ uid integer PHP_INI_SYSTEM zend debugger tunnel_max_port integer PHP_INI_SYSTEM use This defines the maximum value for the r
112. ectives extensions may have For each third party extension you want to add make sure to go to the project s source site to check for additional information related to the extension Compiling Extensions 87 Zend Server Community Edition Reference Manual Under Unix Linux operating systems you can also create and compile your own extensions using the phpize command Disclaimer External extensions are not supported by Zend If you encounter a problem remove any additional extensions before contacting Zend Support Building PHP extensions from source requires basic UNIX skills as well as several build tools among others 88 An ANSI C compiler flex Version 2 5 4 bison Version 1 28 recommended 1 35 or 1 75 Any specific components or libraries required by the extension being built such as gd pdf libs etc To compile extensions from source L 2 Download and extract the extension s source Switch to the extension source directory by default located in lt install_path gt Zend ZendServer lib phpext and run the following commands cd lt your_extension_directory gt lt install_path gt bin phpize Ensure that you replace lt your_extension_directory gt with your extension directory s name Run the configure command to prepare the source for compilation You will need to include the php config and enable shared flags as follows configure with php config lt install_path gt bin php
113. eeeeesaeeeeeeeeeaeeesaaesecaaeseeeescaeeesaeeseneeeeaees 130 Configuration Directives Gummarm cesses eeeneeceeeeeeaaeeeeaaeeaeeeceaeeseaaesdeneeseaeeesaaeseeaeeeseneess 130 Configuration Directive Details ces a ara aee a aaa aaaea aa arata Aaaa aaa EA 131 Zend Dat Cache PHP AP BEE 133 EE 133 PHP FUNCIONS TT 134 Zend Java Bridge Configuration Directives cccccccceeesceceeeeeceeeeeeaeeeeeeeceaeeesaaeeeeaaeseeeeeseaeeseaeeneneeeeaees 138 Configuration Directives SUMMALY eee ce ee een etree eee tae eae eras eeae eee seeeeeeeeseeeseeesnaeesaeeseesneeenaeenaee 138 Configuration Directive Details 139 Zend Jdava Bridge PHP AF Vaikai deeg be pai AREER ean padi Ae RFA RITENA OR TaN aed A eee 140 EE 140 PHP BUNCHONS ctor anoint St A A oe ee Sn Gea 144 Table of Contents The Java Exception Class 144 Glass Ee tee EE 144 Class Methods n2 EE 144 Zend Page Cache PHP AP 145 Table Ee 145 PRIPFUNCHONS wes 5 2 Acti a a acta fae ae p eae ee ees We 145 Zend Job Queue PHP AP 147 EEN 147 The ZendJODQUEUE CIASS AA 149 Glass e tee 149 GlaSS E TE 151 GlaSS E ele EE 153 Zend Job Queue Daemon Configuration Directives ceccceceteeeeeeeeeeeeeeeeeeeceaeeeeeaeseeeeeseaeeeeeaeeseneeenaees 163 Configuration Directives Gummarm ssseesseessinesinssrrssiresirssiresitesitstttnttnastinstnatt tnnt nunt nn annn ntnn nenun nn nnn nnnn 163 Configuration Directive Details 164 WEB API REFERENCE GUIDE
114. em This parameter is case sensitive Expected Response Code 200 OK For more information see Response Format Response Format Response successful message or error message Possible Action Specific Error Codes HTTP Code Description S a The Ee issue does not exist Example Request GET ZendServerManager Api monitorlssueDetails issueld 1 Content type application x www form urlencoded Response lt xml version 1 0 encoding UTF 8 gt lt zendServerAPIResponse xmlns http www zend com server api 1 1 gt lt requestData gt lt apikKeyName gt lt CDATA Admin gt lt apikKeyName gt lt method gt monitorIssueDetails lt method gt lt requestData gt 255 Zend Server Community Edition Reference Manual lt responseData gt lt issueDetails gt lt issue gt lt Gil le e lt rule gt PHP Error lt rule gt lt count gt 1 lt count gt lt lastOccurance gt 123412341234 lt lastOccurance gt lt severity gt Warning lt severity gt lt status gt Open lt status gt lt generalDetails gt lt url gt http localhost test php lt url gt lt sourceFile gt var www test php lt sourceFile gt lt sourceLine gt 302 lt sourceLine gt lt function gt fopen lt function gt lt aggregationHint gt 123412341234 lt aggregatio nHint gt lt errorString gt Permission Denied lt errorString gt lt errorType gt E_WARNING lt errorType gt lt generalDetails gt lt routeDetails gt
115. en IIS is running Status for Windows Process Activation Service WAS Running Status for World Wide Web Publishing Service W3SVC Running amp 61664 installed Run a Test on Your Web Server Purpose To verify that the installed Web server is running properly Result The Hello World message is displayed in your browser This procedure describes how to run a test PHP script E To run a simple test script 1 Create a file called hello php 2 Enter the following code into the file lt php echo Hello World 2 gt The Hello World message is displayed when the code runs in a browser 1 Save the file in your Apache document root directory Only files in this directory are serviced by the Web server For information about the document root directory see Deploying Code with Zend Server 40 Zend Server Reference Manual 2 Open a browser and enter the following URL http localhost lt port number gt hello php Replace lt port number gt with the port you are using The default values are port 80 for Windows DEB and RPM and port 10088 for the other operating systems unless you manually changed the port assignment Your browser displays the Hello World message Configure Debugger Access Control Purpose To enable PHP debugging using Zend Studio and Zend Server Community Edition Result You are able to debug your PHP code and view the results in Zend Studio Before working with the Debugger configu
116. ence Guide zend_jobqueue history_failed The maximum time in days a failed job is kept in database If it is not set the history value is used Type integer Units days Available since version 5 0 zend_jobqueue client_keep_alive Number of second while daemon keeps inactive connection from client In case client doesn t send any request during this time daemon closes the client s connection default 3600 seconds 1 hour Type integer Default Value 3600 Available since version 5 0 zend_jobqueue client_read_timeout Number of second while daemon is trying to read request from client In case client doesn t respond in this time daemon closes the client s connection default 10 seconds Type integer Default Value 30 Available since version 5 0 zend_jobqueue client_write_timeout Number of seconds while daemon is trying to deliver response to client In case client doesn t respond in this time daemon closes the client s connection default 10 seconds Type integer Default Value 30 Available since version 5 0 zend_jobqueue connection_timeout Number of seconds while daemon trying to establish a connection with back end server Type integer Units seconds Default Value 30 Available since version 5 0 165 Zend Server Community Edition Reference Manual zend_jobqueue http_job_timeout Number of seconds while URL based job must complete After timeout expiration daemons drops the connection to bac
117. encoding UTF 8 gt lt zendServerAPIResponse xmlns http www zend com server api 1 0 gt lt requestData gt lt apikKeyName gt angel eyes lt apikeyName gt lt method gt clusterDisableServer lt method gt lt requestData gt lt responseData gt lt serveriInfo gt lt id gt 5 lt id gt lt name gt www 02 lt name gt lt address gt https www 02 local 10082 ZendServer lt address gt lt status gt disabled lt status gt lt messageList gt lt serveriInfo gt lt responseData gt lt zendServerAPIResponse gt Important Note For Zend Server or Zend Server Cluster Manager on Mac or Linux this action is also available via the command line using CLI Tools For more information see CLI Tools 217 Zend Server Community Edition Reference Manual The clusterEnableServer Method This method is used to re enable a cluster member This process may be asynchronous if Session Clustering is used If this is the case the initial operation will return an HTTP 202 response This action is idempotent and running it on an enabled server will result in a 200 OK response with no consequences On a Zend Server Cluster Manager with no valid license this operation fails Required Permissions full HTTP method POST Supported by Editions Zend Server Cluster Manager Request Parameters Expected Response Code 200 OK The server was enabled successfully This status appears if the server is not re joining the cl
118. equest identifier obtained from response cookie Expected Response Code 200 OK For more information see Response Format Response Format Response successful message or error message Possible Action Specific Error Codes This action has no specific error codes lt Example Request GET ZendServerManager Api monitorGetRequestSummary requestUid 3AFD7433445593C54177E2 A6BA60933B Response lt xml version 1 0 encoding UTF 8 gt lt zendServerAPIResponse xmlns http www zend com server api 1 1 gt lt requestData gt lt apikKeyName gt lt CDATA Admin gt lt apikKeyName gt lt method gt monitorGetRequest Summary lt method gt lt requestData gt lt responseData gt 246 Web API Reference Guide lt requestSummary gt lt eventsCount gt 1 lt eventsCount gt lt codeTracing gt 5 7002 1 lt codeTracing gt lt events gt lt event gt lt type gt PHP Error lt type gt Clerc MOI oo an lt description gt lt superGlobals gt lt get gt lt parameter gt lt name gt all lt name gt KWAIWeS gt 2606 lt value gt lt parameter gt lt parameter gt lt name gt php_warn lt name gt lt value gt 1 lt value gt lt parameter gt lt get gt lt post gt lt post gt lt cookie gt lt parameter gt lt name gt ZDEDebuggerPresent lt n ame gt SES ee lt value gt lt parameter gt 247 Zend Server Community Edition Reference Manual lt cookie gt lt se
119. er also has the added advantage of loading classes outside of Zend Framework B To use the Zend Loader 1 Load the Zend Loader utility class once in your script Require_once Zend Loader php 2 From now load each class using the class name Zend_Loader loadClass Zend_Class_Name 3 For example in order to load the Zend Http Client Zend_Loader loadClass Zend_Http_Client 2 Using require include calls Classes can also be called using the conventional require or include calls E To use require class 1 Enter a require command for the relevant file into your script Require File php 2 For example to require the Zend Http Client Class require Zend Http client php In order to see a full list of Zend Framework s components including more information on the functionality and use of the various components see http framework zend com manual 292 Index Configuring Zend Framework Configuring Zend Server to Run a Zend Framework Application The following procedure describes how to configure Zend Server to run Zend Framework projects in a development environment using port based virtual hosts The advantage of port based virtual hosts is in the ease of running several isolated applications on the same Web server This overall solution allows developers working on a Zend Framework project in Zend Studio to immediately test any code changes locally g The following procedure uses instructions suita
120. erence Guide Return Value A list of jobs with their details ZendJobQueue getApplications Returns an array of application names known by the daemon Available since version 5 0 Description array ZendJobQueue getApplications void Return Value A list of applications ZendJobQueue getSchedulingRules Returns an array of all the registered scheduled rules Each rule is represented by a nested associative array with the following properties id The scheduling rule identifier status The rule status see STATUS constants type The rule type see TYPE_ constants priority The priority of the jobs created by this rule persistent The persistence flag of the jobs created by this rule script The URL or script to run name The name of the jobs created by this rule vars The input variables or arguments http_headers The additional HTTP headers schedule The CRON like schedule command app_id The application name associated with this rule and created jobs last_run The last time the rule was run next_run The next time the rule will run Available since version 5 0 Description array ZendJobQueue getSchedulingRules void Return Value A list of scheduling rules 159 Zend Server Community Edition Reference Manual ZendJobQueue getSchedulingRule Returns an associative array with the properties of the scheduling rule identified by the given argument The list of the properties is t
121. esponse Type serversList with information about affected servers one server in Zend Server all cluster members in Zend Server Cluster Manager Possible Action Specific Error Codes HTTP Code Error Code Description importFailed Importing the configuration snapshot failed 409 systemMismatch The system type PHP version or Zend Server version from which the configuration snapshot was exported does not match the current system This error can be overridden if the ignoreSystemMismatch parameter is set to TRUE Example Request some headers removed for clarity POST ZendServerManager Api configurationImport Content type multipart form data boundary EE bla bla bla 227 Zend Server Community Edition Reference Manual Content disposition form data name ignoreSystemMismatch TRUE bla bla bla Content disposition form data name configFile filename mySavedConfig zcfg Content type application vnd zend serverconfig Lon cllimaxyy Caca LOLLOS o oo bla bla bla Response lt xml version 1 0 encoding UTF 8 gt lt zendServerAPIRespons xmlns http www zend com server api 1 0 gt lt requestData gt lt apikeyName gt angel eyes lt apikKeyName gt lt method gt configurationImport lt method gt lt requestData gt lt responseData gt lt serversList gt lt serveriInfo gt lt id gt 12 lt id gt lt name gt www 01 lt name gt lt address gt https www
122. esponse gt Important Note For Zend Server or Zend Server Cluster Manager on Mac or Linux this action is also available via the command line using CLI Tools For more information see CLI Tools 223 Zend Server Community Edition Reference Manual Configuration Management Methods The following is a list of the available methods used to manage your Zend Server or Zend Server Cluster Manager configuration e The configurationExport Method e The configurationimport Method 224 Web API Reference Guide The configurationExport Method Export the current server cluster configuration into a file Required Permissions read HTTP method GET Supported by Editions All Request Parameters This method has no request parameters Expected Response Code 200 OK Response Format A successful call to the configurationExport method results in an HTTP response with the configuration snapshot file in the response body The content type for the configuration snapshot file is application vnd zend serverconfig In addition the response includes a Content disposition header specifying a suggested file name for the configuration snapshot file This is different from most Web API calls where the content type is expected to be application vnd zend serverpi xml version and the response body payload is expected to be in XML format In case of an error a regular error response will be returned containing an lt errorData gt e
123. esponse representing an error the lt responseData gt XML section is replaced with the lt errorData gt XML section which has the following format lt errorData gt lt errorCode gt serverDoesNotExist lt errorCode gt lt errorMessage gt A server with the specified ID does not exist in the cluster lt errorMessage gt lt errorData gt Where lt errorCode gt is a short alphanumeric constant string that represents the specific error lt errorMessage gt is a human readable native language explanation of the error 175 Zend Server Community Edition Reference Manual In addition some error responses may include additional elements in the lt errorData gt container with additional information relevant to the specific error Generic Error Codes The following generic error responses are possible for any operation missingHttpHeader A required HTTP header is missing unexpectedHttpMethod An unexpected HTTP method where GET is used but POST is expected 400 400 invalidParameter One or more request parameters contains invalid data 4 01 01 01 mm malformedRequest The server is unable to understand the request authError An authentication error occurred because of an unknown key or invalid request signature 00 i 400 unknownMethod An unknown Zend Server API method 00 insufficientAccessLevel The user is not authorized to perform this action The request is missing a required parameter timeSkewErr
124. extensions usr local zend lib php_extensions 5 Insert the extension pspell so directive either in php ini or in a separate file under the scan dir 6 Restart your webserver 7 96 Zend Server Reference Manual Ensure the extension is properly loaded by checking the output of PHP Info This can be viewed in the Zend Server Community Edition PHP Info page The extension will now appear in your Administration Interface under Server Setup Extensions from which you can also load and unload the extension for more information see Working with Extensions Troubleshooting The configure script outputs messages as it goes along and many times you will be able to understand the problem just by looking at it however sometimes the error doesn t necessarily reflect the real issue so it is always a good idea to review the config log This is a very generic statement but no other statement can be made as there are many different extensions and issues one may come across so attempting to list them all will be somewhat futile 97 Zend Server Community Edition Reference Manual Loading the mod sel Module The mod_ssl module allows you to enable SSL support on your Apache web server and is needed to enable Apache for SSL requests https For more information on the mod sel module see the mod_ssl user manual at http www modssl org docs 2 8 The bundled Apache that comes with Zend Server Community Edition includes support for
125. file to a blacklist unless the file meets one of the criteria above Optimizer settings can be changed to increase allocated memory and the maximum quantity of files This alternative depends on the amount of memory available to allocate to the Accelerator Memory allocation can only be increased when the Optimizer is set to On E To increase the Optimizer memory allocation 1 Goto Server Setup Components and verify that the Zend Optimizer component is set to On 2 Click the Configure link in the directives column to display the list of Optimizer directives 3 Locate the directive zend_optimizerplus memory_consumption and increase the value according to your system s memory allocation abilities To increase the quantity of files 1 Goto Server Setup Components and verify that the Zend Optimizer component is set to On Click the Configure link in the directives column to display the list of Optimizer directives 3 Locate the directive zend_optimizerplus max_accelerated_files and increase the value according to your system s memory allocation abilities If the memory fills up quickly especially if there are only a few files increase the memory allocation or blacklist the file Files which exceed the allocated memory or file quantity are not accelerated Blacklisting Files If none of the alternatives described above are suitable or if the file meets one of the criteria for blacklisting a file use the followin
126. files that were dynamically loaded on demand Web API Reference Guide PHP Functions java Creates a Java object Available since version 3 6 Description object java string class name l Parameters class_name Class name to create Additional arguments are treated as constructor parameters Return Value The Java object that was created NULL otherwise java_last_exception_get Returns a Java exception object for the last exception that occurred in the script only the last exception is stored by the Java Bridge Available since version 3 6 Description object java_last_exception_get void Return Value Java exception object if there was an exception NULL otherwise java_last_exception_clear Clears the last Java exception object record from the Java Bridge storage Available since version 3 6 Description void java_last_exception_clear void 141 Zend Server Community Edition Reference Manual java_set_ignore_case Sets the case sensitivity for Java calls when there are mixed cases in your PHP script Available since version 3 6 Description void java_set_ignore_case boolean Signore Parameters ignore If set the Java attribute and method names are resolved regardless of case java_throw_exceptions Controls if exceptions are thrown on Java exception When an exception is thrown by a Java application this function controls if the exception caught by the PHP code will continue to be t
127. following development issues Working with Zend Framework This section explores the benefits of the Zend Framework pre configured stack that includes all the system components for developing Web applications with PHP and how to load Zend Framework s classes in your scripts Configuring Zend Framework This section presents the advantages of port based virtual hosts and describes how to configure Zend Server to run Zend Framework projects in a development environment using port based virtual hosts 291 Zend Server Community Edition Reference Manual Working with Zend Framework Zend Framework users who deploy Zend Server will benefit from a pre configured stack that includes all the system components for developing Web applications with PHP The Zend Framework files are placed in Windows lt install_path gt share ZendFramework RPM DEB lt install_path gt share ZendFramework Loading Zend Framework Classes There are two ways to load Zend Framework s classes in your script 1 Using the Zend Loader The Zend Loader utility class checks whether the class already exists within the script If it does it will create the relevant file from the class name using Zend Framework s naming convention See htto framework zend com manual en coding standard naming conventions htm for more information on Zend Framework s naming conventions If the class already exists this will soeed up performance Using the Zend Load
128. for parameters exposed to the script s environment 200 Web API Reference Guide superGlobals List of parameter elements grouped by source get post cookie session and server get List of Available GET parameters parameter elements post List of parameter elements Available POST parameters Available SESSION values session List of parameter elements server List of parameter elements Available SERVER environment parameters cookie List of 1 Available COOKIE values parameter elements 201 Zend Server Community Edition Reference Manual step List of backtrace entry properties Backtrace elements show up in a list of backtraces in which order is important Sequential numbering of the backtrace steps ee class String 1 Object class identifer fe String pt Feah e le ae Gg 202 Web API Reference Guide codeTracingStatus A list of indicators for code tracing activity and operations componentStatus String 1 Current activity status of the component Active Inactive alwaysDump Current always_dump directive value On Off traceEnables Current trace_enabled directive value On Off awaitsRestart String 1 If true ZendServer is waiting for a restart which may affect these settings 203 Zend Server Community Edition Reference Manual codeTrace A single Code trace file s set of properties pid ege ft Sequential numbering of the backtrace steps pul String
129. g procedure to create a blacklist file that contains the file names of the files you do not want to be byte code cached by Optimizer B To create a blacklist file 1 Create a txt file using a text editor 2 Write a list of the file names to blacklist e ignored by the Optimizer List each file name in a new line 3 In Server Setup Components verify that the Zend Optimizer component is set to On 52 Zend Server Reference Manual 4 Click the Configure link in the directives column to display the list of Optimizer directives 5 Locate the directive zend_optimizerplus blacklist_filename and specify the full path to the file location The files in the blacklist are now ignored by Optimizer Optimizer Duplicate Functions Fix In situations where certain functions were or were not defined some PHP code produces different opcodes depending on the circumstances This causes a discrepancy for the Optimizer in the situation where the Optimizer caches one version and a sequence of evenis arises that requires a different function If the discrepancy is not addressed the script stops working and raises a duplicate functions error To maintain proper performance in these and similar situations activate the zend_optimizerplus dups_fix parameter This parameter shuts down the Optimizer duplicate function check to prevent these errors from occurring This parameter can be defined in Server Setup Directives
130. gt On lt traceEnabled gt lt awaitsRestart gt 1 lt awaitsRestart gt lt codeTracingStatus gt lt responseData gt lt zendServerAPIResponse gt 242 Web API Reference Guide The codetracingDownloadTraceFile Method Download the amf file specified by the codetracing identifier Required Permissions Full HTTP method GET Supported Editions Zend Server Zend Server Cluster Manager Request parameters traceFile String Yes Trace file identifier Note that a codetracing identifier is provided as part of the monitorGetRequestSummary xml response Expected Response Code 200 OK For more information see Response Format Response Format A successful call to the monitorDownloadAmf method will result in an HTTP response with the amf file in the response body The content type for the amf file is application x amf In addition the response will include a Content disposition header specifying a suggested file name for the file This is different from most Web API calls where the content type is expected to be application vnd zend serverpi xml version and the response body payload is expected to be in XML format In case of error a regular error response will be returned containing an lt errorData gt element as defined for other Web API methods Possible Action Specific Error Codes HTTP Error Code Description Code The requested trace could not be found Example Request header
131. h converts basic Java objects to primitives e g java long Short to short lt br gt When set to 1 for the Java Bridge returns Java objects and does not convert them to primitives Type boolean Default Value 0 Available since version 4 0 139 Zend Server Community Edition Reference Manual Zend Java Bridge PHP API Table of Contents 140 e JavaException The JavaException class O JavaException getCause Get the Java exception that led to this exception e Zend Java Bridge functions O O java Creates a Java object java last exception get Returns a Java exception object for the last exception that occurred in the script only the last exception is stored by the Java Bridge java last exception clear Clears the last Java exception object record from the Java Bridge storage java_set ignore case Sets the case sensitivity for Java calls when there are mixed cases in your PHP script java throw exceptions Controls if exceptions are thrown on Java exception When an exception is thrown by a Java application this function controls if the exception caught by the PHP code will continue to be thrown or not if not it is stored in the Java Bridge s internal memory java_set_ encoding Sets encoding for strings received by Java from the PHP code to verify that the encoding is the same in the PHP and Java code java require Includes an additional CLASSPATH JAR in a PHP script context java_reload Reloads Jar
132. he lt errorData gt XML lt a Example lt xml version 1 0 encoding UTF 8 gt lt zendServerAPIRespons xmlns http www zend com server api 1 0 gt lt requestData gt lt apikeyName gt angel eyes lt apikKeyName gt lt method gt clusterGetServerStatus lt method gt lt requestData gt lt errorData gt lt errorCode gt unsupportedApiVersion lt errorCode gt lt errorMessage gt Client API version not supported by this server lt errorMessage gt lt supportedApiVersions gt application vnd zend serverapitxml version 1 0 application vnd zend serverapitxml version 1 1 application vnd zend serverapitxml version 2 0 lt supportedApiVersions gt lt errorData gt lt zendServerAPTIResponse gt 177 Zend Server Community Edition Reference Manual You can then choose to switch to a different API version or give up and issue a failure message to the end user The Accept request header while highly recommended is optional If you do not specify the Accept header the server will fall back to using the oldest API version supported by the server 178 Web API Reference Guide Authentication and Message Verification API request authentication is done by creating a digital signature of some request parameters using an account specific secret key This signature as well as the key name is then sent in the custom X Zend Signature HTTP header The server will compare th
133. he extension Adding Extensions for Windows 86 Zend Server Reference Manual The following procedure describes how to download compiled extensions for Wndows DLL files Windows Note When downloading extensions for Windows from PECL make sure to download the non thread safe NTS version ONLY E To download extensions 1 2 Go to http www php net downloads php In the Windows binaries section select PECL lt current ZendServer PHP version gt Non thread safe Win32 binaries 64 bit users can use this too Click the package to start a download process Follow the download instructions and extract the ZIP file Select the d you want To add the extension go to the extension directory lt install_path gt ZendServer lib phpext and add the dll file there Go to your php ini file and add the following line extension lt extension_name gt dll To verify that the extension was loaded properly go to Setup Extensions and locate the extension from the list When loading new extensions also examine the log files For more information on these extensions go to http pecl4win php net Note The extensions in this site are thread safe and therefore should not be downloaded for use with Zend Server Community Edition Some extensions need directives to change the Extension s default configurations These directives should be added added to your php ini file manually There is no way to predict which dir
134. he provided server IDs does not exist in the cluster 405 notImplementedByEdition This method is only available on Zend Server Cluster Manager serverNotLicensed Zend Server Cluster Manager is not licensed Example Request URI broken for readability GET ZendServerManager Api clusterGetServerStatus servers 5B0 5D 12 serverst5B1 5D 15 Response lt xml version 1 0 encoding UTF 8 gt lt zendServerAPIResponse xmlns http www zend com server api 1 0 gt 210 Web API Reference Guide lt requestData gt lt apikKeyName gt angel eyes lt apikKeyName gt lt method gt clusterGetServersStatus lt method gt lt requestData gt lt responseData gt lt serversList gt lt serverinfo gt lt id gt 12 lt id gt lt name gt www 01 lt name gt lt address gt https www 01 local 10082 ZendServer lt address gt lt status gt OK lt status gt lt messageList gt lt serverInfo gt lt serverinfo gt Sie SiISD lt iE gt lt name gt www 02 lt name gt lt address gt https www 02 local 10082 ZendServer lt address gt lt status gt pendingRestart lt status gt lt messageList gt lt warning gt This server is waiting a PHP restart lt warning gt lt messageList gt lt serveriInfo gt lt serversList gt lt responseData gt lt zendServerAPIResponse gt Important Note For Zend Server or Zend Server Cluster Manager on Mac or Linux this action is also available via the command
135. he same as in getSchedulingRule Available since version 5 0 Description array ZendJobQueue getSchedulingRule int Srule_id Parameters rule_id The rule identifier Return Value Information about the scheduling rule ZendJobQueue deleteSchedulingRule Deletes the scheduling rule identified by the given rule_id and scheduled jobs created by this rule Available since version 5 0 Description boolean ZendJobQueue deleteSchedulingRule int Srule_id Parameters rule_id The rule identifier Return Value If scheduling rule was deleted or not deleted ZendJobQueue suspendSchedulingRule Suspends the scheduling rule identified by given rule_id and deletes scheduled jobs created by this rule Available since version 5 0 Description boolean ZendJobQueue suspendSchedulingRule int Srule_id 160 Web API Reference Guide Parameters rule_id The rule identifier Return Value If scheduling rule was suspended or not suspended ZendJobQueue resumeSchedulingRule Resumes the scheduling rule identified by given rule_id and creates a corresponding scheduled job Available since version 5 0 Description boolean ZendJobQueue resumeSchedulingRule int Srule_id Parameters rule_id The rule identifier Return Value If the scheduling rule was resumed or not resumed ZendJobQueue updateSchedulingRule Updates and reschedules the existing scheduling rule Available since version 5 0 Descripti
136. his directive is disabled which means that optimization is active Type boolean Default Value 0 Available since version 4 0 zend_optimizerplus inherited_hack The Optimizer stores the places where DECLARE_CLASS opcodes use inheritance These are the only opcodes that can be executed by PHP but which may not be executed because the parent class is missing due to optimization When the file is loaded Optimizer tries to bind the inherited classes by using the current environment The problem with this scenario is that while the DECLARE_CLASS opcode may not be needed for the current script if the script requires that the opcode at least be defined it may not run The default for this directive is disabled which means that optimization is active Type boolean Default Value 1 Available since version 4 0 zend_optimizerplus dups_fix Enable this hack as a workaround for duplicate definition errors Type boolean Default Value 0 Available since version 4 0 zend_optimizerplus log_verbosity_level All Optimizer errors go to the Web server log lt br gt By default only fatal errors level 0 or errors level 1 are logged You can also enable warnings level 2 info messages level 3 or debug messesges level 4 lt br gt For debug binaries the default log verbosity level is 4 not 1 Type integer Default Value 1 Available since version 4 0 116 Web API Reference Guide zend_optimizerplus memory_consumptio
137. hrown or not if not it is stored in the Java Bridge s internal memory Available since version 3 6 Description void java_throw_exceptions int Sthrow Parameters throw If true a PHP exception is thrown when a Java exception happens If set to FALSE use java_last_exception_get to check for exceptions java_set_encoding Sets encoding for strings received by Java from the PHP code to verify that the encoding is the same in the PHP and Java code Available since version 3 6 Description void java_set_encoding string Sencoding UTF 8 Parameters encoding Default encoding type is UTF 8 The default value is UTF 8 142 Web API Reference Guide java_require Includes an additional CLASSPATH JAR in a PHP script context Available since version 3 6 Description void java_require string Spath Parameters path URL pointing to the location of the Jar file This function accepts the following protocols lt br gt https http file ftp lt br gt It can also be a local path E g ch java_reload Reloads Jar files that were dynamically loaded on demand Available since version 3 6 Description void java_reload string new_jarpath Parameters new_jarpath The path to the Jar files 143 Zend Server Community Edition Reference Manual The Java Exception Class JavaException is a PHP class that inherits from the default PHP5 class Exception Available since 3 6 Class Prototype
138. ide range of IP addresses to access your Web server Therefore we recommend that you limit accessibility and create a secure environment by only using specific hosts full IP address recognized by you that you are sure you want to permit to connect To change this value in the Administration Interface go to Server Setup Debugger remove all the IP range settings and set the specific IP s that you permit to connect to Zend Server Depending on if you are working on a development or production environment you may want to consider different defaults In development environments all the machines that require access to debug should be allowed In production environments it is safer to limit access or even allocate a single machine to allow access Not only will this make your environment more secure it may also help limit and prevent unnecessary traffic on your production server 285 Zend Server Community Edition Reference Manual Securing the Administration Interface Purpose To provide an additional security layer to the existing password protection especially crucial to production environments This solution does not replace the appropriate firewall precautions you should take to deny access to the Administration Interface from certain IP addresses By default access to the Administration Interface is password protected If you want to secure access to the Administration Interface you can do so by setting an IP address ba
139. ing url array vars mixed options array getJobStatus int job_id boolean removeJob int job_id boolean restartJob int job_id boolean isSuspended void static boolean issJobQueueDaemonRunning void void suspendQueue void void resumeQueue void array getStatistics void array getConfig void boolean reloadConfig void array getJobInfo int job_id array getDependentJobs int job_id array getJobsList array query int total array getApplications void array getSchedulingRules void array getSchedulingRule int Zrule Joh boolean deleteSchedulingRule int ru e_id boolean suspendSchedulingRule int ru e_id boolean resumeSchedulingRule int rule_id boolean updateSchedulingRule int ru e_id string script array vars array options static array getCurrentJobParams void 150 Web API Reference Guide static void setCurrentJobStatus int completion string msg Class Constants ZendJobQueue TYPE_HTTP A HTTP type of job with an absolute URL ZendJobQueue TYPE_HTTP_RELATIVE A HTTP type of job with a relative URL ZendJobQueue TYPE_SHELL A SHELL type of job ZendJobQueue PRIORITY_LOW A low priority job ZendJobQueue PRIORITY_NORMAL A normal priority job ZendJobQueue PRIORITY_HIGH A high priority job ZendJobQueue PRIORITY_URGENT An urgent priority job ZendJobQueue STATUS_PENDING The job is waiting to be processed ZendJobQueue STATUS_WAITING_PREDECESSOR The job is
140. ing PHP_INI_SYSTEM zend optimizerplus save comments boolean PHP_INI_SYSTEM zend_optimizerplus fast_ shutdown boolean PHP_INI_SYSTEM zend_optimizerplus optimization level integer PHP_INI_SYSTEM zend_optimizerplus enable_slow_optimizations boolean PHP_INI_SYSTEM is not being accessed The location of the Optimizer blacklist file If disabled all PHPDoc comments are dropped from the code to reduce the size of the optimized code If enabled a fast shutdown sequence is used for the accelerated code A bitmask where each bit enables or disables the appropriate Optimizer passes Enables or disables the optimization passes that may take significant time based on an internal runtime calculation External Configuration File Optimizer blacklist file The Optimizer blacklist file is a text file that holds the names of files that should not be accelerated The file format is to add each filename to a new line The filename may be a full path or just a file prefix i e var www x blacklists all the files and directories in var www that start with x Files are usually triggered by one of the following three reasons lt br gt 1 Directories that contain auto generated code like Smarty or ZFW cache lt br gt 2 Code that does not work well when accelerated due to some delayed compile time evaluation lt br gt 3 Code that triggers an Optimizer bug 114 Web API Reference Guide Configuration Directive Detai
141. ing is provided which does not match a binding URL format and has no alias defined for it an exception will be thrown The default value is taken from default_binding directive ZendJobQueue createHttpJob Creates a new URL based job to make the Job Queue Daemon call given script with given vars Available since version 5 0 Description int ZendJobQueue createHttpJob string url array Svars mixed Soptions Parameters url An absolute URL of the script to call vars An associative array of variables which will be passed to the script The total data size of this array should not be greater than the size defined in the zend_jobqueue max_message_size directive options An associative array of additional options The elements of this array can define job priority predecessor persistence optional name additional attributes of HTTP request as HTTP headers etc The following options are supported name Optional job name priority Job priority see corresponding constants predecessor Integer predecessor job id persistent Boolean keep in history forever schedule_time Time when job should be executed schedule CRON like scheduling command http_headers Array of additional HTTP headers 153 Zend Server Community Edition Reference Manual Return Value A job identifier which can be used to retrieve the job status ZendJobQueue getJobStatus Retrieves status of previously created job identified by
142. ini In the section called userServer set the URL to the new port number Change the port number for directive Listen 3 Restart Apache The different installation options set different Apache configuration file locations as follows DER Apache conf file etc apache2 apache2 conf RPM Apache conf file etc httpd conf httpd conf Mac Apache conf file usr local zend apache2 conf httpd conf IBM i Apache conf file usr local zendsvr apache2 conf httpd conf 311 Zend Server Community Edition Reference Manual Zend Controller Cannot Run Benchmark The following message may appear after you enter a URL into the Zend Controller s benchmark Page redirected to URL Duration sec www zend com DH un Ei gt Start si wo ken a a D 03 04 12 pm 03 04 22 pm This means that the URL that you entered is not the exact URL or is being redirected for some reason In order to run the test specify an exact URL or use the suggested address and click Start again 312 Index Zend Controller Cannot Login After installing Zend Server you try to run the Zend Controller and a message is displayed in the Zend Controller stating that it cannot log in Possible causes 1 You have not yet logged in to Zend Server for the first time and therefore your password has not been defined Log in to Zend Server and set your password 2 The password setting is incorrect Open the Zend Controller settings menu righ
143. ion Type drop down change the type to http Click Add to add the new server and fold the display A message stating that a new server was added is displayed 69 Zend Server Community Edition Reference Manual 5 Go to Configuration and click Save to create a configuration file 6 Take the configuration file and move it to lt Missing gt Your server has now been added and can be configured with phpMyAdmin Further information on using phpMyAdmin can be found in the online documentation at https localhost 10082 phpMyAdmin Documentation html To log in to your phpMyAdmin server you must use your existing MySQL server user name and password usually root for administrators 70 Zend Server Reference Manual Working with MySQL Server Mac OS X The Zend Server Community Edition Mac package includes MySQL and phpMyAdmin This enables the files to be installed seamlessly and to ensure a smooth configuration process Configuration Definitions File Locations mySQL binaries such as mysq reside in lt install_path gt mysql bin mySQL tables and database reside in lt install_path gt mysql data Configuration files in particular my cnf reside at lt install_ path gt mysql data Default Port and Socket Since by default the Skip networking option is enabled the MySQL server does not listen on a TCP IP port at all All interactions with mysqld must be made via Unix sockets The socket file resides
144. ion s repository gcc make autoconf automake and libtool Some of these tools depend on each other for instance the libtool package depends on the gcc package but no damage can be done from specifying all of them Users who utilize distributions that do not have package managers Linux from scratch anyone can compile these tools themselves or obtain pre compiled binaries for them quite easily 90 Zend Server Reference Manual Additionally you can compile a PHP extension from the main PHP source as opposed to PECL This requires installing a package from the Zend Server Community Edition repository called php 5 2 source zend server or php 5 3 source zend server depending on your Zend Server Community Edition s major PHP version This package includes full PHP sources as patched for security or optimization concerns by the Zend development team This ensures that you are using the exact same source code we used when building Zend Server Community Edition Scenario 1 Compile a PECL extension called Newt Newt is a PHP extension for RedHat s Newt New Terminal library a terminal based window and widget library for writing applications with user friendly interfaces Being what it is this extension requires the existence of the Newt library development files If you are using Debian or Ubuntu you should install a package called libnewt dev On RedHat based distributions the package name is newt devel Make sure these are installed
145. ion_name Obfuscate and return the given function name with the internal obfuscation function Available since version 4 0 Description string zend_obfuscate_function_name string function_name Parameters function_name Name of the function to obfuscate Return Value Returns the obfuscated form of the given string zend_current_obfuscation_level Returns the current obfuscation level support set by zend_optimizer obfuscation_level_ support to get information on the product that is currently running Available since version 4 0 Description int zend_current_obfuscation_level void Return Value Current obfuscation level zend_runtime_obfuscate Start runtime obfuscation support to allow limited mixing of obfuscated and un obfuscated code Available since version 4 0 Description boolean zend_runtime_obfuscate void Return Value TRUE if succeeds FALSE otherwise 127 Zend Server Community Edition Reference Manual zend_obfuscate_class name Obfuscate and return the given class name with the internal obfuscation function Available since version 4 0 Description string zend_obfuscate_class_name string class_name Parameters class_name Name of the class to obfuscate Return Value Returns the obfuscated form of the given string zend_get_id Returns an array of Zend host IDs in your system If all_ids is TRUE then all IDs are returned otherwise only IDs considered primary are returned A
146. ional resources and information on Lighttpd see https calomel org lighttpd html Windows There are a few precautions you can take in order to secure your connection Be secured using SSL connection a certificate is needed by 3rd party vendors to enable encryption between client and server All IIS versions 5 6 7 use this surf safe mode Use https connection which enables encryption Configure your Username and Password using 7 12 alpha numeric numerals Set your Password immediately after first time installation Protect your connection using Anti Virus Windows users should update their Microsoft Installation packs with the provided updates to avoid back doors and loop holes To limit IP access Enter your Web server s configuration and define the IP addresses that should be enabled Apache users should refer to the Apache documentation http httpd apache org docs 2 2 howto access html Access control by host For more information about IIS security related topics visit the following Microsoft Web site http www microsoft com technet security prodtech IIS mspx 287 Zend Server Community Edition Reference Manual Configuring PHP for Security You may be able to add an additional security boost to your PHP applications by properly configuring your PHP runtime environment settings You can edit the directives below from the Administration Interface by going to Server Setup Directives Changing some of these setti
147. ions will be visible in the Administration Interface s Extensions page however the directive configuration option will not be active and directives belonging to the extension have to be configured directly from the php ini file Disclaimer Zend Technologies does not provide support for third party products including extensions Therefore if an issue for support arises please remove all third party extensions by commenting out the reference to them in your php ini before referring to the Support Center http www zend com en support center There are two types of extensions PHP extensions and Zend extensions The extension provider should supply information regarding the extension type Zend or PHP Make sure to also check the provider s documentation for possible compatibility issues PHP version compatibility and any other additional configurations that may be required S To add Zend extensions 1 Download the extension Note AIX Unix Linux extensions end with the so suffix 2 Place the extension in your extensions directory To locate the extensions directory open the Administration Interface to Monitor PHP Info and check the value for the directive extension_dir By default your extensions directory is located in lt install_path gt zend lib php_extensions 3 Add the following line to your php ini zend_extension lt full_path_to_extension_so_file gt Restart your server To restart your server Click Restart Server
148. is signature with the expected signature calculated based on the same key and parameters as known to the server and will only authorize the request if the signatures match This authentication and validation method does not contradict the use of HTTPS to encrypt the communication channel which is recommended but not required This section includes the information on the following Generating API Keys Signing API Requests 179 Zend Server Community Edition Reference Manual Generating API Keys API keys are generated using the Zend Server Zend Server Cluster Manager Administration Interface Administration API Keys When generating a new key you must specify a name for this key This may be a username or a group name which is used to identify the key and to tell the server which key to use when attempting to authenticate a request Valid key names may be composed only of token characters as defined by RFC 2616 with the addition of the whitespace character and the character This allows all printable US ASCII characters ASCII characters 0x20 to 0x7e with the exception of the following characters Seep eb YS Tea ef In addition key names may not begin or end with a whitespace character The specific API key also determines the access level granted when using this key Zend Server API keys must be kept secret and immediately revoked if there is any chance that they have been compromised 180 Web
149. ists contact Customer Support at http www zend com en support center In addition to the main Administration Interface Zend Server Community Edition comes with a tray utility called the Zend Controller that provides quick access to 15 Zend Server Community Edition Reference Manual Monitor Tab Dashboard The Dashboard page is accessed from Monitor Dashboard and is the default page after logging in to the Administration Interface The Dashboard page is a summary of information and quick links The information in this page is divided into Tasks and a System Overview Tasks include quick links to configuration tasks and useful information Clicking on a link directs you to the appropriate page in the Administration Interface The System Overview lists information about your environment including PHP version and a Zend Components status display Zend Server Reference Manual Server Info The Server Info page is accessed from Monitor Server Info The Server Info page displays the details of your environment The information displayed in this page is as follows Zend Server Product version PHP PHP version and the path to your PHP configuration file php ini This information can also be accessed from the Administration Interface on the PHP Info page Web Server Your Web server s IP type and the operating system used to run the Web server Zend Framework Release version and directory location in you
150. ity Edition You have the option to enable all features by upgrading to Zend Server from within the product To upgrade to Zend Server 1 Goto the Zend Server Download page to receive a valid license 2 In your product go to Administration License and Password Help About Logout Ei Applications 4 Administration License and Password AP Keys Update Notifications Activate Zend Server Features Zend Server License Order number License key o To learn more about the advanced features of Zend Server click here Change Password Enter your current password Choose a new password Confirm your new password Zend Server Feature Content Turn Zend Server feature information off to hide tabs containing only features available in Zend Server Zend Server feature information displayed Yes No Update Restart PHP 26 CH Zend Server Reference Manual 2 Inthe Zend Server License area enter your license details as follows e Order number Enter your license number name e License Key Enter your license key 3 Click Uedate License to apply new licensing details A round progress bar is displayed indicating that the validation of the license details is taking place Please wait while PHP is a La being restarted A 4 Zend Server reloads the Administration Interface with all Zend Server features enabled Help About Logout elf Monitor Si Applications Rule Management A Server Setup
151. k end server and sets job status to failed and completion status to timeout Type integer Units seconds Default Value 120 Available since version 5 0 zend_jobqueue job_restart_timeout The minimal number of microlliseconds between job startups Type integer Default Value 200 Available since version 5 0 zend_jobqueue http_job_retry_count Number of retries in case of HTTP job failure Type integer Default Value 10 Available since version 5 0 zend_jobqueue http_job_retry_timeout The number of seconds between retries of failed HTTP jobs Type integer Units seconds Default Value 1 Available since version 5 0 zend_jobqueue high_concurrency_margin_allowed Report an event when the Job Queue Daemon reaches a margin between the number of running jobs and the maximum allowed Type integer Default Value 0 Available since version 5 0 166 Web API Reference Guide zend_jobqueue job_time_skew_allowed Report an event when a job is skewing from its defined execution time Type integer Units seconds Default Value 120 Available since version 5 0 zend_jobqueue max_message_size The maximum message size the daemon can except from the extension Type integer Units KBytes Default Value 64 Available since version 5 0 zend_jobqueue log_verbosity_level The Log s verbosity level Type integer Default Value 2 Available since version 5 0 zend_jobqueue log_rotation_size The maximu
152. l e eventsGroup e eventsGroupDetails e event e parameter e superGlobals e step e codeTracingStatus e codeTrace 187 Zend Server Community Edition Reference Manual messageList A list of 0 or more messages An info level message may appear 0 or more times A warning level message may appear 0 or more times An error level message may appear 0 or more times 188 Web API Reference Guide server nfo An object representing a single server with information about the server 1 name String 1 The server name String The server address as an HTTP URL status String 1 The server status which may be one of the following values OK shuttingDown startingUp pendingRestart restarting misconfigured extensionMismatch daemonMismatch notResponding disabled removed unknown messageList messageList 1 A list of messages reported by this server which can be empty if there are no messages to show 189 Zend Server Community Edition Reference Manual serversList A list of servers serverinfo serverinfo The server information may appear more than once 190 Web API Reference Guide systemInfo Generic information about the system being accessed edition String The Zend Server edition which can be one of the following ZendServer ZendServerClusterManager ZendServerCommunityEdition The global status information which can be one of the following OK The system is operational
153. lement as defined for other Web API methods Possible Action Specific Error Codes exportFailed Creating a configuration snapshot failed Example Request headers removed for clarity GET ZendServerManager Api configurationExport Response not all headers are shown Eine i 0O 200 Ox Content type application vnd zend serverconfig Content disposition attachment filename ZendServerConfig 20101123 zcfq lon oldimascty Caca LOLLOS gt aol 225 Zend Server Community Edition Reference Manual Important Note For Zend Server or Zend Server Cluster Manager on Mac or Linux this action is also available via the command line using CLI Tools For more information see CLI Tools 226 Web API Reference Guide The configurationimport Method Import a saved configuration snapshot into the server Required Permissions full HTTP method POST Supported by Editions All Request Parameters Because this method contains a file upload parameters are encoded using the multipart form data content type configFile File Y The configuration snapshot file to import Content type for the file must be application vnd zend serverconfig es ignoreSystemMismatch Boolean No If set to TRUE configuration must be applied even if it was exported from a different system other major PHP version Zend Server version or operating system The default value is FALSE Expected Response Code 200 OK R
154. lication run from a Web Hosting company Once your code is in its dedicated location you will have to support the code so you will need to establish a way to upload files for purposes of issuing updates and fixing bugs or security threats At this point if you have been locally debugging your code with Zend Studio you can now change your settings to remote debugging if there is a firewall between you and your application s files you will need to use tunneling in order to debug through a firewall Zend Studio users can also benefit from Remote Server support for uploading and synchronize your code 298 Index IIS Best Practices In the IIS Best Practices section you will find information on how to configure and optimize IIS and to increase performance This document includes information on the following information IS Configuration Optimization Tuning adjustment to optimize the FastCGI configuration for IIS6 and IIS7 Configuring IIS Timeouts 299 Zend Server Community Edition Reference Manual IIS Configuration Optimization When moving from Zend Core to Zend Server on IIS Microsoft s FastCGI is used instead of the Zend s FastCGI therfore the settings and configurations are in a different location For more information per IIS version see below Tuning FastCGI Configuration for IIS6 These performance enhancements are defined by default when you install Zend Server By default Zend Server runs with a maximum of
155. line using CLI Tools For more information see CLI Tools 211 Zend Server Community Edition Reference Manual The clusterAddServer Method Add a new server to the cluster On a Zend Server Cluster Manager with no valid license this operation fails Required Permissions full HTTP method POST Supported by Editions Zend Server Cluster Manager Request Parameters serverName String Yes The server name The server address as a full HTTP HTTPS URL guiPassword Sting The server GUI The server GUI password e D kum ES ic this server s current settings to the rest of the cluster The default value is FALSE Expected Response Code 200 OK The operation was successful 202 Accepted The server was added successfully but setting propagation failed This can only happen if propagateSettings was set to TRUE Response Type serverlinfo with information about the just added server Possible Action Specific Error Codes HTTP Error Code Description Code 500 cantConnectToServer en invalidServerResponse An invalid or unexpected response from a new Ce e The provided GUI password is incorrect alreadyConnected The server is already a member of a cluster not m r necessarily the current cluster 503 temporarilyLocked The server cannot be added because a cluster D eee 500 noActiveServers The server cannot be added because all servers in OOT Lee 405 notImplementedByEdition This method is only a
156. llowing diagram Web Server Apache lIS Runs a PHP Scripts that calls a Java Class Zend Engine JVM renders the Java lt contacts the Java side and returns to the a new java Bridge Server Zend Engine gt Web Server Apache llS Engine running inside Java Bridge running as a eb server Daemon Windows Service Java Bridge Running on its own JVM Advantages The Zend Java Bridge provides the following advantages J2EE application servers can be extended to include the advantages that PHP offers relative to other Web enablement languages such as reduced development time reduced time to market lower TCO Total Cost of Ownership etc _PHP centric companies can take advantage of J2EE services that are not present in scripting languages The PHP Java Bridge provides the ability to interact with plain Java objects The Java Bridge operates without the overhead of a JVM for each Apache process The Java Bridge consumes a set amount of memory that is disproportionately small relative to the amount of activity that it handles 81 Zend Server Community Edition Reference Manual Zend Framework Zend Framework is a high quality open source framework for developing Web applications and Web services with PHP Built in the true PHP spirit the Zend Framework delivers ease of use and powerful functionality It provides solutions for building modern robust and secure websites Zend Framework Reso
157. ls zend_optimizerplus enable Optimizer On Off switch When set to Off code is not optimized Type boolean Default Value 1 Available since version 4 0 zend_optimizerplus use_cwd When this directive is enabled the Optimizer appends the current working directory to the script key thus elminating possible collisions between files with the same name basename Disablingthe directive improves performance but may break existing applications Type boolean Default Value 1 Available since version 4 0 zend_optimizerplus validate_timestamps When disabled you must reset the Optimizer manually or restart the webserver for changes to the filesystem to take effect lt br gt The frequancy of the check is controlled by the directive zend_optimizerplus revalidate_freq Type boolean Default Value 1 Available since version 4 0 zend_optimizerplus revalidate_freq How often to check file timestamps for changes to the shared memory storage allocation Type integer Units seconds Default Value 2 Available since version 4 0 115 Zend Server Community Edition Reference Manual zend_optimizerplus revalidate_path If the file search is disabled and a cached file is found that uses the same include_path the file is not searched again Thus if a file with the same name appears somewhere else in include_path it won t be found Enable this directive if this optimization has an effect on your applications The default for t
158. lt name gt lt address gt https www 02 local 10082 ZendServer lt address gt lt status gt pendingRestart lt status gt lt messageList gt lt serveriInfo gt lt responseData gt lt zendServerAPTIResponse gt Important Note For Zend Server or Zend Server Cluster Manager on Mac or Linux this action is also available via the command line using CLI Tools For more information see CLI Tools 221 Zend Server Community Edition Reference Manual The restartPHP Method This method restarts PHP on all servers or on specified servers in the cluster A 202 response in this case does not always indicate a successful restart of all servers Use the clusterGetServerStatus command to check the server s status again after a few seconds Required Permissions full HTTP method POST Supported by Editions All Request Parameters servers Array No A list of server IDs to restart If not specified all servers in the cluster will be restarted In a single Zend Server context this parameter is ignored parallelRestart Boolean No Sends the restart command to all servers at the same time The default value is FALSE Expected Response Code 202 Accepted Response Type serversList with the status of all servers to which the restart command was requested i e the servers provided in the servers parameter or all servers if no servers are specified Possible Action Specific Error Codes HTTP Code Description noSu
159. lue A list of jobs ZendJobQueue getJobsList Returns a list of associative arrays with properties of jobs which conform to a given query Available since version 5 0 Description array ZendJobQueue getJobsList array Squery int Stotal Parameters query total 158 An associative array with query arguments The array may contain the following keys which restrict the resulting list app_id Query only jobs which belong to the given application name Query only jobs with the given name script Query only jobs with a script name similar to the given one SQL LIKE type Query only jobs of the given types bitset priority Query only jobs with the given priorities bitset status Query only jobs with the given statuses bitset rule_id Query only jobs produced by the given scheduling rule scheduled_before Query only jobs scheduled before the given date scheduled_after Query only jobs scheduled after the given date executed_before Query only jobs executed before the given date executed_after Query only jobs executed after the given date sort_by Sort by the given field see SORT_BY_ constants sort_direction Sort the order SORT_ASC or SORT_DESC start Skip the given number of jobs count Retrieve only the given number of jobs 100 by default The output parameter which is set to the total number of jobs conforming to the given query ignoring start and count fields Web API Ref
160. lue FALSE if no data that matches the key is found else it returns the stored data If an array of keys is given then an array which its keys are the original keys and the values are the corresponding stored data values zend_disk_cache_fetch Fetches data from the cache The key can be prefixed with a namespace to indicate searching within the specified namespace only If a namespace is not provided the Data Cache searches for the key in the global namespace Available since version 4 0 Description mixed zend_disk_cache_fetch mixed key 135 Zend Server Community Edition Reference Manual Parameters key The data key or an array of data keys Optional for key s name prefix with a namespace Return Value FALSE if no data that matches the key is found else it returns the stored data If an array of keys is given then an array which its keys are the original keys and the values are the corresponding stored data values zend_shm_cache_delete Finds and deletes an entry from the cache using a key to identify it The key can be prefixed with a namespace to indicate that the key can be deleted within that namespace only If a namespace is not provided the Data Cache searches for the key in the global namespace Available since version 4 0 Description boolean zend_shm_cache_delete mixed Skey Parameters key The data key or an array of data keys Optional for key s name prefix with a namespace Return Value
161. m size of the log file before it is rotated Type integer Units MBytes Default Value 10 Available since version 5 0 zend_jobqueue global_directives_ini_file The ini file that contains the global directives as defined in ZendGlobalDirectiveDD xml Type string Default Value GLOBAL_DIRECTIVES_INI_FILE Available since version 5 0 167 Zend Server Community Edition Reference Manual WEB API REFERENCE GUIDE 168 Web API Reference Guide About The Zend Server Web API allows automation of the management and deployment of Zend Server and Zend Server Cluster Manager and allows integration with other Zend or 3rd party software The Web API Reference Guide includes information about Generic Request Response Format API Versioning Authentication and Message Verification Data Types Available API Methods 169 Zend Server Community Edition Reference Manual Generic Request Response Format This section describes the generic formatting of all Zend Server Community Edition Web API requests and responses regardless of the specific method used All Web API HTTP requests and response content will be encoded using UTF 8 character encoding This section includes e Request Format e Response Format 170 Web API Reference Guide Request Format The request format defines the required format for each request sent to Zend Server The request format for all Zend Server Web API requests are formatted as describe
162. n The Optimizer shared memory storage size The amount of memory for storing precompiled PHP code in Mbytes Type integer Units MBytes Default Value 64 Available since version 4 0 zend_optimizerplus max_accelerated_files The number is actually the the first one in the following set of prime numbers that is bigger than the one supplied 223 463 983 1979 3907 7963 16229 32531 65407 130987 Only numbers between 200 and 100000 are allowed Type integer Default Value 2000 Available since version 4 0 zend_optimizerplus max_wasted_percentage The maximum percentage of wasted memory until a restart is scheduled Type integer Units Default Value 5 Available since version 4 0 zend_optimizerplus consistency_checks The default value of 0 means that the checks are disabled Because calculating the checksum impairs performance this directive should be enabled only as part of a debugging process Type integer Default Value 0 Available since version 4 0 117 Zend Server Community Edition Reference Manual zend_optimizerplus force_restart_timeout The Optimizer uses this directive to identify a situation where there may be a problem with a process After this time period has passed the Optimizer assumes that something has happened and starts killing the processes that still hold the locks that are preventing a restart If the log level is 3 or above a killed locker error is recorded in the A
163. n Reference Manual max_execution_time 30 30 This sets the maximum time in seconds that a script is allowed to run before it is terminated by PHP This helps prevent poorly written scripts from tying up the server The default setting is 30 s When running PHP from the command line the default setting isOs The maximum execution time is not affected by system calls stream operations etc See the set_time_limit function for more details You cannot change this setting with ini_set when running in safe mode The only workaround is to turn off safe mode or to change the time limit in the php ini Your Web server may have other timeout configurations that can also interrupt PHP execution Apache has a Timeout directive and IIS has a CGI timeout function Both default to 300 seconds See your Web server documentation for specific details 282 Index memory_limit 128M 128M Sets the maximum amount of memory in bytes that a script can allocate This helps prevent poorly written scripts from consuming all the available memory on a server This setting can also be fine tuned during development to reach an optimal setting When an integer is used the value is measured in bytes Note To have no memory limit set this directive to 1 output_buffering 4096 4096 Allows you to buffer the PHP output instead of having it sent directly as soon as it is
164. n Zend Studio Settings Change status to Closed v Change This error message can be caused by a several possible problems When running diagnostics on an alternate server 1 The Zend Debugger is not running on the alternate server Solution Make sure that the Zend Debugger is running and available on the alternate server by going to the Zend Server Administration Interface and in Server Setup Components check that the Zend Debugger is turned on 2 The connection parameters in Server Setup Monitor are not the same as the settings in Zend Studio s Debugger preferences IP address Port and if you are using SSL Solution Check the settings in Zend Studio for Eclipse For instructions go to http files zend com help Zend Studio Eclipse zend studio eclipse htm and make sure the Zend Studio for Eclipse debug settings are the same as defined in Zend Server 314 Index 3 The Zend Studio IP address is not allowed to debug on the alternate server Solution Go to your Administration Interface and make sure that the Zend Studio IP address that appears in Server Setup Monitor is an allowed host to debug the setting should be in the alternate server s Zend Server Administration Interface under Server Setup Debugger 315 Zend Server Community Edition Reference Manual Windows Zend Server isn t Running Out of The Box This item refers to Windows OS using IIS 5 7 After installing Zend Server clicking on the shortcut opens
165. n a browser The Administration Interface is a Web interface that runs through a browser This procedure describes how to view the Administration Interface To view the Administration Interface LJ 1 Torun Zend Server Community Edition locally open a browser and enter the following URL For Windows http localhost ZendServer For Linux Mac http localhost 10081 ZendServer or https localhost 10082 ZendServer If you are using a remote connection replace localhost with your Host Name or IP 2 The Zend Server Community Edition login screen opens and prompts you to set a password This screen only appears once and is not displayed again after your password is set The next time you log in to Zend Server Community Edition you are prompted for the password you set the first time you opened Zend Server Community Edition 38 Zend Server Reference Manual Configure Your Password Purpose To ensure that you can access the Administration Interface Result Your password is created When you first run Zend Server Community Edition the registration screen is displayed Define your Zend Server Community Edition login password in this screen To view the different password management options click Password Management Check Apache Purpose To verify that Apache is running Result System confirmation This procedure describes how to check if the Apache Web server is running E To check if the Apache server is running D
166. n sending the following API request POST ZendServer Api findTheFish HTTP 1 1 iewer een Jee e 10081 User agent Zend_Http_Client 1 10 Accept application vnd zend serverapitxml version 1 0 Daces Sum 11 qol 2010 fSglosie Gwar Content type application x www form urlencoded Content length 19 lookInCupboard TRUE Using a key named angel eyes with the following value 9dac7 8c5ac43bb2ab361208 61b4aeda8f9bbb6c521e124360Fd5821ef279FdAICT The request parameters to be signed concatenated into a string is zscm local 10081 ZendServer Api findTheFish Zend_Http_Client 1 10 Sum i dw 200 3216510 GMI From this value an HMAC SHA 256 signature will be calculated using the API key For example using the hash_hmac PHP function 785be59b7728b1ibfd6495d610271c5d47 0737775b091 91ldaeb5a728c2d97c0 The final request including the added X Zend Signature header is lines are broken for readability POST ZendServer Api findTheFish HTTP 1 1 BOSES een Locals 2 OO User agent Zend_Http_Client 1 10 Accept application vnd zend serverapi xml version 1 0 Daces Sum ii weil 2OlO oct Gwar Content type application x www form urlencoded Content length 19 X Zend Signature angel eyes 785be59b7728b1b d6495d610271c5d47 0737775b091 91daeb5a728c2d97c0 183 Zend Server Community Edition Reference Manual lookInCupboard TRUE The server then proceeds to generate the same signature based on the same data and
167. nagement If you are using the Zend Controller locally or remotely i e Zend Server Community Edition and Zend Controller are located on separate machines make sure that the Zend Controller settings match your Zend Server settings Click here for instructions on how to change your Zend Controller settings according to your operating system Zend Server Community Edition Reference Manual 4 Click Next The Notification Registration page appears Step 3 of 3 Notification Registration Welcome to Zend Server Community Edition Thank you for installing Zend Server Community Edition you ve made a great choice If you ever want to enhance your PHP environment with Automated deployment Performance optimization Application monitoring Advanced debugging and analysis tools Clustering and scalability 24x7 technical support You can try the advanced features of Zend Server free for 30 days at any time RB Notity me of new Zend Server Community Editon releases and other important updates Email Address 5 Mark the check box below and enter an Email address to receive Zend Server Community Edition updates If you wish to try the advanced features that Zend Server offers click the link on the Welcome to Zend Server Community Edition banner to go to the Zend Server Download page and download an Evaluation license For more information on upgrading to Zend Server see Upgrading Zend Server Reference Manual
168. nce improvement gained by letting the Optimizer run out of the box can be further enhanced with fine tuning These are advanced settings that need to be evaluated based on your environments usage specifications and performance requirements These are only recommendations in most cases such fine tuning should not be necessary Disabling Code Change Auto Detection In the Administration Interface to view the specific directives for Optimizer go to Server Setup Components and click on the Directives link next to the Optimizer Look for zend_optimizerplus validate_timestamps and set the value to Off This speeds up the server but also requires that you restart the server CD if you deploy new versions of existing files When to change If your PHP code is rarely updated changed or if you are capable of manually restarting your PHP on every code update When not to change If you are in development and you are frequently changing code or if you do not have control over the code update process Decreasing Code Validation Frequency In the Administration Interface to view the specific directives for Optimizer go to Server Setup Components and click the Directives link next to the Optimizer Look for zend_optimizerplus revalidate_freq and set the value to 30 seconds Zend Server is now set to check PHP file changes every 30 seconds When to change If you do not change PHP files often and some delay between file update a
169. nd site update is acceptable you may set it even higher When not to change If you have frequently changing files and you need the changes to take effect immediately 279 Zend Server Community Edition Reference Manual Configuring PHP for Performance You may be able to add an additional performance boost to your PHP applications by properly configuring your PHP runtime environment settings You can edit the directives below from the Administration Interface via Server Setup Directives Changing some of these settings may cause certain PHP applications to stop functioning Therefore use discretion when you disable them and test your environment It is important that you fully understand the purpose of each directive before you modify it Optimal php ini configurations and settings for maximum performance optimization Name Recommended Zend Server Default Description Value realpath_cache_size 256K 256K Determines the size of the realpath cache to be used by PHP This value should be increased on systems where PHP opens many files to reflect the quantity of the file operations performed realpath_cache_ttl 120 120 Duration in seconds for which to cache realpath information for a given file or directory For systems with rarely changing files consider increasing the value error_reporting E ALL amp E ALL The error_reporting function E_NOTICE sets the error_reporting directive at runtime P
170. ndServerAPIResponse gt 261 Zend Server Community Edition Reference Manual The monitorExportlssueByEventsGroup Method Export an archive containing all of the issue s information event groups and code tracing if available ready for consumption by Zend Studio The response is a binary payload Required Permissions Read only HTTP method GET Supported by Editions Zend Server Zend Server Cluster Manager Request Parameters Parameter RG Required Description Heian ve a The issue event group identifier E Example Request headers removed for the purpose of clarity GET ZendServerManager Api monitorExportlssueByEventsGroup eventsGroupld 2 Response not all headers are shown HTTP 1 0 200 OK Content type application vnd zend eventexport Content disposition attachment filename Severe_Slow_Function_Execution 1 2 20110921 zsf leo comey Cata KOLLE o oo 262 Web API Reference Guide The monitorChangelssueStatus Method Modify an Issue s status code based on an Issue s Id and a status code Required Permissions Full HTTP method POST Supported by Editions Zend Server Zend Server Cluster Manager Request Parameters Parameter Type Description baa pe e The new status to set Open Closed Ignored Response Format Up to date issue element or an error message explaining the problem Possible Action Specific Error Codes This action has no specific error codes
171. nested associative array with the following properties id The scheduling rule identifier status The rule status see STATUS _ constants type The rule type see TYPE_ constants priority The priority of the jobs created by this rule persistent The persistence flag of the jobs created by this rule script The URL or script to run name The name of the jobs created by this rule vars The input variables or arguments http_headers The additional HTTP headers schedule The CRON like schedule command app_id The application name associated with this rule and created jobs lost run The last time the rule was run next_run The next time the rule will run ZendJobQueue getSchedulingRule Returns an associative array with the properties of the scheduling rule identified by the given argument The list of the properties is the same as in getSchedulingRule ZendJobQueue deleteSchedulingRule Deletes the scheduling rule identified by the given rule_id and scheduled jobs created by this rule ZendJobQueue suspendSchedulingRule Suspends the scheduling rule identified by given rule_id and deletes scheduled jobs created by this rule ZendJobQueue resumeSchedulingRule Resumes the scheduling rule identified by given rule_id and creates a corresponding scheduled job ZendJobQueue updateSchedulingRule Updates and reschedules the existing scheduling rule ZendJobQueue getCurrentJobParams Decodes an array of input
172. ng PHP Extensions Loading the mod ssl Module Java Bridge Use Cases Info Messages 74 Zend Server Reference Manual Components Zend Server Community Edition is comprised of several components that each contributes important functionality to facilitate the development process The components are Zend Debugger The Zend Debugger communicates with the Zend PHP Engine to retrieve runtime information and present it in Zend Studio for root cause analysis Zend Optimizer The Zend Optimizer component speeds up PHP execution via opcode caching and optimization Zend Guard Loader The Zend Guard Loader is used in order to run PHP scripts that are encoded with Zend Guard Zend Data Cache The Zend Data Cache component provides a set of PHP functions to improve performance by storing data in the cache a Zend Java Bridge The Zend Java Bridge component makes it possible to use Java classes and code from within PHP Zend Framework An open source framework for developing Web applications and Web services with PHP Click on a link to view a full description of the components architecture To see how to work with a component select a topic that begins with Working with from the Tasks section For a short description of each component and where it is installed see the Installed Components section in the Installation Guide 75 Zend Server Community Edition Reference Manual Zend Debugger The Zend Debugge
173. ng is an example of a call to the obviously fake makePizza method some lines are broken for readability POST ZendServerManager Api makePizza HTTP 1 1 HOSES ZSEM Local Deca Sim Hi dell ZOO Asgiosi Guar User agent Zend_Http_Client 1 10 Accept application vnd zend serverapitxml version 1 0 X Zend Signature bob at example com 7 0db29a3d82a8lec6f5387f5aae96e295530b4c8acf2074488185902dc900F4 Content type application x www form urlencoded Content length 100 style thinCrust extraCheese TRUE amp ext ras t5B0 5D pepperoni extrast 5Bl 5D onion extrast5B2 5D pineapple The request above is for the makePizza method with the following parameters style extraCheese extras 172 Web API Reference Guide The following example shows a call to a read only getPizzaStatus method GET ZendServerManager Api getPizzaStatus pizzaId 53 HTTP 1 1 LOSES Een LOCEL Deca Swim Hi cell ZOO Agsilogi Gwar User agent Zend_Http_Client 1 10 Accept application vnd zend serverapitxml version 1 0 X Zend Signature bob at example com 02dcbf4cb338a0a8b807c83a8 4a7888929F5Cc06491105d6752f290da47a24619 Notice that the pizzald parameter is passed as part of the URL s query string 173 Zend Server Community Edition Reference Manual Response Format API HTTP response messages use standard HTTP response codes to designate high level status success failure etc and simple XML payload in th
174. nges manually restart your Web server Apache or IIS Now the log files for the Zend Page Cache and Zend Monitor components will be written to the new location This means that some log files such as Apache and PHP will still be written to the default directory lt install_path gt logs The new directory must have the same permissions as the original logs directory 322
175. ngs may cause certain PHP Applications to stop functioning Therefore use discretion while disabling them and test you environment it is important that you fully understand the purpose of each directive before modifying it Optimal php ini configurations and settings for maximum security protection from external threats Name Default Optimal Description Value disable_functions This directive allows you to disable certain functions for security reasons It takes on a comma delimited list of function names disable_functions is not affected by Safe Mode This directive must be set in the php ini file For example you cannot set this in httpd conf disable_classes This directive allows you to disable certain classes for security reasons It takes on a comma delimited list of class names The disable_classes directive is not affected by Safe Mode This directive must be set in php ini For example you cannot set this in httpd conf magic_qotes_gpc 0 0 Sets the magic_quotes state for GPC Get Post Cookie operations When magic_quotes are on all single quotes double quotes backslash and NULLs are escaped with a backslash automatically allow_url_include 0 0 This option allows the use of URL aware fopen wrappers with the following functions include include_once require require_once Note This setting requires that allow_url_fopen be set to On expose_php 1 0 Decides whether
176. nnot be found in the license directory an array is not created For information on the proper installation of a license file as well as the php ini directive see the Zend Guard User Guide Available since version 4 0 125 Zend Server Community Edition Reference Manual Description array zend_loader_file_ licensed void Return Value Returns an array or FALSE lt br gt If an array is returned a valid license for the product exists in the location indicated in the php ini file zend_loader_current_file Obtains the full path to the file that is currently running In other words the path of the file calling this API function is evaluated only at run time and not during encoding Available since version 4 0 Description string zend_loader_current_file void Return Value Returns a string containing the full path of the file that is currently running zend_loader_install_ license Dynamically loads a license for applications encoded with Zend Guard Available since version 4 0 Description boolean zend_loader_install_license string Slicense_file boolean Semer ie I Parameters license _file Name of the license file overwrite Controls if the function overwrites old licenses for the same product lt br gt 0 Do not overwrite lt br gt 1 Overwrite The default value is 0 Return Value TRUE if the license was loaded successfully FALSE otherwise 126 Web API Reference Guide zend_obfuscate_funct
177. nselInfo gt lt managerLicenseInfo gt lt status gt serverLimitExceeded lt status gt lt orderNumber gt ZEND ORDER 66 lt orderNumber gt lt validUntil gt Sat 31 Mar 2012 00 00 00 GMT lt validUntil gt lt serverLimit gt 10 lt serverLimit gt lt managerLicenseInfo gt lt systemInfo gt lt responseData gt lt zendServerAPTResponse gt An example response for the same request sent to a Zend Server Community Edition Machine would be lt xml version 1 0 encoding UTF 8 gt lt zendServerAPIResponse xmlns http www zend com server api 1 0 gt lt requestData gt lt apikeyName gt angel eyes lt apikKeyName gt lt met hod gt getSystemInfo lt method gt lt requestData gt lt responseData gt lt systemInfo gt lt status gt OK lt status gt lt edition gt 208 Web API Reference Guide ZendServerClusterCommunityEdition lt edition gt lt zendServerVersion gt 6 0 1 lt zendServerVersion gt lt supportedApiVersions gt application vnd zend serverapitxml version 1 0 application vnd zend serverapitxml version 1 1 application vnd zend serverapitxml version 2 0 lt supportedApiVersions gt lt phpVersion gt 5 4 1 lt phpVersion gt lt operatingSystem gt Linux lt operatingSystem gt lt serverLicenseInfo gt lt status gt notRequired lt status gt lt orderNumber gt lt valueliiaca i gt lt serverLimit gt 0 lt serverLimit gt lt serverLicenseInfo gt lt man
178. nual jJava naming factory initial gt org jnp interfaces NamingContextFactory jJava naming factory url pkgs gt org jboss naming org jnp interfaces jJava naming provider url gt H jnp yourflowers com 1099 Sctx new Java javax naming InitialContext Senvt Ee CO Fine che lee Sobj Sctx gt lookup YourflowersBean here we find an object no error handling in this example Srmi new Java javax rmi PortableRemoteObject Shome Srmi gt narrow Sobj new Java com yourflowers StoreHome Sstore Shome gt create add an order to the bean EE EE EE Veuluciae siel i EE print Order placed lt br gt Current shopping cart lt br gt get shopping cart data from the bean eene Se Conc S_Gan el reme Ler Tt foreach cart as item prime icen mame js Siliceni coume j ac Sican Tories lt ar gt Nnt release the object Sstore gt remove gt The example code can be understood as follows 102 The code example is written in PHP and forms part of a PHP Web application The PHP application first initializes an operation with the EJB located at a specific URL that has the name yourflowers com 1099 The code then specifies the bean YourflowersBean that the application will look for Next the bean object is returned from the EJB server Zend Server Reference Manual 5 The application then calls methods in this case the Java applic
179. o documentation zend com 13 Zend Server Community Edition Reference Manual Concepts General Layout Zend Server Community Edition s Administration Interface is the main area for configuring and managing your development environment The Administration Interface is accessed through your browser by entering the link that is provided at the end of the installation process Login is done through the Password administration page that appears when you access the Administration Interface for the first time Click here for more about configuring your password Navigation inside the Administration Interface is done by clicking on the tab menus Each main tab has several sub tabs called pages Monitor tab The Monitor tab is the main area for system information and it includes the following sub tabs e Dashboard e Server Info e PHP Info e Logs Server Setup tab The Setup tab is the main area for configuring your PHP and it includes the following sub tabs e Components e Extensions e Directives e Debugger Administration tab The Administration tab is the main area for configuring your Zend Server Community Edition system settings and it includes the following sub tabs e License and Password e Update Notifications Zend Server Reference Manual Important Note If Zend Server Cluster Manager cannot connect to the database the only available action in the Administration Interface is to login If the problem pers
180. o indicate where or how the issue was produced in a more modular and application aware display 196 Web API Reference Guide eventsGroup Details about an issue s eventsGroup This element describes general details about groups of events unlike the event element which provides in depth details eventsGroupld KH Event Group s identifier The number of events in the current event group Timestamp for the first event in the current event group serverld Integer Identifier of the cluster member where the event took place This field will be empty if no serverlD is applicable p a 197 Zend Server Community Edition Reference Manual eventsGroupDetails Details about an issue s eventsGroup including the actual event data WE eventsGroup eventsGroup Basic details about the events group oe event event Event with common data for the events group E Associated code tracing identifier 198 Web API Reference Guide event List of event properties with meta data and backtrace information Free form text field with details about the Issue superGlobals superGlobals 1 Super global arrays and their values get post cookie element session server debugUrl URL for debugging the event Severity indicator for the event Info Warning Critical backtraces List of step 1 A list of backtrace step elements elements 199 Zend Server Community Edition Reference Manual parameter Name and value pair
181. ocal zend include php Zend T usr local zend include php ext T usr local zend include php ext date lib I usr local zend include php DHAVE_CONFIG_H er 02 o newt la export dynamic avoid version prefer pic module rpath var tmp pear build root newt 1 2 1 modules newt lo newt_vcall lo Inewt gcc shared libs newt o libs newt_vcall o Inewt W1 soname Wl newt so o libs newt so creating newt la cd libs amp amp rm f newt la amp amp In s newt la newt la bin sh var tmp pear build root newt 1 2 1 libtool mode install cp newt la var tmp pear build root newt 1 2 1 modules cp libs newt so var tmp pear build root newt 1 2 1 modules newt so cp libs newt lai var tmp pear build root newt 1 2 1 modules newt la PATH SPATH sbin ldconfig n var tmp pear build root newt 1 2 1 modules Libraries have been installed in var tmp pear build root newt 1 2 1 modules Build complete Run make test 3 Use PECL to put the newly built Newt extension into place run make INSTALL_ROOT var tmp pear build root install newt 1 2 1 4 instal the shared extensions by running var tmp pear build root install newt 1 2 1 usr local zend lib php_extensions running find var tmp pear build root install newt 1 2 1 xargs Ae eli Ils 574096 A linger 3 HOO TOOL 4096 Mar 30 20 45 94 Zend Server Reference Manual var tmp pear build root install newt 1 2 1 574119 d be I
182. olve problems with state of the art development and debugging tools Implementing Monitoring Implementing Monitoring is a process of defining Events according to acceptable runtime and performance parameters When an Event occurs the Monitor compiles a complete profile of the Events occurrence and its precise details The Event Details screen includes comprehensive details to enable developers and testers to recreate the Event in a way that mirrors the conditions of the original occurrence This information can then be used to diagnose problems by fine tuning Event rules to accommodate normal occurrences or resolve actual run time problems and errors The integration with Zend Studio makes it easy to diagnose problems and errors using the Debug Event and Profile Event options In addition problems in code can be immediately resolved using the Zend Studio Editor The Zend Studio Editor makes it possible to both implement and deploy changes right away not only to a single server but also to all the nodes that belong to the same Group Code tracing provides an additional layer for analyzing Events can be preserved to leave an indicator of these occurrences if necessary Configuring for Production or Development In general the best practice is the same tune monitoring rules and thresholds to provide the information you need without creating an overflow of events that you are not able to handle This means that in development you may want
183. om http files zend com help Zend Guard zend guard htm 78 Zend Server Reference Manual Zend Data Cache The Zend Data Cache component provides a set of PHP functions to improve performance by storing data in the cache The Zend Data Cache is used to cache different types of data e g strings arrays and objects as well as script output or script output elements for various durations Items can be stored in shared memory SHM or to disk Namespaces are supported to group cached objects for easy management Data Caching is primarily used when it is impractical or impossible to cache the entire page output such as when sections of the script are fully dynamic or when the conditions for caching the script are too numerous An example of this kind of usage is when some of the output is a form The data may include credit card numbers addresses and other kinds of information that should not be cached for security reasons For more information see Working with the Data Cache The Data Cache API includes the following functionality Storing variables to the cache a Fetching variables to the cache Deleting variables from the cache Clearing the cache Disk memory SHM storage Caching using namespaces Cache folder depth configuration 79 Zend Server Community Edition Reference Manual Zend Java Bridge The Zend Java Bridge provides PHP developers with a way to use existing Java code and build PHP applications that
184. on boolean ZendJobQueue updateSchedulingRule int Srule_id string SSC array Svars aicicay See os Parameters rule_id The rule identifier script The URL to request vars The input variables options The same as in createHttpJob 161 Zend Server Community Edition Reference Manual Return Value If scheduling rule was updated or not updated ZendJobQueue getCurrentJobParams Decodes an array of input variables passed to the HTTP job Available since version 5 0 Description static array ZendJobQueue getCurrentJobParams void Return Value The job variables ZendJobQueue setCurrentUobStatus Reports job completion status OK or FAILED back to the daemon Available since version 5 0 Description static void ZendJobQueue setCurrentJobStatus int Scompletion string msg Parameters completion The job completion status OK or FAILED msg The optional explanation message 162 Web API Reference Guide Zend Job Queue Daemon Configuration Directives Configuration Directives Summary Directive zend_ jobqueue database zend_ jobqueue binding zend_ jobqueue max_ http jobs zend _ jobqueue history zend jobqueue history failed zend jobqueue client keep alive zend jobqueue client read timeout zend jobqueue client write timeout zend_jobqueue connection timeout zend jobqueue http job timeout zend jobqueue job restart timeout zend jobqueue http job retry count zend jobqueue http jo
185. onent is intended for PHP developers who run complex PHP applications and can benefit from bytecode caching which is especially helpful for working with Zend Framework The Optimizer works exclusively with Apache or FastCGI environments no CLI or CGI support 77 Zend Server Community Edition Reference Manual Zend Guard Loader The Zend Guard Loader runs PHP scripts that are encoded with Zend Guard The Zend Guard Loader is a PHP extension that runs outputs created by Zend Guard which provides an easy way to encode obfuscate and license PHP code via an Eclipse based interface or from the command line The Guard Loader extension must be installed on each Web server that runs files that were encoded with or use Zend Guard licenses You can also use the Zend Optimizer that also includes the Guard Loader extension for code written in PHP 5 2 The Zend Optimizer is available as a free download from www zend com The Zend Guard Loader translates encoded files to a format that can be parsed by the Zend Engine This runtime process uses the Zend engine as a trigger to start the Zend Guard Loader component Zend Guard Zend Guard is a separate product available from Zend that provides an easy way to encode obfuscate and license PHP code via an Eclipse based interface or from the command line To view the API click Zend Guard Loader For additional information on using Zend Guard see the Zend Guard User Guide available online fr
186. or The request timestamp deviates too much from the server time 405 notImplementedByEdition The method is not implemented by this edition of Zend ee 406 unsupportedApiVersion The API version is not supported by this version of ee 5 500 serverNotConfigured This Zend Server installation was not yet initialized the pe ere user did not go through the initial setup wizard 500 serverNotLicensed Zend Server does not have a valid license which is ha ee Refer to the documentation of a specific method for details about additional possible errors specific to each method 176 Web API Reference Guide API Versioning Negotation As you perform an API call it should specify its currently used API version as part of the Zend Server API media type in the Accept HTTP header For example sending a request using API version 3 0 should include the following Accept header in the request Accept application vnd zend serverapitxml version 3 0 If the server supports the specified API version it will handle the request and respond in the appropriate format matching the specified API version The response format and API version will be specified using the Content type response header Content type application vnd zend serverapitxml version 3 0 If the server is not compatible with the API version being used the server will return an HTTP 406 Not Acceptable response with supported version content types listed as part of t
187. or each extension you can Turn Off The extension is not running on the machine and code that includes the Extension s functions works Turn On The extension is running on the machine Built in This applies to extensions that have dependencies or were complied with PHP Built in extensions cannot be removed and thus do not have an On Off option 22 Zend Server Reference Manual Directives Clicking this link directs you to a pre filtered view of the directives in Server Setup Directives that belong to the extension View Description at the end of each row of the table is a small icon that displays a tooltip that describes the component 23 Zend Server Community Edition Reference Manual Directives The PHP Directives Info page is accessed from Server Setup Directives The PHP Directives page allows you to easily edit your PHP configurations from the Administration Interface From here you can view and configure commonly used directives The available directives are grouped by category in expandable lists Clicking the arrow next to the category name expands the list to expose the different options Where relevant input fields are added to change a directive s value The initial display shows the most commonly used Directives Click All for the full list of directives or use the Search component to locate a specific directive or use ext lt extension_name gt to find directives by extension You can also u
188. or example if you are using a wireless network connection on a laptop verify that you have defined all the possible IP addresses as Allowed Hosts for Debugging or that the IP you want to use is first in the list of IPs in Zend Studio for Eclipse In Window Preferences PHP Debug Installed Debuggers verify that Zend Debugger is selected and click Configure in the Client Host IP field The following procedure describes how to define denied hosts for debugging Users define denied hosts to create a list of IP addresses of computers that run Zend Studio that do not have permission to debug the PHP code that runs on this server E To define denied hosts for debugging 1 Inthe Administration Interface go to Server Setup Debugger 2 Inthe Denied Zend Studio Clients for Debugging section enter a valid IP address or use Wildcards to specify a range of IPs 3 From the drop down list select an option according to the type of IP address you entered Click Exact IP address only for a single IP or one of the other options to represent a range of hosts 4 Click 99 to add the host 5 The changes are applied after you restart the Server The IP or range of IPs is denied permission to connect to the server to debug PHP code with Zend Studio To remove a specific IP from the list click Remove Do not add the same IP address to both the Allowed and Denied host lists Pay attention when you specify a range of IP addresse
189. or improving application response times and minimizing resource utilization PHP bytecode caching Zend Optimizer increases performance with no application changes Data caching a set of functions that allow developers to cache data in shared memory or to disk Use a Reliable PHP Stack in Development and Production Zend Server Community Edition is a pre integrated PHP application stack that s been tested by Zend to ensure the highest levels of reliability You can use it to run your application in production during development and testing ensuring a consistent environment throughout the application lifecycle If at any point you require technical support software updates security patches application monitoring or extra performance you can simply upgrade to Zend Server the commercial version of Zend Server Community Edition Zend Server Reference Manual Get Up and Running with a Full PHP Stack in Minutes Eliminate wasted time spent on putting together your PHP stack piece by piece Zend Server Community Edition includes everything you need whether you re using Windows Linux or Mac OS X The simple native installers will set you up in minutes with Bytecode accelerator Optimizer Zend Data Cache A certified PHP distribution Zend Framework Apache or IIS integration MySQL on Windows and Mac OS X Out of the box connectivity to all common databases Java code connectivity Web based PHP
190. or_enabled boolean TRUE if code acceleration is enabled False otherwise Cache ul boolean TRUE if the Optimizer cache is full memory_usage array contains information about Optimizer memory usage with the following keys e used_memory integer bytes of memory used e free_memory integer bytes of memory available for cache e wasted_memory integer bytes of memory used by invalid or outdated code Wasted memory is reclaimed when the accelerator is reset or when the percentage of wasted memory reaches the value of the lt em gt max_wasted_percentage lt em gt directive 120 Web API Reference Guide current_wasted_percentage The percentage of wasted opcode cache memory out of total memory available accelerator_statistics array contains current opcode cache usage statistics with the following keys e e num_cached_scripts integer number of cached scripts max_cached_scripts integer maximal number of cached scripts hits integer number of cache hits that is requests for files that had valid cache entries misses integer number of cache misses that is requests for files which were not cached accelerator_hit_rate float ratio between opcode cache hits and misses blacklist misses integer number of requests to blacklisted files blacklist_miss_ratio float ratio between hits and requests to blacklisted files last_restart_time integer timestamp of the last restart time scripts array
191. ost always contain an XML document of the following format lt xml version 1 0 encoding UTF 8 gt lt zendServerAPIResponse xmlns http www zend com server api 1 0 gt lt requestData gt lt apikKeyName gt angel eyes lt apikKeyName gt 174 Web API Reference Guide lt method gt clusterGetServerStatus lt method gt lt requestData gt lt responseData gt response data here lt responseData gt lt zendServerAP IResponse gt All API responses are enclosed in lt zendServerAPIResponse gt tags and contain two sections lt requestData gt which includes some reference information about the request and lt responseData gt which includes the response data The content of the lt responseData gt section differs depending on the specific method called Refer to the method s specific documentation for additional information In error responses the lt responseData gt section is replaced with an lt errorData gt section See Error Responses for additional information Some Web API methods will not return an XML document in case of a successful operation specifically methods that export large amounts of binary data such as the configurationExport method In such cases this is specifically indicated in the method s documentation Note that you can check the value of the Content type response header in order to know in advance what kind of content to expect in the response Error Responses In a r
192. osts Only clients listed in zend_debugger allow_hosts can detect the Zend Debugger lt br gt Any other value makes the Zend Debugger undetectable same as Never Type integer Default Value 2 Available since version 3 6 zend_debugger passive_mode_timeout The Debugger s timeout period in seconds to wait for a response from the client Zend Studio Type integer Units seconds Default Value 20 Available since version 3 6 zend_debugger xdebug_compatible_coverage Directive in order to mock up xdebug coverage Type boolean Default Value 0 Available since version 4 0 111 Zend Server Community Edition Reference Manual zend_debugger use_fast_timestamp Enables fast time sampling which is dependent on CPU cycles and frequency otherwise the directive uses operating system timing which may be less accurate Type boolean Default Value 1 Available since version 4 0 112 Web API Reference Guide Zend Optimizer Configuration Directives Configuration Directives Summary Directive zend_optimizerplus enable zend optimizerplus use cwd zend _optimizerplus validate timestamps zend _optimizerplus revalidate_freq zend_optimizerplus revalidate_path zend_optimizerplus inherited hack zend optimizerplus dups fix zend_optimizerplus log verbosity level zend optimizerplus memory consumption zend optimizerplus max_accelerated files zend optimizerplus max wasted percentage zend_optimizerplu
193. ot provided the Data Cache searches for the key in the global namespace o zend shm cache delete Finds and deletes an entry from the cache using a key to identify it The key can be prefixed with a namespace to indicate that the key can be deleted within that namespace only If a namespace is not provided the Data Cache searches for the key in the global namespace o zend disk cache delete Finds and deletes an entry from the cache using a key to identify it The key can be prefixed with a namespace to indicate that the key can be deleted within that namespace only If a namespace is not provided the Data Cache searches for the key in the global namespace o zend shm cache clear Deletes all entries from all namespaces in the cache if a namespace is provided only the entries in that namespace are deleted o zend disk cache clear Deletes all entries from all namespaces in the cache if a namespace is provided only the entries in that namespace are deleted 133 Zend Server Community Edition Reference Manual PHP Functions Zend ehm cache store Stores a variable identified by key into the cache If a namespace is provided the key is stored under that namespace Identical keys can exist under different namespaces Available since version 4 0 Description boolean zend_shm_cache_store string key mixed Svalue int Sttl OD Parameters key The data s key Optional prefix with a namespace value Any PHP o
194. ow traffic to determine if the page is performing well 63 Zend Server Community Edition Reference Manual Cache Working with Data Cache The Data Cache API is used the same way as any other API By inserting the API functions into your PHP code The Data Cache component uses an API to cache partial PHP outputs using memory or disk You can further enhance the performance of your application by caching Web pages that don t require frequent change This feature is available only in the commercial version of Zend Server The Data Cache API includes the following functionality Storing variables to the Cache Fetching variables from the Cache Deleting variables from the Cache Clearing the Cache Disk memory SHM storage Caching using namespaces Cache folder depth configuration Disk Shared Memory Caching This feature provides options to determine where to store cached variables Memory caching improves server responsiveness and increases performance primarily in environments that run high traffic applications that can benefit from off loading activity directed toward their hard disk Disk caching is more suitable for smaller applications and ensures the cached content is available after the machine is restarted SHM disk storage is implemented by using the appropriate API functions and configuring the Data Cache directives Memory option error messages have been created to notify you if the store operation
195. owledge Base for any Zend product related issue at http kb zend com Online Documentation The Zend Product Online Documentation Center can be easily browsed and searched as a resource for accessing the most to date information on using all Zend Products Visit http www zend com en resources zend documentation Open a Support Ticket Only Available in Zend Server If you did not find the answer to your question in any of the Support resources you can open a ticket with the Zend Support team who will answer each ticket on an individual basis This can be done through https www zend com en helpdesk newticket php In Zend Server CE the Community Edition all Support is administered via the Forum Zend PHP Email Updates Sign up for Zend PHP email updates for the hottest updates special promotions and useful developer information To sign up log in to your Zend account at https www zend com en user myzend enter your email address and click Subscribe Zend Server Reference Manual Zend Developer Zone Resource Center The Zend Developer Zone is the leading resource center for PHP developers where you can learn about PHP and meet the experts The Zend Developer Zone features the following The PHP 5 Info Center Articles and Tutorials PHP and PEAR News Weeklies Worldwide Job Classifieds Visit http devzone zend com Feedback Send feedback questions and comments on the Online Help and Documentation t
196. pache logs when this happens Type integer Units seconds Default Value 180 Available since version 4 0 zend_optimizerplus blacklist_filename For additional information see Extermal Configuration File above Type string Available since version 4 0 zend_optimizerplus save_comments If disabled all PHPDoc comments are dropped from the code to reduce the size of the optimized code Type boolean Default Value 1 Available since version 4 0 zend_optimizerplus fast_shutdown The fast shutdown sequence doesn t free each allocated block but lets the Zend Engine Memory Manager do the work Type boolean Default Value 0 Available since version 4 0 zend_optimizerplus optimization_level A bitmask where each bit enables or disables the appropriate Optimizer features where 0 is disabled and 1 is enabled Type integer Default Value Oxfffffbbf Available since version 4 0 118 Web API Reference Guide The following is a list of each bit represented in the value bit 0 Enables disables optimization step 1 e CSE constants subexpressions elimination e Sequences of ADD_CHAR ADD_STRING optimization bit 1 Enables disables optimization step 2 e Convert constant operands to expected types e Convert conditional jumps with constant operands e Optimize static BRK and CONT bit 2 Enables disables optimization step 3 e Convert a a expr into a expr e Convert a into a e Optimize series of
197. r PHP application is business critical you probably want to make sure that your PHP runtime environment is up to date Zend Server Updater ensures that you have the latest C versions of PHP Zend Server Components and Extensions This feature is available only in the commercial version of Zend Server Changing PHP Info The Administration Interface allows easy changing of PHP info through the Setup tab Any changes made in the Extensions Components and Directives pages will be automatically updated in your php ini file and will be reflected in the PHP Info page Configuration changes will only take effect once you PHP has been restarted by clicking Restart PHP More information about the PHP Info display can be found in the PHP Manual accessed by going to PHP Options and Information External Link Zend Server Reference Manual Logs The Logs page is accessed from Monitor Logs The Logs page is a means for developers to view log information directly from the Administration Interface This information can be used to investigate unwanted activity in your environment in terms of errors and application behavior The logs displayed in this page consist of the system logs as determined by the type of Web server you use Apache servers include three logs PHP Error log Apache Error log and Server Access log all of which reference the installation locations except for the PHP Error log which comes from the error_log di
198. r component enables remote debugging of PHP scripts with Zend Studio The Zend Debugger communicates with the Zend PHP Engine to retrieve runtime information and present it in Zend Studio for root cause analysis purposes If your machine has multiple IP addresses make sure you define all the IPs as allowed hosts in Zend Server Community Edition The Zend Debugger API communicates with the Zend PHP engine to reveal PHP runtime information such as variables call stack and environment information This information is then displayed and set up in Zend Studio to enable server side debugging profiling and code coverage 76 Zend Server Reference Manual Zend Optimizer The Zend Optimizer component speeds up PHP execution through opcode caching and optimization The Zend Optimizer improves PHP performance by storing precompiled script bytecode in the shared memory This eliminates the stages of reading code from the disk and compiling it on future access For further performance improvement the stored bytecode is optimized for faster execution This component works out of the box and therefore does not require any configuration or changes to your code The Zend Optimizer speeds up PHP execution and increases server performance resulting in better Web application performance Zend Engine checks if the fie is cached Store in Shared Memory and Execute Web Server Runs Code Fetch from Shared Memory and Execute This comp
199. r computer Zend Data Cache Release version and status Zend Debugger Release version and status Zend Guard Loader Release version and status Zend Java Bridge Release version and status Zend Optimizer The status of the Optimizer component used for opcode caching and optimizations If your PHP application is business critical you probably want to make sure that your PHP runtime environment is up to date Zend Server Updater ensures that you have the latest O versions of PHP Zend Server Components and Extensions This feature is available only in the commercial version of Zend Server 17 Zend Server Community Edition Reference Manual PHP Info The PHP Info page is accessed from Monitor PHP Info The PHP Info screen is a read only page that outputs a large amount of information about the current state of PHP It is an easily accessible representation of information contained in the php ini file including information about PHP compilation options and extensions the PHP version server information and environment PHP environment OS version information paths master and local values of configuration options HTTP headers and the PHP License The values displayed in the PHP Info page may differ from the system wide settings displayed further down the page in the Local View column of the Configuration section To see the system wide settings view information listed in the Master Value column If you
200. r operational such as licensing define the Administration Interface password create a Zend Server Cluster Manager database manage API keys for a specific server etc All operations are only applicable for the local machine you are working on zs manage A wrapper for Web API commands Some commands are for Zend Server Cluster Manager only Both zs manage and zs setup are located in lt install path gt zs manage or zs setup The CLI Tools code is written in PHP and is located at lt install_path gt share zs cli tools Some commands are not applicable to Zend Server Community Edition zs setup Commands The list of available commands can be viewed by running the command lt install path gt zs setup h set password Set the Zend Server Administration Interface password For more information see Password Management set license Set the Zend Server or Zend Server Cluster Manager license key show eula Show the End User License Agreement accept eula Accept the End User License Agreement add api key Create a new Zend Server API key list api keys List all API keys available on the system show api key Show information about a specific API key revoke api key Revoke and delete an API key set nodes license Set the license to be used by Zend Server Cluster Manager cluster members create cluster db Create the Zend Server Cluster Manager Monitor MySQL database
201. r session on the Web server on which Zend Server is installed The default value for zend_debugger allow_hosts intentionally covers a wide range of IP addresses This is to make the initial installation of Zend Server compatible for a large selection of environments However this also can be a security risk as you are permitting a wide range of IP addresses to access your Web server Therefore we recommend that you limit accessibility and create a secure environment by only using specific hosts full IP address recognized by you that you are sure you want to permit to connect To change this value in the Administration Interface go to Server Setup Debugger remove all the IP range settings and set the specific IP s that you permit to connect to Zend Server Depending on if you are working on a development or production environment you may want to consider different defaults In development environments all the machines that require access to debug should be allowed In production environments it is safer to limit access or even allocate a single machine to allow access Not only will this make your environment more secure it may also help limit and prevent unnecessary traffic on your production server 290 Index Development In the Development section you will find information on how to use Zend Server and components in development for efficient detection and diagnosis of issues This document includes information on the
202. racing dumps this action does not disable the code tracing component Limitations This action requires php 5 3 and will not operate on previous php versions Required Permissions Full HTTP method POST Supported Editions Zend Server Zend Server Cluster Manager Request parameters Parameter Type E Description ae E EE a php restart as part of the action to apply the new settings defaults to true Expected Response Code 200 OK 202 Accepted For more information see Response Format Response Format The new code tracing directive s state Possible Action Specific Error Codes HTTP Error Code Description Code internalServerError The code tracing action failed i Example Request Post ZendServerManager Api codetracingDisable Response lt xml version 1 0 encoding UTF 8 gt lt zendServerAPIResponse xmlns http www zend com server api 1 1 gt lt requestData gt lt apiKeyName gt lt CDATA Admin gt lt apikKeyName gt lt method gt codet racingDisable lt method gt lt requestData gt lt responseData gt lt codeTracingStatus gt 231 Zend Server Community Edition Reference Manual lt component Status gt Inactive lt component Status gt lt alwaysDump gt Off lt alwaysDump gt lt traceEnabled gt Off lt traceEnabled gt lt awaitsRestart gt 0 lt awaitsRestart gt lt codeTracingStatus gt lt responseData gt lt zendServerAPIResponse gt 232 We
203. rd Correct completion of this procedure in Windows Zend Server Community Edition displays the password definition page Correct completion of this procedure in other operating systems You can log in with the new password If you are unable to change your password refer to the Support Center for further information The following procedure describes how to change your password from inside the Zend Server Community Edition Administration Interface To change your password from inside the Administration Interface LJ 1 Inthe Administration Interface go to Administration Password and License 2 Enter your current password and enter your new password in the next two fields 3 Click Change Password to apply changes Correct completion of this procedure results in Zend Server Community Edition requiring you to log in with the new password the next time you access the Administration interface Zend Server Community Edition Reference Manual Registering Zend Server Community Edition After installing your version of Zend Server complete the short Setup wizard to begin working Setup Wizard To setup Zend Server Community Edition e 1 The first time Zend Server Community Edition runs after installation the Setup Wizard is displayed server Step 1 of 3 End User License Agreement Please read and accept the following terms before using Zend Server Community Edition Zend Technologies Ltd End User License Agreement This En
204. re the allowed hosts in Server Setup Debugger By default Zend Server Community Edition comes with a permissive setting that allows all standard private IP addresses for example 10 to access the Debugger For security reasons if you do not have an immediate need for permissive access remove these ranges from the Allowed Hosts 10 192 168 172 16 Additional setup information can be found in the Installation Guide in Package Setup and Control Scripts 41 Zend Server Community Edition Reference Manual Configuring Zend Server Community Edition This section refers to the actual configuration workflow for using Zend Server Community Edition Here we describe the general workflow Each component also has a separate section describing how to work with the component in detail The Zend Server Community Edition s Administration Interface is the main control center for configuring your PHP and Zend Server Community Edition components After installing Zend Server Community Edition use the Administration Interface to configure your PHP by performing the following actions 42 In Server Setup Extensions define the extensions that should be turned on or turned off If you are planning to use functions related to an extension in your code verify that the extension is turned on If your extension has additional directives that are used to configure the extension s behavior a configure link is included in the
205. rea and click Subscribe For information on upgrading see your system s procedure in Upgrading 31 Zend Server Community Edition Reference Manual Zend Controller The Zend Controller is accessed from the system tray by clicking on the Zend Icon a or from the command line by running lt install_path gt bin zendcontroller Windows users can load the Zend Controller by going to lt install_path gt bin and clicking Zend Controller exe The Zend Controller is a system tray utility that provides quick access to frequently performed tasks and useful information If you are accessing Zend Server that is running on a different machine you will not be able to see the Zend Controller unless you installed an additional instance on your machine Adding the Zend Controller to the Start Menu System Tray Taskbar The Zend Controller resides in the System Tray Taskbar The Zend Controller may behave differently in each environment In some systems the Zend Controller may run as soon as the computer is started and in others it doesn t The following instructions are included to let you define the Controller s behavior according to your preferences GNOME View the instructions online at http www ubuntugeek com howto add entries in qnome menu htm KDE view the KDE online documentation at http docs kde org develooment en kdebase workspace kmenuedit quickstart htm a Windows Vista and XP and 2008 1 Right click Start and select
206. rective IIS servers include the PHP Error log Power users can edit the XML file to include additional logs For more information on adding logs to the Logs page see Working with Logs From this page you can View Logs Filter Logs Navigate inside a log Add Logs 19 Zend Server Community Edition Reference Manual Setup Tab Components The Components page is accessed from Server Setup Components The Components page provides a convenient way to view and configure the components installed in your environment From this page when applicable you can for each rule Turn On Off See table below for component specific information Clear Empties cache information Configure Directives Clicking this link directs you to a pre filtered view of the directives in Server Setup Directives that belong to the component View Description at the end of each row of the table is a small icon that displays a tooltip that describes the component Additional actions for Specific rules Zend Debugger Allowed Clients Clicking this link directs you to Server Setup Debugger where you can define the IP addresses that can or are prohibited to connect Zend Job Queue Queue Setup Clicking this link directs you to Server Setup Job Queue where you can define global Job Queue settings Zend Monitor Monitoring Rules Clicking this link directs you to Rule Management Monitoring where you can define and
207. rmation The gathered information is used to help Zend s support team to troubleshoot support issues and provide comprehensive and efficient support Collected Information In general the information collected is defined in the definition file If for security reasons you do not want to disclose specific information you can edit the file to not include that information However the more information the support team can access the better the chance of quickly resolving support related issues Linux B To run the support tool lt install_path gt bin bugreport sh The default location for saving the files is TMPDIR zend_server_report_bug_ TIMESTAMP tar gz If TMPDIR is not defined it results to tmp The definition file is located in lt install_path gt share bugreport files This file contains the definitions for which files and directories to collect Through this file you can also define the name that will be used to create the archive in case you do not want to use the default name Example etc apache2 conf d apache_cont d Means take the contents of the entire etc apache2 conf d directory and rename it to apache_conf d lt install_path gt share bugreport commands Defines which commands to run and include in the output Once a report is generated you will see the following output Sample Output lt install_path gt bin bugreport sh The information was collected successfully Use free text to describe th
208. rver Info page and in your php ini file Changes are also applied when the server is manually restarted Restart PHP Message The Restart PHP message appears whenever a change is made to settings in your php ini file in order to apply the settings click the Restart PHP button The changes will be applied to php ini file on which Zend Server is running The Restart PHP message appears whenever a change is made to setting in your clusters php ini file In order to apply the settings go to Cluster Setup Servers select the nodes to be restarted and click Restart Selected or Restart All to reset the PHP in all nodes The changes will be applied to the php ini files on your selected node s that are associated with this cluster 44 Zend Server Reference Manual Configuring Directives Associated with Extensions E To configure a directive associated with an extension 1 Go to Server Setup Extensions 2 If the Extension has directives that can be configured a link appears in the directives column Clicking the link opens the Directives page with the relevant directives already filtered 3 Configure the directive as required You can configure multiple directives before you save and apply your changes 4 Click the Save Changes SSE ution at the top right corner of the screen to save your changes To discard changes navigate away from the screen without clicking the Save Changes button Changes are updated in the Extension
209. rver Update Notifications i More information about Zend Server updates is available here Message Date Zend Server 5 0 4 02 Dec 2010 e Zend Framework updated to 1 11 1 Zend Guard Loader support for PHP 5 3 OCIS extension updated to 1 4 4 e Oracle Client Libraries updated to 11 2 0 2 Linux only Improved reliability of Session Clustering and Zend Monitor infrastructure View the Release Notes Zend Server 5 0 3 more info 14 Sep 2010 Zend Server 5 0 2 more info 23 Jun 2010 Zend Server 6 0 1 more info 21 Apr 2010 Zend Server 5 0 0 more info 23 Feb 2010 Zend Server 4 0 6 Hotfix 4 more info 27 Jan 2010 Zend Server 4 0 6 Hotfix 3 more info 27 Jan 2010 Zend Server 4 0 6 Hotfix 1 deprecated by Hotfix 3 more info 19 Jan 2010 Zend Server 4 0 6 more info 16 Nov 2009 Zend Server 4 0 5 more info 11 Aug 2009 Subscribe to Zend Server Product Update Notifications Enter your email address in order to be notified of new Zend Server releases and other important updates Email Address Subscribe 30 Zend Server Reference Manual The update notification information is provided through an Atom feed which you can subscribe to using any standard feed reader program or service The update notification feed URL is http www zend com news server updates feed If you would like to be notified of Zend Server updates enter your email address in the Subscribe to Zend Server Product Update Notifications a
210. s If you deny a range of addresses that includes an IP that was specified in the Allowed hosts the host is not allowed to create a debug session Wildcards Net Mask Wildcards use the asterisk to define a string of IP addresses and to specify a range of IPs that are either allowed or denied hosts This option makes it possible to specify a range of IPs from 0 255 according to the selected number of wildcards For example if you use the Net Mask option to deny the IPs 10 1 3 all the IP addresses beginning with 10 1 3 are denied access to the Studio Server i e integration with Studio is not permitted for these IP addresses 59 Zend Server Community Edition Reference Manual Remote Debugging Through a Firewall Remote debugging is the process of creating a connection between two machines For example the machine on which the Debugger Zend Studio resides and the machine on which the Zend Server Community Edition resides When these machines are on the same local network or there are no security devices that limit remote connections no additional action is required However if one or both of the machines are behind a firewall the communication required to run the debug process is not allowed To allow debugging and still maintain a secure environment you need to use firewall tunneling For more information on how to setup firewall tunneling see Working with Firewall Tunneling 60 Zend Server Reference Manual Working
211. s your added value built on Zend Framework Fully Tested Extend Safely and Easily Thoroughly tested enterprise ready and built with agile methods Zend Framework has been unit tested from the start with stringent code coverage requirements to ensure that all code contributed has not only been thoroughly unit tested but also remains stable and easy for you to extend re test with your extensions and further maintain 83 Zend Server Community Edition Reference Manual Zend Controller The Zend Controller runs parallel to the Administration Interface to provide easy access to useful developer tools and information The Zend Controller is a small utility that you can use to remotely access the Administration Interface for tasks such as turning components on and off The Zend Controller also provides developer resources including the Benchmark Tool and a search area that lists sites targeted for PHP developer use 84 Zend Server Reference Manual Adding Extensions This section includes information for the following Operating Systems Zend Server on UNIX Linux Zend Server Community Edition on UNIX Linux Mac Zend Server for IBM i Zend Server Community Edition users can benefit from extension management capabilities for third party extensions as well as for Zend Extensions This enables users to load and unload all extensions directly from the Zend Server Community Edition Extensions page Important The newly added extens
212. s and tips for configuring IIS on Windows The Troubleshoot section includes solutions to known issues possible problems and an error message reference If you have a tip or best practice that you would like to see here please feel free to send it to documentation zend com 272 Index Performance In the Performance section you will find information on how to configure and optimize Zend Server and components to increase performance This document includes information on the following performance issues Optimizing Zend Server Performance This section provides a description of each performance component and includes recommendations on when the component should be installed and for which conditions it should be disabled or removed Qptimizing Monitoring This section provides suggestions on how to implement and configure the monitoring for production and development environments Fine Tuning Optimizer This section provides advanced settings to further enhance the performance gains achieved when Optimizer run out of the box Configuring PHP for Performance This section explores the optimal php ini configurations and settings to get the best PHP performance optimization 273 Zend Server Community Edition Reference Manual Optimizing Zend Server Performance The Zend Server components are designed to encompass several different requirements However there is no point in adding or using certain components
213. s consistency checks zend_optimizerplus force restart timeout Modification Type Scope boolean PHP_INI_SYSTEM boolean PHP_INI_SYSTEM boolean PHP_INI_ALL integer PHP_INI_ALL boolean PHP_INI_ALL boolean PHP_INI_SYSTEM boolean PHP_INI_ALL integer PHP_INI_SYSTEM integer PHP_INI_SYSTEM integer PHP_INI_SYSTEM integer PHP_INI_SYSTEM integer PHP_INI_ALL integer PHP_INI_SYSTEM Description Optimizer On Off switch When set to Off code is not optimized If set to On use the current directory as a part of the script key If enabled the Optimizer checks the file timestamps and updates the cache accordingly How often to check file timestamps for changes to the shared memory storage allocation Enables or disables file search in include_path optimization Enable this hack as a workaround for can t redeclare class errors Enable this hack as a workaround for duplicate definition errors The verbosity of the Optimizer log The Optimizer shared memory storage size The amount of memory for storing precompiled PHP code in Mbytes The maximum number of keys scripts in the Optimizer hash table The maximum percentage of wasted memory until a restart is scheduled Check the cache checksum each N requests How long to wait in seconds for a scheduled restart to begin if the cache 113 Zend Server Community Edition Reference Manual zend_optimizerplus blacklist filename str
214. s not mean that you must use the namespaces to clear the cache The entire cache can be cleared by using the output_cache_remove function Setting the cached namespace The cache namespace is set by adding it as a prefix to the cache with as the separator EN Example This example shows how to manipulate variable caching using a namespace zend_disk_cache_store my_namespace my_key data is fetched with Zzend_disk_cache_fetch my_namespace my_key zend_shm_cache_clear my_namespace clears all the keys that start with my_namespace Cache Folder Depth Configuration Defining the Cache folder depth is intended for environments that use a large number of keys By definition cached content is separated into different directories by key to prevent performance degradation caused by accessing files that contain large amounts of content This option is only available with disk caching Increase the cache folder depth according to the quantity of content that requires caching small amount 0 large quantities 2 Note A single directory may include several keys depending on the quantity of cached content The cache folder depth is defined by the directive zend_cache disk dir_levels The value of the directive configures how the cached files are stored The accepted values for this directive are 0 1 or 2 where 0 one directory containing all the cache files 1 a separate directory under the cache directory
215. s removed for the purpose of clarity GET ZendServerManager Api codetracingDownloadTraceFile traceFile 10 123 4 243 Zend Server Community Edition Reference Manual Response not all headers are shown HERE 0 AO OOK Content type application x amf Content disposition attachment filename 10 123 4 amf loo cloninguay CaCa LOLLOS o aod 244 Web API Reference Guide Monitor Methods The following is a list of methods available for the Monitoring feature monitorGetRequestSummary monitorDownloadTraceFile codetracingDownloadTraceFile monitorStartDebug studioStartDebug monitorGetlssuesListByPredefinedFilter monitorGetlssuesDetails monitorGetEventGroupDetails monitorExportlssueByEventsGroup monitorChangelssueStatus Possible Deployment Action Specific Error Codes HTTP Code Description 404 noSuchFilterld The requested filter does not exist 245 Zend Server Community Edition Reference Manual The monitorGetRequestSummary Method Retrieve information about a particular request s events and code tracing The requestUid identifier is provided in a cookie that is set in the response to the particular request This API action is designed to be used with the new Zend Studio browser toolbar Required Permissions Read Only HTTP method GET Supported by Editions Zend Server Zend Server Cluster Manager Request Parameters Parameter Type Required Description Bee Dee EE r
216. s using Zend Studio For more information on turning the Debugger Component to On see Working with Components From the Zend Server Community Edition perspective other than defining allowed hosts and denied hosts no additional interaction is required The following procedure describes how to define allowed hosts for debugging Users define allowed hosts to create a list of IP addresses of computers that run Zend Studio that have permission to debug the PHP code that runs on the server To define allowed hosts for debugging LJ 1 Inthe Administration Interface go to Server Setup Debugger 2 Inthe Allowed Zend Studio Clients for Debugging section enter a valid IP address or enter a range by entering the beginning of an IP address and adding 0 instead of the rest of the number To make sure you are using Wildcards to specify a range of IPs select the pattern you want from the drop down list 3 From the drop down list select an option according to the type of IP address you entered Click Exact IP address only for a single IP or one of the other options to represent a range of hosts 4 Click 99 to add the Host 5 The changes are applied after you restart the Server The IP or range of IPs is allowed to connect to the server to debug PHP code with Zend Studio To remove a specific IP from the list click Remove Important Note 58 Zend Server Reference Manual If your machine has several IP addresses f
217. s_name Obfuscate and return the given class name with the internal obfuscation function zend_ get id Returns an array of Zend host IDs in your system If all_ids is TRUE then all IDs are returned otherwise only IDs considered primary are returned zend loader version Returns Zend Guard Loader version Web API Reference Guide PHP Functions zend_loader_enabled Checks the Zend Optimizer configuration to verify that it is configured to load encoded files Available since version 4 0 Description boolean zend_loader_enabled void Return Value Returns TRUE if the Guard Loader is configured to load encoded files Returns FALSE if the Guard Loader is not configured to load encoded files zend_loader_file_encoded Returns TRUE if the current file was encoded with Zend Guard or FALSE otherwise If FALSE consider disabling the Guard Loader Available since version 4 0 Description boolean zend_loader_file_ encoded void Return Value TRUE if Zend encoded FALSE otherwise zend_loader file licensed Compares the signature of the running file against the signatures of the license files that are loaded into the License Registry by the php ini file If a valid license file exists the values of the license file are read into an array If a valid license does not exist or is not specified in the php ini it is not entered in the PHP server s license registry If a valid license that matches the product and signature ca
218. same secret key If the two signatures match the request will be accepted 184 Web API Reference Guide Data Types The following section describes the different data types used for request parameters and response data enclosed in XML The specific API methods documented in Available API Methods refer to the data types defined here The data types described here are Request Data Types Response Data Types 185 Zend Server Community Edition Reference Manual Request Data Types Request data may be encoded into several primitive types Since all data is eventually represented as UTF 8 strings these types mostly define what characters are considered valid for data of a specific type Additional validation rules may apply for specific parameters 186 Boolean A case insensitive Boolean value represented as either TRUE or FALSE Integer An integer whole number String A string of characters TimeStamp The time and date represented in RFC 882 RFC 1123 format e g Sun 06 Nov 1994 08 49 37 GMT The time and date must always be represented in the GMT time zone even if the server or client uses a different default time zone Array An array of values Arrays are encoded by adding square brackets with an incrementing 0 based index number to the parameter name For example the array parameter fruits apple o orange banana is to be represented as follows fruits
219. se the Popular option to view commonly used directives such as directives that define directories and languages 24 Zend Server Reference Manual Debugger The Debugger page is accessed from Server Setup Debugger The Debugger page is used to enable remote PHP debugging and profiling of Web applications using the Zend Debugger component This component enables developers using the Zend IDE to connect to a remote server to analyze debug and profile and fix code Event information collected by the Monitor component can be further diagnosed with Zend Studio provided that the machine running Zend Studio is registered as an allowed host and it does not appear in the denied hosts list Special attention to this should be given when specifying IP ranges to make sure that necessary IPs are not included in that range By default your local IP 127 0 0 1 is registered as an allowed host by default The Zend Debugger page allows you to configure the hosts for the following debug options Hosts allowed to initiate debugging and profiling sessions Hosts denied the permission to initiate debugging and profiling sessions 25 Zend Server Community Edition Reference Manual Administration Tab License and Password The License and Password page is accessed from Administration License and Password Upgrading from Zend Server Community Edition to Zend Server Some features are not available for users of the Zend Server Commun
220. sed access control list on the Web server running the Administration Interface After following this procedure users that try to access the Administration Interface from not allowed unauthorized IP addresses are not able to access the Administration Interface Linux The administration Interface runs on a dedicated lighttpd Web server To secure access to the Administration Interface edit your lighttpd configuration file in one of the following ways 1 To only allow access from localhost replace your lighttpd conf with the pre configured file called lighttpd conf localonly that is in the same directory 2 To limit access to specific IP addresses open your lighttpd conf and add the IP addresses as follows SHTTP remoteip 10 1 2 163 10 1 6 46 127 0 0 1 HTTP url ZendServer url access deny This example shows how to allow access from 10 1 2 163 10 1 6 46 and localhost and deny the rest You can also do EISE ere eent I VO te2oLOSILO 1 6 127 0 0 1 A EE mel ZendServer wl access dany This means that you allow access from 10 1 2 163 10 1 6 46 127 0 0 1 localhost and hosts from 10 1 6 0 and deny the rest 3 After applying the changes to your configurations restart the lighttpd server with the command lt install_path gt bin lighttpd sh restart or alternatively lt install_path gt bin zendctl sh restart lighttpd 286 Index Q For addit
221. sed by a glitch in the application the same thing would most likely occur in each of the JVMs in the non Zend system Example 2 A Case Study in Management Integration J2EE A company called FlowerPwr com sells flowers over the Internet They are a successful East Coast based firm that has an aggressive management profile They are currently in the process of acquiring a West Coast competitor let s call it Yourflowers com that provides a similar service FlowerPwr com has its own website Its various enterprise applications are written in PHP Yourflowers com also has its own Website However all its applications are Java based and were developed for J2EE They have their own J2EE application server FlowerPwr com needs to begin operating as an integrated commercial entity as soon as possible in a way that conceals the fact that the companies have merged Using the Java Bridge FlowerPwr com can create a common portal in PHP The company can leave Java up and running and take full advantage of their acquisition s existing Java services FlowerPwr com can do this over an existing portal using PHP The following code example illustrates how the Java Bridge can apply to this business scenario and others like it E Example N be Ea z EJB configuration for JBoss Other servers may need other settings Note that CLASSPATH should contain these classes Senvt array 101 Zend Server Community Edition Reference Ma
222. ser In that case try restarting your webserver and running the script again 304 Index Troubleshoot Welcome to the Zend Server Troubleshoot section The following content is a collection of knowledge and information based on the experience of Zend s Development and Support teams and the PHP community In the Troubleshoot section you will find solutions to known issues possible problems and an error message reference If you encounter any of these issues while working with Zend Server this information can help you resolve the matter quickly to enable you to return to your normal workflow Cant find what you are looking for We want to know Send a mail to documentation zend com asking about an error message or a usability issue and we will make a troubleshoot item and add it here This document includes information on the following issues All operating systems Zend Server Exception Caught When the port settings are not configured as expected License Not Working Your new license does not activate the features Zend Controller Cannot Login Zend Controller does not start as expected Zend Controller Cannot Run Benchmark There is an issue with the URL you are trying to test Error Failed to Communicate with Zend Studio The communication with Zend Studio has failed Changing the Component s Log Directory Configuration options for advanced users Log File Permissions Handle connection permission errors to
223. sible action specific error codes Lists the HTTP response code and error code that can be returned in case of an unsuccessful operation Every method can receive any of the generic error codes in addition to its possible action specific error codes For more information see Error Responses Response format This is only defined in methods which return a response format different from the generic response format The methods described here are Server and Cluster Management Methods Configuration Management Methods Codetracing Methods Monitor Methods Studio Integration Methods 205 Zend Server Community Edition Reference Manual Server and Cluster Management Methods The following is a list of the available methods used to manage your server and or cluster e getSystemInfo e clusterGetServerStatus e clusterAddServer e clusterRemoveServer e clusterDisableServer e clusterEnableServer e clusterReconfigureServer e restartPHP 206 Web API Reference Guide The getSystemInfo Method Use this method to get information about the system including the Zend Server edition and version PHP version licensing information etc This method produces similar output on all Zend Server systems and is future compatible deploymentVersion will only show the current deployment version for Zend Server versions which support the feature If your Zend Server version does not support deployment 0 zero will be displayed
224. specified in the directive zend log_dir in the ZendGlobalDirectives ini file located in lt install_path gt etc conf d ZendGlobalDirectives ini If you change the path the following components will write their logs to the new location monitor log monitor_node log monitor_zdo log page_cache log Linux J To Change the Log directory in Linux 1 Create the new logs directory with write permissions in order to be able to write the logs in the new directory 2 The new directory has to be owned by the Apache NOBODY user profile and belong to the file system group zend To move the directory to the zend group run the following command as user root chown r Apache user zend new directory 3 Open lt install_path gt etc cont d ZendGglobalDdirectives ini and change the value of zend log_dir to the new log directory 4 Run zendctl sh stop and zendctl sh start to apply the changes this script is located in lt install_path gt bin Now the log files for the Zend Page Cache and Zend Monitor components will be written to the new location This means that some log files such as Apache and PHP will still be written to the default directory lt install_path gt var log 321 Zend Server Community Edition Reference Manual Windows To Change the Log directory in Windows 1 Create the new logs directory 2 Open lt install_path gt etc php ini and change the value of zend log_dir to the new log directory 3 To apply cha
225. ssary to an get going SSC Extensible and well A tested code base Frameworks and best practices mean reduced training costs and quicker time to market important factors in adoption decisions Built so you can pick and choose just the pieces you need to turbocharge your web applications all your developers know where to find their PHP Zend Framework code which speeds new development and reduces maintenance costs 82 Zend Server Reference Manual Latest Web Development Features AJAX support through JSON meet the ease of use requirements your users have come to expect Search a native PHP edition of the industry standard Lucene search engine Syndication the data formats and easy access to them your Web 2 0 applications need Web Services Zend Framework aims to be the premier place to consume and publish web services High quality object oriented PHP 5 class library attention to best practices like design patterns unit testing and loose coupling Friendly amp Simple Licensing Safe for the Enterprise Based on the simple and safe new BSD license with Zend Framework s License you can rest assured that your code is compliant unimpeachable and protected as you see fit We also require all contributors to the open source Zend Framework to complete and sign a Contributor License Agreement CLA which is based on the standard open source Apache license to protect your intellectual property that i
226. ssion gt lt session gt oon vel lt parameter gt lt name gt HTTP_USER_AGENT lt name gt lt value gt Wget 1 12 linux gnu lt value gt lt parameter gt lt parameter gt lt name gt HTTP_ACCEPT lt name gt lt value gt lt value gt lt parameter gt lt parameter gt lt name gt REQUEST_TIME lt name gt lt value gt 1315396868 lt value gt lt parameter gt lt server gt lt superGlobals gt lt debugUrl gt lt debugUr1 gt lt severity gt normal lt severity gt lt backtrace gt lt step gt lt number gt 0 lt number gt lt object gt lt object gt lt class gt lt class gt lt function gt bt_generator lt function 248 Web API Reference Guide gt lt file gt var www test php lt file gt lt line gt 293 lt line gt lt step gt lt backt race gt lt event gt lt events gt lt requestSummary gt lt responseData gt lt zendServerAPIResponse gt 249 Zend Server Community Edition Reference Manual The monitorDownloadTraceFile Method See codetracingDownloadTraceFile 250 Web API Reference Guide The monitorStartDebug Method See studioStartDebug 251 Zend Server Community Edition Reference Manual The monitorGetlssuesListByPredefinedFilter Method Retrieve a list of monitor issues according to a preset filter identifier The filter identifier is shared with the Ul s predefined filters This WebAPI method may also accept ordering details and
227. stration Interface under Server Setup Extensions from which you can also load and unload the extension for more information see Working with Extensions 95 Zend Server Community Edition Reference Manual Scenario 2 Compile a PHP extension included in the main PHP source called PSpell Pspell Portable Spell Checker Interface Library provides a generic interface to the system spelling checking libraries To compile PSpell first install the php source zend ce pe package for this procedure Also since this extension relies on the portable spell checking interface pspell library you will need to install its devel package Debian and Ubuntu users should install the ibpspell dev package on RedHat based distributions the package name is aspell devel E To compile your own extension 1 CD the extension s source directory in our example the PHP version is 5 2 9 as it is the current stable version Zend Server Community Edition is shipped with cd usr local zend share php source php 5 2 9 ext pspell 2 Run phpize usr local zend bin phpize The output should be similar to this Configuring for PHP Api Version 20041225 Zend Module Api No 20060613 Zend Extension Api No 220060519 3 Run the configure script generated by phpize contigure with php config usr local zend bin php contig 4 Run make make 5 Become a super user root and run make install The output should be Installing shared
228. t apikeyName gt lt CDATA Admin gt lt apikKeyName gt lt method gt monitorGetIssuesListByPredefinedFilter lt method gt lt requestData gt lt responseData gt lt issues gt lt issue gt lt id gt 11 lt id gt lt rule gt PHP Error lt rule gt lt count gt 1 lt count gt lt lastOccurance gt 123412341234 lt lastOccurance gt lt severity gt Warning lt severity gt lt status gt Open lt status gt lt generalDetails gt lt url gt http localhost test php lt url gt lt sourceFile gt var www test php lt sourceFile gt lt sourceLine gt 302 lt sourceLine gt lt function gt fopen lt function gt lt aggregationHint gt 123412341234 lt aggregation Hint gt 253 Zend Server Community Edition Reference Manual 254 lt generalDetails gt lt issue gt lt issues gt lt responseData gt lt zendServerAPIResponse gt lt errorString gt Permission Denied lt errorString gt lt errorType gt E_WARNING lt errorType gt Web API Reference Guide The monitorGetlssuesDetails Method Retrieve an issue s details according to the issueld passed as a parameter Additional information about event groups is also displayed Required Permissions Read only HTTP method GET Supported by Editions Zend Server Zend Server Cluster Manager Request Parameters issueld String Yes The predefined filter s id Can be the filter s name or the actual identifier randomly created by the syst
229. t click on E and select Seitings from the menu Reenter your password in the Password field 3 Your port number is incorrect Open the Zend Controller settings menu right click on E and select Settings from the menu Make sure the port number is correct same as in the URL for opening Zend Server 313 Zend Server Community Edition Reference Manual Error Failed to Communicate with Zend Studio The following error message appears in Zend Server when using the Zend Studio Diagnostics that are available from the Monitor Events Event Details page Failed to communicate with Zend Studio Go to the online help s troubleshoot section to find out how to fix the connection as 8 E 9 Fatal PHP Error Page last refreshed 08 Feb 2011 12 02 zg O AZ Occurred 7 times between 06 Feb 2011 11 19 and 07 Feb 2011 13 09 Status Open Severity Critical URL http pe karnafitesticluster control parallelAdd more Source File fusr local zend share ZendFrameworkilibraryiZend H more Function Name Zend_Http_Client request Error String Uncaught exception Zend_Http_Client_Adapter_Excep more E Start Time Count Error Data Function Data Request Server Backtrace _ Epot 07 Feb 13 09 Baa PHP Error 3 07 Feb 13 01 Uncaught exception Zend_Http_Client_Adapter_Exception with message Unable to Connect to tep 10 9 115 68 10081 06 Feb 11 19 1 i iil KI Zend Studio Diagnostics Debug Event Profile Event Show File i
230. ta gt lt zendServerAPIResponse gt 234 Web API Reference Guide The codetracinglsEnabled Method Check if the directives zend_codetracing always_dump and zend_codetracing trace_enabled are set and if the code tracing component is active Limitations This action requires php 5 3 and will not operate on previous php versions Required Permissions Read only HTTP method GET Supported Editions Zend Server Zend Server Cluster Manager Request parameters None Expected Response Code 200 OK For more information see Response Format Response Format Indication for the component s current status Possible Action Specific Error Codes HTTP Error Code Description Code internalServerError The code tracing action failed EN Example Request Get ZendServerManager Api codetracinglsEnabled Response lt xml version 1 0 encoding UTF 8 gt lt zendServerAPIResponse xmlns http www zend com server api 1 1 gt lt requestData gt lt apiKeyName gt lt CDATA Admin gt lt apikKeyName gt lt method gt codet racingIsEnabled lt method gt lt requestData gt lt responseData gt lt codeTracingStatus gt lt componentStatus gt Active lt component Status gt lt alwaysDump gt On lt alwaysDump gt lt traceEnabled gt On lt traceEnabled gt 235 Zend Server Community Edition Reference Manual lt awaitsRestart gt 1 lt awaitsRestart gt lt codeTracingStatus gt lt responseData gt
231. te Method Delete a code tracing file entry Required Permissions Full HTTP method POST Supported Editions Zend Server Zend Server Cluster Manager Request parameters Parameter Type Required Description mene e Expected Response Code 200 OK For more information see Response Format Response Format Details of the trace file entry that was deleted lt or gt an error message if the operation failed Possible Action Specific Error Codes HTTP Error Code Description Code internalServerError The code tracing action failed La eme The requested trace could not be found E Example Request Post ZendServerManager Api codetracingDelete Response lt xml version 1 0 encoding UTF 8 gt lt zendServerAPIResponse xmlns http www zend com server api 1 1 gt lt requestData gt lt apikKeyName gt lt CDATA Admin gt lt apikKeyName gt lt met hod gt codet racingDelete lt met hod gt lt requestData gt lt responseData gt lt codeTrace gt 239 Zend Server Community Edition Reference Manual LOPI H ILA LO lt date gt 123412341234 lt date gt lt url gt http localhost test php lt url gt lt createdBy gt Monitor Event lt createdBy gt lt fileSize gt 12341234 lt fileSize gt lt applicationId gt 1 lt applicationId gt lt codeTrace gt lt responseData gt lt zendServerAPIResponse gt 240 Web API Reference Guide The codetracingList Method
232. ten concurrent PHP instances For high load Web servers it is recommended to increase this value based on your performance requirements and other hardware software limitations such as memory CPU etc E To control the maximum amount of concurrent PHP instances Go to C WINDOWS system32 inetsrv fcgiext ini Locate the entry for php under Types Locate the section corresponding to this entry usually under PHP bk ob gt Append the following line at the end of this section MaxInstances 10 This will enable Zend Server to run ten PHP instances for high loads If you have lots of memory and high loads you can increase this value even more J To control the amount of requests handled by a single PHP instance before recycling 1 Goto C WINDOWS system32 inetsrv fcgiext ini 2 Locate the entry for php under Types 3 Locate the section corresponding to this entry usually under PHP 4 Append the following line at the end of this section InstanceMaxRequests 10000 This will allow a single PHP instance to handle 10 000 requests instead of the default 1 000 If you set this number higher make sure you increase the value of PHP_FCGI_MAX_REQUESTS located in the same file accordingly Index Tuning FastCGI Configuration for IIS7 These performance enhancements are defined by default when installing Zend Server By default Zend Server runs with a maximum of ten concurrent PHP instances For high load Web
233. text in the Filter area and click Refresh There is no need to display the complete log again Navigate Inside a Log This procedure describes the different navigation options available for navigating inside a selected log file Start displays the first X lines of the log file LJ Prev shows the previous X lines of the log file Next Shows the Next X lines of the log file End displays the last X lines of the log file X represents the number of lines that you specified in the Show option 59w L20 es The default value is 20 46 Zend Server Reference Manual Activate Auto refresh The following procedure describes how to activate and deactivate the Auto refresh option The Auto refresh option sets the log information to display the most recent log entries in the last lines of the log that is currently being viewed Therefore as the log changes over time the content in the view is always current This feature provides an easy way to view errors in almost real time Because the refresh rate is in seconds there is at least a 3 5 second display lag which is why the Auto refresh feature is not considered true real time logging E To activate Auto refresh 1 Select a log to display 2 Click the Auto refresh check box to automatically refresh the log information As long as the log is displayed the information is refreshed Each time you choose another log or exit the page the settings are reset Advanced A
234. th Zend Guard or FALSE otherwise If FALSE consider disabling the Guard Loader zend loader file licensed Compares the signature of the running file against the signatures of the license files that are loaded into the License Registry by the php ini file If a valid license file exists the values of the license file are read into an array If a valid license does not exist or is not specified in the php ini it is not entered in the PHP server s license registry If a valid license that matches the product and signature cannot be found in the license directory an array is not created For information on the proper installation of a license file as well as the php ini directive see the Zend Guard User Guide zend loader current file Obtains the full path to the file that is currently running In other words the path of the file calling this API function is evaluated only at run time and not during encoding zend loader install license Dynamically loads a license for applications encoded with Zend Guard zend obfuscate function name Obfuscate and return the given function name with the internal obfuscation function zend current obfuscation level Returns the current obfuscation level support set by zend_optimizer obfuscation_level_support to get information on the product that is currently running zend runtime obfuscate Start runtime obfuscation support to allow limited mixing of obfuscated and un obfuscated code zend obfuscate clas
235. that you enter a list of IP addresses to allow deny or permit remote debugging through a firewall therefore it has an additional option for adding Allowed Clients This component can be restarted This component stores information and therefore has an additional action for clearing information For more information on adding additional components see the Installation Guide The On Off Status is used to configure your php ini according to the components you want to load If you intend to use functions related to a component in your code verify that the extension is enabled and that the status is set to On Hovering with the curser over the Information icon displays a brief component description If your PHP application is business critical you probably want to make sure that your PHP runtime environment is up to date Zend Server Updater ensures that you have the latest versions of PHP Zend Server Components and Extensions This feature is available only in the commercial version of Zend Server 21 Zend Server Community Edition Reference Manual Extensions The PHP Extensions page is accessed from Server Setup Extensions The PHP Extensions page provides a convenient way to view and configure extensions Use this page to control and configure extensions that are loaded in your environment To find out how to add more extensions to this list see Adding Extensions and UNIX Compiling PHP Extensions for Zend
236. the ssl _module but this needs to be loaded in order to activate it You must have acquired an SSL certificate from an SSL certificate provider e g http www slacksite com apache certificate html or have created your own SSL certificate for the mod_ssl to be loaded J To load the mod sel module 1 Open your httpd conf file By default this is located in Windows lt install_path gt apache2 conf httpd conf Linux Tarbal lt install_path gt apache2 cont httpd conf 2 Un comment the following line by removing the Include conf extra httpd ssl conf This calls the SSL configuration file 3 Place your server crt and server key certification files in the conf folder 4 Restart the Apache server for the changes to take effect The mod_ssl module is loaded 98 Zend Server Reference Manual Java Bridge Use Cases This section describes some of the common uses for the Java Bridge The usage scenarios and examples discussed here provide a framework for the Java Bridge s uses rather than a complete picture Real world experience indicates that companies are finding more and more applications for the Java Bridge beyond what was initially anticipated Usage Scenarios There are two usage scenarios that describe the most common applications for the PHP Java Bridge Integration with Existing Java Infrastructure PHP is a fully featured scripting language engineered to cover virtually all of an enterprise s requiremen
237. the Zend Debugger when running a remote debug session with Zend Studio Type string Available since version 3 6 zend_debugger allow_tunnel A list of hosts hostmask list that can use the machine on which Zend Server is installed to create a communication tunnel for remote debgging with Zend Studio This is done to solve firewall connectivity limitations Type string Available since version 3 6 zend_debugger max_msg_size The maximum message size accepted by the Zend Debugger for protocol network messages Type integer Default Value 2097152 Available since version 3 6 zend_debugger httpd_uid The user ID of the httpd process that runs the Zend Debugger only for tunneling Type integer Default Value 1 Available since version 3 6 110 Web API Reference Guide zend_debugger tunnel_min_port A range of ports that the communication tunnel can use This defines the minimum value for the range Type integer Default Value 1024 Available since version 3 6 zend_debugger tunnel_max_port A range of ports that the communication tunnel can use This defines the maximum value for the range Type integer Default Value 65535 Available since version 3 6 zend_debugger expose_remotely Define which clients know that the Zend Debugger is installed lt br gt 0 Never The presence of the Zend Debugger is not detected by other clients lt br gt 1 Always All clients can detect the Zend Debugger lt br gt 2 Allowed H
238. the browser with an error Possible cause It could be that your Web site is not running Solution Turn on your Web site B To turn on your Web site 1 Goto My Computer 2 Right click and from the menu select Manage The management Console is displayed In the navigation tree locate the node Internet Information Services Under this node is a list of Web sites make sure that the Web site Zend Server is associated with is running If it is not running there will be a red indicator on the folder 5 To set the Web site to run right click on the folder and set to start Try to run Zend Server again If this did not solve the problem more information can be found in the Zend Support Center http www zend com en support center Supported Web sites IIS5 users will only have one Web site Whereas IIS6 and IIS7 support multiple Web sites When activating a Web site make sure that you are activating the appropriate Web site the site that was selected in the installation process 316 Index Windows Zend Server not Loading g This Item is only relevant for Windows If for any reason you cannot load Zend Server or one of the Zend Server related process causes a crash or unexpected system behavior use the installer in Repair mode To run the installer in repair mode LJ 1 Run the installer file or go to Start Control Panel Add or Remove Programs Zend Server and select Modify to run the installer 2 Click Next to complete
239. the cracks Using monitoring helps organizations improve communication between the development testing and IT teams to streamline the development and deployment processes Development and production environments can unify the working environment and ensure improved information collection and distribution between development teams testing teams and IT teams See illustration below K Detailed Bugs i Quality Assurance Developer Using Zend Server in your working environment ensures that pertinent and focused information reaches the right person at the right time The enhanced information exchange results in major improvements in quality of code time to production and overall performance and stability The subsequent benefit is more resources dedicated to activities that focus on improving and expanding the current application and less time spent on locating the information that is necessary to recreate and resolve code and performance issues The Monitor component assists the efforts of the development testing and IT teams to quickly pinpoint analyze and resolve issues such as PHP Slow Script Execution Function Errors Database Errors etc 276 Index Workflow Implement customized Event Rules to areas prone to problems in your unique environment facilitating focused and efficient problem resolution Analyze Full Problem Context for a detailed insight of problematic occurrences Integrate with Zend Studio to res
240. the location of your Zend Server installation your document root will be located at lt installation_directory gt Apache2 2 conf httod conf where lt installation_directory gt is the location of the directory in which Zend Server is installed Linux If you installed Zend Server from a repository DEB or RPM packages the location of your 294 Index configuration file is defined by your distribution s Apache packages and will vary depending on your distribution and configuration Common locations include e Debian Ubuntu etc apache2 apache2 conf e Fedora Core RHEL CentOS etc httpd httpd conf If you changed the location of your Zend Server installation your document root will be located at lt installation_directory gt apache2 conft httpd conf where lt installation_directory gt is the location of the directory in which Zend Server is installed 295 Zend Server Community Edition Reference Manual Deployment to Production In the Deployment to Production section you will find information on how to deploy code that runs on Zend Server If you are using Zend Server running on Apache or Zend Server Cluster Manager on Linux you can use the Deployment feature to deploy your application This document includes information on Deploying Code with Zend Server This section presents suggestions on how to best deploy your PHP code to run with Zend Server for production and development environments 296 Index
241. the repair process and Finish to close the Installer You should now be able to run Zend Server If you are still encountering problems check out our Support Center at http www zend com en support center 317 Zend Server Community Edition Reference Manual Windows Internet Explorer Blocking Zend Server g This item is relevant for Internet Explorer 7 running on Windows 2008 Server After installing Zend Server for the first time you may encounter an Internet Explorer system message stating that Zend Server was blocked see image below Internet Explorer ai Content from the Web site listed below is being SE Explorer Enhanced Cose http 10 1 9 66 Leam more about Intemet orer s Enhanced Security Confi if you trust this Web site you can lower security settings for the site by adding it to the Trusted sites zone If you know this Web site is on your local intranet review help for instructions on adding the site to the local intranet zone instead To add this site to Trusted sites zone Select the Tools menu then Intemet Options On the Security tab select Trusted Zone and then Sites Important parar ee oe ee ee settings for all content from this web site for all applications including Intemet Explorer This is a security message prompting you to add Zend Server to the trusted sites zone This procedure describes how to add Zend Server to the trusted sites zone in Internet Explorer 7 running on Windows
242. ts At the same time many enterprises have a long history of application development in Java The Java Bridge enables enterprises to continue to use their Java infrastructure applications databases business logic and various Java servers WebLogic JBoss Oracle Application Server etc Accessing Java Language and Architecture Some enterprises require the full set of PHP capabilities yet have a specific need for select Java based applications SIP signaling in the communications industry or JDBC for creating connectivity to SQL databases are two examples of impressive industry specific products The Java Bridge enables enterprises to adopt a PHP standard and to use their preferred Java based applications Activities This section describes two sample activities that indicate some of what you can do with the PHP Java Bridge In the sample activities it is important to differentiate between Java and J2EE The difference will impact on architecture and in turn on the script code The important differences are Java is a programming language Java applications created in Java for the enterprise are not bound to a specific framework Therefore it is possible and perhaps preferable for an enterprise to relocate code libraries to the server that runs Zend Server Community Edition J2EE is a structured framework for application scripts developed for J2EE It is preferable that J2EE servers be left intact 99 Zend Server Community
243. ts turned on to see the effect each component has on performance Before running a test make sure the URL you enter is the exact URL and does not rely on redirection Using a redirecting URL causes the test to fail To run a Benchmark LJ 1 Open the Zend Controller In the Benchmark section enter a URL In the Duration section define the amount of seconds to run the test If you are comparing how different Zend Server Community Edition components affect performance make sure you run the tests at approximately the same time to avoid large fluctuations in traffic volume and ensure that the traffic conditions are similar for each test 4 Click Go to start running the test Clicking Abort terminates the test without collecting test information 62 Zend Server Reference Manual The results are displayed in a bar chart The Benchmark tool displays up to five test results If there are more than five results the tool displays the five most recent results Understanding Results Once you have the results the most important consideration is to determine what constitutes a good value URL Duration sec fwwzendcomien Bio es 03 04 12 pm 03 04 22 pm 03 06 29 pm When testing the effect Zend Server Community Edition components have on performance the more requests per second the faster the code Another consideration is the size of the page Large pages take longer to load and should be checked during both high and l
244. ttp www zend com server api 1 0 gt lt requestData gt lt apikKeyName gt angel eyes lt apikeyName gt lt method gt clusterEnableServer lt method gt lt requestData gt lt responseData gt lt serveriInfo gt lt 1 a lt ie lt name gt www 02 lt name gt lt address gt https www 02 1local 10082 ZendServer lt address gt lt status gt pendingRestart lt status gt lt messageList gt lt serveriInfo gt lt responseData gt lt zendServerAPIResponse gt Important Note For Zend Server or Zend Server Cluster Manager on Mac or Linux this action is also available via the command line using CLI Tools For more information see CLI Tools 219 Zend Server Community Edition Reference Manual The clusterReconfigureServer Method Re configure a cluster member to match the cluster s profile This operation will fail on a Zend Server Cluster Manager with no valid license Required Permissions full HTTP method POST Supported by Editions Zend Server Cluster Manager Request Parameters es doRestart Boolean No Specify if the re configured server should be restarted after the re configure action The default is FALSE Expected Response Code 200 OK The server was re configured successfully 202 Accepted The server was re configured successfully and is now in the process of being restarted Response Type serverinfo with the status of the server which is being re configured The status is expecte
245. turn Value If the namespace does not exist or there are no items to clear the function will return TRUE The function will return FALSE only in case of error 137 Zend Server Community Edition Reference Manual Zend Java Bridge Configuration Directives Configuration Directives Summary e Modification SA Directive Type Scope Description zend jbridge server_port integer PHP_INI_SYSTEM me TOP BEER listening zend jbridge ints are longs boolean PHP_INI_ALL GU Sek EROS mie Java lang Long integers primarily for 64 bit machines zend_jbridge encoding string PHP_INI_ALL Sets he encoding ype thal g pasad rom PHP to Java zend jbridge use java objects boolean PHP_INI_ALL Uses basic Java objects and does not attempt to convert them to primitives 138 Web API Reference Guide Configuration Directive Details zend_jbridge server_port Default is 10001 Must be the same as the server s zend javamw port Type integer Default Value 10001 Available since version 4 0 zend_jbridge ints_are_longs Translates PHP integer values to java lang Long integers 64 bit instead of java lang Integer integers 32 bit The default setting is off Type boolean Default Value 0 Available since version 4 0 zend_jbridge encoding Sets the encoding type that is passed from PHP to Java Type string Default Value UTF 8 Available since version 4 0 zend_jbridge use_java_objects When set to 0 preserves the current implementation whic
246. ue or false ZendJobQueue isJobQueueDaemonRunning Checks if the Job Queue Daemon is running ZendJobQueue suspendQueue Suspends the Job Queue so it will accept new jobs but won t start them The jobs which were executed during call to this function will be completed ZendJobQueue resumeQueue Resumes the Job Queue so it will schedule and start queued jobs ZendJobQueue getStatistics Returns internal daemon statistics such as up time number of complete jobs number of failed jobs number of waiting jobs number of currently running jobs etc ZendJobQueue getConfig Returns the current value of the configuration option of the Job Queue Daemon ZendJobQueue reloadConfig Re reads the configuration file of the Job Queue Daemon and reloads all directives that are reloadable ZendJobQueue getJobInfo Returns an associative array with properties of the job with the given id from the daemon database ZendJobQueue getDependentJobs Returns a list of associative arrays with the properties of the jobs which depend on the job with the given identifier ZendJobQueue getJobsList Returns a list of associative arrays with properties of jobs which conform to a given query 147 Zend Server Community Edition Reference Manual 148 ZendJobQueue getApplications Returns an array of application names known by the daemon ZendJobQueue getSchedulingRules Returns an array of all the registered scheduled rules Each rule is represented by a
247. ueue Statistics Code Tracing Server Info PHP Info Logs Recent Events System Overview Tasks PHP Version Learn how to start with Zend Server and PHP Zend Framework Version Configure Zend Server Components Zend Server Zend Code Tracing Zend Data Cache Zend Debugger Zend Deployment Zend Download Server Zend Guard Loader Zend Java Bridge Zend Job Queue Zend Monitor Zend Optimizer Zend Page Cache Zend Session Clustering O Restart PhP Ed To get started with the newly available Zend Server features see Getting Started and Working with Zend Server For more information on registering Zend Server and license expiration see Registering Zend Server 11 Zend Server Community Edition Reference Manual Support Zend Technologies provides a wide range of resources for obtaining additional information and support such as the Zend Support Center the Zend Newsletter and the Zend Developer Zone Zend Support Center The Zend Support Center is a portal for information on all Zend Product related issues From the Zend Support Center you can access Zend Forums Hosted user forums for the Zend product user community See what other users have to say and get answers directly from the Zend Support team Visit http forums zend com Zend Support Knowledge Base The Zend Knowledge Base contains an extensive range of articles on commonly encountered problems troubleshooting tips and work arounds Search the Kn
248. unning otherwise it returns false 155 Zend Server Community Edition Reference Manual ZendJobQueue suspendQueue Suspends the Job Queue so it will accept new jobs but won t start them The jobs which were executed during call to this function will be completed Available since version 5 0 Description void ZendJobQueue suspendQueue void ZendJobQueue resumeQueue Resumes the Job Queue so it will schedule and start queued jobs Available since version 5 0 Description void ZendJobQueue resumeQueue void ZendJobQueue getStatistics Returns internal daemon statistics such as up time number of complete jobs number of failed jobs number of waiting jobs number of currently running jobs etc Available since version 5 0 Description array ZendJobQueue getStatistics void Return Value Associative array ZendJobQueue getConfig Returns the current value of the configuration option of the Job Queue Daemon Available since version 5 0 Description array ZendJobQueue getConfig void 156 Web API Reference Guide Return Value Associative array of configuration variables ZendJobQueue reloadConfig Re reads the configuration file of the Job Queue Daemon and reloads all directives that are reloadable Available since version 5 0 Description boolean ZendJobQueue reloadConfig void Return Value If configuration file was loaded successfully or not ZendJobQueue getJobInfo Returns an asso
249. upgrading to Zend Server from within the product J To upgrade to Zend Server 1 Go to the Zend Server Download page to receive a valid license 2 In your product go to Administration License and Password amp Applications z Administration License and Password APikeys Update Notifications Activate Zend Server Features Zend Server License Order number License key o To learn more about the advanced features of Zend Server click here Change Password Enter your current password Choose a new password Confirm your new password Zend Server Feature Content Turn Zend Server feature information off to hide tabs containing only features available in Zend Server Zend Server feature information displayed Yes No Update 5 Restart PHP VA 2 Inthe Zend Server License area enter your license details as follows e Order number Enter your license number name e License Key Enter your license key 3 Click P Ate License to apply new licensing details 10 Zend Server Reference Manual The progress indicator is displayed indicating that the validation of the license details is taking place Af P Please wait while PHP is ef La being restarted A 4 Zend Server reloads the Administration Interface with all Zend Server Community Edition features enabled server Help About Logout ll Monitor SN Applications Rule Management Ki Server Setup Ki Administration Dashboard Events Jobs Q
250. urces All the developer resources can be found at http framework zend com Why Zend Framework Taken from http framework zend com whyzf overview Extending the art and spirit of PHP Zend Framework is based on simplicity Object oriented best practices corporate friendly licensing and a rigorously tested agile code base Zend Framework is focused on building more secure reliable and modern Web 2 0 applications and Web services and consuming widely available APIs from leading vendors like Google Amazon Yahoo and Flickr as well as API providers and cataloguers like Sitrikelron and ProgrammableWeb Expanding on these core themes we have implemented Zend Framework to embody extreme simplicity and productivity the latest Web 2 0 features simple corporate friendly licensing and an agile well tested code base that your enterprise can depend upon Extreme Simplicity amp Productivity We designed Zend Framework with simplicity in mind To provide a lightweight loosely coupled component library simplified to provide 4 5s of the functionality everyone needs and that lets you customize the other 20 to meet your specific business needs By focusing on the most commonly needed functionality we retain the simplified spirit of PHP programming while dramatically lowering the learning curve and your training costs so developers get up to speed quickly We do this with No configuration ch Flexible architecture IN files nece
251. use it to change the status of the following components Data Cache Debugger Optimizer and Java Bridge You can also access the Administration Interface directly by clicking one of the following Zend Controller buttons Configure Zend Debugger Zend Extension Configuration and PHP Info Other Zend Controller features include Multi Source search and Benchmarking Using the Zend Controller Benchmark Tool The Zend Controller Benchmark tool is a simple benchmark that developers can use to run performance tests on the URLs Web pages they develop The main purpose of this tool is to identify the performance gain that is achieved when using Zend Server Community Edition s Optimizer and Data Caching components This can be done by turning the different Zend Server Community Edition components on and off and running the benchmark The Zend Controller Benchmark tool does not replace standard benchmarking utilities It is intended to provide a quick and easy way to measure performance without having to run elaborate and resource expensive performance tests How it Works The Benchmark tool checks HTTP request response times and lists them in a bar chart that displays when the test was started and the average amount of requests per second received for the duration of the test user defined in seconds These tests can be run once without one of the performance related components Data Cache and Optimizer and then again with each or all componen
252. uster after performing a graceful shutdown and has no sessions to reclaim 202 Accepted The process started but has not completed yet You can check the server status within a few seconds using the clusterGetServerStatus method to verify that the operation is complete Response Type serverlnfo with the status of the server being enabled Status is expected to be either startingUp if the server is in the process of re joining the cluster or any other active status OK pendingRestart misconfigured extensionMismatch daemonMismatch notResponding if the process was completed Possible Action Specific Error Codes HTTP Error Code Description Code 4 There is no server with the provided server ID 500 cantConnectT oServer Zend Server Cluster Manager is unable to connect to the specified server 500 invalidServerResponse An invalid or unexpected response from the server 503 temporarilyLocked The server cannot be disabled because another server in the cluster is performing a graceful startup shutdown 218 Web API Reference Guide 405 notImplementedByEdition The method is not implemented by this edition of Zend Server 500 serverNotLicensed Zend Server Cluster Manager is not licensed Example Request headers removed for clarity POST ZendServerManager Api clusterEnableServer serverId 5 Response arra l 0 200 Ox lt xml version 1 0 encoding UTF 8 gt lt zendServerAPTIResponse xmlns h
253. vailable on Zend Server Cluster Manager 212 Web API Reference Guide Example Request headers removed for clarity POST ZendServerManager Api clusterAddServer serverName www O05 amp serverURL https www 05 local 10081 ZendServer amp guiPassword somepassword amp doRestart TRUE Response lt xml version 1 0 encoding UTF 8 gt lt zendServerAPTResponse xmlns http www zend com server api 1 0 gt lt requestData gt lt apikKeyName gt angel eyes lt apikeyName gt lt method gt clusterAddServer lt method gt lt requestData gt lt responseData gt lt serverinfo gt lt id gt 25 lt id gt lt name gt www 05 lt name gt lt address gt https www 05 local 10082 ZendServer lt address gt lt status gt OK lt status gt lt messageList gt lt serveriInfo gt lt responseData gt lt zendServerAPIResponse gt Important Note For Zend Server or Zend Server Cluster Manager on Mac or Linux this action is also available via the command line using CLI Tools For more information see CLI Tools 213 Zend Server Community Edition Reference Manual The clusterRemoveServer Method This method removes a server from the cluster The removal process may be asynchronous if Session Clustering is used If this is the case the initial operation will return an HTTP 202 response As long as the server is not fully removed further calls to remove the same server should be idempotent On a Zend
254. vailable since version 4 0 Description array zend_get_id boolean Sall_ids false Parameters all de If all_ids is TRUE returns all IDs otherwise returns only IDs that are considered primary The default value is false Return Value Array of host IDs 128 zend_loader_version Returns Zend Guard Loader version Available since version 4 0 Description string zend_loader_version void Return Value Zend Guard Loader version Web API Reference Guide 129 Zend Server Community Edition Reference Manual Zend Data Cache Configuration Directives Configuration Directives Summary Modification Directive Type Scope Description Amount of shared memory each data cache namespace will consume This includes the global namespace used when none are defined in cached objects The path for storing cached content to the disk zend daiacache dek dr level integer PHP_INI_SYSTEM Directory depth for storing keys Enables the Data Cache The Data Cache cannot work without zend datacache enable boolean PHP_INI_SYSTEM this directive The Data Cache can be turned on or off from the Administration Interface When enabled the Data Cache zend datacache shm memory cache size integer PHP IN SYSTEM zend_ datacache disk save path string PHP_INI_SYSTEM zend _datacache apc compatibility boolean PHP_INI_SYSTEM extension registers APC compatibility methods zend_ datacache log verbosity level integer PHP_INI_SYSTEM
255. ves ini file allowed Report an event when a job is skewing from its defined execution time The maximum message size the daemon can accept from the extension integer The Loge verbosity level The maximum size of the log file before it is rotated string Global Directives ini File integer integer integer 163 Zend Server Community Edition Reference Manual Configuration Directive Details zend_jobqueue database A database connection string in PDO like format Relative sqlite path will be treated as relative to Zend Server data directory Type string Default Value sqlite file jobqueue db Available since version 5 0 zend_jobqueue binding An address of TCP or UNIX socket to listen for requests from clients and management GUI Type string Default Values e _unix jobqueue sock e Windows tcp 127 0 0 1 10085 Available since version 5 0 zend_jobqueue max_http_jobs The maximum number of HTTP based jobs which can be executed simultaneously by single back end server Type integer Default Value 4 Available since version 5 0 zend_jobqueue history The maximum time in days a completed failed or removed job is kept in database If no directive is provided time is unlimited and jobs are never deleted Independently on this directive setting jobs may be kept forever using persistent option Type integer Units days Default Value 7 Available since version 5 0 164 Web API Refer
256. waiting for its predecessor s completion ZendJobQueue STATUS RUNNING The job is executing ZendJobQueue STATUS_COMPLETED Job execution has been completed successfully ZendJobQueue STATUS_FAILED The job execution failed ZendJobQueue STATUS OK The job was executed and reported its successful completion status ZendJobQueue STATUS_LOGICALLY_FAILED The job was executed but reported failed completion status ZendJobQueue STATUS TIMEOUT Job execution timeout ZendJobQueue STATUS_ REMOVED A logically removed job ZendJobQueue STATUS_ SCHEDULED The job is scheduled to be executed at some specific time ZendJobQueue STATUS_ SUSPENDED The job execution is susspended ZendJobQueue SORT_NONE Disable sorting of result set of getUobsList ZendJobQueue SORT_BY_ID 151 Zend Server Community Edition Reference Manual Sort result set of getUobsList by job id ZendJobQueue SORT_BY_ TYPE Sort result set of getJobsList by job type ZendJobQueue SORT_BY_SCRIPT Sort result set of getJobsList by job script name ZendJobQueue SORT_BY_APPLICATION Sort result set of getJobsList by application name ZendJobQueue SORT_BY_NAME Sort result set of getJobsList by job name ZendJobQueue SORT_BY_PRIORITY Sort result set of getUobsList by job priority ZendJobQueue SORT_BY_ STATUS Sort result set of getUobsList by job status ZendJobQueue SORT_BY_PREDECESSOR Sort result set of getUobsList by job predecessor Zen
257. wall using Zend Studio for Eclipse Working with Zend Controller How to configure your Zend Controller and use it to activate components and benchmark URLs Use the Zend Controller The configuration creates a start button m in the system tray Working with Data Cache How to use the Data Cache API Implement the Data Cache API functions into your PHP code 37 Zend Server Community Edition Reference Manual Getting Started with Zend Server Community Edition Zend Server Community Edition is a tool that requires a minimal amount of actual interaction with the Administration Interface Once your environment is setup apart from occasionally logging in to view your system settings or your php ini there are not many day to day activities that require the Administration Interface The first point of reference for working with Zend Server Community Edition is what to do after installation What to do After Installing Zend Server Community Edition The following section describes the tasks that should be performed after installing Zend Server Community Edition for the first time These tasks cover all the different installation types DEB RPM and Windows Each task is accompanied by a description of its purpose and the expected results Run the Administration Interface Purpose To verify the installation and that the Administration Interface is accessible Result the Administration Interface opens i
258. with the following prefix lt install_path gt This represents the location of the installed files If you used the default settings the location should be as follows Windows C Program Files Zend ZendServer Windows 64 bit C Program Files x86 Zend ZendServer DEB RPM usr local zend Mac usr local zend For Zend Server Community Edition installation directories see the Zend Server for IBM i Installation Guide Zend Server Reference Manual Password Management After completing the Installation process and opening Zend Server Community Edition a password definition page is displayed for first time users This page only appears once to define the Administration Interface s login password For security reasons Zend Server Community Edition cannot restore your password for you However you can reset your password if you have access to the application s files and Administrator privileges The following procedure describes how to reset a lost password from outside the Administration Interface E To reset your password In Windows 1 Inthe Start menu locate the Zend Server Community Edition section and select Zend Change Password Your password is reset 2 The next time you log in to the Administration Interface you will be prompted to set a new password Other operating systems 1 From the command line run gui_passwa sh that is located in lt install_path gt bin 2 You will be prompted to enter a new passwo
259. xtensions It is also a tool supplied in the form of a small shell script with PHP code behind it to retrieve extensions from the aforementioned repository e phpize a shell script to generate a configure script for PHP extensions Build Tools While PHP can be built using many different tool chains this article will focus on using the GNU tool chain The main tools where PHP is concerned are e autoconf automatic configure script builder This is called by the phpize script e automake a tool for generating GNU Standards compliant Makefiles e libtool Generic library support script Libtool hides the complexity of generating special library types Such as shared libraries behind a consistent sort of interface e GNU make a GNU tool for controlling the generation of executables and other non source files of a program from the program s source files e GCC PHP extensions are typically written in C Hence in order for them to compile you would need a C compiler While GCC now stands for GNU compiler Collection and is no longer just a GNU C Compiler for our purposes we only need the C part of the collection GNU s elf binutils package The programs in this package are used to assemble link and manipulate binary and object files Install the following packages Users of distributions with package managers mainly Debian Ubuntu RHEL CentOS and Fedora Core and many others should install the following packages from their distribut

Download Pdf Manuals

image

Related Search

Related Contents

notice d`installation d`utilisation d`entretien    Diapositiva 1  取扱説明書 - Panasonic  JVC HR-673 VCR User Manual  VistaQuest VQ515 Camcorder User Manual    

Copyright © All rights reserved.
Failed to retrieve file