Showing posts with label mamp. Show all posts
Showing posts with label mamp. Show all posts

Wednesday, 10 April 2013

Making test sites in a subdirectory of a live joomla site

So I want a website which is a front end, but I want to be able to develop websites in subdirectories of this front-end site.

I just found this tutorial of how to do the reverse. Mainly editing the configuration.php file.

Also found this documentation from Joomla on how to move sites around in directorys/sub-directories

So, after much trial and error I finally got it working:

  1. So, I changed MAMPs directory to my new setup website:
    1. /Applications/MAMP/htdocs/mynewwebsite
  2. I then moved other websites within its' directory structure
    1. moved /Applications/MAMP/htdocs/testsite1 to /Applications/MAMP/htdocs/mynewwebsite/testsite1
  3. edited the configuration.php file in testsite1
    1. I actually found it had changed itself! But just to note:
    2. public $log_path = '/Applications/MAMP/htdocs/mynewwebsite/testsite1/logs';
    3. public $tmp_path = '/Applications/MAMP/htdocs/mynewwebsite/testsite1/tmp';
This sort of worked. It worked on the localhost machine perfectly, but when browsing externally it came up with:
404 - Article not found joomla error
I had a quick search and found this forum topic about it. Turns out a temporary fix is to turn off "Search Engine Friendly URLs" under Administration > Global Configuration > Site:


Sunday, 17 February 2013

Joomla 3 and MAMP

So, just trying to start a new site in Joomla 3. On the first page one of the items says this:

Magic Quotes GPC OffNo

It basically won't install unless Magic Quotes GPC is turned off.

Found the answer here by 

All other answers were pointing towards fooling Joomla into thinking that either it didn't need GPC turned off, or that it needs the feature turned on. The correct way would of course to have the system setup to how joomla would need it (hence the verification stage here).

Basically, found php.ini in two folders:
Applications/MAMP/bin/php/:
php5.2.17
php5.3.6
/config/php.ini

in 5.3.6 I only found the following lines:

