Picon
Favicon

cvs write access to Christofer

Hello all, 

This is just to announce that Christofer Ness has write access to the 
wifiadmin cvs tree. Christofer has been hacking on wifiadmin for quite a 
while, we all are looking forward to checking out his work. 

-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
Christopher Ness | 26 Aug 20:12

Persistent Configurations

Hi All,

I'm almost finished up persistent configurations, but the kicker is that
the web server (thttpd) doesn't seem to like the PHP program I built to
run as an abstraction interface to the config storage.

How do the PHP scripts execute ls, iwconfig, etc.  Is there some path
variable set up somewhere in the code or is it dependant on `php.ini`
somewhere?

I want this program to execute in /alt/
sunny2:/tmp/www/cgi-bin/wifiadmin# ls -la /alt/wlan-config.php
-rwxr-xr-x    1 root     root         5934 Jan 22
21:37 /alt/wlan-config.php

It works great from the CLI, but the web server tries to execute it from
iwsettings.php and it seems to try and run the command where I set the
config value in process 1320 below.  But the web server doesn't move on,
it just gives up.

 1067 root        960 S   /usr/sbin/thttpd -p 80 -u root -d /tmp/www -c /cgi-bi
 1313 root       2132 S N /usr/bin/php iwsettings.php
 1315 root        964 S   /usr/sbin/thttpd -p 80 -u root -d /tmp/www -c /cgi-bi
 1320 root       2004 S N /usr/bin/php -q /alt/wlan-config.php set nick 'SUNNY3
 1321 root        672 R   ps aux

This is probably a PHP/thttpd issue, but anybody have a suggestion on
what I should look for?

Cheers,
(Continue reading)

Thimios Dimopulos | 27 Aug 18:28
Picon
Favicon

Re: Persistent Configurations

It's surely a different thing, running php code on a bash shell through
php-cli than running it on the web server. For one thing, on the first
case, you have all the environment variables available. 

Is your code on-line somewhere? Maybe i could help if i could test it.

On Παρ, 2005-08-26 at 14:12 -0400, Christopher Ness wrote:
> Hi All,
> 
> I'm almost finished up persistent configurations, but the kicker is that
> the web server (thttpd) doesn't seem to like the PHP program I built to
> run as an abstraction interface to the config storage.
> 
> How do the PHP scripts execute ls, iwconfig, etc.  Is there some path
> variable set up somewhere in the code or is it dependant on `php.ini`
> somewhere?
> 
> I want this program to execute in /alt/
> sunny2:/tmp/www/cgi-bin/wifiadmin# ls -la /alt/wlan-config.php
> -rwxr-xr-x    1 root     root         5934 Jan 22
> 21:37 /alt/wlan-config.php
> 
> It works great from the CLI, but the web server tries to execute it from
> iwsettings.php and it seems to try and run the command where I set the
> config value in process 1320 below.  But the web server doesn't move on,
> it just gives up.
> 
>  1067 root        960 S   /usr/sbin/thttpd -p 80 -u root -d /tmp/www -c /cgi-bi
>  1313 root       2132 S N /usr/bin/php iwsettings.php
>  1315 root        964 S   /usr/sbin/thttpd -p 80 -u root -d /tmp/www -c /cgi-bi
(Continue reading)

Christopher Ness | 27 Aug 18:57

Re: Persistent Configurations

Sorry, this should have gone to the list, so here it is.

On Sat, 2005-08-27 at 19:28 +0300, Thimios Dimopulos wrote:
> It's surely a different thing, running php code on a bash shell through
> php-cli than running it on the web server. For one thing, on the first
> case, you have all the environment variables available. 

Indeed, which is why I was suspecting the path, but now on the embedded
board I'm finding the PHP processes keep spawning almost recursively
(the parent waits for the child to finish, which forks it's own child,
etc) until the system is no longer responsive.

> Is your code on-line somewhere? Maybe i could help if i could test it.

I have posted a snapshot tarball for inspection.  It's probably
something silly, but thanks for looking.

       http://www.nesser.org/src/wifiadmin-persist-cfg.tar.gz

This code requires PHP 5.0 + since it uses a new function call
put_file_contents() but that could be removed and a fopen, fwrite,
fclose could be put in it's place for an earlier PHP parser.

The wifi-admin in this tarball broken because the persistent storage
function never finishes.  Other than that, enjoy.  :)

I'm still working on getting my stable work from this past summer into
the CVS repository.  Friday was my last day of that contract.

There seems to be taking quite a bit of time for me to filter out local
(Continue reading)


Gmane