Rynoxx / sentora-whmcs

A WHMCS module for the Sentora control Panel AND a Sentora module for WHMCS
GNU General Public License v3.0
13 stars 19 forks source link

WHMCS Sentora Module Error #5

Closed GameTrackerPW closed 7 years ago

GameTrackerPW commented 8 years ago

Hi,

i have download your sentora module and whmcs module project and install it like instructions in readme.txt but now sentora module works fine when i go to whmcs products/services and go to edit service e.g WEB Package 1 it say me this:

Fatal error: Can't use method return value in write context in /var/www/html/modules/servers/sentora/sentora.php on line 400

When i delete this line i become this:

The site (my site) does not work

PS: Do not do it because I have not yet added server to whmcs??

Rynoxx commented 8 years ago

Hi, which version of PHP are you running? Anything lower than 5.4 wont function properly, and you shouldn't really be running anything lower than 5.6 as they've reached end of life

GameTrackerPW commented 8 years ago

Hi, i have now updated from 5.4 to 5.6 and still not working :(

Rynoxx commented 8 years ago

Could you post line 398-402 of your sentora.php here? I can't find anything on line 400 of the latest sentora.php that should be causing any trouble

GameTrackerPW commented 8 years ago

Yes,

$clientsdetails = $params["clientsdetails"];  # Array of clients details - firstname, lastname, email, country, etc...
// Product option
$groupid = "3"; # Default to Client no need to have an else statement for this.
if ($params["configoption2"] === "on" || stripos($producttype, "reseller") !== false){
    $groupid = "2";
}

But now it says that this is not error

http://prntscr.com/cm79yx

All works fine complete all modules but when i upload sentora nothing more in configproducts.php working just blank page with this up

Rynoxx commented 8 years ago

Ok, change it to the following

$groupid = "3"; # Default to Client no need to have an else statement for this.
$isReseller = stripos($producttype, "reseller");
if ($params["configoption2"] === "on" || $isReseller !== false){
    $groupid = "2";
}

And read the error logs of your webserver/php to see why the blank page shows up, it usually indicates a fatal PHP error, might be solved using the above code though

GameTrackerPW commented 8 years ago

I have updated that but still not working... when i delete sentora module all works fine when i upload only configproducts.php in edit porudct mod stop working

GameTrackerPW commented 8 years ago

How can i enable php error log? I go to Setup > General Settings > Other and enable Display Errors but where display it that errors? i dont know how to see what is problem

Rynoxx commented 8 years ago

Enabling that setting in WHMCS would show the errors instead of the page you showed in the screenshot, other than that there would be a log file located somewhere in /var/log depending on what webserver you're using

GameTrackerPW commented 8 years ago

I don't have log folder on site when i go only says that picture i have send to you... How can i fix error?

Rynoxx commented 8 years ago

The previous error you mentioned should've been solved by the code I sent before, you'd have to look in the log file generated by your webserver, which webserver are you running? Apache?

GameTrackerPW commented 8 years ago

Yes, Apache Centos 6 64Bit

Rynoxx commented 8 years ago

Then generally the log files for apache can be found in /var/log/httpd/, unless configured otherwise, e.g. Sentora drops log files in /var/sentora/logs/domains/USERNAME

The error log file itself should be called something along the lines of error.log or error_log, or perhaps DOMAIN-error.log

GameTrackerPW commented 8 years ago

I have nothing found in error log in /var/log/httpd/ i dont know what to do...

Rynoxx commented 8 years ago

Odd, double check that you haven't configured it to be something else, also check /var/log/apache/

GameTrackerPW commented 8 years ago

HI, i have activated sentora module but where can i now find API Key for server?

Rynoxx commented 8 years ago

You can find it when going to the module in Sentora, there is a button which says "API Key" press it and it'll show the API key for your sentora installation

LeafedFox commented 8 years ago

I'm also having the same issue as described above. I'm using PHP 5.4. How can I fix the "Can't use method return value in write context" error? Thanks.

Rynoxx commented 8 years ago

@ItsGageHolland As PHP 5.4 has reached its end of life sometime last year ( http://php.net/supported-versions.php ), I recommend updating to at least PHP 5.6, if that doesn't work, try the solution I sent to JustSentora in the 5th reply. And get back to me with the result

LeafedFox commented 8 years ago

@Rynoxx Updating to PHP 5.6 seemed to do the trick. Thanks.