php_gd2 is not working on windows 8.1 - windows-8.1

php_gd2 is not working on windows 8.1 every thing is ok php gd info is given below.
Array ( [GD Version] => bundled (2.1.0 compatible) [FreeType Support] => 1 [FreeType Linkage] => with freetype [T1Lib Support] => [GIF Read Support] => 1 [GIF Create Support] => 1 [JPEG Support] => 1 [PNG Support] => 1 [WBMP Support] => 1 [XPM Support] => 1 [XBM Support] => 1 [JIS-mapped Japanese Font Support] => )
Same code is working on windows 7 but not on windows 8.1
What is error please tell me.

i think error is in your server. because when you go from one local server to another this error occur some time and sometime not. For example when you move from wamp to xamp or xamp to wamp this error may be produced or may not. So, try by changing you local server.

Just simple to make GD library work on Windows 8.1 x64... copy php.ini to c:\windows.

Related

How can I override facter's os facts during local testing on a different operating system?

Environment
I am currently using Puppet 6.21.1 on Ruby 2.7.4 with PDK 2.3.0 (mostly for linting and launching the Puppet console as a REPL). The OS is macOS Monetery. If it matters, I'm running Ruby under RVM 1.29.12-next with a module-specific gemset.
Objective
I'm trying to test some Hiera lookups within a module on a macOS machine, and am trying to override the kernel, os, and osfamily facts returned on the development box by facter.
[See notes on the X/Y problem at the bottom of the post.]
What I've Tried
I have tried using the FACTERLIB environment variable, various individually-set FACTER_ environment variables, and a custom facts directory with the facter --custom-dir flag. While I have limited success my setting top-level variables with individual FACTER_ prefixed environment variables, I can't seem to get facter to return a defined Hash for facter os that I copied from a Debian or Ubuntu host, which is what I'm currently trying to do for reasons I touch on below.
My current fact override looks like this:
# ${module_repository?}/.myfacts/os.rb
Facter.add(:os) do
confine :kernal => 'Darwin'
has_weight = 1_000
setcode do
{
architecture => 'amd64',
distro => {
codename => 'focal',
description => 'Ubuntu 20.04.3 LTS',
id => 'Ubuntu',
release => {
full => '20.04',
major => '20.04',
},
},
family => 'Debian',
hardware => 'x86_64',
name => 'Ubuntu',
release => {
full => '20.04',
major => '20.04',
},
selinux => {
enabled => false,
},
}
end
end
Unfortunately, calling facter --custom-dir=".myfacts" facter os from within the module's top-level directory results in the standard facts (give or take the top-level facter element, which doesn't appear in the output when not running overrides) for macOS Monterey:
facter =>
os => {
architecture => "x86_64",
family => "Darwin",
hardware => "x86_64",
macosx => {
build => "21A559",
product => "macOS",
version => {
full => "12.0.1",
major => "12",
minor => "0",
patch => "1"
}
},
name => "Darwin",
release => {
full => "21.1.0",
major => "21",
minor => "1"
}
}
Both the X and the Y in my X/Y Problem
How can I get facter to report itself as a Debian-family Ubuntu system so that I can properly test my Hiera v5 lookups under ${module_respository?}/data/os/Debian.yaml from PDK console on my non-Puppetized Darwin development system?
Try
FACTER_<fact_name>=<fact_value> puppet agent -t ...
See also: https://www.puppetcookbook.com/posts/override-a-facter-fact.html
Using rspec-puppet is the best path forward in my experience. I too haven't had luck injecting facts (in any reliable way) to override... However, rspec-puppet can test with any pre-determined set of facts locally, or from various canned factsets. Give it a shot.

download jdk 8 using puppet on windows 10

I need to download jdk-8u45-windows-x64.exe on windows and install java. when i use pget it downloads a corrupt/unreadable file.
download.pp
class role::java {
pget{'Download java':
source => 'http://download.oracle.com/otn-pub/java/jdk/8u45-b15/jdk-8u45-windows-x64.exe',
target => 'C:\Users\Administrator\Downloads',
}
exec{"jdkinstaller":
  command => "C:\Users\Administrator\Downloads\jdk-8u45-windows-x64.exe /s ADDLOCAL=\"ToolsFeature,DemosFeature,SourceFeature\" ",
  creates => 'C:\Program Files\Java\jdk1.8.0_45\bin\javac.exe',
  logoutput => 'true',
 }
}
I tried using cyberious/windows_java from puppet forge but it didnt work either.
is there any other way to install java on windows.
Two issues in this manifest
The one Exception_al is mentioned.
as mentioned below in picture, you should escape "\". For this you have to use "/" instead of "\"

Apache 2.4 on Ubuntu: "Can't load driver file apr_dbd_oracle.so"

I'm running Ubuntu 17.04. I have an application running in Wildfly 10.1.0 and am trying to use Apache 2.4 to force the user to log in when they browse to the app URL. I have got this working on a Windows environment and was hoping it would be as simple as copying my Apache config files over to the Ubuntu box, but it's not.
I added the line below to httpd.conf
Include conf/extra/dbd.conf
Contents of conf/extra/dbd.conf:
DBDriver oracle
DBDParams user=xx;pass=yy;server=zz
DBDMin 2
DBDKeep 4
DBDMax 10
DBDExptime 300
I then tried to restart Apache using the command:
sudo /usr/local/apache2/bin/apachectl restart -f /usr/local/apache2/conf/httpd.conf
I get the message:
AH00526: Syntax error on line 1 of /usr/local/apache2/conf/extra/dbd.conf
Can't load driver file apr_dbd_oracle.so
I followed this tutorial on how to build the file apr_dbd_oracle.so. I have attempted to verify that apr_dbd_oracle.so was built properly by running the command:
ldd /usr/local/apr/lib/apr-util-1/apr_dbd_oracle.so
Which produces output:
linux-vdso.so.1 => (0x00007ffc2d3f6000)
libclntsh.so.11.1 => /u01/app/oracle/product/11.2.0/xe/lib/libclntsh.so.11.1 (0x00007f92d4b0e000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f92d48d7000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f92d4510000)
libnnz11.so => /u01/app/oracle/product/11.2.0/xe/lib/libnnz11.so (0x00007f92d4148000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f92d3f44000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f92d3c39000)
libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007f92d3a20000)
libaio.so.1 => /lib/x86_64-linux-gnu/libaio.so.1 (0x00007f92d381e000)
/lib64/ld-linux-x86-64.so.2 (0x0000561dd2f8b000)
I'm not a Linux expert but I suspect that if the .so file was corrupt then ldd would not produce this output. I conclude from this that apr_dbd_oracle.so works but Apache can't find it. I have tried copying the file to various locations, both by duplicating the file and creating symbolic links. I have also tried Googling where Apache looks for the file but no luck.
Can anyone clarify the directory that Apache expects the file apr_dbd_oracle.so to be in? Thanks in advance.
From our conversation earlier:
Configuration of shared libraries for root access is different to the logged in user.
Try executing without sudo to see if it's a configuration issue.

Predicting package version

I'm configuring syslog-ng through puppet on my servers. The configuration files are very different between versions 2.x, 3.1 and 3.3 . On my hosts, depending on the operating system (centos5, centos6, debian 7, ubuntu), the available syslog-ng version will vary.
I had 2 ideas to adapt the configuration of syslog-ng to the correct version :
Custom Fact : It's easy to write a custom fact to test the installed version of syslog-ng. But this fact will be useless if syslog-ng is not already installed.
Conditions in the manifest : I find it a bit ugly to define a "case" in the manifest wich would determine the version of syslog-ng that the operatingsystem provides.
For me, the cleanest way to do this is to test which version of the package is available through the operatingsystem before installation.
A facter could do this, but I guess it would be a bit difficult.
Is there a puppetish way to solve my problem ?
There is indeed puppet-ish way to solve this problem!
You can combine $::osfamily with $::operatingsystemrelease to do something like this in your manifests:
case $::osfamily {
'CentOS': {
case $::operatingsystemrelease {
/^6/: { include syslog-ng::centos6 }
/^5/: { include syslog-ng::centos5 }
default: { notice("This operating system release for CentOs '${::operatingsystemrelease}' is not supported.")
}
}
default: { notice "Unsupported osfamily ${::osfamily}" }
}
I am not sure I understood all of your problem. In any case, one can use puppet package type to ensure a particular version and use $lsbdistdescription to get the OS name. For example :
package { 'syslog-ng' :
ensure => $::lsbdistdescription {
'/CentOS 7/': => "3.2",
'/CentOS 6/': => "3.1",
'/(Debian|Ubuntu)/' => "2.x",
default => "latest",
},
}
NOTE: In the above one has to get the exact name of the OS, i.e. CentOS 7 or CentOS 6 or Ubuntu from each OS. You can do that by executing facter --puppet | grep lsbdistdescription on the OS. I don't have variety of machines, so I couldn't check that exactly.
Then the configuration file can be just one sourced from a template. The template will vary based on the OS.
file { 'file.cfg' :
ensure => "present",
content => template("modulename/file.erb"),
require => Package["syslog-ng"],
}
Hope it helps.

Dependency cycle with apt source

I'm trying to install the puppet module at https://github.com/dwerder/puppet-mongodb
One of the requirements for it to work is to have the mongodb repository set-up. Since I'm trying to deploy it on Debian I tried using the following class to add the source:
class mongodb::apt::repo {
include apt
apt::source { '10gen':
location => 'http://downloads-distro.mongodb.org/repo/debian-sysvinit',
release => 'dist',
repos => '10gen',
key => '7F0CEB10',
key_server => 'keyserver.ubuntu.com',
include_src => false
}
}
However, upon trying to install the module (on a test node) I get the following output:
root#debian:/etc/puppet/modules# puppet agent --test
info: Caching catalog for debian.lan
info: Applying configuration version '1353946258'
err: Could not apply complete catalog: Found 1 dependency cycle:
(Exec[apt_update] => Class[Apt::Update] => Anchor[apt::source::10gen] => Anchor[apt::source::10gen] => Apt::Source[10gen] => Class[Mongodb::Apt::Repo] => Package[mongodb-10gen] => Anchor[mongodb::install::end] => Anchor[mongodb::install::end] => File[10gen.list] => Apt::Source[10gen])
Try the '--graph' option and opening the resulting '.dot' file in OmniGraffle or GraphViz
notice: Finished catalog run in 0.06 seconds
The class is included in the module's install class at https://github.com/dwerder/puppet-mongodb/blob/master/manifests/install.pp
I'm not quite sure why this dependency cycle happens, any ideas?
What was your last change (that's probably the moment you added the cycle).
Try the suggestion to generate the graph. Post the generated dot file as gist so that we can investigate further.
Take a look at Debugging cycle or missing dependency.
Note that some dependencies are explicit (require, ->) or implicit (the resource provider add the dependency by it self)... having a look at the dot file should help.

Resources