• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Strange PHP 4.4.1 problem (previously declared...)

E

Eijkb

Guest
PSA: 7.5.4
HTTP: 2.0.53
PHP: 4.4.1

Description:
A dedicated client has several sites on his server, all running the CJ Overkill script for linktrading.

All different sites are host on different vhosts

Problem:
Output log from "smatjes.com" ->

[Tue Jan 10 11:48:08 2006] [error] [client 80.201.111.181] PHP Fatal error: Cannot redeclare cjoverkill_connect() (previously declared in /var/www/vhosts/paardenlullen.com/httpdocs/cj-functions.inc.php:13) in /var/www/vhosts/smatjes.com/httpdocs/cj-functions.inc.php on line 12

Question:
How is it possible that a function declared within a file on smatjes.com is crashing with the (same) function declared within a file on paardenlullen.com? That shouldn't be possible between different vhosts?

Anyone a solution?
 
I would check to see if other PHP scripts aren't calling (or more likely 'requiring' or 'including') eachother.

If he has two copies the files and includes files from smatjes.com in paardenlullen.com things would normally be fine (assuming open_basedir)

The problem comes up if he (probably in another file) includes a duplicate of the function declaration - there is a problem.

My theory as to what is happening:

file A includes file B in "cj-functions.inc.php" in "smatjes.com", it either: also includes "cj-functions.inc.php" itself or another files that does

OR

File B requires other files that have a require_once File B - becuase of the search path of the include it ends up finding a different file.

I am a shell guy - sorry but I am
I would check the files with a quick grep command:

Code:
grep -rsi  paardenlullen /var/www/vhosts/smatjes.com/httpdocs/

and see what you get. I bet it is in an include or a require.....if not look in the vhost.conf and see if he added it to his basedir
 
Thx for reply.

grep -rsi paardenlullen /var/www/vhosts/smatjes.com/httpdocs/trade.php is not giving any output.

I have altered /conf/vhost.conf and included an open_basedir statement, problems are solved for crossdomain problems.
 
Back
Top