Probleme de syntax

Résolu/Fermé
pascal9898 Messages postés 194 Date d'inscription samedi 12 septembre 2009 Statut Membre Dernière intervention 2 décembre 2011 - 5 juil. 2010 à 03:28
pascal9898 Messages postés 194 Date d'inscription samedi 12 septembre 2009 Statut Membre Dernière intervention 2 décembre 2011 - 13 juil. 2010 à 23:10
Bonjour,

Je trouve pas la reponse a l'erreur que j'ai =
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /homez.344/assis/www/OpenInviter/openinviter.php on line 13
Voici le code de la ligne 11 a 15 =

class openinviter
	{
	public function $pluginTypes=array('email'=>'Email Providers','social'=>'Social Networks');
	private $version='1.9.2';
	private $configStructure=array(


Merci a ceux qui pouront m'aidez !

15 réponses

doudoupe Messages postés 85 Date d'inscription mercredi 3 juin 2009 Statut Membre Dernière intervention 7 mars 2012 68
5 juil. 2010 à 03:42
hmm...
Je pense que ça vient du mot clé 'function' qui est réservé à la définition de fonctions...
Or $pluginTypes semble être un array, donc je ne vois pas du tout ce que 'function vient faire ici...
2
pascal9898 Messages postés 194 Date d'inscription samedi 12 septembre 2009 Statut Membre Dernière intervention 2 décembre 2011 22
5 juil. 2010 à 03:50
Oui je m'en doutais mais meme en le mettant comme ca sa donne toujours la meme erreur !


class openinviter
	{
	public $pluginTypes=array('email'=>'Email Providers','social'=>'Social Networks');
	private $version='1.9.2';
	private $configStructure=array(
0
doudoupe Messages postés 85 Date d'inscription mercredi 3 juin 2009 Statut Membre Dernière intervention 7 mars 2012 68
5 juil. 2010 à 03:59
Je te conseille de poster ta classe entièrement.
Il faut faire attention aux erreurs, de temps à autre, les erreurs ne sont pas réellement à la ligne indiquée.

Je dis ça car ton code est correct.

class openinviter
{
public $pluginTypes=array('email'=>'Email Providers','social'=>'Social Networks');
private $version='1.9.2';
}

ça compile bien chez moi! ;)
0
pascal9898 Messages postés 194 Date d'inscription samedi 12 septembre 2009 Statut Membre Dernière intervention 2 décembre 2011 22
5 juil. 2010 à 04:02
<?php
/**
 * The core of the OpenInviter system
 * 
 * Contains methods and properties used by all
 * the OpenInivter plugins
 * 
 * @author OpenInviter
 * @version 1.7.6
 */
class openinviter
	{
	public $pluginTypes=array('email'=>'Email Providers','social'=>'Social Networks');
	private $version='1.9.2';
	private $configStructure=array(
		'username'=>array('required'=>true,'default'=>'******'),
		'private_key'=>array('required'=>true,'default'=>'******'),
		'message_body'=>array('required'=>false,'default'=>''),
		'message_subject'=>array('required'=>false,'default'=>''),
		'plugins_cache_time'=>array('required'=>false,'default'=>1800),
		'plugins_cache_file'=>array('required'=>true,'default'=>'oi_plugins.php'),
		'cookie_path'=>array('required'=>true,'default'=>'/tmp'),
		'local_debug'=>array('required'=>false,'default'=>false),
		'remote_debug'=>array('required'=>false,'default'=>false),
		'hosted'=>array('required'=>false,'default'=>false),
		'proxies'=>array('required'=>false,'default'=>array()),
		'stats'=>array('required'=>false,'default'=>false),
		'stats_user'=>array('required'=>false,'default'=>''),
		'stats_password'=>array('required'=>false,'default'=>''),
		'update_files'=>array('required'=>false,'default'=>TRUE),
	);
	private $statsDB=false;
	private $configOK;
	private $basePath='';
	private $availablePlugins=array();
	private $currentPlugin=array();
	
	public function __construct()
		{
		$this->basePath=dirname(__FILE__);
		include($this->basePath."/config.php");
		require_once($this->basePath."/plugins/_base.php");
		$this->settings=$openinviter_settings;
		$this->configOK=$this->checkConfig();
		}
	
	private function checkConfig()
		{
		$to_add=array();$ok=true;
		foreach ($this->configStructure as $option=>$details)
			{
			if (!isset($this->settings[$option])) $to_add[$option]=$details['default'];
			if ($ok) if ($details['required'] AND empty($this->settings[$option])) { $this->internalError="'{$option}' is not defined in config.php";$ok=false; }
			}
		if (!empty($to_add))
			{
			$file_path=$this->basePath."/config.php";
			foreach ($to_add as $option=>$value) $this->settings[$option]=$value;
			if (is_writable($file_path))
				{
				$file_contents="<?php\n";
				$file_contents.="\$openinviter_settings=array(\n".$this->arrayToText($this->settings)."\n);\n";
				$file_contents.="?>";
				file_put_contents($file_path,$file_contents);
				}
			}
		return $ok;
		}
	
	private function arrayToText($array)
		{
		$text='';
		$flag=false;
		$i=0;
		foreach ($array as $key=>$val)
			{
			if($flag) $text.=",\n";
			$flag=true;
			$text.="'{$key}'=>";
			if (is_array($val)) $text.='array('.$this->arrayToText($val).')';
			elseif (is_bool($val)) $text.=($val?'true':'false');
			else $text.="\"{$val}\"";
			}
		return($text);
		}
	
	private function statsCheck()
		{
		if (!$this->settings['stats']) return true;
		$db_file=$this->basePath.'/openinviter_stats.sqlite';
		if (!file_exists($db_file))
			{
			if (!is_writable($this->basePath)) { $this->internalError="Unable to write stats. ".$this->basePath." is not writable";return false; }
			if (!$this->statsOpenDB()) { $this->internalError="Unable to create the stats database.";return false; }
			$this->statsQuery("CREATE TABLE oi_imports (id INTEGER PRIMARY KEY, service VARCHAR(16), contacts INTEGER, insert_dt DATETIME, insert_ip VARCHAR(15))");
			$this->statsQuery("CREATE TABLE oi_messages (id INTEGER PRIMARY KEY, service VARCHAR(16), type CHAR(1), messages INTEGER, insert_dt DATETIME, insert_ip VARCHAR(15))");
			}
		elseif (!is_readable($db_file)) { $this->internalError="Unable to open stats database. {$db_file} is not readable.";return false; }
		elseif (!is_writable($db_file)) { $this->internalError="Unable to write stats. {$db_file} is not writable";return false; }
		elseif (!$this->statsOpenDB()) { $this->internalError="Unable to open the stats database.";return false; }
		return true;
		}
	
	private function statsOpenDB()
		{
		if (!$this->settings['stats']) return true;
		if (function_exists('sqlite_open')) 
			if ($this->statsDB=sqlite_open($this->basePath.'/openinviter_stats.sqlite',0666)) return true;
		return false;
		}
	
	private function statsRecordImport($contacts)
		{
		if (!$this->settings['stats']) return true;
		if (!$this->statsDB) if (!$this->statsOpenDB()) return false;
		$this->statsQuery("INSERT INTO oi_imports (service,contacts,insert_dt,insert_ip) VALUES ('{$this->plugin->service}','{$contacts}','".date("Y-m-d H:i:s")."','{$_SERVER['REMOTE_ADDR']}')");
		}
	
	private function statsRecordMessages($msg_type,$messages)
		{
		if (!$this->settings['stats']) return true;
		if (!$this->statsDB) if (!$this->statsOpenDB()) return false;
		$this->statsQuery("INSERT INTO oi_messages (service,type,messages,insert_dt,insert_ip) VALUES ('{$this->plugin->service}','{$msg_type}','{$messages}','".date("Y-m-d H:i:s")."','{$_SERVER['REMOTE_ADDR']}')");
		}
	
	public function statsQuery($query)
		{
		if (!$this->settings['stats']) return false;
		if (!$this->statsDB)
			{
			if (!$this->statsCheck()) return false;
			if (!$this->statsOpenDB()) return false;
			}
		return sqlite_query($this->statsDB,$query,SQLITE_ASSOC);		
		}
	
	/**
	 * Start internal plugin
	 * 
	 * Starts the internal plugin and
	 * transfers the settings to it.
	 * 
	 * @param string $plugin_name The name of the plugin being started
	 */	  
	public function startPlugin($plugin_name,$getPlugins=false)
		{
		if (!$getPlugins) $this->currentPlugin=$this->availablePlugins[$plugin_name];
		if (file_exists($this->basePath."/postinstall.php")) { $this->internalError="You have to delete postinstall.php before using OpenInviter";return false; }
		elseif (!$this->configOK) return false;
		elseif (!$this->statsCheck()) return false;
		elseif ($this->settings['hosted'])
			{
			if (!file_exists($this->basePath."/plugins/_hosted.plg.php")) $this->internalError="Invalid service provider";
			else
				{
				if (!class_exists('_hosted')) require_once($this->basePath."/plugins/_hosted.plg.php");
				if ($getPlugins)
					{
					$this->servicesLink=new _hosted($plugin_name);
					$this->servicesLink->settings=$this->settings;
					$this->servicesLink->base_version=$this->version;
					$this->servicesLink->base_path=$this->basePath;
					}
				else
					{
					$this->plugin=new _hosted($plugin_name);
					$this->plugin->settings=$this->settings;
					$this->plugin->base_version=$this->version;
	    			$this->plugin->base_path=$this->basePath;
	    			$this->plugin->hostedServices=$this->getPlugins();
					}
				}
			}
		elseif (file_exists($this->basePath."/plugins/{$plugin_name}.plg.php"))
			{
			$ok=true;
			if (!class_exists($plugin_name)) require_once($this->basePath."/plugins/{$plugin_name}.plg.php");
			$this->plugin=new $plugin_name();
    		$this->plugin->settings=$this->settings;
    		$this->plugin->base_version=$this->version;
    		$this->plugin->base_path=$this->basePath;
    		$this->currentPlugin=$this->availablePlugins[$plugin_name];
			if (file_exists($this->basePath."/conf/{$plugin_name}.conf")) 
				{
				include($this->basePath."/conf/{$plugin_name}.conf");
				if (empty($enable)) $this->internalError="Invalid service provider";
				if (!empty($messageDelay)) $this->plugin->messageDelay=$messageDelay; else  $this->plugin->messageDelay=1;
				if (!empty($maxMessages)) $this->plugin->maxMessages=$maxMessages; else $this->plugin->maxMessages=10;
				}
			}
		else { $this->internalError="Invalid service provider";return false; }
		return true;
		}
	
	/**
	 * Stop the internal plugin
	 * 
	 * Acts as a wrapper function for the stopPlugin
	 * function in the OpenInviter_Base class
	 */
	public function stopPlugin($graceful=false)
		{
		$this->plugin->stopPlugin($graceful);
		}

	/**
	 * Login function
	 * 
	 * Acts as a wrapper function for the plugin's
	 * login function.
	 * 
	 * @param string $user The username being logged in
	 * @param string $pass The password for the username being logged in
	 * @return mixed FALSE if the login credentials don't match the plugin's requirements or the result of the plugin's login function.
	 */
	public function login($user,$pass)
		{
		if (!$this->checkLoginCredentials($user)) return false;
		return $this->plugin->login($user,$pass);
		}
	
	/**
	 * Get the current user's contacts
	 * 
	 * Acts as a wrapper function for the plugin's
	 * getMyContacts function.
	 * 
	 * @return mixed The result of the plugin's getMyContacts function.
	 */
	public function getMyContacts()
		{
		$contacts=$this->plugin->getMyContacts();
		if ($contacts!==false) $this->statsRecordImport(count($contacts));
		return $contacts;
		}	

	/**
	 * End the current user's session
	 * 
	 * Acts as a wrapper function for the plugin's
	 * logout function
	 * 
	 * @return bool The result of the plugin's logout function.
	 */
	public function logout()
		{
		return $this->plugin->logout();	
		}

	public function writePlConf($name_file,$type)
		{
		if (!file_exists($this->basePath."/conf")) mkdir($this->basePath."/conf",0755,true);
		if ($type=='social')  file_put_contents($this->basePath."/conf/{$name_file}.conf",'<?php $enable=true;$autoUpdate=true;$messageDelay=1;$maxMessages=10;?>');	
		elseif($type=='email') file_put_contents($this->basePath."/conf/{$name_file}.conf",'<?php $enable=true;$autoUpdate=true; ?>');
		elseif($type=='hosted') file_put_contents($this->basePath."/conf/{$name_file}.conf",'<?php $enable=false;$autoUpdate=true; ?>');		
		}

	/**
	 * Get the installed plugins
	 * 
	 * Returns information about the available plugins
	 * 
	 * @return mixed An array of the plugins available or FALSE if there are no plugins available.
	 */
	public function getPlugins($update=false,$required_details=false)
		{
		$plugins=array();
		if ($required_details) 
			{
			$valid_rcache=false;$cache_rpath=$this->settings['cookie_path'].'/'."int_{$required_details}.php";
			if (file_exists($cache_rpath))
				{
				include($cache_rpath);
				$cache_rts=filemtime($cache_rpath);
				if (time()-$cache_rts<=$this->settings['plugins_cache_time']) $valid_rcache=true;
				}
			if ($valid_rcache) return $returnPlugins;
			}
		$cache_path=$this->settings['cookie_path'].'/'.$this->settings['plugins_cache_file'];$valid_cache=false;
		$cache_ts=0;
		if (!$update)
			if (file_exists($cache_path))
				{
				include($cache_path);
				$cache_ts=filemtime($cache_path);
				if (time()-$cache_ts<=$this->settings['plugins_cache_time']) $valid_cache=true;
				}
		if (!$valid_cache)
			{
			$array_file=array();
			$temp=glob($this->basePath."/plugins/*.plg.php");
	        foreach ($temp as $file) $array_file[basename($file,'.plg.php')]=$file;
	        if (!$update)
	        	{
		        if ($this->settings['hosted'])
		        	{
					if ($this->startPlugin('_hosted',true)!==FALSE) { $plugins=array();$plugins['hosted']=$this->servicesLink->getHostedServices(); }
		        	else return array();
		        	}
	        	if (isset($array_file['_hosted'])) unset($array_file['_hosted']);
	        	}	
	         if ($update==TRUE OR $this->settings['hosted']==FALSE)
	        	{
	        	$reWriteAll=false;
				if (count($array_file)>0) 
					{			
					ksort($array_file);$modified_files=array();
					if (!empty($plugins['hosted'])) { $reWriteAll=true;$plugins=array(); }
					else
						foreach ($plugins as $key=>$vals)
							{
							foreach ($vals as $key2=>$val2)
								if (!isset($array_file[$key2])) unset($vals[$key2]);
							if (empty($vals)) unset($plugins[$key]);
							else $plugins[$key]=$vals;
							}
					foreach ($array_file as $plugin_key=>$file) 
						if (filemtime($file)>$cache_ts OR $reWriteAll) 
							$modified_files[$plugin_key]=$file;
					foreach($modified_files as $plugin_key=>$file)
						if (file_exists($this->basePath."/conf/{$plugin_key}.conf"))
							{
							include_once($this->basePath."/conf/{$plugin_key}.conf");
							if ($enable AND $update==false)
								{ include($file); if ($this->checkVersion($_pluginInfo['base_version'])) $plugins[$_pluginInfo['type']][$plugin_key]=$_pluginInfo; }
							elseif ($update==true)
								{ include($file); if ($this->checkVersion($_pluginInfo['base_version'])) $plugins[$_pluginInfo['type']][$plugin_key]=array_merge(array('autoupdate'=>$autoUpdate),$_pluginInfo); }
							}
						else
							{  include($file);if ($this->checkVersion($_pluginInfo['base_version'])) $plugins[$_pluginInfo['type']][$plugin_key]=$_pluginInfo; $this->writePlConf($plugin_key,$_pluginInfo['type']);}
					}
				foreach ($plugins as $key=>$val) if (empty($val)) unset($plugins[$key]);
	        	}
			if (!$update)
				{
				if ((!$valid_cache) AND (empty($modified_files)) AND (!$this->settings['hosted'])) touch($this->settings['cookie_path'].'/'.$this->settings['plugins_cache_file']);
				else
					{
					$cache_contents="<?php\n";
					$cache_contents.="\$plugins=array(\n".$this->arrayToText($plugins)."\n);\n";
					$cache_contents.="?>";
					file_put_contents($cache_path,$cache_contents);
					}
				}
			}
		if (!$this->settings['hosted']) $returnPlugins=$plugins;			
		else $returnPlugins=(!empty($plugins['hosted'])?$plugins['hosted']:array());		
		if ($required_details) 
			{			
			if (!$valid_rcache)
				{					 
				foreach($returnPlugins as $types=>$plugins)
					foreach($plugins as $plugKey=>$plugin)
						if (!empty($plugin['imported_details']))
							{ if (!in_array($required_details,$plugin['imported_details'])) unset($returnPlugins[$types][$plugKey]); }
						else unset($returnPlugins[$types][$plugKey]);
				if (!empty($returnPlugins))
					{
					$cache_contents="<?php\n";
					$cache_contents.="\$returnPlugins=array(\n".$this->arrayToText($returnPlugins)."\n);\n";
					$cache_contents.="?>";
					file_put_contents($cache_rpath,$cache_contents);	
					}		
				}
			return $returnPlugins;
			}
		$temp=array();
		if (!empty($returnPlugins)) 
			foreach ($returnPlugins as $type=>$type_plugins)
				$temp=array_merge($temp,$type_plugins);				
		$this->availablePlugins=$temp;							 																	
		return $returnPlugins;
		}
	
	/**
	 * Send a message
	 * 
	 * Acts as a wrapper for the plugin's
	 * sendMessage function.
	 * 
	 * @param string $session_id The OpenInviter user's session ID
	 * @param string $message The message being sent to the users
	 * @param array $contacts An array of contacts that are going to receive the message
	 * @return mixed -1 if the plugin doesn't have an internal sendMessage function or the result of the plugin's sendMessage function
	 */
	public function sendMessage($session_id,$message,$contacts)
		{
		$this->plugin->init($session_id);
		$internal=$this->getInternalError();
		if ($internal) return false;
		if (!method_exists($this->plugin,'sendMessage')) { $this->statsRecordMessages('E',count($contacts));return -1; }
		else 
			{
			$sent=$this->plugin->sendMessage($session_id,$message,$contacts);
			if ($sent!==false) $this->statsRecordMessages('I',count($contacts));
			return $sent;
			}
		}
	
	/**
	 * Find out if the contacts should be displayed
	 * 
	 * Tells whether the current plugin will display
	 * a list of contacts or not
	 * 
	 * @return bool TRUE if the plugin displays the list of contacts, FALSE otherwise.
	 */
	public function showContacts()
		{
		return $this->plugin->showContacts;
		}
	
	/**
	 * Check version requirements
	 * 
	 * Checks if the current version of OpenInviter
	 * is greater than the plugin's required version
	 * 
	 * @param string $required_version The OpenInviter version that the plugin requires.
	 * @return bool TRUE if the version if equal or greater, FALSE otherwise.
	 */
	public function checkVersion($required_version)
		{
		if (version_compare($required_version,$this->version,'<=')) return true;
		return false;
		}
	
	/**
	 * Find out the version of OpenInviter
	 * 
	 * Find out the version of the OpenInviter
	 * base class
	 * 
	 * @return string The version of the OpenInviter base class.
	 */
	public function getVersion()
		{
		return $this->version;
		}
	
	/**
	 * Check the provided login credentials
	 * 
	 * Checks whether the provided login credentials
	 * match the plugin's required structure and (if required)
	 * if the provided domain name is allowed for the
	 * current plugin.
	 * 
	 * @param string $user The provided user name.
	 * @return bool TRUE if the login credentials match the required structure, FALSE otherwise. 
	 */
	private function checkLoginCredentials($user)
		{
		$is_email=$this->plugin->isEmail($user);
		if ($this->currentPlugin['requirement'])
			{
			if ($this->currentPlugin['requirement']=='email' AND !$is_email)
				{
				$this->internalError="Please enter the full email, not just the username";
				return false;
				}
			elseif ($this->currentPlugin['requirement']=='user' AND $is_email)
				{
				$this->internalError="Please enter just the username, not the full email";
				return false;
				}
			}
		if ($this->currentPlugin['allowed_domains'] AND $is_email)
			{
			$temp=explode('@',$user);$user_domain=$temp[1];$temp=false;
			foreach ($this->currentPlugin['allowed_domains'] as $domain)
				if (preg_match($domain,$user_domain)) { $temp=true;break; }
			if (!$temp)
				{
				$this->internalError="<b>{$user_domain}</b> is not a valid domain for this provider";
				return false;
				}
			}
		return true;
		}
	
	public function getPluginByDomain($user)
		{
		$user_domain=explode('@',$user);if (!isset($user_domain[1])) return false;
		$user_domain=$user_domain[1];
		foreach ($this->availablePlugins as $plugin=>$details)
			{
			$patterns=array();
			if ($details['allowed_domains']) $patterns=$details['allowed_domains']; elseif (isset($details['detected_domains'])) $patterns=$details['detected_domains'];
			foreach ($patterns as $domain_pattern)
				if (preg_match($domain_pattern,$user_domain)) return $plugin;
			}
		return false;
		}
	
	/**
	 * Gets the OpenInviter's internal error
	 * 
	 * Gets the OpenInviter's base class or the plugin's
	 * internal error message
	 * 
	 * @return mixed The error message or FALSE if there is no error.s
	 */
	public function getInternalError()
		{
		if (isset($this->internalError)) return $this->internalError;
		if (isset($this->plugin->internalError)) return $this->plugin->internalError;
		return false;
		}
	
	/**
	 * Get the current OpenInviter session ID
	 * 
	 * Acts as a wrapper function for the plugin's
	 * getSessionID function.
	 * 
	 * @return mixed The result of the plugin's getSessionID function.
	 */
	public function getSessionID()
		{
		return $this->plugin->getSessionID();
		}
	
	}
?>
0
doudoupe Messages postés 85 Date d'inscription mercredi 3 juin 2009 Statut Membre Dernière intervention 7 mars 2012 68
5 juil. 2010 à 04:10
Ah oui quand meme... ^^
Je ne m'attendais pas à une si grosse classe!
Je tente mais je ne promet rien!! ^^
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
doudoupe Messages postés 85 Date d'inscription mercredi 3 juin 2009 Statut Membre Dernière intervention 7 mars 2012 68
5 juil. 2010 à 04:23
Bon je dois avouer que j'ai pas regarder dans le détail ta classe.
J'ai juste regardé au niveau syntaxique, ça a l'air d'être correct! Et puis vu la qualité de ton code, je doute que tu postes pour une erreur d'accolade! ^^

J'ai trouvé ça sur google, jette un oeil et vérifie :

http://www.prestashop.com/forums/viewthread/326/
0
pascal9898 Messages postés 194 Date d'inscription samedi 12 septembre 2009 Statut Membre Dernière intervention 2 décembre 2011 22
5 juil. 2010 à 13:59
Bonjour,

Merci pour t'est reponse, ce n'est pas mon code, je l'ai trouvé sur un site "OpenInviter", mais sur leur plateforme ont trouve aucune reponse à cette erreur !
De coup j'essai ici, vu que ont a des reponse rapide !
Je vais continuer a chercher pourquoi cette erreur !

Si quelqu'un peut me dire pourquoi je l'ai je suis toujours preneur !

Merci !
0
pascal9898 Messages postés 194 Date d'inscription samedi 12 septembre 2009 Statut Membre Dernière intervention 2 décembre 2011 22
5 juil. 2010 à 15:10
Je pense avoir serné le probleme, et du coup sa proviens du faite que je suis en php4 et que pour me servir de se script je doit passer en php5 !

Puis je passer en php5 uniquement pour le dossier ou se trouve mon srcipt ?
Sinon j'ai peut que mon site entier plante !

Comment doit proceder ?
J'ai fait un .htaccess a la racine du dosier ou se trouve mon script et j'ai mis dedans = >> SetEnv PHP_VER 5

Du coup je tombe sur une erreur 500 Internal Server Error

Que doit je faire ? ? ?

Au secour mdrrr
0
fxtaa Messages postés 1050 Date d'inscription mardi 20 octobre 2009 Statut Membre Dernière intervention 2 avril 2015 74
Modifié par fxtaa le 5/07/2010 à 15:22
Télécharge le dossier de php5 et modifie le httpd.conf de ton dossier apache en modifiant les lignes "LoadModule" et "PHPIniDir" en mettant le chemin de ton nouveau dossier php. exemple :
LoadModule php5_module "c:/www/apache/php5/php5apache2.dll" 
PHPIniDir "c:/www/apache/php5"


Tu testes ton site: si le reste de ton site plante, on cherchera autres choses.
Si tout marche, reste en version 5.
0
pascal9898 Messages postés 194 Date d'inscription samedi 12 septembre 2009 Statut Membre Dernière intervention 2 décembre 2011 22
5 juil. 2010 à 16:10
Ok je veut bien ! Mdrrr

Mais mon niveau en php sur 10 est de 4/10 !
Si tu peut m'expliquer un peu plus détailler sa serais vraiment cool !

Merci en tout ca si sa peut m'aider, et en meme temps j'apprend !
0
fxtaa Messages postés 1050 Date d'inscription mardi 20 octobre 2009 Statut Membre Dernière intervention 2 avril 2015 74
5 juil. 2010 à 16:17
Edite le fichier apache/conf/httpd.conf

Tu fais une recherche de "LoadModule", tu commentes Loadmodule et phpiniDir puis tu rajoutes la localisation de php5apache2.dll de ton dossier php5 avec Loadmodule. Et le phpinidir où se trouve la localisation du dossier php5.

Exemple :
#LoadModule php4_module "c:/www/apache/php4/php4apache2.dll"
#PHPIniDir "c:/www/apache/php4"
LoadModule php5_module "c:/www/apache/php5/php5apache2.dll"
PHPIniDir "c:/www/apache/php5"
0
pascal9898 Messages postés 194 Date d'inscription samedi 12 septembre 2009 Statut Membre Dernière intervention 2 décembre 2011 22
5 juil. 2010 à 16:20
Oui je veut bien, mais ont parle bien dan le FTP la ?
Cela dit dedant j'ai pas le chemin d'accés = apache/conf/httpd.conf


Je suis sur OVH en Php4 mais j'aimerais juste passer en php5, pour la racine de mon dosier ou ce trouve le script OpenInviter !

Je n'ai ni "Apache" ni "httpd.conf"

Merci et excuser moi !
0
pascal9898 Messages postés 194 Date d'inscription samedi 12 septembre 2009 Statut Membre Dernière intervention 2 décembre 2011 22
5 juil. 2010 à 16:23
Maintenant apres multiple modification j'ai l'erreur =

Fatal error: Non-abstract method PostInstall::login() must contain body in /homez.344/animolin/www/OpenInviter/postinstall.php on line 142
0
fxtaa Messages postés 1050 Date d'inscription mardi 20 octobre 2009 Statut Membre Dernière intervention 2 avril 2015 74
7 juil. 2010 à 09:57
salut désolé de pas être passé avant. As-tu réussis à passer en php5?
0
pascal9898 Messages postés 194 Date d'inscription samedi 12 septembre 2009 Statut Membre Dernière intervention 2 décembre 2011 22
7 juil. 2010 à 12:33
Nan pas réussi !
Si tu peut m'aidez !
Sa serais cool !
Merci
0
fxtaa Messages postés 1050 Date d'inscription mardi 20 octobre 2009 Statut Membre Dernière intervention 2 avril 2015 74
7 juil. 2010 à 14:16
Pour commencer il faut que tu trouves le fichier httpd.conf.

Nan je ne te parle pas de FTP la.
Par exemple mon httpd.conf est ici : C:\www\apache\Apache2\conf\httpd.conf
0
pascal9898 Messages postés 194 Date d'inscription samedi 12 septembre 2009 Statut Membre Dernière intervention 2 décembre 2011 22
6 juil. 2010 à 11:35
Personne ne peut m'aidez, svp !
0
pascal9898 Messages postés 194 Date d'inscription samedi 12 septembre 2009 Statut Membre Dernière intervention 2 décembre 2011 22
7 juil. 2010 à 14:33
Et voila comme je l'avais predi, j'arrige a faire fonctionner le script, mais cela influ sur mon Forum !

Erreur =

phpBB Debug] PHP Notice: in file /invite.php on line 12: main(OpenInviter/frontend.php) [function.main]: failed to open stream: No such file or directory
[phpBB Debug] PHP Notice: in file /invite.php on line 12: main() [function.include]: Failed opening 'OpenInviter/frontend.php' for inclusion (include_path='.:/usr/local/lib/php')
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4382: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3526)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4384: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3526)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4385: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3526)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4386: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3526)


