Jump to content

EvanAgee

Members
  • Posts

    62
  • Joined

  • Last visited

    Never

Posts posted by EvanAgee

  1. Thanks Gizmola!

     

    I'm curious, since there isn't a well-known (or suggested) method for dealing with this case, is there a better workflow that I haven't yet considered? I know it's possible to have 2 different projects, but I figured there had to be some way to connect the projects together and share updates between them.

     

    I'll have to research the svn sandboxes idea.

     

    Thanks much!

  2. Greetings All,

     

    I'm new to subversion, but I have it setup on my web server (MediaTemple.net) and I've been able to successfully create a repository, etc. My question is more about workflow.

     

    So the situation is quite common, I have www.mywebsite.com that's the live/production version of my project and I have beta.mywebsite.com which is a test/development version of the same site. About 99% of the code base is the same for both sites but they're are some configuration variables that are different to keep them from interfering with each other.

     

    My goal workflow is this:

    1. Make an update on my local machine, commit those changes to beta...

    2. Preview those changes on beta to make sure all is well

    3. Pull (or update) those changes into www once I've verified that everything is good to go.

     

    Could anyone give me a little help with how I would set this up? I'm not sure why it has been so confusing to this point.

  3. Hello all,

     

    I'm trying to zip up a large site, about 20GB and download the zip file to my local machine. I've managed to get the zip file created on the server and then download the file, however when I try to unzip the file on my Mac via the terminal I get the following message:

     

    End-of-central-directory signature not found.  Either this file is not

      a zipfile, or it constitutes one disk of a multi-part archive.  In the

      latter case the central directory and zipfile comment will be found on

      the last disk(s) of this archive.

    unzip:  cannot find zipfile directory in one of httpdocs.zip or

            httpdocs.zip.zip, and cannot find httpdocs.zip.ZIP, period.

     

    The server is a MediaTemple Nitro server. Any clues what's going on?

  4. So I've got a content management system that stores page content/data in one table and assets (images, videos, etc) in a separate table. I know I can use a JOIN to get all of the data with one query, but I'm looking to match the resulting output with the PHP array I'm currently using to distribute the resulting content to the Smarty template.

     

    Currently I get all of the page data and set that array to $page. Then I do a second query to get all of the assets and set that resulting array to $page["assets"].

     

    So, I'm wondering if there's a good way to take my new JOIN query and structure that result so rather than having one large 1 dimensional array I have an array that's setup with all of the results from the assets table as an element of the content table result array.

     

    Hope I'm making sense :)

  5. So this is my php:

     

    $sql = "INSERT INTO $content_table (".implode(", ",array_keys($cFields)).", timestamp) values (".implode(", ",array_values($cFields)).", now())";

     

    For whatever reason I'm getting this error:

     

    An error occured when we tried to create the page. Please contact your system administrator. Here is the error

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' timestamp) values (, now())' at line 1

    Statement executed was:

    INSERT INTO tiger2_content (, timestamp) values (, now())

     

    HOWEVER, this worked fine under PHP4. Ideas? $cFields is obviously an array that I'm constructing dynamically using $_POST variable  values. Any help much appreciated!

  6. Okay, so both of the servers in question were runnig Apache/2.0.52 (CentOS). However, on one server my htaccess mod_rewrite syntax is working perfectly and on the other it's not working at all! Below is the syntax.

     

    RewriteEngine on

    RewriteRule ^print/$ /lib/cjprinterfriendlyv2/printpage.php

     

    RewriteRule ^make_offer/(\d+) /?action=make_offer&p=$1 [L]

    RewriteRule ^blog(/|)$ /?action=blog [L]

    RewriteRule ^blog/(.+)$ /?p=$1 [L]

    RewriteRule ^tags/(.+)$ /?tag=$1 [QSA,L]

    RewriteRule ^asset/(.+)/(\d+)(|/)$ /?asset=$1&id=$2 [L]

    RewriteRule ^video/(\d+)(|/)$ /?asset=video&id=$1 [L]

    RewriteRule ^asset/video/(.+)(\.php|\.html|\.htm)$ /?asset=video&file_name=$1 [L]

    RewriteRule ^video/(.+)(\.php|\.html|\.htm)$ /?asset=video&file_name=$1 [L]

    RewriteRule ^tags/$ /?tag=INDEX [L]

    RewriteRule ^presearch/$ /?action=presearch [QSA,L]

    RewriteRule ^search/(.*)/(|pages|images|videos)$ /?action=search&s=$1&t=$2 [L]

    RewriteRule ^sitemap/$ /?action=sitemap [L]

    RewriteRule ^sitemap/(image|video)(&p=(\d+)|)$ /?action=sitemap&m=$1&p=$3 [L]

    RewriteRule ^ecommerce-videos-movies/$ /?action=sitemap&m=video [L]

    RewriteRule ^ecommerce-images-photos/$ /?action=sitemap&m=image [L]

    RewriteRule ^email_this_page/(\d+)(|/)$ /?action=email_page&pid=$1 [L]

    RewriteRule ^email_this_page/asset/(\d+)(|/)$ /?action=email_page&&is_asset=true&aid=$1 [L]

     

    RewriteCond %{REQUEST_URI} !^/lib/

    RewriteCond %{REQUEST_URI} !^/admin/

    RewriteRule ^(.+)(\.php|\.html|\.htm|\/)$ /?p=$1$2 [QSA,L]

     

    For the newer server that's not doing what I expect my URLS http://www.domain.com/dynamic_page_title/ aren't working correctly. On my older server it worked perfectly.

     

    Any ideas?

  7. Greetings,

     

    I've got several rules below. The problem is that even after it has applied one of the rules higher in the list it continues to apply the rules further down the list. What I'm looking for is for a rule to be applied and then for it to quit comparing the URL to the rules.

     

    RewriteEngine on

    RewriteRule ^print/$ /lib/cjprinterfriendlyv2/printpage.php

     

    Options FollowSymlinks

    RewriteRule ^make_offer/(\d+) /?action=make_offer&p=$1

    RewriteRule ^blog(/|)$ /?action=blog

    RewriteRule ^blog/(.+)$ /?p=$1

    RewriteRule ^tags/(.+)$ /?tag=$1 [QSA]

    RewriteRule ^asset/(.+)/(\d+)(|/)$ /?asset=$1&id=$2

    RewriteRule ^video/(\d+)(|/)$ /?asset=video&id=$1

    RewriteRule ^asset/video/(.+)(\.php|\.html|\.htm)$ /?asset=video&file_name=$1

    RewriteRule ^video/(.+)(\.php|\.html|\.htm)$ /?asset=video&file_name=$1

    RewriteRule ^tags/$ /?tag=INDEX

    RewriteRule ^presearch/$ /?action=presearch [QSA]

    RewriteRule ^search/(.*)/(|pages|images|videos)$ /?action=search&s=$1&t=$2

    RewriteRule ^sitemap/$ /?action=sitemap

    RewriteRule ^sitemap/(image|video)(&p=(\d+)|)$ /?action=sitemap&m=$1&p=$3

    RewriteRule ^ecommerce-videos-movies/$ /?action=sitemap&m=video

    RewriteRule ^ecommerce-images-photos/$ /?action=sitemap&m=image

    RewriteRule ^email_this_page/(\d+)(|/)$ /?action=email_page&pid=$1

    RewriteRule ^email_this_page/asset/(\d+)(|/)$ /?action=email_page&&is_asset=true&aid=$1

     

    RewriteRule ^(.+)(\.php|\.html|\.htm|\/)$ /?p=$1$2 [QSA]

     

    The last rule should only apply to queries NOT matching the rules above, sort of a catch all rule. How can I achieve this?

  8. Okay, so this is a little difficult to explain....

     

    I'm creating a PHP-powered AJAX interface that generates a list of items. What I'm wanting to do is make that list of items sortable so I'm using the scriptaculous Sortable.create method. Here's where it gets tricky.

     

    So my php file displays my result set using a Smarty template. The problem is that the smarty template (which contains the javascript that triggers the Sortable.create method doesn't appear to be included in the template when it's displayed, there's a blank spot in the source where the JS should be.

     

    Here's the JS that's at the bottom of my Smarty template:

     

    <script type="text/javascript">
    {literal}
    <!--
    Sortable.create("results_table", {
    	onUpdate:function(){ 
    		alert(Sortable.sequence('results_table').join(''));
    	}
    });
    -->
    {/literal}
    </script>

     

    Any ideas?

  9. Hey all,

     

    I'm using Prototype.js for some AJAX in a project. Typically I just call the PHP and use echo to return the real time results. However, I'm wanting to keep my code and design separate so I'm wondering what the best way to incorporate smarty templates into the mix is? Do I just use $smarty->fetch and echo that output? I haven't been able to get that to work yet. Below is my current code:

     

    if ($_GET["action"] == 'search') {
    	$html = 'Yeah!';
    	$smarty->assign('html',$html);
    	$results = $smarty->fetch('/admin/Templates/pages/related_search_results.html');
    	echo $results;
    	exit;
    }
    

  10. So I've got a data import script that can potentially run very long as it handles downloading of images via URLs as well as importing large amounts of data (15,000+ lines) from Excel.

     

    So what's the best way to make sure that the script actually runs to completion and doesn't time out? I've been using sleep() is that the best way?

  11. Hey all,

     

    I'm currently using the simple PayPal Buy Now buttons on my site which directs the user to PayPal's shopping cart system (taking them away from my site). I'm looking to take my shopping cart to the next level of sophistication and I'm wondering if this exists:

     

    - A PayPal shopping cart API where PayPal still manages sessions, items in the cart, totals, etc

    - That can be accessed via PHP and we can control the design/layout of the pages completely

    - Then, at the end once the user is ready to checkout, PayPal also handles the payment for the cart total

     

    Could you all direct me in the right direction? I know PayPal has payment APIs but I'm hoping that they can continue to power my shopping cart while giving me the chance to keep visitors on my site and control the look of the cart.

  12. I'm currently importing data into a database from an uploaded Excel file. Once the data has been imported I'm wanting to add a couple of columns to the Excel file to create a connection between the Excel file and our database. Can anyone tell me how it's possible for me to update the original Excel file with the new columns?

     

    I should mention that I'm currently using Spreadsheet_Excel_Reader (http://sourceforge.net/projects/phpexcelreader/) to import the Excel data currently.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.