Forum

Questions and discussions

Amazon S3 setup problem

Script's setup and configuration

Amazon S3 setup problem

Postby df305 » Sun Sep 18, 2011 1:43 pm

I followed the instructions to set up Amazon S3 (test completes successfully), but I receive an error message from cron daemon:

public_html/members/cron_amazon.php: line 1: syntax error near unexpected token `('
public_html/members/cron_amazon.php: line 1: `<?include("../admin/function/db.php");?>'

Any help would be greatly appreciated!
DF
df305
 
Posts: 9
Joined: Thu Sep 08, 2011 1:06 pm

Re: Amazon S3 setup problem

Postby admin » Sun Sep 18, 2011 6:04 pm

If you see <? ?> code in the errors it means that php code was not executed.
admin
Site Admin
 
Posts: 1465
Joined: Sun Mar 07, 2010 5:55 pm

Re: Amazon S3 setup problem

Postby df305 » Sun Sep 18, 2011 6:49 pm

I'm not sure I understand what that means. Have to admit I'm not a world champion in PHP ;-)
Why would the PHP not be executed? Any suggestions what I can do to solve the problem?
THANKS!
df305
 
Posts: 9
Joined: Thu Sep 08, 2011 1:06 pm

Re: Amazon S3 setup problem

Postby admin » Mon Sep 19, 2011 7:45 am

Does php cron understand short tags <? ?>
or it requires <?php ?>
admin
Site Admin
 
Posts: 1465
Joined: Sun Mar 07, 2010 5:55 pm

Re: Amazon S3 setup problem

Postby df305 » Mon Sep 19, 2011 4:13 pm

The script runs fine when I execute it from the browser, but not with a cron job. I tried <?php ?>, same problem. Of course I could run it manually after each upload, but an automatic way would be much better.

Another strange thing is that the black bars that I got rid of with Lucy's trick (thank you!)
Code: Select all
var s".$id_parent." = new SWFObject(\"".site_root."/images/mediaplayer.swf\",\"single\",\"".$site_ffmpeg_width."\",\"".$site_ffmpeg_height+20

now appear again after the file moves to Amazon! Is there a command in the Amazon script that re-arranges the size of the clip again? Do I have to apply the +20 somewhere again?

Thanks for any help, I'm a bit lost with these PHP issues!
DF
df305
 
Posts: 9
Joined: Thu Sep 08, 2011 1:06 pm

Re: Amazon S3 setup problem

Postby admin » Fri Sep 23, 2011 7:03 am

What command to use to run a cron script?

I advice the next one:

Code: Select all
/usr/bin/lynx -source http://yourdomain.com/members/cron_amazon.php
admin
Site Admin
 
Posts: 1465
Joined: Sun Mar 07, 2010 5:55 pm

Re: Amazon S3 setup problem

Postby df305 » Sun Sep 25, 2011 9:18 pm

Thanks for the reply. I followed your advice and go this error message:

<b>Strict Standards</b>: date() [<a href='function.date'>function.date</a>]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CDT/-5.0/DST' instead in <b>/home/305/public_html/members/cron_amazon.php</b> on line <b>234</b><br />

What can I do about this?
Thanks, DF
df305
 
Posts: 9
Joined: Thu Sep 08, 2011 1:06 pm

Re: Amazon S3 setup problem

Postby Spectral » Wed Sep 28, 2011 4:41 am

Hi df305,

I had the same Problem and found a good workaround which makes the whole thing work, although it is not a real solution.
Enter in the CRON command line this:

Code: Select all
wget http://yourdomain.com/members/cron_amazon.php >/dev/null 2>&1


This makes it a HTTP request and it will work just as you would kick it with the Browser.
Check your root directory every now and then, it might be receiving some http fake files you have to delete which are resulting from the requests.

I hope this helps and Anton finds a real solution soon :-)
Spectral
 
Posts: 14
Joined: Fri Mar 11, 2011 6:19 pm


Return to Configuration

Who is online

Users browsing this forum: No registered users and 3 guests

cron
  Photo Store Script

Professional php photo stock script and WordPress plug-in for photographers and video producers.

  Support
  CMSaccount Inc.