Je comprend plus la !
0
fxtaa Messages postés 1050 Date d'inscription mardi 20 octobre 2009 Statut Membre Dernière intervention 2 avril 2015 74
7 juil. 2010 à 14:43
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4382: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3526)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4384: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3526)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4385: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3526)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4386: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3526)


Bon déjà ça, c'est quand t'envoies quelques choses à ton client avant ces informations.

Un espace un echo, n'importe quoi qui sera traité coté client, il faut pas.

----------------------------------------------------------------------------------------------------

phpBB Debug] PHP Notice: in file /invite.php on line 12: main(OpenInviter/frontend.php) [function.main]: failed to open stream: No such file or directory


"no such file or directory".... ton fichier openinviter/frontend.php existe pas

-----------------------------------------------------------------------------------------------------

[phpBB Debug] PHP Notice: in file /invite.php on line 12: main() [function.include]: Failed opening 'OpenInviter/frontend.php' for inclusion (include_path='.:/usr/local/lib/php')


Surement lié au fichier frontend.php qui trouve pas
0
pascal9898 Messages postés 194 Date d'inscription samedi 12 septembre 2009 Statut Membre Dernière intervention 2 décembre 2011 22
Modifié par pascal9898 le 7/07/2010 à 14:53
Tiens si tu veut regarde car je comprend pas !

