HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


How to get started

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#38279 (In Topic #8614)
Avatar

Well-settled

I have some beginner questions. I am retired after 32 years in IT but last technical role was over 23 years ago. I have in last couple of years developed a few static websites with Dreamweaver. I'm now wanting to learn enough to rebuild these and develop new websites as community sites using ocPortal.
I run a Windows PC. Have started researching what software products needed for dynamic websites e.g. PHP, mySQL, GD enabled, Apache, and what these products do. These are all new to me. Are they integral to ocPortal or will I need to download and install them separately? I have identified where I could download some of them from. Can you point me to appropriate ocPortal guidelines or give me some guidance about creating development and testing environment (minimum PC config., checklist of products, disk space required, sequence of installation etc.)? Any tips in advance will be appreciated.
:thumbs:
Back to the top
 
Posted
Rating:
#38286
Avatar

Hi Chris,

The software you referred to (PHP, Apache, MySQL) are all necessary for ocPortal (and most other similar programs) to run, as you discovered.

For a number of reasons, we don't bundle this software with ocPortal. You can get them from their manufacturer's websites, but I prefer a package called WinLAMP. It's a packaged installer for Windows that installs and configures these programs for you.

When that happens, you'll be able to type http://localhost/ into your web browser and see your own web server, accessible from only your machine (unless your firewall & ISP allow otherwise). To all intents and purposes, it is just as functional as any web server you find on the web.

After that, you can download ocPortal (or any web product, for that matter) and install it according to their directors. Instead of FTP'ing to a remote server, you just drag and drop those files into C:\Apache2\htdocs.

To setup your database, download and install phpMyAdmin (or if you choose the WinLAMP package, just go to http://localhost/phpmyadmin ) and follow steps to create a new database. Your default username is root, and password is either 'mysql' or blank.

As far as minimum requirements, you don't need very much. Just about any machine can run Apache/PHP/MySQL. As long as you don't want dozens of users accessing it at once, you'll be fine.

This is a great way to test web products because you can do it without an internet connection and there is very little page latency.

Back to the top
 
Posted
Rating:
#38288

Non-joined user

Setting up development environment

Allen said

Hi Chris,

The software you referred to (PHP, Apache, MySQL) are all necessary for ocPortal (and most other similar programs) to run, as you discovered.

…………………………………………..

This is a great way to test web products because you can do it without an internet connection and there is very little page latency.
  Allen
Many thanks for your advice. This seems to be just what I'm looking for, can't wait to get started!
Just to make sure I understand you correctly a) the development/ test environment created with Winlamp and ocPortal installs on my PC b) I would be able to display a website on my PC as I develop it, via my browser i.e. it resides on my HD  c) to publish a website product I would FTP to an external host server as I do at present with my Dreamweaver built websites. Please confirm.
Do any of the free hosting ISPs support the necessary products for dynamic websites e.g. php, mySql etc., or do you get this only through "paid for" ISP services? I appreciate that free hosting ISP services sometimes are not as long-lasting as "paid for" ISP services due to a possible lack of financial viability.
Regards - Chris
Back to the top
 
Posted
Rating:
#38289
Avatar

Well-settled

Allen said

Hi Chris,

The software you referred to (PHP, Apache, MySQL) are all necessary for ocPortal (and most other similar programs) to run, as you discovered.

…………

This is a great way to test web products because you can do it without an internet connection and there is very little page latency.
  Allen
 As you probably realised I thought I was automatically logged in just now so my reply #38288 appears to be from a non-joined guest. I am logged in this time and honest guv - it won't happen again!!
 Chris
Back to the top
 
Posted
Rating:
#38292
Avatar

Well-settled

I can answer on your last question about the free and paid hosting, some free ISP's can have the that all, but you have no garanty's for stability and so more. There are paid ISP's with low monthlye costs, that offer you more. But its a choice that is to made…

Success by your first install ocPortal.
Back to the top
 
Posted
Rating:
#38332
Avatar

Well-settled

You are welcome.  :thumbs:
Back to the top
 
Posted
Rating:
#38386
Avatar

