GithubHelp home page GithubHelp logo

Comments (65)

nschonni avatar nschonni commented on August 20, 2024

Another options would be https://heroku.com/

from wet-boew-php.

LaurentGoderre avatar LaurentGoderre commented on August 20, 2024

None of these options are free though....

from wet-boew-php.

LaurentGoderre avatar LaurentGoderre commented on August 20, 2024

Oh nm

from wet-boew-php.

LaurentGoderre avatar LaurentGoderre commented on August 20, 2024

Well, it not easy getting any of those for free. Heroku don't seem to let you and Microsoft is very confusing

from wet-boew-php.

LaurentGoderre avatar LaurentGoderre commented on August 20, 2024

I'm not giving my credit card info for a "free" service lol

from wet-boew-php.

nschonni avatar nschonni commented on August 20, 2024

Maybe this will help https://hakre.wordpress.com/2012/05/20/php-on-heroku-again/

from wet-boew-php.

nschonni avatar nschonni commented on August 20, 2024

This might be another PHP specific one https://www.appfog.com/

from wet-boew-php.

LaurentGoderre avatar LaurentGoderre commented on August 20, 2024

For the heroku, it says you can "try" it for free. I want to avoid relying on something that might end up costing us

from wet-boew-php.

LaurentGoderre avatar LaurentGoderre commented on August 20, 2024

Is this variant changing enough to warrant this kind of effort?

from wet-boew-php.

nschonni avatar nschonni commented on August 20, 2024

I think so, people tend to cut/paste from the files. So we should keep the markup in sync with the releases.

from wet-boew-php.

pjackson28 avatar pjackson28 commented on August 20, 2024

This is an active project thanks to @upsonp so the working examples need to be updated. The current working examples are out of date and need to be refreshed. They are currently hosted on the RCMP server but they are not maintaining it so an alternate hosting place needs to be found.

from wet-boew-php.

nschonni avatar nschonni commented on August 20, 2024

I got the basic site setup for deploying on commit here http://wet-boew-php.azurewebsites.net/demos-php/theme-gcwu-fegc/ but since the dist folders aren't included it is still broken.

from wet-boew-php.

nschonni avatar nschonni commented on August 20, 2024

If the root/dist folder is parametrized, we could configure it to point to raw files in wet-boew-dist

from wet-boew-php.

upsonp avatar upsonp commented on August 20, 2024

I don't have a pc in front of me at the moment, but I think this is done in the /demos-php/theme-gcwu-fegc/inc/config.php file. I'm hoping to use the $UNKNOWN['wet-boew-dist'] and $UNKNOWN['wet-boew-theme'] variables for this purpose, again I'm on my phone and might have the variable names wrong. I have to do some research to make sure that method will be compatible with WET v4. I can't see why it wouldn't

from wet-boew-php.

upsonp avatar upsonp commented on August 20, 2024

Variable names are actually $_UNKNOWN['gc_theme_folder'] and $_UNKNOWN['gc_dist_folder'].

from wet-boew-php.

upsonp avatar upsonp commented on August 20, 2024

@nschonni I think interms of the discussion we were having in #29, it would probably be best for me to update the PHP demo config files adding the $DEPLOY_FOLDER_PHP = "/wet-boew-php/"; and $DEPLOY_FOLDER_DIST = "/wet-boew-dist/"; variables with some code comments describing them.

from wet-boew-php.

nschonni avatar nschonni commented on August 20, 2024

@upsonp you can see that there is something wrong I've got in the config http://wet-boew-php.azurewebsites.net/demos-php/index-eng.php

What section of the config should be changed to point to this structure to the submodules built files that are at a different root from the demo-php and dist-php folders?

from wet-boew-php.

upsonp avatar upsonp commented on August 20, 2024

@nschonni I'm not familiar with how submodules work, but I think if you open the /demos-php/config/theme-gcwu-fegc/config.php file and replace the line:

$_ROOT_SERVER_DIR = "/wet-boew";

