× 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.



After reviewing the links and what you wrote it seems I was trying to do a combination of things.

I had Zend server create a virtual host. The original config I posted is what the server created.
Because that was created outside of the IBM apache config location, I added an include directive to point to that config file and a listen directive for the new port.
I then used Zend studio's export option to create the zpk.
Then in Zend server I used the deploy app option to deploy the app to the new virtual host.
I never get past the first screen.

Deploying the app to the default host with no other updates, I never get past the first screen.
I see RewriteEngine on in the config.
There is the default .htaccess file in the program from the skeleton.
Allow override all is all over the place in various <directory> groupings.

I've seen some conference slides from Alan Seiden and Stephanie Rabbani recommending the use of virtual hosts, as much as I would prefer not to change the apache config for each application, if it works I'll do it. Assuming my manager and the auditors don't prevent it. This could generate a very large config file as we modernize more apps.

But based on these slides and your statement about Virtual host owning the app. I deployed my app and then built a virtual host to point to the directory where Zend server placed it. I can now get past the first page!!!!!
Since I'm still new at this I had to list the directory structure all the way to the public file as was stated. That means in my directory structure a few levels under __default__ is the generated directory that get a new number each time you deploy an application. Does that mean every time I deploy an application I'll have to adjust this number?

We are trying to get away from developing directly in www/sendphp7/htdocs. To more like the RPGLE code is handle, develop in personal development libraries, promote that to test, from test promote to production.

Thanks in advance for any insight into what I am doing here, or more to the point what I should be doing here.


-----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 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.