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



Hi Aaron,

I'm sorry, I don't understand your reply. Why did you send me a link to the exec() function?

You posted that "echo exec('whoami')" didn't work for you, and only returned blanks. I explained why it doesn't work, and gave you an alternate command that does.

And you respond by giving me a link to the docs for exec()? Huh? Does that make any sense?

you ask "could it be a case issue"? Huh? I don't know, as I don't know what you're doing with the output. The 'echo' commadn would print the userid on the screen... are your eyes case-sensitive?

I guess what I'm saying is... I don't know anything about Wordpress, or how it works or how it decides what it does/doesn't have access to. But you asked a specific question about exec('whoami') that I could help with, and I tried... and I don't understand the response you gave.



On 12/9/2010 2:04 PM, Aaron Bartell wrote:
Hi Scott,

I was using whoami based on the example in this URL:
http://php.net/manual/en/function.exec.php

Though maybe because I am running on an IBMi it doesn't work the same.

Your suggestion of

echo exec('id -un')

produces "qtmhhttp" (without the quotes)

Could it be a case issue?

Note I did run the following commands but it still isn't allowing PHP to
write to the directory it is trying to write to:

CHGAUT OBJ('/www/zendsvr') USER(QTMHHTTP) DTAAUT(*RWX) OBJAUT(*ALL)
SUBTREE(*ALL)


CHGAUT OBJ('/www/zendsvr') USER(*PUBLIC) DTAAUT(*RWX) OBJAUT(*ALL)
SUBTREE(*ALL)


CHGAUT OBJ('/www/zendsvr') USER(ZENDADMIN) DTAAUT(*RWX) OBJAUT(*ALL)
SUBTREE(*ALL)

CHGAUT OBJ('/www/zendsvr') USER(NOBODY) DTAAUT(*RWX) OBJAUT(*ALL)
SUBTREE(*ALL)

CHGAUT OBJ('/www/zendsvr') USER(WORDPRESS) DTAAUT(*RWX) OBJAUT(*ALL)
SUBTREE(*ALL)

Note that USER(WORDPRESS) is both a user in WordPress and an IBMi profile.
I just wanted to test that out to see if it was the case.

I am not sure how much more wide open I can make it other than to do the
above for '/' (root folder), and I don't really want to do that.

Oh, and Jim, I tried a CHGAUT for QPGMR without luck.

Aaron Bartell
www.MowYourLawn.com/blog
www.OpenRPGUI.com
www.SoftwareSavesLives.com



On Thu, Dec 9, 2010 at 12:08 PM, Scott Klement<web400@xxxxxxxxxxxxxxxx>wrote:

Hi Aaron,

I use the 'whoami' command regularly on FreeBSD. But AFIAK, it has
never existed in PASE or QShell. Did you install/write your own whoami
tool? Or did IBM add one in a newer release? (I'm still stuck on v5r4,
and it's driving me nuts.)

But anyway, I'd start by checking to see if you have a 'whoami'.

Assuming that you don't, I'd try using the 'id' command instead. For
example:

echo exec('id -un');

This is off the top of my head, untested. Hope it helps.



On 12/9/2010 10:36 AM, Aaron Bartell wrote:
Hi all,

I was able to get WordPress up and running on my IBM i with relative ease
and now I want to install additional plugins. The issue is that if the
user
profile used by the currently running script doesn't have access to the
folder where the plugin is going to be installed, then it will prompt you
for FTP login information.

Here is an article that talks about the issue:

http://hecode.com/why-wordpress-asks-for-connection-info-when-i-try-to-install-new-plugin/

In the article then recommend creating a simple php script with the
following:

echo exec('whoami');

I did that, and it is executing successfully (no ZendServer error logs or
warnings) but it returns blanks, so that doesn't help. I have even gone
as
far as giving *PUBLIC all authority to the entire directory structure
with
the following command (running V6R1):


CHGAUT OBJ('/www/zendsvr') USER(*PUBLIC) DTAAUT(*RWX) OBJAUT(*ALL)
SUBTREE(*ALL)


Still no go.

Anybody else resolve this?
Aaron Bartell

--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.




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.