; Magic quotes
;
; Use Sybase-style magic quotes (escape ' with '' instead of \').
magic_quotes_sybase = Off
in 5.2.17 I found these more promising lines:
; Magic quotes
;
; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = On
; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
magic_quotes_runtime = Off  
; Use Sybase-style magic quotes (escape ' with '' instead of \').
magic_quotes_sybase = Off 


I edited the line in 5.2.17 to no avail. I also looked in MAMP which said it was using php 5.3.6 anyway.

I looked on MAMP's website and found that the latest version of MAMP comes with version 5.4.4. I also read that PHP 5.4.4 has depricated Magic Quotes! as of 5.3.

So, the easier solution would be simply to upgrade MAMP.

After doing so I found that I had to put my MYSQL password in for MAMP to be able to use mysql. In these files (found in a previous blog):



  1. Go to MAMP/bin/mamp/index.php and change the password bit
  2. Got to MAMP/bin/MyPHPAdmin/config.inc.php and change the password bit in here too
Done!!!
Joomla 3 worked after this.





Friday, 13 April 2012

Moving a site to Joomla

So, here I am moving www.wallspacevisualarts.co.uk to Joomla. I thought I'd best keep notes so I don't loose where I am when I finally give up for the day.

So far I have downloaded and installed the latest Joomla - 2.5.4 on the home machine and put it in the folder - /WallSpaceVisualArts/

I've ran the setup wizard:
  1. The admin user is me with my usual password.
  2. The sites database is - wallspacevisualarts  (all lowercase). Admin for this is root. My own password.
  3. I didn't install the sample data set.
The plan is relatively simple. I put the whole website on there, minus the content that can change. For the moment the only content that is changing is the tabulated text in the tabs. These can be articles which are always shown.

I want to eventually make the pictures an article also, but this would require much more work.

Here's the plan in chronological order (or maybe not so chronological):

  1. get the documentation to know how to make a template
    1. here it is
  2. take out the css and put in a file
    1. I called the file "main.css" in the css folder
  3. make the template files and folders
    1. made the root /Joomla Website/Templates
    2. made one inside called /WallSpaceVersion1/
    3. Made /css/ and /images folders
    4. made templateDetails.xml
      1. copied all info from link above and made it relevent
    5. made index.php
  4. move ALL images into "images" directory
    1. moved images from "assets" directory to "images" directory
    2. change any mention of "assets" with "images"
  5. Change the way the tabs work so that they are called "tab1" and the information attached to each tab is called "tab1_info" to make more universal.
  6. re-write the templateDetails.xml to encompass all the files used
    1. if you declare a folder, do you need to declare the files in that folder?
      1. looking at atomic's templateDetails.xml, they just put the files in the root folder
      2. I think you just declare the files that you want to be editable
  7. put the right bits of code in the right places
  8. delete text
  9. replace text with relevent code which brings up articles
    1. Just found this article about Jdoc statements. It will hopefully work nicely
    2. So, having looked into it, I found that what I actually wanted was to make each article a "Custom HTML" module. Each of these modules is then assigned a position in the page
      1. Here's an example of what I put in the html code:
        1. <jdoc:include type="modules" name="menu1" />
        2. and for the module I assigned it to position "menu1.
        3. don't forget to declare the menu1 in the templateDetails.xml document
  10. make into template
  11. put in joomla
    1. had a little trouble with this. It turns out the "discover" button doesn't work well. The template turned up in "templates" tab but not in "styles" tab! Had to zip it and install it!
  12. test
    1. with initial testing, the images didn't appear
      1. here's the code that I eventually used to link pictures placed in the template:
      2. basically, where-ever you have
        1. ="location.jpg" you replace with:
        2. ="baseurl; ?>/templates/location.jpg
  13. make johns login
  14. make a space for it in index.php and declare it in templateDetails.xml
  15. upgrade daily.co.uk account to Home Pro
  16. make database on Daily (limited to 20 databases)
    1. described it as "wallspacevisualarts"
    2. db name is wallsp_1
    3. To get on the database, you can go to mysql.daily.co.uk
      1. it runs on phpmyadmin
    4. normal password
  17. backup joomla on home machine
  18. backup old website on daily server
  19. restore on daily server
  20. give him a tutorial


Monday, 20 February 2012

Uploading/transferring joomla

So I want to make a joomla site, but I use multiple jam-a-lam jazzy jeff stuff, yeh?? is you dizzy blood?!!

cannot believe how hot it is ya know! like 16 degrees yeh on wednesday!! gonn be real hot and sweatey wagwan, so get ya tshirts on and in the pool bitches! :D

So I found this wiki based on joomla 1.5. I shall read sometime.

So there are basically two ways:

  1. manually uploading files and database
    1. Copy joomla folder up to server via ftp
    2. using myphpadmin on local machine export database
    3. somehow import database into server php?
    4. edit the configuration php file and change details
  2. using akeeba
    1. backup joomla using the akeeba extension
    2. I assume you upload a joomla site and import this jpa file somehow
    3. Here's their quickstart guide which looks VERY helpful.
So I did it!!

  1. I backed up using akeeba
    1. I downloaded the backup file
    2. upload the backup file to the new server root
  2. on the new server make sure there is a database ready
  3. I used akeeba kickstart to restore!!
    1. heres some documentation (very helpful)
    2. download kickstart
    3. unzip
    4. put kickstart.php and en.ini file in root of server
    5. goto the webaddress http://yourserver.com/kickstart.php
    6. go through the wizard
  4. Done

Wednesday, 15 February 2012

Joomla on a Mac

So, I've been trying out the cloudaccess.net version of Joomla and I thought I'd try the totally free downloadable version, mainly to see the differences and also to perhaps edit files more locally.

Just read up on the txt file which comes with the download, takes you to this page for installation requirements. At the bottom of the page it says there is a quicker way then installing all the little things; MAMP, Macintosh, Apache, Mysql and PHP. 

So... here's how I did it:

  1. Download MAMP and install
  2. run MAMP from applications folder
    1. Go to "Open Start Page" or open browser and type : http://localhost:8888/MAMP
    2. Go to MyPHPAdmin
      1. Name a new database and click create
  3. Now download Joomla
    1. unzip it (if safari doesn't)
      1. Put the new folder in /Applications/MAMP/htdocs
    2. In the web-browser go to http://localhost:8888/Joomla_2 (or whatever folder you've named it)
    3. It now takes you through the Joomla installation
    4. One point I got stuck on was the database name. Type in the database name you created in MyPHPAdmin
    5. The default password for the database thing is:
      1. username = root
      2. password = root
      3. I wouldn't change these if I were you. If you do:
        1. Go to MAMP/bin/mamp/index.php and change the password bit
        2. Got to MAMP/bin/MyPHPAdmin/config.inc.php and change the password bit in here too
  4. Done!!
I'm going to try and download the joomla site I made on cloudaccess.net and put it on the computer? I shall hopefully write a post and stick it up here.


Notes:

Had this error message come up:

Could not connect to the database. Connector returned number: 2

Turns out I didn't create the database and/or put the right password in. It would be easier if Joomla could do this bit?

I'd gone and changed the password for root in MAMP!! Doh, I ended up having to look for where the password entries were for each part of MAMP. Found the main two:


  1. Go to MAMP/bin/mamp/index.php and change the password bit
  2. Got to MAMP/bin/MyPHPAdmin/config.inc.php and change the password bit in here too



How can I change the password for the MySQL database?



Open the terminal and type the following:
/Applications/MAMP/Library/bin/mysqladmin -u root -p password

Instead of 
 use the new password you want.
Afterwards, you also need to change the password for phpMyAdmin and other scripts which are running under MAMP. You can change the password for phpMyAdmin in the file /Applications/MAMP/bin/phpMyAdmin-X.X.X/config.inc.php