a) the development/ test environment created with Winlamp and ocPortal installs on my PC
b) I would be able to display a website on my PC as I develop it, via my browser i.e. it resides on my HD
c) to publish a website product I would FTP to an external host server as I do at present with my Dreamweaver built websites. Please confirm.

Yep - you've got it.

Do any of the free hosting ISPs support the necessary products for dynamic websites e.g. php, mySql etc., or do you get this only through "paid for" ISP services?

Sometimes you can. I remember looking for free hosts who supported these technologies and it seemed there were always a few out there. But you're always going to pay in poor reliability. If you have a website that people will use regularly, it's worth it to spend a few dollars a month to get a proper host.

It's also worth checking with your ISP, because often they will give you 10MB or so for free.

Back to the top
 
Posted
Rating:
#38422
Avatar

Well-settled

Allen said

a) the development/ test environment created with Winlamp and ocPortal installs on my PC
b) I would be able to display a website on my PC as I develop it, via my browser i.e. it resides on my HD
c) to publish a website product I would FTP to an external host server as I do at present with my Dreamweaver built websites. Please confirm.
Yep - you've got it.

Do any of the free hosting ISPs support the necessary products for dynamic websites e.g. php, mySql etc., or do you get this only through "paid for" ISP services?
Sometimes you can. I remember looking for free hosts who supported these technologies and it seemed there were always a few out there. But you're always going to pay in poor reliability. If you have a website that people will use regularly, it's worth it to spend a few dollars a month to get a proper host.

It's also worth checking with your ISP, because often they will give you 10MB or so for free.
  Thanks - have done the downloads, will start installation later this week.
Back to the top
 
Posted
Rating:
#38525
Avatar

Well-settled

Installation Hiccup
I have run WinLAMP installation on C: & obtained a success message (see attach1). Then I unzipped ocPortal Quick.zip in Apache2/htdocs folder. phpMyAdmin displays OK; phpMyAdmin presents MySQL page (see attach2). Contents of Apache2 look OK (see attach3).
ocPortal Basic Installation describes welcome screen if I access c:/localhost/install.php via my browser (Firefox) but this does not happen. Instead Firefox starts opening lots of new tabs ad infinitum so I can't install ocPortal! I un-installed and re-installed WinLAMP with the same result. Have you any suggestions as to why this happens or what I am doing wrong? My OS is XP.



Back to the top
 
Posted
Rating:
#38527
Avatar

Right.

As you've noticed there's a certain amount of complexity to this process, and I now see a few details I'd overlooked before.

First, you won't be able to use the "quick" installation method in this case. That method requires an FTP server on your machine, which is rarely the case.

Instead choose the "manual" installation method, and then as I said before, extract the contents to C:\Apache2\htdocs

The second problem that you're having is the path you're choosing. You'll need to always type http://localhost/whatever, and not C:/apache2/htdocs/whatever.

The reason is that Apache, PHP and MySQL only "run" when you use that first format. The second method still works the way Windows always does, which is to "open" the file. In this case, that means it will show you the code inside install.php.

If you want to see a simpler example, then do this: now that you have WinLAMP installed, create a new text file in C:\Apache2\htdocs called phpinfo.php. Inside of that file, put this code:

Code

<?php phpinfo(); ?>

Be sure that you save it. In your web browser, type: C:\apache2\htdocs\phpinfo.php

If you use Internet Explorer this will perform exactly the same function as double-clicking that file, which might open up your text editor or ask you which program to open this file with. In Firefox it will try to show you the code, but you might need to click "View > Page Source" to see it. Either way you'll end up looking at the code you've just written.

Now, if you want to execute or run that file, which is typical terminology, then you need to open your browser and visit http://localhost/phpinfo.php. Again, this forces Apache and PHP to run the code you've written. In this case, this code generates a long web page showing you information about your computer.

Back to the top
 
Posted
Rating:
#38541
Avatar

Well-settled

Allen said

Right.

As you've noticed there's a certain amount of complexity to this process, and I now see a few details I'd overlooked before.

etc etc
  Thanks for very prompt reply. I'll let you know how I get on
