Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having trouble setting up Helphub site locally #282

Open
emfluenceindia opened this issue Jan 23, 2019 · 7 comments
Open

Having trouble setting up Helphub site locally #282

emfluenceindia opened this issue Jan 23, 2019 · 7 comments

Comments

@emfluenceindia
Copy link
Contributor

emfluenceindia commented Jan 23, 2019

Issue Description

I am not sure if this is an "issue" or I am the only one having this trouble. As per suggestion of @zzap and @Kenshino I am putting it here.

I am following the instructions listed here under Local Install section.
I have done with steps 1-10. One confusion I have though about item no. 5, i.e. where exactly to run npm install. I ran it inside WPorg Support theme folder, not sure this is the right place to run.

When I activate the above theme, I am getting the following on-screen message.

Broken Themes
The following themes are installed but incomplete.

Name	Description		
wporg	Stylesheet is missing.

Ignoring the above I went on and run the site which resulted to an error:

Warning: require(/var/www/wp-projects/helphub/wp-content/themes/footer.php): failed to open stream: No such file or directory in /var/www/wp-projects/helphub/wp-content/themes/wporg-support/footer.php on line 12

Fatal error: require(): Failed opening required '/var/www/wp-projects/helphub/wp-content/themes/footer.php' (include_path='.:/home/subrara/.phpbrew/php/php-5.6.22/lib/php') in /var/www/wp-projects/helphub/wp-content/themes/wporg-support/footer.php on line 12

The same above this happening for header.php as well (line no. 191 in functions.php of the theme)

I changed theme to twentyseventeen and the site started running without any issue.

Expected Result:

Site should run without issue with the theme activated.

Actual Result:

Site is not running as described above.

Additional Comment:

I know this is the area to create issues and this might not be an issue at all and I am only experiencing it. If this is the case, it would be extremely helpful if I know what I am doing wrong.

@zzap
Copy link
Member

zzap commented Jan 28, 2019

OK, let's first fix the step 5 confusion. Command npm install should be ran from wp-content folder.

Try that and see what happens. Comment here results. Thank you.

@zzap
Copy link
Member

zzap commented Feb 5, 2019

What you need there is to include header and footer from wp.org:

Here are steps, missing from our CONTRIBUTING and README files:

  1. In wp-config.php, before /** Absolute path to the WordPress directory. */, add following:
define( 'WPORGPATH', 'https://wordpress.org/' );
  1. In php.ini (on Linux, with Apache, it's usually found on /etc/php/PHP-VERSION/apache2/php.ini), find allow_url_include and make sure it's turned on, like so:
allow_url_include = On
  1. Restart server. This may vary depending on your local setup. On Linux you would run this command in terminal:
sudo service apache2 restart

These should be added to our contributing documentation.

@emfluenceindia
Copy link
Contributor Author

emfluenceindia commented Feb 11, 2019

I tried above and now getting this:

Warning: require(): https:// wrapper is disabled in the server configuration by allow_url_include=0 in /var/www/wp-projects/helphub/wp-content/themes/wporg-support/functions.php on line 191

Warning: require(https://wordpress.org/header.php): failed to open stream: no suitable wrapper could be found in /var/www/wp-projects/helphub/wp-content/themes/wporg-support/functions.php on line 191

Fatal error: require(): Failed opening required 'https://wordpress.org/header.php' (include_path='.:/home/subrara/.phpbrew/php/php-5.6.22/lib/php') in /var/www/wp-projects/helphub/wp-content/themes/wporg-support/functions.php on line 191

My php.ini is located at
/etc/php5/apache2/php.ini and /etc/php5/cli/php.ini. One more thing I have noticed that phpinfo() is showing Loaded Configuration File | (none) !!

Screenshot: https://prnt.sc/mjk7oi

I added allow_url_include = On in both the above files. Is there any issue with my system configuration? Hope I don't need to reinstall everything from scratch! :( All my local websites are running perfectly fine. So what could be the missing block I am totally confused.

UPDATE:

subrara@subrara-desktop:~$ php -i |grep 'php.ini'
Configuration File (php.ini) Path => /etc/php5/cli
Loaded Configuration File => /etc/php5/cli/php.ini

And I have both allow_url_include = On and allow_url_fopen = On /etc/php5/cli/php.ini.
And after making these changes I did restart Apache.

@zzap
Copy link
Member

zzap commented Feb 11, 2019

Yes, your configuration is not correct. /etc/php5/apache2/php.ini and /etc/php5/cli/php.ini are two different files doing different things. You need to edit /etc/php5/apache2/php.ini and to make sure it's loaded there where you have (none).

@emfluenceindia
Copy link
Contributor Author

Thanks! I will do a fresh installation on my laptop tomorrow and go from there. Hope this time everything would work :)

@zzap
Copy link
Member

zzap commented Feb 11, 2019

Good luck 🤞

@pranshukharkwal
Copy link

@zzap @emfluenceindia I am facing the same error :

`Warning: require(): https:// wrapper is disabled in the server configuration by allow_url_include=0 in C:\xampp\htdocs\helphub\wp-content\themes\wporg-support\functions.php on line 192

Warning: require(https://wordpress.org/header.php): failed to open stream: no suitable wrapper could be found in C:\xampp\htdocs\helphub\wp-content\themes\wporg-support\functions.php on line 192

Fatal error: require(): Failed opening required 'https://wordpress.org/header.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\helphub\wp-content\themes\wporg-support\functions.php on line 192
There has been a critical error on your website.`

In phpinfo, it shows :
Loaded Configuration File | C:\xampp\php\php.ini

And I have both allow_url_include = On and allow_url_fopen = On in this file.
Also npm install ran successfully.

What else could be the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants