Installation Parse error & Fatal error Installation Parse error & Fatal error
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Installation Parse error & Fatal error

Started by mehdi42, January 10, 2004, 11:38:33 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

mehdi42

Hi all,

Sinds yesterday I am trying to install the package without any success.

if I point to de directory i get the following errors:
Parse error: parse error in /home/persianj/public_html/cpg1.2.1_standalone/include/init.inc.php on line 49
Fatal error: Call to undefined function: breadcrumb() in /home/persianj/public_html/cpg1.2.1_standalone/index.php on line 118


If I type install.php after cpg1.2.1_standalone/ I get on top of the page the following error followed with the tabel to enter the database info

Parse error: parse error in /home/persianj/public_html/cpg1.2.1_standalone/include/sql_parse.php on line 68

If I fill out the db info and press Let's Go I get the following error:
Fatal error: Call to undefined function: remove_remarks() in /home/persianj/public_html/cpg1.2.1_standalone/install.php on line 426

I have been awake the whole night playing around. I have checked the whole forum and done everything i could imagine.

This is my server info:
Operating system Linux
Kernel version 2.4.20-24.9
Apache version 1.3.29 (Unix)
PERL version 5.8.0
PHP version 4.3.3
MySQL version 4.0.15-standard
cPanel Build 8.5.5-RELEASE 20

I have both ImageMagick and Gd2  & have not modified any of the files. I have downloaded the package from different mirrors and still the same errors.

Please help me if you can.

ThanX

Joachim Müller

hm, this sounds very strange indeed - your server certainly should be ready to run coppermine, so it's not a matter of minimum requirements. My guess is the files have somehow been corrupted during upload. Some shots in the dark: Try using another software and computer to unpack the coppermine package - maybe your client ruins the files when unpacking them. If you're running your own server, try to upload them in a different way: if you initially used ftp, try file access (or the other way round).
Use ftp to download all files from your server to a fresh directory on your client and use a file comparison tool like winmerge to compare the "originals" from the package and the files you downloaded from your server - if they differ, there might be the solution in this.

GauGau

mehdi42

I did what you said still the same problems.

What on the server can cause such a problem. I have recently changed servers. On this new server i have problems installing an old picture gallery that uses php and mysql as well. I get parse error on that one as well. I have contacted my admin and he says everything is okay and that he is using php and mysql himself and that everything is working. So please if you can help me what on the server configuration can caus such problem i might be able to resolve this. I am getting crazy and have to install this ! It has become a challenge!!!  

I have seen the demo and it is a great gallery and i have to get it to work
so please HELP!

Joachim Müller

OK, if you're absolutely sure that the coppermine files you have on your server are OK then let's go for the second option (which is less probable, but worth checking): try to make sure your PHP install works on your server and the admin hasn't disabled some core PHP functions.
Line 49 of init.inc.php should be            if (isset($$key)) unset($$key);Create a single file with just this very line of code in it, save it as "test.php" somewhere on your harddrive and upload it to your webspace. Then run it in your browser and observe what's happening...
If nothing unexpected happens, use some more code around line 49 and check if you still have the same error.

GauGau

mehdi42

Okay i did what you said and i get an error with line 49 pasted in a new php file.


Parse error: parse error in /home/persianj/public_html/test.php on line 3

This is all i have in the test.php file :
<?php

 
if (isset($$key)) unset($$key);
?>


So if i am right this means something is not right on the server. Correct? if so can you help me in a way i can convince my site admin there is something wrong.

Thanx a bunch for your responses .

I realy appriciate this.

Joachim Müller

let's find out what part of the code line makes your server think the code doesn't work. Just replace your test file's content with this:<?php
if
(
isset
($
$key)
)
{
unset
($
$key)
;
}
?>
(works on my server), let's see what error message it shows (in which line).

GauGau

mehdi42

okay i did that and i get an error on line 9

the code:
Quote<?php
if
(
isset
($$key)
)
{
unset
($$key)
;
}
?>


Parse error: parse error in /home/persianj/public_html/test.php on line 9

Joachim Müller

now this is something to show to your server admin, ask him for advice...

GauGau

mehdi42

okay thanX
I will do my best ! If he listens!

Will let you know

mehdi42

I told my admin to create a test.php with the same code as you had mentioned. This is the response i received from my admin:


Warning: isset() only works with variables as passing anything else will result in a parse error. For checking if constants are set use the defined() function.

unset() destroys the specified variables. Note that in PHP 3, unset() will always return TRUE (actually, the integer value 1). In PHP 4, however, unset() is no longer a true function: it is now a statement. As such no value is returned, and attempting to take the value of unset() results in a parse error.

http://us2.php.net/manual-lookup.php?pattern=&lang=en

Joachim Müller

If I were you I'd tell him not to try to lecture me, but take a look at the problem. The stuff he wrote was a quote from http://php.net/manual/en/function.isset.php and http://php.net/manual/en/function.unset.php - of course this is true: isset can only be used with vars, but you actually did use it with a var in your test script. Actually they are called "Variable variables" and can be used with isset and unset...

If you're paying for webhosting, remind him of this fact. If you're on free webhosting, you're probably stuck.

GauGau

mehdi42

With a friend I had couple of gigs with dominet.net. The server got hacked couple of weeks ago. So this friend has got a compleet server with a new company and i am buying couple of gigs from him. I guess I am stuck!!!

I tried to upload the package on the old server, path error. Can you help me install it here and i can prove him this way!!!!!

http://host3.dominet.net/~persianj/copper/

ThanX

mehdi42

hey man check the site out it is working perfect so it is the new server!

ThanX
I am gonna go play around a bit

mehdi42

Finaly I convinced him something is wrong. He recompiloed the appache server with all PHP functions and guess what IT WORKS. Script is great. ThanX for all your help.



For all those who are reading this topic the problem was on my server and not in the script. Script is GREAT !