× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks I'll review everything.

The zpk is being generated by Zend studio. I'll have to verify I have the deplotment.xml correct.

The config I posted had no adjustments by me. That config is stored where you expect it. /usr/local/zendphph7/... . But that is not where the apache config is. It is stored /www/zendphp7/conf/httpd.conf.
In my research I saw a recommendation to use virtual host for applications. Probably talking about framework 1 or 2 in the article. So I tried to have Zend server create a virtual host. After saying it completed successfully, no host was displayed in the server admin. I determined this was due the host being created in the wrong place. So I added an "include" to point to that place and "listen" for the new port as required. Up to this point, at least for this attempt that is all I did. I then used Zend server deploy application to the ZPK created by Zend studio, choosing the new virtual host, that was finally recognized after the include and listen were added to the actual config file. The .htaccess file was created by the default skeleton.

Thanks for the information. I just finished Zend framework 3 course and I am trying to create something while it is still fresh in my head. The course was taught on a linux virtual machine where everything worked right out of the box..

-----Original Message-----
From: OpenSource <opensource-bounces@xxxxxxxxxxxx> On Behalf Of Hiebert, Chris
Sent: Tuesday, July 31, 2018 3:16 PM
To: IBMi Open Source Roundtable <opensource@xxxxxxxxxxxx>
Subject: [EXTERNAL] Re: [IBMiOSS] configuring PHP Zend framework on IBM

For the ZF3 app you need the DocumentRoot to point to the public folder of the app.

The server then uses the .htaccess file in that folder to rewrite the requests and pass the extra elements of the url as a query string to the index.php script located there.

When you do this the ZF3 app will take over the entire port. So accessing the url "https://urldefense.proofpoint.com/v2/url?u=http-3A__servername-3Aport_&d=DwICAg&c=S6jE3hMA0s16gx2_CUBBn4vjc1odLunI6MSvd_AfdV8&r=Ub_YbVSedaHB7-0yGANN94iTrfkU2nCKT1D5-5Jv01Y&m=0HMTU_JT3xQfALZLifS9ICLuSzONO276s2lYDH63uSA&s=Pos25md79sYdZPvmOl6jmKbqXQ8cypAaPCmqWVL9T2E&e="; should open up the index.php landing page.


This would be a different setup than using the App Deployment.
In the App Deployment you will give the App a name.
Then you would access it using that name "https://urldefense.proofpoint.com/v2/url?u=http-3A__servername-3Aport_appname_&d=DwICAg&c=S6jE3hMA0s16gx2_CUBBn4vjc1odLunI6MSvd_AfdV8&r=Ub_YbVSedaHB7-0yGANN94iTrfkU2nCKT1D5-5Jv01Y&m=0HMTU_JT3xQfALZLifS9ICLuSzONO276s2lYDH63uSA&s=ShdMaMlA6ETAVP3DnQ-sl7hMDXErLD9Y3uVjfwqaYrQ&e=";.



As far as using the ZendServer App Deployment, you would need to create the ZPK package file.
In that case you would develop the app, then include a deployment.xml that describes the app for ZendServer.
Then generate the ZPK file that is needed for App Deployment.
The deployment.xml file contains a docroot entry that should tell ZendServer how to update the Apache config.

Here is a documentation page that describes how to generate a ZPK file.
https://urldefense.proofpoint.com/v2/url?u=https-3A__framework.zend.com_blog_2017-2D03-2D21-2Dcreate-2Dzpks-2Dthe-2Deasy-2Dway.html&d=DwICAg&c=S6jE3hMA0s16gx2_CUBBn4vjc1odLunI6MSvd_AfdV8&r=Ub_YbVSedaHB7-0yGANN94iTrfkU2nCKT1D5-5Jv01Y&m=0HMTU_JT3xQfALZLifS9ICLuSzONO276s2lYDH63uSA&s=9XclgqKDeRkC4kBulGh0V1wqCTyVCpDsbJtdp4CQi_o&e=



ZendServer should generate an updated apache config each time you redeploy the app. Which should fix the changing app folder location.
However, that means the config specific to the app must reside under the "zendphp7/etc/site.d" folder. In that folder, the " __default__" folder, or another folder named after the virtual host.

https://urldefense.proofpoint.com/v2/url?u=http-3A__files.zend.com_help_Zend-2DServer-2D9.1_content_deploying-5Fan-5Fapplication.htm&d=DwICAg&c=S6jE3hMA0s16gx2_CUBBn4vjc1odLunI6MSvd_AfdV8&r=Ub_YbVSedaHB7-0yGANN94iTrfkU2nCKT1D5-5Jv01Y&m=0HMTU_JT3xQfALZLifS9ICLuSzONO276s2lYDH63uSA&s=GFC38fW_FOiR5tZbzkAqpoeY4OH8GBsOQespVXeRg6M&e=