With:
$DEPLOY_FOLDER_DIST = "{location of the core wet files}";
$DEPLOY_FOLDER_PHP= "{location of the folder /dist-php and /demos-php are in}"

from wet-boew-php.

upsonp avatar upsonp commented on August 20, 2024

@nschonni If I make changes to the https://github.com/nschonni/wet-boew-php/tree/azure-demos files does that affect the Azure site, or do you have to push the updates to the site some how.

from wet-boew-php.

nschonni avatar nschonni commented on August 20, 2024

So for https://github.com/nschonni/wet-boew-php/tree/azure-demos I think it would be:

  • $_ROOT_SERVER_DIR = "/";
  • $_DEPLOY_FOLDER_DIST_ = "/web-boew/dist";
  • $_DEPLOY_FOLDER_PHP_= "/"

from wet-boew-php.

nschonni avatar nschonni commented on August 20, 2024

Go ahead an PR it there, as soon as changes are pushed that that branch Azure will rebuild the site.

from wet-boew-php.

upsonp avatar upsonp commented on August 20, 2024

Close. You don't need $_ROOT_SERVER_DIR = "/";

from wet-boew-php.

upsonp avatar upsonp commented on August 20, 2024

I've never updated a site like this before, so I'm not entirely sure it'll work or how to debug it.

from wet-boew-php.

nschonni avatar nschonni commented on August 20, 2024

I'm getting a 500 error for http://wet-boew-php.azurewebsites.net/demos-php/index-eng.php

from wet-boew-php.

upsonp avatar upsonp commented on August 20, 2024

Do you have access to that server?

I'm not sure what would be causing a 500 internal error, but I don't think it's related to the PHP variant setup seeing as how what's there now is pretty much what was working earlier.

from wet-boew-php.

nschonni avatar nschonni commented on August 20, 2024

Finally figured out the FTP access to the logs. The last message I'm getting now is:

[08-May-2013 16:33:24 America/Los_Angeles] PHP Parse error:  syntax error, unexpected T_VARIABLE in C:\DWASFiles\Sites\wet-boew-php\VirtualDirectory0\site\wwwroot\demos-php\config\theme-gcwu-fegc\config.php on line 9

from wet-boew-php.

upsonp avatar upsonp commented on August 20, 2024

Missing semicolon, I've only had glasses for six months, but that's why I got them.

from wet-boew-php.

nschonni avatar nschonni commented on August 20, 2024

OK, the GCWU theme is working now http://wet-boew-php.azurewebsites.net/demos-php/index-eng.php


@upsonp the links generated for the languages on http://wet-boew-php.azurewebsites.net/demos-php/index.php has some weird backslash escaping

from wet-boew-php.

upsonp avatar upsonp commented on August 20, 2024

Looks like there's an issue with the SVG image. The SVG mimetype might have to be added to the server mimetype list.

from wet-boew-php.

upsonp avatar upsonp commented on August 20, 2024

@nschonni the backslash issue on that page is because the $_PAGE['title_eng'] variable wasn't set. 'eng' is the primary language, but I guess I for got to set the primary title. The backslash is the separator between the english and french title.

from wet-boew-php.

nschonni avatar nschonni commented on August 20, 2024

Fixed the SVG issue, Azure is hosted on IIS so I've added a root web.config

from wet-boew-php.

nschonni avatar nschonni commented on August 20, 2024

@upsonp the issue is that the link renders out to http://wet-boew-php.azurewebsites.net/demos-php/%5Cdemos-php/index-eng.php
Note the encoded backslash following the demos-php

from wet-boew-php.

upsonp avatar upsonp commented on August 20, 2024

Thanks @nschonni I thought you were talking about the title for the page... The links seem to be working fine for me,
From http://wet-boew-php.azurewebsites.net/demos-php/index.php
The English button points to http://wet-boew-php.azurewebsites.net/demos-php/index-eng.php
The french points to http://wet-boew-php.azurewebsites.net/demos-php/index-fra.php

I'm glad we're making progress though. Thanks a lot for setting this up. I'll look into making some of the suggested changes we came up with for this exercise in the main php variant. I'm off to bed.

