Jump to content

Godfrey

Members
  • Posts

    63
  • Joined

  • Last visited

Posts posted by Godfrey

  1. Ah, thanks for the tip arjen! In the end this technique worked smoothly!

    At first it this technique of exporting and importing the tables didn't work either, and gave me the exact same error. I think that the compiling of the tables during export still somehow stores the local name of the database, so during import it tries to create a new database with that name. But how my phpmyadmin/mysql is setup won't allow users to access tables they aren't "added" to,  so there's no way for the user to add in tables to a non-existent table. 

    However... what I had to do was to: 

    1. Move files from the local server folder to the live server 
    2. Create a new database on the server.
    3. Rename the local database exactly the same as the newly created database on the live server, then
    4. add the user, which I log into phpmyadmin with, to that new live database.
    5. Export from the local then import to the live.
    6. Change the config.php settings only on the live server. 

    This way the table import technique worked! Hope this might help others also using this funky cPanel / phpMyAdmin / MySql setup of mine. 

    Now I just have to setup my dual config php files and I think fix the broken page links, as mentioned in some other posts...

  2. I'm trying to follow some steps from other threads about migrating a site from a local server to a live server.

    I've uploaded my site files from my local directory to my live server's directory, and I've created an .sql export file via phpmyadmin on my local server.

    However, when I try to import this into my live server's DB (also phpmyadmin), I get this error:


     

    Error

    SQL query:

    --
    -- Database: `sitename_pw`
    --
    CREATE DATABASE IF NOT EXISTS `sitename_pw` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;

     

    MySQL said: dot.gif

    #1044 - Access denied for user 'my_user_name'@'localhost' to database 'sitename_pw'


    I've tried editing the credential settings in the config.php file in the site/ folder, but a few things are confusing me:

    1. does editing this file have anything to do with this error?
    2. if I edit this file, what should I put as the database name, etc., since the db hasn't even been created yet?
    3. (When I first opened the file, I couldn't find the db credentials at the bottom. It just said "Installer config data appears below", then nothing. That's weird that it just disappeared... I ended up copy and pasting the lines of code for credentials from another config file )

    Other than the config.php file, what else can I do to remedy this error? Another catch with my setup is that with my host's cPanel/ phpmyadmin setup, I have to create mysql users and databases through a wizard. All the user and databases are prefixed with myname_, and I have to manually add users to databases through the wizard.... 

  3. Kongondo, I hear you. I need some of that precious yet elusive shut-eye too ;)

    So the reason I brought up the topic (Sorry this is a little off topic from the original question) was because right now for a project I am working on, I have a image slider which displays the image, the image alt attribute as a caption, and places a link over the image so that each image can link to another page. Within the plugin is an array where each element, representing the images, is an object literal with these three fields.

    Using PW API to manage this slider, I simply pull the fields from a multiple images field. For each image, I output the image path, the image description for caption (the alt attribute). However, for the link of each of the images, I ended up adding a repeater field with only one field in it - a page field. So for however many images there are in the slider, you just add as many of those repeater fields. Each repeater field holds a link that corresponds with one of the images. I actually thought of doing something like your hackish method, @adrian, I just wasn't expert enough to do it :P

    I think it would be nice if you could add a link property to each image in the images field, just like how there is a description property for each image (so you wouldn't have to use a hack). I was thinking of adding this as a suggestion to the roadmap. But enough of the tangent, maybe I will post this there sometime :]

  4. Ah, this is very nice insight! Thanks Kongondo :)

    Looking into the /site/assets/files/.... folders, it seems that PW does not do any compression, as the original-size image files are simply copied over into that folder.

    Now you have me more curious; I wonder if I can modify the table so that each image includes a URL (link) column as well, beside the Description column, so that I can have each image hold a link to anywhere I want. Then for example I could do something like:
     

    foreach ($albumimage as $image) {
                    echo $image->link // link to some other page
                    // just like how you can currently write: 
                   echo $image->description
                   }



    .... though I'm afraid that I might have to mess around with some core scripts as well?

     

  5. Forgive me if this is a silly question, but where exactly does PW store the data that is uploaded?

    I'm most curious about images. If you upload your image to the images field in PW, where does it store data for that image?

    Is it in the database among the columns created? Also, does PW compress images? So if you upload 250mb of images, would that actually take up less space with PW? 

  6. Dang, cool site! Love the graphics style, interface design and how easy it is to navigate around.  

    And yeah, the mobile style menu is simple and sweet. The little details such as the closable menu and transforming search bar are really neat. 

    I'd like to thank Ryan again for this amazing tool! I've never done such a tailor made CMS (Wordpress, Joomla, Drupal, CMS - I've been there) that's so easy to use that my client didn't need more than 10 minutes of "training" and is super happy about the outcome and the ease of maintaining it. Simple, amazing and beautiful.

    Best of all: the code is clean and since you code the templates from scratch, you know exactly what is what and speed and great clean markup is an obvious result of it...

    ^ Agree

  7.  (with AngularJS GUI, which was actually quite fun) 

    ^ Completely agree. I just started learning AngularJS two or three days ago and I cannot believe what I've already been able to whip up. It's such a blast!!

    Also, nice site! Love how clean it is.

    The one thing for me there's a bit too much pink and red and it seems to clash with the dark purple, but that's probably because I don't see this color scheme often.

    Like others said, I think the responsive part is really awesome. Love how the posts transition as you adjust screen width, and especially how the logo responds as well.

    • Like 1
  8. I think I got it, lin 1009 of the php.ini is commented out:

    ;extension=php_openssl.dll

    I'm assuming, that line beginning with the ; means it's commented out.

    Was unaware of that commenting method, so here's a link to the parsing the INI file for php:

    http://php.net/manual/en/function.parse-ini-file.php

    Attempting to rerun then here in a few.

    thanks, again.

    [Hint: Don't forget to restart your xampp server, after making the php,ini file change, found at xampp/php/php.ini]

    Nice catches. These same steps helped me.

    Thanks a bunchload @Soma! This really helped me. This + your Simple Site profile installed splendidly for me. Such a time-saver!

    • Like 1
  9. @arjen and @teppo: 
     

    Ohhh, didn't know about the necessary backslashes around "gallery". (I looked on the cheatsheet and the example for get() was $pages->get("selector") )

    This worked!:

     <a href='<?php echo $pages->get("/gallery/")->url?>'> Back </a>



    Woops, both the missing "echo" and $albumimage were silly mistakes of my when typed this question (@arjen you were right), sorry about that! 

    @teppo, for some reason this wasn't working for me and broke my code:

     <a href='<?php echo $pages->get("gallery")->url?>'>


    Thanks both!

  10. I'm trying to get a page url and echo it in a link, however I keep getting error:

    Error: Exception: Unknown Selector operator: '' -- was your selector value properly escaped? (in C:\wamp\www\klp\wire\core\Selectors.php line 165)

    I have tried two methods:

     <a href='<?php $pages->get("gallery")->url; ?>'> Back </a>

     <?php echo ' <a href=" '.$pages->get('gallery')->url.' "> Back </a>';?> 

     
    But both are getting me the same result. Sometimes half my page just doesn't even load. 
    I read around and think I need to escape my quotations. I have no idea what I would escape in this case though.... I think the key problem here is the double quotes while trying to select gallery ("gallery"), because when I am doing this without having to use the get() method it works perfectly. (e.g. $page->$albumimage->url; works for me)
     
    What would I escape to get this properly working?
  11. Hmm. No luck with anything related to the php.ini. Tried removing that sem-colon, but I think ti's just that the writers of the ini file have a funny preference to put the semi-colons at the start of the line.
     

    Thanks for the quick reply. I finally gave up and just deleted "php_xdebug-2.2.0-5.3-vc9-x86_64.dll" in wamp>bin>php>php5.3.13>zend_ext, since I read in different places that one solution is to just disable xdebug. I have no idea what I just did, but it works now... :\ 

  12. Hmm, I got the same problem. How do I change this max_level? I found php.ini and changed these lines:

    ; Maximum input variable nesting level
    ; http://php.net/max-input-nesting-level
    ;max_input_nesting_level = 200
     

    Is this correct? Even after this I'm getting the same error whenever I open a page with a repeater field.

    Edit: Oh, I found that I could edit php.ini by clicking "PHP" in the wamp control panel. However, after changing the value in that to 200 as well, I am still getting this error.. 

  13. Oh, it was the case that config.php did not exist in my site folder. I have no idea how that file disappeared in the process of extracting and uploading. But basically I extracted the original processwire zip file again and found that there did exist a config.php in the site folder. 

  14. Oh, huh. So where was it in the wrong place? I'm actually not sure which file is ./site/config.php ... because in my site folder there is no config.php.... Is that the problem in itself? I found a config.php and index.config.php in my "wire" folder, but not my "site" folder. 

  15. I'm trying to install another copy of processwire, this time I replaced some files with the BootWire files.

    Since my FTP was being incapable (extremely slow and not uploading all files correctly) I wiped everything then used cPanel to upload a zipfile instead. 


    After extracting, on the first install page I'm getting  "Error: File ./site/config.php must be writable. Please adjust the permissions before continuing."

    What file should I change permissions for to fix this? I've played around with the file permissiosn for multiple folders and files but with no luck. 

    What permission should I set the file? Will 755 do? 

    Thanks for any help!

  16. So I'm trying to install processwire on my local testing server. 

    I downloaded a fresh copy of the pw files into a local folder, then used dreamweaver ftp to upload them to a folder in WAMP.

    After hitting the "continue" button in the MySQL database/File permissions setup page, the install guide freezes for a long time and chrome just says "waiting for localhost" at the bottom left.

    Then, after a while, I get this blank processwire install page: 

    post-1217-0-87300700-1371272380_thumb.jp

    Any ideas as to what is going on?

    I'm pretty sure I created a database table and user right.

    Here are the credentials I entered:

    DB Name: processwire 

    DB User: godfrey

    DB Pass: .....

    DB Host: localhost
    DB Port: 80 (changed from 3306)

    Also pretty sure I set up my user privileges right:

    post-1217-0-28414000-1371272629_thumb.jp

  17. As a btw, the alternative syntax to wire('pages') is $wire->pages :) http://processwire.com/api/include/

    Oh yeah, I saw that and that's what prompted me to think they may be interchangeable :)

    They are the same. Difference is that wire('page') works everywhere, but $page works only on template context (which is of course the most common).

    So if you are using functions or building modules, you need to use wire('page').

    So is it that $page will only work if I make that .php into a template? And wire('') should be used if, for example, I am creating a an includes file containing functions? However that still doesn't really make sense to me because even if I use an include, it will still be rendered into the .php which is attached to a template... 

×
×
  • Create New...