Pages (2): 1 2   
Member
Member
riptheriper   17-08-2008, 21:34
#1

Hi,

I have successfully installed zenphoto on my server and it is working flawless. Now I would like to fetch latest images and random images on website’s main page which is outside a Zen folder, I have named “zenphoto” to “portfolio”.
Following is my previous working code:

Above code is not working with a new version of ZenPhoto, any help will be highly appreciated?

Thanks and regards

Member
Member
sbillard   18-08-2008, 01:12
#2

What is happening? This is working for me. Where have you placed the page with this script?

Member
Member
riptheriper   18-08-2008, 07:39
#3

Hi,

Thanks for your reply; following is my directory structure on my local host:

Inetpub
    |Website 01
    |
Website 02 (… and so on)
    |Website (it has a zenphoto)
           |
index.php (with above posted script on root of that folder)
           |___Portfolio (renamed from zenphoto to portfolio and the rest of structure is same as zenphoto)

I hope it will help you to understand a situation, if not and would like to ask some more information then kindly ask me and I will be glad to pass you most appropriate info which I could.

Thanks and regards

Member
Member
riptheriper   19-08-2008, 16:27
#4

Problem has been solved by installing a version 1.2

Member
Member
Barbara   02-09-2008, 15:00
#5

I have the same problem. It's a fresh installation of 1.2 I uploaded a few pics but other than that I didn't change anything.
The site structure is site.com/zentest/
This is my code
`

Test Index

`
And this is the error:
Fatal error: Call to undefined function: zp_error() in /home/xxxx/public_html/test/zp-core/functions-db.php on line 35

Member
Member
sbillard   02-09-2008, 16:48
#6

There is a mismatch between your descripton and the error message. According to the error message the zenphoto files appear to be in the test folder but your description places them in the zentest folder.

Member
Member
Barbara   02-09-2008, 17:51
#7

Yep, sorry. I pasted the wrong log
Fatal error: Call to undefined function: zp_error() in /home/xxxx/public_html/zentest/zp-core/functions-db.php on line 35
Btw, don't know if it helps, but if I change WEBPATH to the full path (http://site.com/zentest)this is what I get:
Fatal error: Call to undefined function: printimagestatistic() in /home/xxxx/public_html/test.php on line 11

Member
Member
sbillard   02-09-2008, 19:34
#8

Can you look at your error logs? The function should have been defined. Also, the place where it is being called is indicating a problem connecting to the database. So it would appear that things are not loading properly.

Member
Member
Barbara   02-09-2008, 21:42
#9

Changed the webpath back to the folder name only.
This is what the error log says, basically the same warning as the one in the browser
[02-Sep-2008 17:28:54] PHP Fatal error: Call to undefined function: zp_error() in /home/xxxx/public_html/zentest/zp-core/functions-db.php on line 35
I c/p the function as it is and it's working inside the gallery so I assume the database is ok. I have no idea why it is not connecting.
Do you know what else I can change/check?

Member
Member
Barbara   08-09-2008, 12:17
#10

Help?

Member
Member
sbillard   08-09-2008, 19:02
#11

Please post the full structure of your gallelry (as riptheriper did). Are yolu using this in conjunction with anything else like Wordpress?

There really should be no way that this error can occur--the zp_error() is defined in functions.php which is included at the beginning of functions-db.php so should really exist.

You can modify the code in functions-db.php to give us some more information:

if (!$mysql_connection) {

insert here: echo ' $_zp_conf_vars: ';print_r($_zp_conf_vars);

zp_error(gettext('MySQL Error: Zenphoto could not connect to the database server.') .gettext('Check your [b]zp-config.php[/b] file for the correct [i][b]host[/b], [b]user name[/b], and [b]password[/b][/i].') . gettext('Note that you may need to change the [i]host[/i] from localhost if your web server uses a separate MySQL server, which is common in large shared hosting environments like Dreamhost and GoDaddy.') . gettext('Also make sure the server is running, if you control it.')); return false; }
[b]NOTE:[/b] this will display your MySQL user and password, so you want to do this, capture the result, and then take it out.

Member
Member
Barbara   09-09-2008, 09:44
#12

Zenphoto is the only script I'm currently running. The above code doesn't seem to be working, unless I'm doing something wrong.

$_zp_conf_vars:
Fatal error: Call to undefined function: zp_error() in /home/gsrfanco/public_html/zentest/zp-core/functions-db.php on line 36
and this is the code (line 34 and on):
if (!$mysql_connection) { echo '$_zp_conf_vars: ';print_r($_zp_conf_vars); zp_error(gettext('MySQL Error: Zenphoto could not connect to the database server.') .gettext('Check your [b]zp-config.php[/b] file for the correct [i][b]host[/b], [b]user name[/b], and [b]password[/b][/i].') . gettext('Note that you may need to change the [i]host[/i] from localhost if your web server uses a separate MySQL server, which is common in large shared hosting environments like Dreamhost and GoDaddy.') . gettext('Also make sure the server is running, if you control it.')); return false; }
The structure:

root folder (it has the file with the script)
|__zentest

Member
Member
sbillard   09-09-2008, 16:47
#13

Well, I certainly don't know why it is not working, but at least now we know the symptoms. Somehow the configuration file is not being found, so zenphoto does not have the MySql login information.

If you don't mind continuing to debug this through this thread, you can add another line to the above code echo current directory: '.getcwd(); echo ' zp-config.php ';if (file_exists('zp-config.php') echo ' found'else echo 'not found';

We will see what this tells us and go on from there.

Member
Member
Barbara   09-09-2008, 19:28
#14

Thanks sbillard! I c/p and it said Parse error: syntax error, unexpected '

Member
Member
sbillard   09-09-2008, 20:54
#15

Ok, missing paren corrected:

echo '$_zp_conf_vars:'; print_r($_zp_conf_vars); echo ' current directory: '.getcwd(); echo ' zp-config.php '; if (file_exists('zp-config.php')) echo 'found'; else echo 'not found';

Member
Member
Barbara   09-09-2008, 22:53
#16

Here you go:

$_zp_conf_vars:
current directory: /home/xxxx/public_html
zp-config.php not found
Fatal error: Call to undefined function: zp_error() in /home/xxxx/public_html/zentest/zp-core/functions-db.php on line 44

Member
Member
sbillard   10-09-2008, 02:44
#17

Sorry, I guess I really don't know what is going on. Maybe if I sleep on it or give it a rest something will occur to me.

Member
Member
Barbara   11-09-2008, 07:55
#18

No problem. Thanks anyway. I think I'll just copy the html of the pics and paste it in the page where I need it.

Member
Member
Barbara   15-01-2009, 23:05
#19

I have a new gallery and the same problem. I tried the above code but it is no longer working. Is there anything else I can do?

The site structure now is
root
\folder
\zenphoto

Member
Member
Barbara   17-06-2009, 21:46
#20

I have this code in a test page, it's working but all the thumbnails are broken
The html output:
< a href="photos/Miscellaneous/image_001.jpg.php" title="image_001">
< img src="photos/cache/Miscellaneous/image_001.jpg_100_thumb.jpg" alt="image_001" />
Using an absolute path would fix it but I don't know what to change. I tried
define('WEBPATH', '[i]/[/i]photos') but it gives me this error
Warning: require_once(/photos/zp-core/template-functions.php) [function.require-once]: failed to open stream: No such file or directory in /home/xxx/public_html/test/zen.php on line 4

Fatal error: require_once() [function.require]: Failed opening required '/photos/zp-core/template-functions.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxx/public_html/test/zen.php on line 4
my site structure is
public_html/test/photos

Pages (2): 1 2   
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.