HTTP 500 Error

You just have to create a .htaccess file to add the Header directive for CORS

Example:

Header set Access-Control-Allow-Origin "*"

Or like this

<IfModule mod_headers.c>
  Header set Access-Control-Allow-Origin "*"
</IfModule>
1 Like

thank you… i have added your Header set Access-Control-Allow-Origin"*" header code in .htaccess
site didn’t come back
as well as the suggested php test code in file created in htdocs

<!DOCTYPE htm|> <html>
«body>
<h1>My first
PHP page</h1> <?php echo "Hello World!", ?>
</body> </html></php>

site still not coming back from error 500
i am open to more suggestions

Stop hijacking other peoples topics please. Future hijacking will result in the post getting flagged and removed.

6 Likes

There are quite a few errors in your PHP and HTML code.

You should probably start here:

Be sure to copy/paste the sample code exactly as it is shown.

Hi solace-ken,

CORS is not something you should grant full opens, as it is designed to prevent unintended code executions on your page. Setting too wide-open permissions would defeat the purpose of having CORS in the first place.

Websitedesigner must learn this him/herself to get this running in the intended way.

Cheers!

I see this now

CORS is blocked on free hosting.
Defining via .htaccess will not work

3 Likes

Hi KangJL,

Why CORS is blocked tho, wasn’t it supposed to be there to protect the website? How about setting the header through PHP? Are there any security concerns behinds this?

header('Access-Control-Allow-Origin', '');

Cheers!

I believe cross origin is blocked for security purpose .
That is why iframes will not work for redirect purpose

example.com and subdomain.example.com can be considered as cross origin

3 Likes

The article describing the security system mentions this:

3 Likes

my apologies

1 Like

here are my new errors this morning

Warning : “continue” targeting switch is equivalent to “break” in /home/vol9_3/epizy.com/epiz_20079140/htdocs/wp-content/plugins/woocommerce-product-importer/includes/functions.php on line 284

Fatal error : Array and string offset access syntax with curly braces is no longer supported in /home/vol9_3/epizy.com/epiz_20079140/htdocs/wp-content/plugins/woocommerce/includes/wc-formatting-functions.php on line 746

There has been a critical error on this website.

down to this error

Fatal error : Array and string offset access syntax with curly braces is no longer supported in /home/vol9_3/epizy.com/epiz_20079140/htdocs/wp-content/plugins/woocommerce/includes/wc-formatting-functions.php on line 746

There has been a critical error on this website.

changed plugin to woocommerce-product-importer.hold

This seems to be because of old PHP syntax which is no longer supported in PHP 8.2.
You might want to upgrade your plugin version, or if you’re on the latest, report the issue to them.

3 Likes

Hi Websitedesigner,

For WooCommerce, unless you have very specific requirements, it now supports Import function, you can use that without an external plugin.

Cheers!

1 Like

I’ve gotten in my website since I upgraded and put the 2 plugins on hold … even though I’ve brought a bunch of it up I’m still getting bad gateways after delete and reinstalling latest versions for woo commerce. woo importer.longer complies in upgrade

Hi Websitedesigner,

Do not attempt to install too many plugins in WordPress, you’re asking for trouble if you do so. The rule of thumb is around 40, given that they’re all very optimized.

If you see bad gateway errors, it simply means that your website still takes too much time to process a single request. Reinstalling everything without removing the bloat does not solve the issue and it’ll persist until you remove deactivated plugins or legacy ones. WooCommerce also made quite a few changes over the past season so you might want to look intot that as well.

The best way of WordPress planning is to avoid having plugins that do overlapping or fundamentally competitive things.

I have no idea what you mean by this.

Cheers!

I do not agree. 40 plugins is too much for free hosting. Just WooCommerce and Elementor is enough too slow your website to a crawl

4 Likes

I’ve 10 plugins … substituted a generic importer for woo commerce importer which I believe has become obsolete with upgrade. Thank you all for your help.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.