PHP 5.3 has a lot of changes that make scripts that worked with earlier version of php not function correctly anymore. I learned this from "trial and error" as well. Anyway, glad that it is working for you now.
Printable View
PHP 5.3 has a lot of changes that make scripts that worked with earlier version of php not function correctly anymore. I learned this from "trial and error" as well. Anyway, glad that it is working for you now.
I just deinstalled apache and php and re-installed it from fresh sources. no change. I can't get the script to work on my computer. Now I get another error in addition:
[Tue Aug 25 21:29:11 2009] [error] [client 127.0.0.1] PHP Deprecated: Function eregi() is deprecated in C:\\webdev\\rmv3\\album\\getalbumpics.php on line 11, referer: http://localhost/album.php
I don't know if this would call the script to fail, but it is definitely not working on my computer.
Are you familiar with PHP? If so, I'd try and modify albumpics.php per the error warnings you've been receiving to see if that changes anything:
1) For the date() function, I don't see any issues mentioned in the documentation, but perhaps I missed something.
2) For eregi(), The docs do say it's deprecated, and I'll most likely be updating the php script officially for this soon. In the meantime, try using preg_match instead.
Thanks. I will see if I can do that. I just saw another piece of information. This morning I fired up my computer and started the web page in Firefox while it was still loading up. I guess that slowed it down a bit, and I saw briefly flashing on the page an icon (with a red "X", the "loading.gif, and a text "loading...". I coldn't make out more details as it flashed by prety quickly. I believe that this is from the PHP script, right? So, between that point and the display, something seems to go wrong. I am wondering if the time code inserts some unwanted characters that are then interpreted wrong and the filenames are not right, and then your script cannot load the images. I just don't know how to debug php. I'm familiar with other languages, and there is always a way to insert some comments to see where things might go wrong, or there is a debugger tool that let's you do that and watch variables, for example. How does that work with php?
No, the red "x" and brief animation is from the JavaScript, which isn't the issue. I think you are getting closer earlier as far as those PHP log errors are concerned. Basically some of the code inside getalbumpics.php is incompatible on your home server. You'll need to try modifying some of the code inside the PHP script based on the error messages mentioned.
If and when your PHP code does work, you should be able to call it directly in your browser, and have it return a JavaScript array such as when you click on the below:
http://www.dynamicdrive.com/dynamici....php?id=jaguar
Found the problem. Had to sign up and post a simple fix for anyone else who needs to show some photos quick :)
Open the file getalbumpics.php and change the first line from
toPHP Code:<?
Or you can open php.ini and setPHP Code:<?php
it is off by default and will give you a blank page if not turned on :)Code:short_open_tag = On
Hope this helps someone else. Took me over an hour to figure it out. Guess I should have started looking at the code first instead of my apache/php settings.