Fatal error and use of undefined constant in child theme unless I redefine it

Child theme functions.php:

// Init. require_once( WPBF_CHILD_THEME_DIR . '/inc/init-child.php'); 

In the parent theme functions.php, the constant is defined:

define( 'WPBF_CHILD_THEME_DIR', get_stylesheet_directory() ); 

If I include the same constant definition in the child theme like the above, then the require_once works and /inc/init-child.php file is loaded.

However I get a notice stating that the constant is already defined in the parent theme’s functions.php (correct!).

But if I remove this from the child theme’s functions.php, then I get the following:-

Warning: Use of undefined constant WPBF_CHILD_THEME_DIR - assumed 'WPBF_CHILD_THEME_DIR' (this will throw an Error in a future version of PHP) in /var/www/vhosts/xxx/subdomains/xxx/httpdocs/wp-content/themes/page-builder-framework-child/functions.php on line 42  Warning: require_once(WPBF_CHILD_THEME_DIR/inc/init-child.php): failed to open stream: No such file or directory in /var/www/vhosts/xxx/subdomains/xxx/httpdocs/wp-content/themes/page-builder-framework-child/functions.php on line 42  Fatal error: require_once(): Failed opening required 'WPBF_CHILD_THEME_DIR/inc/init-child.php' (include_path='.:/opt/plesk/php/7.3/share/pear') in /var/www/vhosts/xxx/subdomains/xxx/httpdocs/wp-content/themes/page-builder-framework-child/functions.php on line 42 

So why can I only load the file via the child theme if I redefine the constant even though it is going to show me a notice to state it is already defined…?

The same constant is already in use in the very same child theme functions.php file further up as well like:

// Textdomain. load_child_theme_textdomain( 'page-builder-framework-child', WPBF_CHILD_THEME_DIR . '/languages' ); 

I am assuming there should be a correct way to load the file needed without having to repeat constant definitions?

FTP server and chroot: SSL3 alert write: fatal: protocol version

When i enable "chroot_local_user=YES" in my FTP server config /etc/vsftpd/vsftpd.conf
then the FTP client (WinSCP) says:

when it is commented out and "service vsftpd restart" , it login OK, but allows browsing system directories in the /.
This is CentOS 7 Linux.

These are…

FTP server and chroot: SSL3 alert write: fatal: protocol version

Fatal error: Uncaught Error: Class ‘WP_Block_Styles_Registry’

I am having some issues determining the solution to this problem below. The website was sent to our team to fix.

Turned on error reporting in wp-config.php:
define('WP_DEBUG', true);

WordPress version: 5.3.2
PHP version: 7.2

WordPress Theme: Grow Pro

Fatal error: Uncaught Error: Class 'WP_Block_Styles_Registry' not  found in /home/website/public_html/clientsite.com/wp-includes/script-  loader.php:2902 Stack trace: #0  /home/website/public_html/clientsite.com/wp-includes/class-wp-  hook.php(288): enqueue_block_styles_assets('') #1  /home/website/public_html/clientsite.com/wp-includes/class-wp-  hook.php(312): WP_Hook->apply_filters(NULL, Array) #2  /home/website/public_html/clientsite.com/wp-includes/plugin.php(478):  WP_Hook->do_action(Array) #3  /home/website/public_html/clientsite.com/wp-includes/script-  loader.php(2856): do_action('enqueue_block_a...') #4  /home/website/public_html/clientsite.com/wp-includes/class-wp-  hook.php(288): wp_common_block_scripts_and_styles('') #5  /home/website/public_html/clientsite.com/wp-includes/class-wp-  hook.php(312): WP_Hook->apply_filters(NULL, Array) #6  /home/website/public_html/clientsite.com/wp-includes/plugin.php(478):  WP_Hook->do_action(Array) #7 /home/website/public_html/ir in  /home/website/public_html/clientsite.com/wp-includes/script-loader.php  on line 2902 

There has been a critical error on your website.

Learn more about debugging in WordPress.


For privacy reasons, I wouldn’t be sharing the live website link.

Any help with resolving these errors would be greatly appreciated.

Thank you in advance,
Nick Hiebert

Fatal error: Uncaught Error: Cannot use object of type WP_Error as array due to wpml-translation-management

I tried to create a CPT post using wp_insert_post() using loop. However, it only creates one post and shows the following error.