Back to the top
 
Posted
Rating:
#38545
Avatar

Well-settled

Allen said

Right.

As you've noticed there's a certain amount of complexity to this process, and I now see a few details I'd overlooked before.

etc etc
  Successful installation this time, thanks for your help. Initial website looks messy & needs some work. Next step is finding my way around the functionality and how to make design changes.
One hiccup - at the start of ocPortal installation a message said there was no PHP GD extension on the server which I believe I need for graphics, thumbnails etc. I thought this was going to be set automatically during WinLAMP installation but perhaps I slipped up somewhere. I searched on the web for some clues, various forums mentioned installing sudo apt-get install php5-gd (which I haven't downloaded) to overcome the problem. Please will you advise what I should do?
When eventually my website's ready to publish is it htdocs which I upload to my host server? Also I don't yet understand how I develop additional separate websites after this first development and where these would be stored. Can you point me to some documentation which explains this?
:thumbs:
Back to the top
 
Posted
Rating:
#38551
Avatar

One hiccup - at the start of ocPortal installation a message said there was no PHP GD extension on the server which I believe I need for graphics, thumbnails etc. I thought this was going to be set automatically during WinLAMP installation but perhaps I slipped up somewhere.

WinLAMP ships with the GD extension but doesn't enable it by default.

Start > Programs > WinLAMP > Configure > Edit PHP php.ini file

This will open notepad to your configuration file for PHP. Use Edit > Find and search for gd. When you find it (mine says ;extension=php_gd2.dll) remove the semi-colon from the beginning of the line. Save it, and reset Apache (Start > Programs > WinLAMP > Apache Restart).

When eventually my website's ready to publish is it htdocs which I upload to my host server?

You would upload the contents of the htdocs folder to the "web root" on your web host. Sometimes this is called "httpdocs", sometimes it's called "www", and sometimes there is no subfolder at all. Those are just typical conventions and they vary from host to host. Your host will tell of course tell you which to use.

By the way, the folder name "Apache2/htdocs" is simply the default convention WinLAMP chooses on your computer. I personally have moved my root to "C:\web\www" because I think it makes more sense. You can change yours by editing the DocumentRoot paramater in the Apache httpd.conf file.

As I was saying, you'll upload the contents of your web root (probably htdocs) to the web root on your host. If you're paitent this will work fine, but in ocPortal's case it can be slow, so I prefer to zip it up, upload the zip, and unzip it on the server. You will need "shell access" to do that so ask your host if that's possible for you.

Also I don't yet understand how I develop additional separate websites after this first development and where these would be stored. Can you point me to some documentation which explains this?

I just install the websites in subdirectories instead of the root htdocs folder. For instance, C:\apache2\htdocs\gaming_community, C:\apache2\htdocs\moms_school_reunion_website, C:\apache2\htdocs\personal_blog, you know, whatever. Just extract ocPortal into each of these folders and run the installer for each of them.

Can you point me to some documentation which explains this?

You can try looking for decent documentation but I haven't found any. I have learned by trying and failing a lot, and by asking questions on forums.

Understand that it really is difficult for them to write a "how-to" for a quick and easy setup. They need to keep their descriptions accurate and detailed, causing it to be rather overwhelming.

I've simplified this process lot, so a lot of things you "know" to be "true" so far are really just the case for your computer. C:/Apache2/htdocs is an example - at first I made it seem like this is always the "magic" folder Apache uses, but as I mentioned, this is easy to change and many people do. It's just a common default choice.

I risk confusing you down the road because of this (e.g., "I thought Allen said……was always true?"), but it's ok right now because it's getting you started. I haven't really lied to you anywhere, and since you have IT experience you'll be ok.

Basically, play with Apache some more. Explore it, break it a few times, and you'll begin to understand it a lot better.

Hopefully I've gotten you started, but as you get more and more questions, instead of documentation start turning to Google and various communities for solutions. Documention really is trash unless you have a fairly specific question. It is not a how-to guide.


Last edit: by Allen

Back to the top
 
Posted
Rating:
#38563
Avatar

Well-settled

Allen said

WinLAMP ships with the GD extension but doesn't enable it by default. etc etc
Your time-stamp puzzled me but after browsing ocPortal it seems you're in Penn. US. I like your personal website and pictures; far superior to my Dreamweaver based efforts I might add! Have changed gd setting as suggested. Also thanks for the tips re:htdocs and the concept of different websites.
Actually the thing which started me down this road is a friend's suggestion that the website of a nautical association we both belong to might be improved and therefore encourage more members if a new site provided interaction e.g. forums. Is ocPortal in the business of developing websites or is this product only intended as a Build Your Own tool? That's not to say BYO would not be the route to take - just interested in the options.
Back to the top
 
Posted
Rating:
#38569
Avatar

Yes, we've worked on specific projects for customers before. If you're interested please open a ticket to discuss the details.

Back to the top
 
Posted
Rating:
#38706
Avatar

Well-settled

Webhost and Apache support

I'm looking for a web host to support the ocPortal based website I'm building. One I'm looking at is PlusNet whose literature says their webspace supports CGI php scripting, MySql and Apache server 1.3. As you may recall I've installed WinLAMP including Apache2 on my PC where I'm developing the new website. If I were to ftp my website developed under Apache2 server to webspace on PlusNet would it run be able to run under Apache 1.3 or not?

If not, apart from using a differant webhost, is there any way around the problem? Presumably I could install Apache 1.3 instead of version 2 and rebuild the website?

PS Thanks for info about raising a ticket for professional development. I will bear this in mind pending a 3rd party's decision on what they want to do.
Back to the top
 
Posted
Rating:
#38725
Avatar

It will be alright. You should have zero problems since ocPortal supports Apache 1.3.


Last edit: by Chris Graham

Back to the top
 
Posted
Rating:
#41270
Avatar

Well-settled


Ive resumed trial use of ocPortal which I last looked at in March. Allen Ellis helped me at the time. The trial site I started in April would not load today so I decided to re-install WinLAMP and ocPortal locally. Im having trouble getting the installation completed this time.

WinLAMP reported it was installed OK (I note its now MySql v5 no v4). Im trying to do a local ocPortal install but am stuck. At step 3 the Wizard seems only to allow MySQL v4 but I pressed on anyway. In step 4 when I try to Install ocPortal it returns a message Could not connect to database-server (Cant connect to MySQL server on local host) (10061). Have you any suggestions as to what I may have missed or done wrongly?

Allen told me in March to use the manual install version of ocPortal because I was doing a local installation. I see on the online guide I have to set lots of file permissions to 777 and 666 which I dont think I had to do in March. I dont know how to do this. Do I still have to use the manual version or have things changed allowing me to use the Quick installation avoiding the need to manually set permissions?

Back to the top
 
Posted
Rating:
#41271
Avatar

Well-settled

Ive resumed trial use of ocPortal which I last looked at in March. Allen Ellis helped me at the time. The trial site I started in April would not load today so I decided to re-install WinLAMP and ocPortal locally. Im having trouble getting the installation completed this time.
WinLAMP reported it was installed OK (I note its now MySql v5 no v4). Im trying to do a local ocPortal install but am stuck. At step 3 the Wizard seems only to allow MySQL v4 but I pressed on. In step 4 when I try to Install ocPortal it returns a message Could not connect to database-server (Cant connect to MySQL server on local host) (10061). Have you any suggestions as to what I may have missed or done wrongly?
Allen told me in March to use the manual install version of ocPortal because I was doing a local installation. I see on the online guide I have to set lots of file permissions to 777 and 666 which I dont think I had to do in March. I dont know how to do this. Do I still have to use the manual version or have things changed allowing me to use the Quick installation avoiding the need to manually set permissions?
Back to the top
 
Posted
Rating:
#41274
Avatar

Hi,

As you're on Windows you can skip the file permission setting.

Is it possible that mySQL is no longer running? I'm not expert on WinLAMP but usually mySQL gets installed as a service. If you go into Control Panel, then Administrative Tools, then Services, you should see a service in there. Is it running, or if not does starting it solve the problem?


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Expand