I could imagine you having some configuration issues if you had manually adjusted the apache config or if you didn't use the ZPK app deployment.

For our configuration of ZendServer 9 and zendphp7 and V7R3, the IBM Apache host is at /www/zendphp7/conf/httpd.conf.

The config file includes this line to pull in the ZendServer configs:
IncludeOptional /usr/local/zendphp7/etc/sites.d/vhost_*.conf

It looks like you added something similar. However, there may be issues if ZendServer doesn't see the includes they are expecting.


Chris Hiebert
Senior Programmer/Analyst
Disclaimer: Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.

-----Original Message-----
From: OpenSource [mailto:opensource-bounces@xxxxxxxxxxxx] On Behalf Of Roche, Bob
Sent: Tuesday, July 31, 2018 8:29 AM
To: opensource@xxxxxxxxxxxx
Subject: [IBMiOSS] configuring PHP Zend framework on IBM

I am trying to get a Zend framework 3 application running on our IBM test system. I used Zend server create a virtual machine. Added an include to the HTTP config file since Zend server generates the virtual host in the wrong place for an IBM system. Restarted apache and the system recognizes the host. I then used Zend server to deploy a basic Zend framework 3 skeleton application. The first page displays, but the next test is to get a framework 404 page by trying to get to a page that does not exist. I get the apache 404 screen. If I can't get the framework 404, I'll never get the next page to display.

Zend server generated this:

<VirtualHost *:9003>

DocumentRoot "/usr/local/zendphp7/var/apps/http/cbs2/9003/_docroot_"
<Directory "/usr/local/zendphp7/var/apps/http/cbs2/9003/_docroot_">
Options +Indexes +FollowSymLinks
DirectoryIndex index.php
Order allow,deny
Allow from all
AllowOverride All
</Directory>

ServerName XXX:9003

# include the folder containing the vhost aliases for zend server deployment
Include "/usr/local/zendphp7/etc/sites.d/http/XXX/9003/*.conf"

</VirtualHost>

I did add the listen statement to the apache config file. Previously I have tried several configurations based on what I can find online. Most placed the DocumentRoot all the way to the public directory. My issue with that is Zend server increments the directory structure each time you deploy the application. I saw a similar question in the IBM I forums at Zend/Rogue Wave from a few years ago. But it was never replied too.


--
This is the IBMi Open Source Roundtable (OpenSource) mailing list To post a message email: OpenSource@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.midrange.com_mailman_listinfo_opensource&d=DwICAg&c=2S-2xx8Cum_thMfWs-kOOHQTwolPvSZ4PFLhr1wDDGs&r=GYVfe7k5MogwSsRr94zbPeTDRJYpFK3WOG9BKFEwK1s&m=zpXSXkLSRJ5aHOB-C9zs_URuTRjAnZyrEHkieGr1YIU&s=U6Z8st05NjV4h_rImcj7QtKCdXgkW9olIbd4zRUm1uA&e=
or email: OpenSource-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at https://urldefense.proofpoint.com/v2/url?u=https-3A__archive.midrange.com_opensource&d=DwICAg&c=2S-2xx8Cum_thMfWs-kOOHQTwolPvSZ4PFLhr1wDDGs&r=GYVfe7k5MogwSsRr94zbPeTDRJYpFK3WOG9BKFEwK1s&m=zpXSXkLSRJ5aHOB-C9zs_URuTRjAnZyrEHkieGr1YIU&s=HeHzmEH2y5MgWqX4x5dsGnlG0kA5MrMa8XJyjGsYAtM&e=.
--
This is the IBMi Open Source Roundtable (OpenSource) mailing list To post a message email: OpenSource@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.midrange.com_mailman_listinfo_opensource&d=DwICAg&c=S6jE3hMA0s16gx2_CUBBn4vjc1odLunI6MSvd_AfdV8&r=Ub_YbVSedaHB7-0yGANN94iTrfkU2nCKT1D5-5Jv01Y&m=0HMTU_JT3xQfALZLifS9ICLuSzONO276s2lYDH63uSA&s=D5oZeobyUV_jv4cI2JCSTIQHSp1gqR1ES_Lqw-ImUcA&e=
or email: OpenSource-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at https://urldefense.proofpoint.com/v2/url?u=https-3A__archive.midrange.com_opensource&d=DwICAg&c=S6jE3hMA0s16gx2_CUBBn4vjc1odLunI6MSvd_AfdV8&r=Ub_YbVSedaHB7-0yGANN94iTrfkU2nCKT1D5-5Jv01Y&m=0HMTU_JT3xQfALZLifS9ICLuSzONO276s2lYDH63uSA&s=UtOCJHBVum3ZQlqPGCxZBejq875WQ2ndVd9LGrzd1PU&e=.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.