Fatal error: Uncaught Error: Cannot use object of type WP_Error as array in C:\xampp\htdocs\theme\wp-content\plugins\wpml-translation-management\inc\actions\wpml-tm-post-actions.class.php:195 Stack trace: #0 C:\xampp\htdocs\theme\wp-content\plugins\wpml-translation-management\inc\actions\wpml-tm-post-actions.class.php(50): WPML_TM_Post_Actions->save_translation_priority(1543) #1 C:\xampp\htdocs\theme\wp-content\plugins\wpml-translation-management\inc\wpml-private-actions.php(69): WPML_TM_Post_Actions->save_post_actions(1543, Object(WP_Post), false) #2 C:\xampp\htdocs\theme\wp-includes\class-wp-hook.php(286): wpml_tm_save_post(1543, Object(WP_Post), false) #3 C:\xampp\htdocs\theme\wp-includes\class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #4 C:\xampp\htdocs\theme\wp-includes\plugin.php(465): WP_Hook->do_action(Array) #5 C:\xampp\htdocs\theme\wp-content\plugins\sitepress-multilingual-cms\inc\post-translation\wpml-post-translation.class.php(183): do_action(‘wpml_tm_save_po…’, 1543, Object(WP_Post), false) #6 C:\xampp in C:\xampp\htdocs\theme\wp-content\plugins\wpml-translation-management\inc\actions\wpml-tm-post-actions.class.php on line 195

I have my code as shown below:

$ args = array(

‘ID’ => $ post_id,

‘comment_status’ => ‘closed’,

‘ping_status’ => ‘closed’,

‘post_author’ => $ author_id,

‘post_title’ => $ title,

‘post_content’ => $ content,

‘post_status’ => ‘publish’,

‘post_type’ => $ cpt,

);

$ post_id = wp_insert_post($ args);

Librería sympy: Tengo el error Intel MKL FATAL ERROR: Cannot load mkl_intel_thread.dll

Verdaderamente ya estoy frustrado y no le encuentro solución, vean que estoy tratando de usar la libreria sympy de Python, pero al tratar de escribir código para que este me devuelva la gráfica de una función me devuelve el siguiente error: Intel MKL FATAL ERROR: Cannot load mkl_intel_thread.dll.

Lo que estoy haciendo es lo siguiente:

from sympy import * x,y,z = symbols("x y z") print(plot(cos(x))) 

Luego de hacer ese codigo tan sencillo para mostrar la gráfica de cos(x) obtengo en la salida el siguiente error:

INTEL MKL ERROR: %1 no es una aplicaci¾n Win32 vßlida. mkl_intel_thread.dll. Intel MKL FATAL ERROR: Cannot load mkl_intel_thread.dll. 

Anexo también que este error se presenta solo a la hora de gráficar, todo lo demás funciona correctamente. Lo único que se me ocurre hasta ahora es que el error sea debido al procesador ya que mi procesador es AMD y el dll que intenta ejecutar mi editor de código hace referencia a nucleos de un procesador intel.

Fatal error: Uncaught Error: Class ‘HttpRequest’ not found

Estoy tratando de consumir un webservice al cual tengo que enviarle ciertos datos, al tratar de ejecutarlo me sale el siguiente error: Fatal error: Uncaught Error: Class ‘HttpRequest’ not found

Mi código es este: <?php  $  request = new HttpRequest(); $  request-   >setUrl('https://api.nubarium.com/ocr/obtener_datos'); $  request->setMethod(HTTP_METH_POST);  $  request->setHeaders(array( 'Authorization' => 'Basic c3ljcmVhOl9pMzYuRXhqMnA=', 'Content-Type' => 'application/json' ));  $  request->setBody('{ "id": "imagen base64", "idReverso": ""  }');  try { $  response = $  request->send();  echo $  response->getBody(); } catch (HttpException $  ex) {  echo $  ex;  } ?> 

fatal error: call to undefined function mysqli_connect on phpdesktop-linux-72.1 on linux

and i want to make .exe file on linux and this error is showing while we execute the code so kindly anyone help me to sort out this problem

fatal error: call to undefined function mysqli_connect() in /home/ahsan/desktop/phpdesktop-linux-72.1/www/index.php(29): include()#1 {main} thrown in /home/ahsan/desktop/phpdesktop-linux-72.1/www/connection.php on line #6

FATAL: pg_hba.conf rejects connection for host … SSL OFF

Before this issue happen, it work perfectly fine for months.

I am had try the configuration below at DO droplet:

1) Change pg_hba.conf

host all all 0.0.0.0/0 trust 

2) I issue the restart commond

service postgresql restart 

3) I still receive the error in

tail -f /var/log/postgresql/postgresql-10-main.log 

Spec:

  • PG: Postgresql 10
  • OS: Ubuntu 18.04.1 LTS
  • My postgresql.conf configuration file as follow:

    listen_addresses = ‘*’

Fatal server error: (EE) no screens found(EE) at any tty

I want to create a “virtual display” to use another display resolution.

I’ve opened any tty from tty2 to tty6 and tried this:

