• Welcome to OS2World OLD-STATIC-BACKUP Forum.
 

News:

This is an old OS2World backup forum for reference only. IT IS READ ONLY!!!

If you need help with OS/2 - eComStation visit http://www.os2world.com/forum

Main Menu

Need help on PHP script under Warp4 - stand alone

Started by Dave Palmer, 2008.11.14, 05:02:59

Previous topic - Next topic

Dave Palmer

Need some help understanding how I can get PHP to run on my Warp4 system when retrieved from a network attached storage (NAS) device.

I have a huge collection of photos.  They are assembled by year, by month within year, etc.  The directory structure is two deep, but years broad.

When hosted by the ISP  the  PHP script which retrieves the photos and puts them into a gallery structure for viewing.  No coding is required and the gallery reflects the exact content of the directory at 1, 2 or 3 or more levels.

I want to put the same material on a NAS (backup and accessibility)  and I need a way to process that PHP script on my system.

Perhaps if I'd paid attention over the years I'd know how to do this.  But I don't know how and I could sure use some help.

How do I go about achieving my objective?  Any advice is appreciated.

Thanks,
Dave Palmer


RobertM

Hi Dave,

What web server are you using (if any)? How is the NAS recognized by W4? If it is by drive letter, then it may be as simple as changing where the scripts point. Or it may also require paths being set in the web server (if one is being used).

One way or another, it needs to be mapped in a fashion that the PHP scripts can use. If the NAS contains a web server of sorts, it may work in conjunction with that.

Let us know a little more info and we'll see what we can figure out.

Thanks,
Robert


|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|


Dave Palmer

Hi Robert,
I don't have a web server.  Just a SOHO OS/2 guy - with DSL access to my ISP (Qwest)

The NAS is LAN attached (DSL <--->NAS) - and access from my Warp4  is either FTP (for uploading, etc.) or via Firefox via  HTTP... (i.e. appears as normal client website)

I happen to have a ethernet attached Buffalo AirStation which is my interface to the DSL Modem - and/or the NAS

To put it another way - it is the same as client access to either of 2 ISP sites ( except my NAS site is here in the garage and my ISP is in Arizona).

The box is a legacy IOGEAR BOSS GNS1000120   and specs, etc. are here: http://www.iogear.com/product/GNS1000200/

Thanks,
Dave


Quote from: RobertM on 2008.11.14, 05:38:07
Hi Dave,

What web server are you using (if any)? How is the NAS recognized by W4? If it is by drive letter, then it may be as simple as changing where the scripts point. Or it may also require paths being set in the web server (if one is being used).

One way or another, it needs to be mapped in a fashion that the PHP scripts can use. If the NAS contains a web server of sorts, it may work in conjunction with that.

Let us know a little more info and we'll see what we can figure out.

Thanks,
Robert

RobertM

Hi David,

The easiest method is to duplicate the access structure as it now exists (ie: however you access the NAS - via FTP or HTTP) and modify the PHP scripts to match.

And of course, you need at least a working PHP installation - and possibly a working Apache installation. Pretty easy with the wAMP package which will install what you need via WarpIn.

Robert


|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|


Dave Palmer

Hi Robert,
Once again youth and knowledge trump  old age and  force.   To have such knowledge would be great.

So, by the numbers - I'd guess wAMP is first, then install or find an Apache PHP, install and modify.

Close?

Dave
Quote from: RobertM on 2008.11.14, 21:25:43
Hi David,

The easiest method is to duplicate the access structure as it now exists (ie: however you access the NAS - via FTP or HTTP) and modify the PHP scripts to match.

And of course, you need at least a working PHP installation - and possibly a working Apache installation. Pretty easy with the wAMP package which will install what you need via WarpIn.

Robert

RobertM

Quote from: Dave Palmer on 2008.11.15, 00:16:15
Hi Robert,
Once again youth and knowledge trump  old age and  force.   To have such knowledge would be great.

So, by the numbers - I'd guess wAMP is first, then install or find an Apache PHP, install and modify.

Close?

Dave

Close. And apologies. The package you need is called oAMP (OS/2 AMP). It will include PHP (the "P" in oAMP). To install using these packages, you will also need WarpIn (not sure which version - but if you have the wrong one installed, it will let you know. Simply upgrade WarpIn to the latest if that happens).


Installation instructions can be found here:
http://www.godacon.de/download/OAMP-HowTo_V07.pdf
(haven't checked them out - may not be the best... but the installer is pretty straightforward)

The downloads can be found here:
http://www.amp4ecs.de/
(there should be an "English" link on the page)

The site seems to be having a few issues at the moment. An alternate download location for older builds (which still should be suitable for you) is located here:
http://www.os2site.com/sw/internet/amp/index.html

Builds from either location should be able to be upgraded with the latest PHP, MySQL and Apache versions from Paul's site. Just ensure you pick the build stability you wish. Paul does have some RC builds up there along with the stable builds. Though I have not tried many of his RC builds, I have found all the builds I have tried to be very stable and use quite a few in production environments (Paul Rocks!!!).



Updated builds (if you want to install them) can be found on Paul Smedley's site:
http://smedley.info/

Install using oAMP, and then update any components you wish to. In the case of MySQL (if you plan on using it), you may have to ensure that the config files are not overwritten, or specify them in the startup icons for MySQL (possibly along with MySQL's data directories).

From what you are describing, you dont need MySQL support (and it is started separately - or not started at all - depending on your preferences), so it is probably not something you need to play with at all unless you simply wish to.



Once complete, you may have to edit a couple things in the Apache config file to enable PHP support (dont remember off hand - but they are easy enough to find in Apache's config file's module section).




You will also find that various add-ons relying on MySQL and PHP will work fine as well. I've successfully installed and tested Joomla, Typo3 and others with no issues. Anything based strictly off of PHP and MySQL and Apache (as their base) seem to work fine. Anything that requires an OS specific module (such as cPanel) will not work (unless someone gets them to give them the source code to recompile their Linux support to OS/2).


Robert


|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|