allow_url_fopen dependency #48

Kapalı
aheathershaw tarafından 2018-07-27 16:46:50 +01:00 açıldı · 14 yorum
Sahibi

LNT00:

Installing Blue Twilight Setup Files
•Checking PHP modules...
•Fetching Composer signature...

Warning: file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /public/install.php on line 140

Warning: file_get_contents(https://composer.github.io/installer.sig): failed to open stream: no suitable wrapper could be found in /public/install.php on line 140
Failed downloading the Composer signature from https://composer.github.io/installer.sig.

Unable to set allow_url_fopen on shared hosting

[LNT00](https://github.com/LNT00): Installing Blue Twilight Setup Files •Checking PHP modules... •Fetching Composer signature... Warning: file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /public/install.php on line 140 Warning: file_get_contents(https://composer.github.io/installer.sig): failed to open stream: no suitable wrapper could be found in /public/install.php on line 140 Failed downloading the Composer signature from https://composer.github.io/installer.sig. Unable to set allow_url_fopen on shared hosting
aheathershaw 2018-07-27 16:46:50 +01:00 Version 2.1.0 kilometre taşına ekledi
aheathershaw
bug
etiketini 2018-07-27 16:46:50 +01:00 ekledi
aheathershaw 2018-07-27 16:46:55 +01:00 kendini atadı
Yazar
Sahibi

Thanks for reporting this. Do you have shell/CLI access on your host?

The only way around this I can see is to ship a copy of the Composer installer with Blue Twilight - which is directly against the Composer project's recommendations, however I can't see another alternative.

Thanks for reporting this. Do you have shell/CLI access on your host? The only way around this I can see is to ship a copy of the Composer installer with Blue Twilight - which is directly against the Composer project's recommendations, however I can't see another alternative.
Yazar
Sahibi

LNT00:

No, my host is quite restrictive and i don't have ssh access.
Would using curl instead of file_get_contents() be a solution?

[LNT00](https://github.com/LNT00): No, my host is quite restrictive and i don't have ssh access. Would using curl instead of file_get_contents() be a solution?
Yazar
Sahibi

Yep, that may work. Let me have a look tomorrow, I'll get you a replacement install.php file to try out.

Yep, that may work. Let me have a look tomorrow, I'll get you a replacement `install.php` file to try out.
Yazar
Sahibi

Actually, just reading around - it seems Composer requires allow_url_fopen turned on due to its own use of file_get_contents.

https://github.com/composer/composer/issues/4740

I've zipped up the dependencies (which Composer installs) at the below URL. Download and unzip this on your own machine, then upload into the root folder of your Blue Twilight install - so you have:

  • app
  • bootstrap
  • config
  • ... etc. ...
  • vendor (this is the contents of the zip file).

http://www.andyheathershaw.uk/blue-twilight-vendor.tar.gz

Actually, just reading around - it seems Composer requires allow_url_fopen turned on due to its own use of `file_get_contents`. https://github.com/composer/composer/issues/4740 I've zipped up the dependencies (which Composer installs) at the below URL. Download and unzip this on your own machine, then upload into the root folder of your Blue Twilight install - so you have: - app - bootstrap - config - ... etc. ... - vendor (this is the contents of the zip file). http://www.andyheathershaw.uk/blue-twilight-vendor.tar.gz
Yazar
Sahibi

I've noticed you're accessing your system using "http://your-url/public/" - ideally your web hosting root (sometimes called www-root) should be pointed to the public folder, so you just access "http://your-url/".

However if you cannot do this, you'll need to amend your public/.htaccess file to have RewriteBase /public/ instead of RewriteBase /

Then you should be able to access "http://your-url/public/" and it will run the BT installer (hopefully!)

I've noticed you're accessing your system using "http://your-url/public/" - ideally your web hosting root (sometimes called www-root) should be pointed to the public folder, so you just access "http://your-url/". However if you cannot do this, you'll need to amend your public/.htaccess file to have `RewriteBase /public/` instead of `RewriteBase /` Then you should be able to access "http://your-url/public/" and it will run the BT installer (hopefully!)
Yazar
Sahibi

LNT00:

root is pointed to public folder

After adding the folder i get 404 on
http://mydomain/photo/public/install/check

[LNT00](https://github.com/LNT00): root is pointed to public folder After adding the folder i get 404 on http://mydomain/photo/public/install/check
Yazar
Sahibi

If your www-root is pointed to the public folder (within Blue Twilight's install directory), you don't need /public in the URL. Blue Twilight is a Laravel 5 application, which are designed to be at the root of a domain or subdomain (e.g. http://photos.mydomain or just http://mydomain -> which would be rooted at, e.g. /file/system/path/blue-twilight/public.)

Based on your URL, it looks like your www-root isn't pointing to Blue Twilight's public folder.

To get your current URL working, you will need to modify your public/.htaccess to have a RewriteBase of /photo/public/ - i.e.

RewriteBase /photo/public/

If your www-root is pointed to the public folder (within Blue Twilight's install directory), you don't need /public in the URL. Blue Twilight is a Laravel 5 application, which are designed to be at the root of a domain or subdomain (e.g. http://photos.mydomain or just http://mydomain -> which would be rooted at, e.g. `/file/system/path/blue-twilight/public`.) Based on your URL, it looks like your www-root isn't pointing to Blue Twilight's public folder. To get your current URL working, you will need to modify your `public/.htaccess` to have a `RewriteBase` of `/photo/public/` - i.e. `RewriteBase /photo/public/`
Yazar
Sahibi

LNT00:

Yes, i had the subdomain pointing wrong, changed it to correct location.

System Requirements page is displayed with a warning

Maximum POST request size: Your post_max_size setting should be slightly bigger than your upload_max_filesize setting to allow for the HTTP header.

and when i click Continue i get

Whoops, looks like something went wrong.

[LNT00](https://github.com/LNT00): Yes, i had the subdomain pointing wrong, changed it to correct location. System Requirements page is displayed with a warning Maximum POST request size: Your post_max_size setting should be slightly bigger than your upload_max_filesize setting to allow for the HTTP header. -- and when i click Continue i get Whoops, looks like something went wrong.
Yazar
Sahibi

LNT00:

I enabled debug and this is the actual error:

(1/1) FatalErrorException Call to undefined method Illuminate\Session\Store::set()
in InstallController.php (line 58)

[LNT00](https://github.com/LNT00): I enabled debug and this is the actual error: (1/1) FatalErrorException Call to undefined method Illuminate\Session\Store::set() in InstallController.php (line 58)
Yazar
Sahibi

What version of Blue Twilight are you using?

What version of Blue Twilight are you using?
Yazar
Sahibi

LNT00:

2.1.0-beta.3

LE: i just tried with Version 2.0.2 and got the same result.

[LNT00](https://github.com/LNT00): 2.1.0-beta.3 LE: i just tried with Version 2.0.2 and got the same result.
Yazar
Sahibi

LNT00:

So it worked after i edited InstallController.php and changed two instances of set() to put().
(found some details here: https://laracasts.com/discuss/channels/laravel/a-session-error-after-updating-to-laravel-54 )

It installed successfully and it's working now.

Thanks!

[LNT00](https://github.com/LNT00): So it worked after i edited InstallController.php and changed two instances of set() to put(). (found some details here: https://laracasts.com/discuss/channels/laravel/a-session-error-after-updating-to-laravel-54 ) It installed successfully and it's working now. Thanks!
Yazar
Sahibi

Brilliant thanks - I must have missed this in the Laravel 5.3 -> 5.4 upgrade.

I'll raise a separate issue for it and close this one.

Brilliant thanks - I must have missed this in the Laravel 5.3 -> 5.4 upgrade. I'll raise a separate issue for it and close this one.
Yazar
Sahibi
Migrated from https://github.com/andysh-uk/blue-twilight/issues/48
Bu konuşmaya katılmak için oturum aç.
Kilometre Taşı Yok
Atanan Kişi Yok
1 Katılımcı
Bildirimler
Bitiş Tarihi
Bitiş tarihi geçersiz veya aralık dışında. Lütfen 'yyyy-aa-gg' biçimini kullanın.

Bitiş tarihi atanmadı.

Bağımlılıklar

Bağımlılık yok.

Referans: aheathershaw/blue-twilight#48
Herhangi bir açıklama sağlanmadı.