from wet-boew-php.

nschonni avatar nschonni commented on August 20, 2024

Alright, I'm going to try and fix the http redirection so that it points http://wet-boew-php.azurewebsites.net/ to http://wet-boew-php.azurewebsites.net/demos-php/index.php

from wet-boew-php.

pjackson28 avatar pjackson28 commented on August 20, 2024

Make sure the links from the wet-boew working examples get updated as well (http://wet-boew.github.io/wet-boew/demos/php/index-eng.html). They are currently pointing to the old RCMP examples.

from wet-boew-php.

nschonni avatar nschonni commented on August 20, 2024

@pjackson28 this is still testing under my fork, I can't setup the hook to the main repo

from wet-boew-php.

LaurentGoderre avatar LaurentGoderre commented on August 20, 2024

Let me known when you're ready to set it up

from wet-boew-php.

upsonp avatar upsonp commented on August 20, 2024

@nschonni I took some of the lessons we learned from last nights exercise and added them to the main PHP Variant. As you suggested I factored out the paths that were set at the top of each of the /demos-php/config/{theme}/config.php files. There is now a /demos-php/config/config-path.php file with the variables $_SITE['wb_php_root'] and $_SITE['wb_core_root'], which is more consistent with the way other variables are named.

So when you have a chance to redeploy you should only have to update the /demos-php/config/config-path.php file with:

$_SITE['wb_core_root'] = "/wet-boew";
$_SITE['wb_php_root'] = "";

from wet-boew-php.

nschonni avatar nschonni commented on August 20, 2024

@upsonp should I PR the submodule and web.config?
@LaurentGoderre I'll remove my reservation on the wet-boew-php site once everything is ready to go 👍

from wet-boew-php.

upsonp avatar upsonp commented on August 20, 2024

@nschonni Sorry, I don't know what PR means or what the web.config is. I'm assuming that means something like keep them separate from or add them to the the primary repository?

from wet-boew-php.

LaurentGoderre avatar LaurentGoderre commented on August 20, 2024

the web.config is an IIS config file. Not sure it should be in a php repo.

from wet-boew-php.

LaurentGoderre avatar LaurentGoderre commented on August 20, 2024

@upsonp means Pull Request

from wet-boew-php.

upsonp avatar upsonp commented on August 20, 2024

@LaurentGoderre Thanks.

@nschonni I'm assuming then that you're asking to submit a PR so the main PHP repository could be linked to the azure site? If that's the case then please do.

If on the other hand we can't link the main repository to the azure site, I'd like to keep only things relevant to the variant there; so I'm not keen on having a web.config or other config files for a specific server implementation stored there. It might be confusing to someone who downloads the variant that doesn't understand web servers.

from wet-boew-php.

LaurentGoderre avatar LaurentGoderre commented on August 20, 2024

There's probably a way to make it work without adding the config file to the repo

from wet-boew-php.

nschonni avatar nschonni commented on August 20, 2024

@LaurentGoderre no the web.config is required to add the SVG MIME type, but I've added comments to the file to indicate it's for our demos

from wet-boew-php.

nschonni avatar nschonni commented on August 20, 2024

@upsonp I can only reproduce the weird /\ in the language buttons in Firefox ...

from wet-boew-php.

upsonp avatar upsonp commented on August 20, 2024

@nschonni I actually reproduced the issue in firefox on my Galaxy Note II phone. No problems in chrome on my Ubuntu machine. I should have tested on my Win7 work machine, hopefully I'll remember on Monday.

from wet-boew-php.

upsonp avatar upsonp commented on August 20, 2024

@nschonni I'm pretty sure the issue is with this section of code in the index.php file

//get the path to the current folder this file resides in. 
$_ROOT_PATH_ = $_SERVER['DOCUMENT_ROOT'];
if(strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
    //Backslashes are escape characters so on a winodws server
    //they need to be replaced with double backslash. For anyone
    //that hasn't see it before you have to escape the backslash
    //in regular expressions hence the \\\\\\\\\\\\\\\\\\\\\\\\\ below
    $_ROOT_PATH_ = preg_replace("(\\\)", "\\\\\\", $_ROOT_PATH_);
}
//Remove the server root path to make the path a nice URL relaitve path
$_PATH_ = preg_replace("(".$_ROOT_PATH_.")", "", realpath(dirname(__FILE__)));

if( strtoupper(substr(PHP_OS, 0, 3)) != 'WIN' ) {
    //linux server paths I think end with a forward slash
    //so the initial / is removed from the path in the preg_replace above
    //and is required to form the URL
    $_PATH_ = "/".$_PATH_;
}

$_SITE['wb_site_href_eng'] = $_PATH_ ."/index-eng.php";
$_SITE['wb_site_href_fra'] = $_PATH_ ."/index-fra.php";

the $PATH variable is being calculated dynamically, but I don't think it has to be.

replacing it with

$_SITE['wb_site_href_eng'] = "index-eng.php";
$_SITE['wb_site_href_fra'] = "index-fra.php";

seems to work on my local server

from wet-boew-php.

nschonni avatar nschonni commented on August 20, 2024

Not sure, are you using $_SITE['wb_php_root'] = ""; on your local?

from wet-boew-php.

upsonp avatar upsonp commented on August 20, 2024

No, $_SITE['wb_php_root'] = "/wet-boew-php"; on my local server.

from wet-boew-php.

upsonp avatar upsonp commented on August 20, 2024

Looks like the last merge fixed it. I'm not sure why I came up with that mess of code in the first place. Sometimes I just over think things.

from wet-boew-php.

upsonp avatar upsonp commented on August 20, 2024

@nschonni - I'm satisfied that the working examples are showing up ok in your dev branch. If you want to submit a pull request and change the pointers for the azure server to point to the master PHP variant I think we could put this to bed.

from wet-boew-php.

upsonp avatar upsonp commented on August 20, 2024

@nschonni I've merged the Azure Demos into the master PHP variant. Should I keep them as a separate branch instead of just linking them to the master? and what do we have to do to point the azure site to the wet-boew/wet-boew-php?

I've made some corrections related to #11, but they're not showing up in the demos.

from wet-boew-php.

nschonni avatar nschonni commented on August 20, 2024

The azure site is still pointing to my fork/branch, but once it can be switched over then it will point to the master branch of this repo.

from wet-boew-php.

nschonni avatar nschonni commented on August 20, 2024

@upsonp I've pointed it to this repo now and did a manual sync. The automated hook needs to be setup by @LaurentGoderre

from wet-boew-php.

upsonp avatar upsonp commented on August 20, 2024

@nschonni Thanks great job.

from wet-boew-php.

LaurentGoderre avatar LaurentGoderre commented on August 20, 2024

@nschonni do you need me to setup azure?

from wet-boew-php.

nschonni avatar nschonni commented on August 20, 2024

@LaurentGoderre yeah, you need an repo admin to configure the hook. When you want to do it I'll remove my reservation on the site name.

from wet-boew-php.

LaurentGoderre avatar LaurentGoderre commented on August 20, 2024

I don't see azure in the list

from wet-boew-php.

nschonni avatar nschonni commented on August 20, 2024

It needs to be setup through the http://windows.azure.com management portal

from wet-boew-php.

LaurentGoderre avatar LaurentGoderre commented on August 20, 2024

It says I need a subscription....

from wet-boew-php.

nschonni avatar nschonni commented on August 20, 2024

from wet-boew-php.

pjackson28 avatar pjackson28 commented on August 20, 2024

@nschonni I've granted you admin privileges to the wet-boew-php repo. So if that is the best option then you already have the privileges.

from wet-boew-php.

nschonni avatar nschonni commented on August 20, 2024

Thanks @pjackson28 I've setup for this repo now. I've kept it on the free tier for now, but I can switch over to the dedicated if the traffic demands increase.


@upsonp any new commits to master will now show up on the website. Could you fix those relative path issues?

from wet-boew-php.

upsonp avatar upsonp commented on August 20, 2024

@nschonni sure thing

from wet-boew-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.