Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 168
  • Last Modified:

PHP code question

Hi,
I'm trying to run a third party PHP script. It's called zensync and it's designed to allow fast upload of photos to the ZenFolio site (photo sharing/selling site).

The instructions say to modify the local config.php, which I did. It's local to the script directory zensync is in.
The it says to run it:   php zensync.php
When I type that nothing happens. I just get the command prompt back.
So I went into the zensync.php code and typed in an echo statement. If I put the echo before the first require, I get "Hello" back. Otherwise, I get nothing back. All the files listed as 'required' are in the local directory where the zensync scripts exists. So I don't understand why the script is coming back with nothing.
Ideas?
Better trouble shooting skills for php? I'm a programmer but not really PHP.

Thanks,
zensync.php:

echo "Hello";  ## Comes back with Hello
require("config.php");
echo "Hello";  ## Comes back with nothing
require("config.class.php");
require("logger.class.php");
require("helper.inc.php");
require("zenlogin.inc.php");
require("dirobj.class.php");
0
nachtmsk
Asked:
nachtmsk
  • 3
  • 3
1 Solution
 
GaryCommented:
So config.php is in the same folder as zensync.php ?

Add to the top of the page after the opening php tag

error_reporting(E_ALL);
0
 
nachtmskAuthor Commented:
Yeah, it's in the same dir (folder). I'll add that in and see what happens.
0
 
nachtmskAuthor Commented:
Still nothing.
Here is the top of the main php script:

#!/usr/bin/php
<?php
error_reporting(E_ALL);
/*
*************************************************************************
  ZenSync - Zenfolio Image Depot Synchronizer
  Created and maintained by Dan Richardson and Harald Maida
*************************************************************************
  ZenSync is an opensource tool written in PHP running on any
  platform with a PHP installation that transfers a file system based
  depot of images into a Zenfolio photo gallery. It is easy to use
  and keeps your Zenfolio photo gallery in sync with the file system
  based image depot located on any desktop or server.

  ZenSync is distributed under the GNU General Public License.
*************************************************************************

  ZenSync - Zenfolio Image Depot Synchronizer
  Copyright 2007 and forever thereafter by Dan Richardson & Harald Maida.
  All rights reserved.

  This file and all related or dependant files distributed with this
  file are considered as a whole to make up ZenSync.

  ZenSync is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  ZenSync is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  See the GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with ZenSync (see file LICENSE.txt); if not, write to the
  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  Boston, MA  02110-1301, USA

  For more information on ZenSync2 visit http://blog.harim.at/zensync
  For more information on ZenSync visit http://www.plymptonia.com/

**************************************************************************
  Originally created by Dan Richardson
  Extended by Harald Maida
**************************************************************************
*/
// Main ZenSync starts here
require("config.php");
echo "Hello";
require("config.class.php");
===========================================

Here  is a dir listing of everything in the same dir as the script:

-rwxrwxrwx 1 1796965  357519   609 Jun 10  2009 config.class.php
-rwxrwxrwx 1 1796965  357519  7609 Sep 23 11:23 config.php
-rwxrwxrwx 1 1796965  357519 17762 Jul  6  2009 dirobj.class.php
-rwxrwxrwx 1 1796965  357519   349 Jun 10  2009 helper.inc.php
-rwxrwxrwx 1 1796965  357519 15425 Apr 21  2005 LICENSE.txt
-rwxrwxrwx 1 1796965  357519  1087 Sep 10  2009 logger.class.php
-rwxrwxrwx 1 1796965  357519  2524 Jul  6  2009 make_h264.php
-rwxrwxrwx 1 1796965  357519  1266 Jul  6  2009 make_vid.php
-rwxrwxrwx 1 1796965  357519  3562 Jun 13  2009 README.txt
-rwxrwxrwx 1 1796965  357519    83 Aug 21  2009 sync.sh
-rwxrwxrwx 1 1796965  357519  2143 Jun 11  2009 TODO.txt
-rwxrwxrwx 1 1796965  357519    11 Jun 12  2009 VERSION.txt
-rwxrwxrwx 1 1796965  357519  1435 Jun  4  2009 zenlogin.inc.php
-rwxrwxrwx 1 1796965  357519  5975 Sep 23 12:00 zensync.php
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Ray PaseurCommented:
PHP is notoriously bad about hiding the messages you need to see.  You may also need to add this line.

ini_set('display_errors', TRUE);
0
 
Ray PaseurCommented:
Hmm... I just read the comments thread on this page:
http://www.plymptonia.com/?p=20

Might be worth checking out that thread.  Also checking to see if there is anything newer than the 2009 libraries.  PHP has changed a lot in the last 5 years.
0
 
nachtmskAuthor Commented:
Ray
Thanks for the tip.
Getting lots of error messages now!! I'll see what I can do with them.
First one is that it needs a SOAP library. Guess I'll have to get that.

Don't think there are new libs for this script but I will check.
0
 
Ray PaseurCommented:
Good docs (as good as anything about SOAP can be) here: http://php.net/manual/en/book.soap.php
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now