PDA

View Full Version : Moving index page without reinstalling?


sherina
02-25-2005, 05:57 PM
So after using (and enjoying immensely, by the way) PIxelpost for awhile, I'm regretting the location I chose. Is there an easy way to move then index page elsewhere without having to uproot everything else?

For clarity's sake, my photolog is currently here:
http://andromeda.qc.ca/click

I'd prefer to have my photolog on the main page:
http://andromeda.qc.ca

I tried just putting the index.php in the root directory and changing the url in my admin area but all I got was a blank page so obviously I didn't do enough.

Any help would be great!

Connie
02-25-2005, 06:44 PM
well, for the advanced user, as the easiest and most secure way I would suggest to make a backup of the complete mysql database, with PHPMyadmin which is always a good thing, then re-install the script into the root-directory and populate the database tables again using PHPMyadmin from the backup (without the config-table...)

for sure it is not enough to lift the index.php
you should lift the other directories as well as they are all in a fixed relation:

addons, admin, config, images, thumbnails, language, templates <= they all must be below the directory where index.php is located

the siteurl, imagepath are stored in the config-table of the database, so all this must be synchronised

good luck

sherina
02-25-2005, 07:34 PM
I should just learn to leave well enough alone I think.

Since I didn't know enough about phpmyadmin, I decided not to go that route. Instead I tried moving everything to my root directory. The pictures posted but the thumbnails wouldn't. I decided to remove everything from my root directory, put the admin info (the url and the path to the images) back to their original state, and now when I try to upload an image I get this:


Warning: move_uploaded_file(/home/sherina/public_html/click/images022605-processed.jpg): failed to open stream: Permission denied in /home/sherina/public_html/click/admin/index.php on line 443

Warning: move_uploaded_file(): Unable to move '/tmp/phpSZ35fQ' to '/home/sherina/public_html/click/images022605-processed.jpg' in /home/sherina/public_html/click/admin/index.php on line 443
Error
Upload went without error.

I didn't change anything in my original folders so I'm not sure what the heck is going on. Any ideas? I'd hate to reinstall from scratch and lose all my pictures.

raminia
02-25-2005, 07:55 PM
I made this automatic for u. to move your pixelpost address within the same domain.

0) make a backup if you can! This comes without any warranty but I've tested this on my local server and it's ok to me.

1) edit the line says
$new_url = 'http://www.yournewurl.com/'; // Use the entailing '/' (I'm not sure without it it would be ok or not)
and type your new address there.

2)Put it the main address along with index.php and then open it in the browser.

3) If it's successfull it will prompt. Then Move all of pixelpost file and folder to the new location using an FTP program.

4) UPDATE:
Set the permissions on the images and thumbnails folder. (chmod 777)

5)good luck!


<?php

// This file is for moving your pixelpost photoblog to a new location. It assumes that you use
// the original pixelpost 1.3 without dramatic modification in the database tables.
// Written: Ramin Mehran (raminia) @ 2005-02-26

$new_url = 'http://www.yournewurl.com/'; // Use the entailing '/' (I'm not sure without it it would be ok or not)

echo 'Moving to new address... <br> New address: ';
echo $new_url;
echo '<br><br><hr>';

error_reporting(0);


require("admin/pixelpost.php");


/* start up mysql */
mysql_connect($pixelpost_db_host, $pixelpost_db_user, $pixelpost_db_pass) || die("Error: ". mysql_error());
mysql_select_db($pixelpost_db_pixelpost) || die("Error: ". mysql_error());

$query = "update ".$pixelpost_db_prefix."config set siteurl='" .$new_url ."'" ;
if (mysql_query($query ))
{$note = 'DB updated successfully! <br> Now you should move all of your pixelpost folder to the new address ' .$new_url .' using FTP';
echo $note;}
else echo 'Nothing changed!';

?>

@Connie:
The only field needs update is siteurl in the pixelpost_config. image folder is relative.

raminia
02-25-2005, 07:58 PM
oops!
it seems I'm late a little:))

that's not a big deal. you have to set the permissions to the folders again.
refer to the installation guide where talks about chmod 777.

UPDATE: ATTENTION!
If you didnt enter the image path REALTIVE this patch does not work for you!

look at the following post for the new patch.

Fellow Eskimo
03-09-2005, 11:52 PM
Alright, this is what im trying to do. Im moving my domain to a new host. However, I have several CMS on my site and want to switch all of the files over and all of the locations before I repoint the dns settings. I havent had trouble...until I had to deal with the MySQL database.

I transfered all files, then I made a dump file of the MySQL database, put it on my new server, loaded it and pixel post. Didnt get any of the enteries. Then I looked here, I changed the settigns of the database file, reloaded it. Nada. I have plain pixel post, but none of the photo enteries.

The original site is here:
http://www.felloweskimo.net/photo

the site I want to have pixel post on is here:
http://s95334664.onlinehome.us/fe/photo/

Why is it repointing itself to the original site? What od I need to change?

raminia
03-10-2005, 05:18 AM
sorry to ask but do you even read the above posts?

as I said before the url of site should be change in DB:

The only field needs update is siteurl in the pixelpost_config. image folder is relative.

and I provided something to do it for u!

Fellow Eskimo
03-10-2005, 10:59 AM
I did that.

raminia
03-10-2005, 11:54 AM
and what happend? does it prompt you anything?

Fellow Eskimo
03-10-2005, 10:34 PM
No, no prompt. After redoing the url and image directory, I reloaded the dump file for the MySQL database. No errors, and photos where they are supposed to be.

raminia
03-11-2005, 04:06 AM
if it didn't give messages that means it didn't run to the end!
if it succeed it should say
your pixelpost folder to the new address ' .$new_url .' using FTP';

and if it fail it shold say some other things.
Thus you have wrong entry in it or you have placed it in a wrong place!
insert this
error_reporting(E_ALL);

at the top of the php file and see the errrors.

raminia
03-11-2005, 05:13 AM
UPDATE: ATTENTION!
If you didnt enter the image path REALTIVE the old patch does not work for you! Use this new patch instead

USE this patch instead and enter new siteurl as well as image path
<?php

// This file is for moving your pixelpost photoblog to a new location. It assumes that you use
// the original pixelpost 1.3 without dramatic modification in the database tables.
// Written: Ramin Mehran (raminia) @ 2005-02-26

$new_url = 'http://www.yournewurl.com/'; // Use the entailing '/' (I'm not sure without it it would be ok or not)
$new_image_path = '/myimagepath/atlocalserver/asappears_in_FTP/';

echo 'Moving to new address... <br> New address: ';
echo $new_url;
echo '<br><br><hr>';


require("admin/pixelpost.php");


/* start up mysql */
mysql_connect($pixelpost_db_host, $pixelpost_db_user, $pixelpost_db_pass) || die("Error: ". mysql_error());
mysql_select_db($pixelpost_db_pixelpost) || die("Error: ". mysql_error());

$query = "update ".$pixelpost_db_prefix."config set siteurl='" .$new_url ."'" ;
if (mysql_query($query ))
{$note = 'site url updated successfully! <br> ';
echo $note;}
else echo 'SITEURL did not change!';


$query = "update ".$pixelpost_db_prefix."config set imagepath='" .$new_image_path ."'" ;
if (mysql_query($query ))
{$note = 'image path updated successfully! <br> Now you should move all of your pixelpost folder to the new address ' .$new_url .' using FTP';
echo $note;}
else echo 'Imagepath did not change!';


?>


@ Connie
This should be corrected in the FAQ