sudo startx -- :1 

… but always I got:

xauth: (stdin):2:  unknown command "f86ae7809cf17138ea28ef7a7e32d2bb"   X.Org X Server 1.19.6 Release Date: 2017-12-20 X Protocol Version 11, Revision 0 Build Operating System: Linux 4.4.0-148-generic x86_64 Ubuntu Current Operating System: Linux feli-pc 4.15.0-55-generic #60-Ubuntu SMP Tue Jul 2 18:22:20 UTC 2019 x86_64 Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.15.0-55-generic root=UUID=366115be-a8f8-4d07-8c74-1bfb4756fd6b ro acpi_osi=Windows i8042.reset i915.preliminary_hw_support=1 noplymouth video=SVIDEO-1:d Build Date: 03 June 2019  08:10:35AM xorg-server 2:1.19.6-1ubuntu4.3 (For technical support please see http://www.ubuntu.com/support)  Current version of pixman: 0.34.0     Before reporting problems, check http://wiki.x.org     to make sure that you have the latest version. Markers: (--) probed, (**) from config file, (==) default setting,     (++) from command line, (!!) notice, (II) informational,     (WW) warning, (EE) error, (NI) not implemented, (??) unknown. (==) Log file: "/var/log/Xorg.1.log", Time: Sat Aug 10 23:17:57 2019 (==) Using system config directory "/usr/share/X11/xorg.conf.d" (EE)  **Fatal server error: (EE) no screens found(EE)**  (EE)  Please consult the The X.Org Foundation support       at http://wiki.x.org  for help.  (EE) Please also check the log file at "/var/log/Xorg.1.log" for additional information. (EE)  (EE) Server terminated with error (1). Closing log file. xinit: giving up xinit: unable to connect to X server: Connection refused xinit: server error 

I’ve also tried:

Xorg -configure :1   X.Org X Server 1.19.6 Release Date: 2017-12-20 X Protocol Version 11, Revision 0 Build Operating System: Linux 4.4.0-148-generic x86_64 Ubuntu Current Operating System: Linux feli-pc 4.15.0-55-generic #60-Ubuntu SMP Tue Jul 2 18:22:20 UTC 2019 x86_64 Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.15.0-55-generic root=UUID=366115be-a8f8-4d07-8c74-1bfb4756fd6b ro acpi_osi=Windows i8042.reset i915.preliminary_hw_support=1 noplymouth video=SVIDEO-1:d Build Date: 03 June 2019  08:10:35AM xorg-server 2:1.19.6-1ubuntu4.3 (For technical support please see http://www.ubuntu.com/support)  Current version of pixman: 0.34.0     Before reporting problems, check http://wiki.x.org     to make sure that you have the latest version. Markers: (--) probed, (**) from config file, (==) default setting,     (++) from command line, (!!) notice, (II) informational,     (WW) warning, (EE) error, (NI) not implemented, (??) unknown. (==) Log file: "/home/felipe/.local/share/xorg/Xorg.1.log", Time: Sat Aug 10 23:49:17 2019 (EE)  (EE) Backtrace: (EE) 0: /usr/lib/xorg/Xorg (xorg_backtrace+0x4d) [0x55fac2088abd] (EE) 1: /usr/lib/xorg/Xorg (0x55fac1ed0000+0x1bc859) [0x55fac208c859] (EE) 2: /lib/x86_64-linux-gnu/libpthread.so.0 (0x7f1680adf000+0x12890) [0x7f1680af1890] (EE) 3: /usr/lib/xorg/Xorg (0x55fac1ed0000+0xb231b) [0x55fac1f8231b] (EE) 4: /usr/lib/xorg/Xorg (xf86BusProbe+0x9) [0x55fac1f5a229] (EE) 5: /usr/lib/xorg/Xorg (InitOutput+0x7f1) [0x55fac1f68e71] (EE) 6: /usr/lib/xorg/Xorg (0x55fac1ed0000+0x56cd3) [0x55fac1f26cd3] (EE) 7: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xe7) [0x7f168070fb97] (EE) 8: /usr/lib/xorg/Xorg (_start+0x2a) [0x55fac1f10b8a] (EE)  (EE) Segmentation fault at address 0x50 (EE)  Fatal server error: (EE) Caught signal 11 (Segmentation fault). Server aborting (EE)  (EE)  Please consult the The X.Org Foundation support       at http://wiki.x.org  for help.  (EE) Please also check the log file at "/home/felipe/.local/share/xorg/Xorg.1.log" for additional information. (EE)  (EE) Server terminated with error (1). Closing log file. 

I don’t know how I can proceed

BTW I’ve Nvidia and Intel graphics and I’m using nvidia (proprietary) and i915 drivers respectively