Parse error: syntax error, unexpected $end, expecting ')'

Dear sirs,
I tried everything I could try. My gallery crashes and gives alwas something like: Parse error: syntax error, unexpected $end, expecting ')' in /DISK4/WWW/divadloaqualung.cz/www/galerie/data_aqualung/album_tabs.php on line 344 and many similar messages.
Procedure:
1. I delete all files from data folder (chmode 777)
2. I run gallery like mydomain/galleryfolder
3. Gallery starts clean like just after installation = properly
4. Succesfull login, setup, pasword, thumbnails and etc.
5. I copy there my translation file, gallery goes in my language properly
6. Scanning directories ok, so gallery perfectly works.
7. In aprox. an hour one of two my gallery albums has "no picture" thumb
8. I go to setup to rescan directories
9. This album disappears from the list (but photos are placed ok, 777 and right path to them)
10. Burial, it goes crash with an error.

Summary:
I start thinking it is not a question of my hosting, so any ideas how to solve this?
In an another copy of gallery (anther hosting) postcard antispam disapperad - I did nothing with)

Many thanks for an advice.
Alois

php.ini settings

By the way,
are there any strictly required (or recommended = tested) setups in php.ini to allow the gallery work on 100%?
I am not a specialist.

An appendix to above:
I modified album & imageview.tpl but there would not be the problem because gallery works fine until for example I tried to made changes in setup backend and save even.
My photos folder path is relative to gallery folder up one level like: ../photos, it works normaly fine even few days.

No there is norecommended

No there is norecommended setup in php.ini, may be a could make public my setup setting on php where i am developing and testing.

What you need is to have enough memory limit to convert the pictures.

Backup - Restore

So, I tried download THE SAME working gallery with the SAME path to photos folder from here: http://hlavsa.cz/aqualung/galerie/main.php, I copied whole gallery folder to an another hosting /except files in cache_.../, set chmodes for required folders here http://www.divadloaqualung.cz/galerie/main.php?cmd=album and:
Warning: fopen(data_aqualung/writablity_test) [function.fopen]: failed to open stream: Permission denied in /DISK4/WWW/divadloaqualung.cz/www/galerie/main.php on line 2314

Warning: fclose(): supplied argument is not a valid stream resource in /DISK4/WWW/divadloaqualung.cz/www/galerie/main.php on line 2315
Welcome to phpAlbum 0.4.1.14
Your data directory data_aqualung/ is not writable
Please change the rights on this directory so php can write in it. (UNIX: CHMOD 777, WINDOWS: setup rights

But this is not the truth, chmode is set to 777 for data_

My question is logical:
Is it possible to restore whole gallery in this way?
May the php.ini on server case this?

Uff
Thanks

Yes you can restore gallery

Yes you can restore gallery in that you copy all files. Actually all settings are stored in the files in data directory.

But you will for sure get problems like you have. Your data directory is 777 which is important to be able to create new files there. But if you copy the data files with some FTP the "wwwrun" user under which php is running is no more the owner of that files, so the copied files (in data dir) has to be set to 777 too. Otherwise they can not be open by php for writing.

And now to answer to your

And now to answer to your original post:

First, the album directory does not have to be chmodded to 777, it must be readable to PHP, phpAlbum does not change any of your JPGs:)

I think if the gallery is working but after some hours not it should be something with your server. I would like to have a copy of your data directory ( you can zip and send it to support(at)phpalbum.net) in that case when it is broken,i.e. not more working.

I see you have there errors in album_tabs.php which is actually one of the main data files of the phpalbum. This is very strange as this file is created on the first run of phpAlbum and is no more changed. Only if you do some upgrades to phpAlbum.

It looks like if you have some problem with your file system on server, the file must be definitely corrupt.

Big determination

Dear Patrick,
I really appreciate your big effort! I tried to delete data folder and start gallery again, then zip fresh data files ... It failed completly (just now)!
Ok, I said, stop being furious, use common sense. Patrick said the keyword: server.
Ok, I took whole my little site and moved it here (another test server):
http://www.diskopeklo.cz/aqualung/galerie/main.php?cmd=album
PATRICK! Y O U A R E R I G H T ! THANK YOU !!!

So, if there are real problems, server change is the last, but clever solution. My test site works in seconds! Ftp is much faster then before.
For the Czech users: NEVER TRY ANY ATTEMPTS ON www.pipni.cz! NEVER!!! It spent me a week of my, Patricks life. But good experience ... :-)

And about backup - restore
Thank you, I understand now exactely, my message is - it is ok, it was a real test.
Only little thought - are restored data files chmoded to 777 safe enough? If not, can a php code "hack" set them being owned back and working with chmode 644?

There is an imaginary big bottle of good drink for you!
Thanks again from Prague
Alois

Probably it would be

Probably it would be possible to take the ownership and change the chmod back to 644 if you before chmod them to 777. This is not that bad idea.
Bud it is not that unsafe, because everybody can read them even if they are 644. You can not display them directly from web because they are php files which displays nothing, there is only an array in it.
You would need to have shell access to see them.

pipni.cz hosting problem

hi. my english is very bad, excuse me.

i have problem with pipni.cz hosting and phpAlbum. i upload album source files and everything is all right. after approximately two days phpAlbum doesn't work.


Parse error: syntax error, unexpected ';' in /DISK3/WWW/shadowork.net/photos/phpdatabase.php(548) : runtime-created function on line 1

Fatal error: Function name must be a string in /DISK3/WWW/shadowork.net/photos/phpdatabase.php on line 704

when i delete files in folder "data", phpalbum work. but all settings i have to set again. i found a problem most probably with "album_files_xxxx.php".

when album works, i have last album_files "album_files_1033.php". size is 104kB. in the end of file is correct code:


255 =>
array (
'file_name' => 'IMG_8640.JPG',
'visible' => 'true',
'desc' => '',
'long_desc' => '',
'params' => '',
'dir_logo' => 'true',
'view_count' => 0,
'vote_count' => 0,
'vote_avg' => 0,
'comment_count' => 0,
'use_for_logo' => 'false',
'file_time' => '1182970994',
'screenshot' => '',
'type' => 'I',
'keywords' =>
array (
),
),
) ?>

but after two days phpalbum doesn't work again and i have "album_files_1033.php" - 65kB (before 104kB) and "album_files_1034.php". i don't add any files to photo folder.

in the end of file "album_files_1033.php" is wrong code:


158 =>
array (
'file_name' => 'IMG_8515.JPG',
'visible' => 'true',
'desc' => '',
'long_desc' => '',
'params' => '',
'dir_logo' => 'true',
'view_count' => 0,
'vote_count'

and code in file "album_files_1034.php" is only:


<? $db_data["files_1034"] = array (
) ?>

the file "album_files_1033.php" looks corrupt and file "album_files_1034.php" have empty array... this problem typically occurs in hosting pipni.cz. maybe you help me with this problem, maybe i have to solve this problem with pipni.cz. i don't know. i shall be happy to any way help.

Lord Mystic

http://shadowork.net
http://photos.shadowork.net

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.


style="display:inline-block;width:468px;height:60px"
data-ad-client="ca-pub-8698264690166658"
data-ad-slot="4417389723">