Installation help

PHP error on new installation

 
 
Picture of michael sanderson
PHP error on new installation
 

Using Moodle 2.7 (NOT latest - though the same error happened with that version), I am getting the following when attempting to run the initial install:

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home1/mandjnc1/public_html/class/index.php on line 79

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home1/mandjnc1/public_html/class/index.php on line 79

Parse error: syntax error, unexpected T_STRING in /home1/mandjnc1/public_html/class/index.php on line 79


I'm using Hostgator as my provider and my initial thoughts is that this is a problem with the PHP version?


Michael


 
Average of ratings: -
Picture of john Simpson
Re: PHP error on new installation
Group Particularly helpful Moodlers

From what source did you install Moodle. Was it from the Hostgater control panel? Also can you upgrade your PHP from this control panel?


 
Average of ratings: -
Picture of michael sanderson
Re: PHP error on new installation
 

I installed manually from the source obtained from moodle AND hostgator with the same error. Hostgator has PHP 5.4 installed which is compatible with 2.7

 
Average of ratings: -
Picture of Matteo Scaramuccia
Re: PHP error on new installation
Group DevelopersGroup Particularly helpful Moodlers

Hi Michael,
that PHP error means that you're running a PHP version not supporting namespaces i.e. < 5.3.0. Please, double check the PHP version issue with Hostgator tech support.

HTH,
Matteo

 
Average of ratings: -
Picture of john Simpson
Re: PHP error on new installation
Group Particularly helpful Moodlers
Speaking as someone with recent experiences and definitely not as a moodle expert. If you can't have your PHP upgraded with hostgater, go to moodle download section, go down the list and choose a moodle that states the minimum php version that your hostgater has. It appears you need to download moodle 2.0.10. 

I had problems with my previous web host, who refused to upgrade the php and stated that moodle was too much for them to handle. I changed my web host where with them, I basically pressed one install moodle button and got moodle fully installed. Just the way it should be.

Many webhosts now have moodle listed in their control panel as cgi scripts, or listed under applications. But some don't install, or you will have an old version of moodle. So from past experiences I ask readers to chose your web host wisely, and don't commit yourself to paying any more than a monthly payment. Most certainly don't commit yourself to a yearly contract.
 
Average of ratings: -
Picture of John-Paul B
Re: PHP error on new installation
 

Hello michael,


Make sure you have not changed the PHP settings in your cPanel using HostGator's PHP Configuration plugin. It may be causing you to revert:

http://support.hostgator.com/articles/hosting-guide/hardware-software/php-5-4


I hope this helps,

John-Paul

 
Average of ratings: -