Home > AS/400 Tips > iSeries programmer tips > Running PHP open source applications: NOBODY needs authority
iSeries 400 Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ISERIES PROGRAMMER TIPS

Running PHP open source applications: NOBODY needs authority


Larry Nies, Contributor
05.05.2009
Rating: -4.40- (out of 5)


iSeries news and advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


After installing Zend Core on my IBM i, I could hardly wait to download my first open source PHP application. I searched for an open source PHP CRM application and found numerous examples on Sourceforge. Once I found the PHP application that met my needs, I downloaded it to my laptop and uploaded it to the /www/zendcore/htdocs/ directory on my System i IFS. This directory is where I keep all of my scripts, as it allows me have a central location for all of my PHP applications.

I began to follow the installation instructions provided only to have the PHP script halt, and an error message appeared in the browser. The message said that I did not have the proper authority to the new application folder that I uploaded.

I then realized I had forgotten an important step after I had loaded the application to the IBM i IFS, and that was to grant user NOBODY authority to the folder uploaded to the /www/zendcore/htdocs directory. This problem is easy to correct. Open up an AS/400 green screen and do the following:

  1. Change the directory to the /www/zendcore/htdocs. To do this, key in the following command:

    CHGCURDIR '/www/zendcore/htdocs'

    and press 'ENTER.' This will put you at the Web documents root for Zend Core.

  2. For a quick verification that the directory is changed you can run the WRKLNK command from a green screen command line. You should then see the folders and files located in the /www/zendcore/htdocs directory.
  3. On the same green screen key the CHGAUT command as follows or prompt the command by pressing F4. The CHGAUT command should be keyed as follows:

    CHGAUT OBJ('OpenSourceFolder/') USER(NOBODY) DTAAUT(*RWX)

    press 'ENTER' to continue, when the command is completed you will see that it has changed the authority for a number of objects within the new open source folder that you have uploaded. Should you desire to see if the authority is correct you can WRKLNK to the /www/zendcore/htdocs directory and locate your open source folder and key a '9' in the option field and press 'ENTER' and you should now see user NOBODY has authority.

  4. Open your preferred browser and enter the URL as outlined in the installation instructions for setting up the new open source application. It may appear something like the following:

    http://server_name:port#/OpenSourceFolder/install.php

Voila! You should now see the installation screen to complete the application setup process. The user NOBODY is used by Zend Core to allow access to the folder and folders that reside in the new open source application directory. The benefit of running CHGAUT on the open source folder is to eliminate the "Unauthorized Access" error message received when you try to install the open source application, thus giving you a clean installation.

Editor's note: Previews of PDFs with sample code are available for

Let us know what you think about this tip, send us a note and let us know if you want more tips on this topic, and if there are any specific areas you would like to see covered.

ABOUT THE AUTHOR: Larry Nies is President and co-founder of NSC, Inc.. Nies has been involved with IBM as a Business Partner since 1984, working on S/38, S36, S/3, AS/400, iSeries, i5 System i. He is a proficient RPG programmer and wrote his first Web application in 1997 using Net.Data on an AS/400 and have since used Java, HTML, Javascript, Ajax, PHP etc. Nies was first Exposed to PHP on the iSeries in 2006 following installation of Zend Core on an iSeries, and has been writing PHP applications ever since. He has consulted and programmed for a variety of industries, including distribution, logistics, manufacturing, and local governments.

Rate this Tip
To rate tips, you must be a member of Search400.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
iSeries application development tools
TAATOOL: Useful tools for programmers on IBM i
Migrating from RPG to EGL on IBM i
EGL Rich UI on IBM i: Do you Dojo?
Zend Web software teams up with IBM System i
The best technologies and tools for System i programmers in 2009
AS/400 lessons from the past, present, and future: A holiday tale
Documenting nested program structures on the AS/400
Learn the i: iSeries DevCon coming up in Orlando
Application modernization in the i world
System i virtualization prevents T-Mobile busy signal
iSeries application development tools Research

iSeries CL programming
Taking advantage of CL advancements, starting with V5R3
Checking in on your IBM i authorization lists
Simplify the process of converting a spool file from iSeries into an Excel spreadsheet
CL program for daily backups
An automated CL method of moving a query from AS/400 to Excel
Changing user password expiration
Eight steps for creating program documentation using AS/400 utilities
DAYSPAST CLLE program for AS/400: Compares object creation date with today's date
Advanced Job Scheduler help
How do I retrieve the source for an output queue description to put in to a CL program?

Web Development
Implementing a browser interface in COBOL: Creating your graphic Web page
Implementing a browser interface in COBOL: Getting started
IBM i shop boosts online sales with RPG-based Web platform
Migrating from RPG to EGL on IBM i
Groovy programming on IBM i
Zend Web software teams up with IBM System i
The best technologies and tools for System i programmers in 2009
Seven IBM i project lessons learned in 2008
AS/400 lessons from the past, present, and future: A holiday tale
Application modernization strategies for System i

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
WebSphere Development Studio Client (WDSC)  (Search400.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



iSeries Security - Security Tools, Physical Security and System Security
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts