• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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