[*********]

Trop compliqué pour moi !
0
fxtaa Messages postés 1050 Date d'inscription mardi 20 octobre 2009 Statut Membre Dernière intervention 2 avril 2015 74
7 juil. 2010 à 14:50
Désolé mais je peux rien faire là.
Je suis allé voir, ce sont bien les erreurs qui sont affichés mais je ne peux pas les corriger à ta place :s
0
pascal9898 Messages postés 194 Date d'inscription samedi 12 septembre 2009 Statut Membre Dernière intervention 2 décembre 2011 22
7 juil. 2010 à 14:54
Ok
Je vais essayer de chercher avec les reponse que tu ma mis !
Merci Fxtaa
0
pascal9898 Messages postés 194 Date d'inscription samedi 12 septembre 2009 Statut Membre Dernière intervention 2 décembre 2011 22
13 juil. 2010 à 13:31
Personne ne voit !
0
fxtaa Messages postés 1050 Date d'inscription mardi 20 octobre 2009 Statut Membre Dernière intervention 2 avril 2015 74
13 juil. 2010 à 15:48
mais on te l'a deja dit ce qui n'allait pas !
Il te manque le fichier frontend.php et tu envois quelques choses coté client avant ta fonction situé dans functions.php.
0
pascal9898 Messages postés 194 Date d'inscription samedi 12 septembre 2009 Statut Membre Dernière intervention 2 décembre 2011 22
13 juil. 2010 à 16:37
Bonjour !
Justement ce fichier existe !
http://imagik.fr/view-rl/269869

