hey chris, i got it working by changing this,
var str = patt.exec(code);
to this,
var str = code.match("<h2 class=\"pic\">My message<\/h2>\n(.*)<");
result = str[1];
my local is virtual linux via OS X, and the site is on linux
the environment is through google tag manager. it's a snippet of iframe code that you place onto your site. through their user interface you then include the usual google analytics tracking tags, as well as custom js functions to track custom data. I don't think there are any limitations, well...
hey vacunita, here's the string,
<h2 class="pic">My message</h2>hello world</div>
and I'm trying to match 'hello world' by using this regex,
/<h2 class="pic">My message<\/h2>(.*?)<\/div>/ig
...on my local environment i'm successfully able to achieve this,
str[0] = <h2 class="pic">My...
i'm not that familiar with javascript. i'm trying to do something very simple which works fine on my local, but doesn't seem to work on a 3rd party environment (Google tag manager - macro)...
- I'm trying to match 'hello world' inside the var, 'code'
- then strip out any white space, to include...
just got it working. this is the correct code,
* * * * * php /var/www/html/test/index.php
was able to figure it out after reading this post... http://askubuntu.com/questions/430509/cannot-run-cron-job-for-a-php-script/430664#430664
any takers on why this is not working? besides creating the cron (shown in the examples below), is there anywhere else i'm meant to do something to get it working, like a specific config file located somewhere?
if anyone can help, is it possible that you could give me exact step by step...
hi himdp, you're right about using all asterix's for testing purposes, so i've made the update, but i'm still not seeing the cron work. besides creating the cron, am i also supposed to do something elsewhere? scratching my head why this is not working
I've been trying to create a cron that doesn't seem to be working. i'm running Ubuntu 14.04. for testing i've set my cron to run every minute.
btw, i'd created the cron using, 'sudo crontab -e'. not sure if sudo was needed, but thought why not for testing purposes in case permissions might be...
thanks feherke, just now rebuilt the server on my local (for some reason i couldn't just update from or get rid of apache2 2.4.6. this was moments before you'd replied. i know i was a bit of a hot head, but if i do need to go back to my previous local config, i'll factor in your suggestion...
i'm in the directory... /var/www/html/test/index.php
the file i'm trying to reference is inside... /var/www/html/template/template_includes.php
dirname(__FILE__) gives me /var/www/html/test/ ...i need to go back a directory to reference, /var/www/html/template/template_includes.php
i guess i...
ok, i'm racking my brain how to get around this, my problem is
- my local is running Apache/2.4.6 (Ubuntu)...(/var/www)
- and my server is running Apache/2.4.7 (Ubuntu)...(/var/www/html)
in the latest apache2 they've created a new 'html' folder where to place web files. so when flipping...
what i don't get is when i echo $_SERVER['DOCUMENT_ROOT'] outside of the include it gives me, DOCUMENT_ROOT: /var/www/html
but inside use it inside the include, all i'm getting is... PHP Warning: include(/template/template_includes.php): failed
hi feherke,
here's my code,
include(''.$_SERVER['DOCUMENT_ROOT'] . '/template/template_includes.php');
works fine via the browser, but i get errors when running via the command line. here's the error message,
hey feherke, yes you're right, i'm starting to narrow it down to my include file thats referencing the db connection params...
original include causing the error...
<?php //include('../template/template_includes.php')?>
did a quick update to this, but didn't work
<?php...
Hi,
i'm kind of new to linux and running scripts directly from the command line
my server version is Ubuntu 14.04. (my php version is 5.5.9). I was trying to set up a cron job to run a php script, but was having no success. so i decided to see if the script would just run via the command line...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.