mirror of
https://github.com/SuiteCRM/SuiteCRM.git
synced 2026-03-02 19:16:58 -05:00
issues launching suitecrm locally #5057
Labels
No labels
Area: API
Area: Campaigns
Area: Cases
Area: Clean Up
Area: Clean Up: Performance
Area: Dashlets
Area: Databases
Area: Developer Tools
Area: Elasticsearch
Area: Elasticsearch
Area: Emails
Area: Emails:Campaigns
Area: Emails:Cases
Area: Emails:Compose
Area: Emails:Config
Area: Emails:Templates
Area: Environment
Area: Installation
Area: Language
Area: Mobile
Area: Module
Area: PDFs
Area: PHP8
Area: Reports
Area: Studio
Area: Styling
Area: Upgrading
Area: Workflow
Area:Activity Stream
Area:Calls
Area:Import
Area:Projects
Area:Search
Area:Surveys
Area:Themes
Area:Users
Branch:Hotfix
Good First Issue
Hacktoberfest
Help Wanted
PR:Community Contribution
PR:Type:Enhancement
Priority:Critical
Priority:Important
Priority:Moderate
Severity: Major
Severity: Minor
Severity: Moderate
Status: Requires Code Review
Status: Requires Updates
Status: Stale
Status: Team Investigating
Status:Assessed
Status:Fix Proposed
Status:Needs Assessed
Status:Requires Automated Tests
Type: Bug
Type:Deprecated
Type:Discussion
Type:Duplicate
Type:Invalid
Type:Question
Type:Suggestion
Type:Suggestion
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/SuiteCRM-SuiteCRM#5057
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @hodanf on GitHub (Aug 28, 2023).
Issue
I cannot launch suitecrm locally after cloning ht egithub repository. I am not sure if there is a requirements.txt document somewhere but when I tried to launch it, it is throwing the fwrite error below which seems to be from the suitecrm code itself
Expected Behavior
launch locally using localhost
Actual Behavior
PHP Fatal error: Uncaught TypeError: fwrite(): Argument #1 ($stream) must be of type resource, bool given in /home/*******/Desktop/SuiteCRM/install/install_utils.php:723
^will not launch locally with php -S localhost:8000 -t
Possible Fix
Unknown
Steps to Reproduce
clone github, launch locally with php -S localhost:8000 -t
Your Environment
Suitecrm Version (current github version)
PHP 8.2.9
MySQL 8.0.34-0ubuntu0.20.04.1
Google Chrome Version 116.0.5845.96
@chris001 commented on GitHub (Aug 28, 2023):
composerisn't installed, you have to install it with:From the main directory of SuiteCRM, you have to run the command:
composer installBrowse to the web site of your SuiteCRM install. It should load and prompt you to login.
@johnM2401 commented on GitHub (Aug 30, 2023):
Hey!
Thanks for getting in touch!
On top of what @chris001 has noted, I would recommend ensuring your file/folder permissions are correct before installing.
As well as ensuring you meet the compatability matrix:
https://docs.suitecrm.com/admin/compatibility-matrix/
And have all the prerequisites noted here:
https://docs.suitecrm.com/admin/installation-guide/downloading-installing/#_recommended_installation_pre_requisites
If you're still having issues installing, could you try installing the version released yesterday? (7.14.0)
This version has a number of php8-related fixes, and should install when using php8.2.
Please let us know if you are having any further issues!
@Aakeeo commented on GitHub (Oct 3, 2023):
It's mostly because the permissions are not correct for the SuiteCRM directory. If you give correct permissions. I will initialize a log file and this should work.
I too had the same issue... I am on Ubuntu.. All I did was
chmod -R 755
chown -R www-data: www-data <suitecrm_directory>
Please note that I have apache running as web server. Hence the user www-data
@Aakeeo commented on GitHub (Feb 3, 2024):
The issue here is on the line 732 in install/install_utils.php . You can change the code from
if (@fwrite($fp, $nl.$entry) === false) {
$GLOBALS['log']->fatal('could not write to install.log: '.$entry);
}
to
if(is_resource($fp)){
if (@fwrite($fp, $nl.$entry) === false) {
$GLOBALS['log']->fatal('could not write to install.log: '.$entry);
}
}
@chris001 commented on GitHub (Feb 3, 2024):
@Aakeeo Can you make a Pull Request with your fix?
@pgorod commented on GitHub (Feb 3, 2024):
May I suggest something different?
The proposed code will not be useful to users because if you neglected to set proper permissions and the log file can't be written to, you won't know what happened, you will be left without a clue.
On the other hand, it is difficult to write a helpful message to the log file, if you can't write to the log file...
So I propose this trick: change the
$fpvariable name to$ifYoureSeeingAFatalErrorHereThenYouMustCheckPermsWritingToLogFile... and leave the current code as it is. If it bombs, if bombs telling you why.
@serhiisamko091184 commented on GitHub (Oct 7, 2024):
Hello @hodanf,
The issue has been marked as stale because there has been no recent activity. It will be closed if no further activity occurs.
Thanks for your contributions.
Regards,
Serhii