Si cela viens de l'autre erreur comment puis je la reparer ?
0
fxtaa Messages postés 1050 Date d'inscription mardi 20 octobre 2009 Statut Membre Dernière intervention 2 avril 2015 74
Modifié par fxtaa le 13/07/2010 à 16:48
Commençons par cette erreur qui est simple à corriger : le programme ne trouve pas un fichier.
Le chemin n'est pas bon alors "Failed opening 'OpenInviter/frontend.php'"

Essaye de mettre le contenu de ton 2nd Openinviter directement dans celui du parent du même nom.

En gros tu mets le contenu de OpenInvite/Openinviter directement dans OpenInviter




Pour le header, c'est plus galère déjà.
Pour comprendre l'erreur il faut comprendre le fonctionnement du php. Le php c'est un fonctionnement client-serveur.

Le serveur traîte des informations puis envoie les résultats au client.

Ici l'erreur vient du fait que certain résultat ont déjà été envoyé au client alors qu'une des fonctions que tu utilises ne peut fonctionner que si aucune information n'a été envoyé au client.

Il faut donc trouver ce que tu envoies au client avant d'exécuter ta fonction.
0
pascal9898 Messages postés 194 Date d'inscription samedi 12 septembre 2009 Statut Membre Dernière intervention 2 décembre 2011 22
13 juil. 2010 à 17:01
Oui je comprend, cela dit j'ai beau changer la ligne 12 :

include('OpenInviter/frontend.php');
En =
include('http://www.animoline.fr/OpenInviter/OpenInviter/frontend.php');
Meme en =
include('OpenInviter/OpenInviter/frontend.php');

Le message d'erreur reste toujours le meme !
0
pascal9898 Messages postés 194 Date d'inscription samedi 12 septembre 2009 Statut Membre Dernière intervention 2 décembre 2011 22
13 juil. 2010 à 17:05
Pour la seconde erreur cela correspond aux ligne suivante =

4381 // application/xhtml+xml not used because of IE
4382 header('Content-type: text/html; charset=UTF-8');
4383
4384 header('Cache-Control: private, no-cache="set-cookie"');
4385 header('Expires: 0');
4386 header('Pragma: no-cache');
4387
4388 return;

Merci de m'aider cela fait plusieur jour que j'en suis la !
0