403 Error PHP

Status
Not open for further replies.

westgerm

New Member
Messages
10
Reaction score
0
Points
1
I use the glossary compiler Glossword. It's always worked perfectly, but today, I created a new entry - usually when I submit the new entry, it saves it and returns me to a blank form to put in another entry. However, when I submit now, I get a Litespeed 403 Forbidden page. The entry is still saved, but it doesn't redirect me.

Can anyone shed light on what's happening? I didn't change any settings.

I found an error log. Please bear in mind I have played around with permissions trying to figure out what's going on:

Code:
[30-Jun-2014 13:34:56 UTC] PHP Deprecated:  preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/westger2/public_html/dictionary/inc/func.text.inc.php on line 277
[30-Jun-2014 09:46:07 America/New_York] PHP Warning:  include_once(inc/config.inc.php): failed to open stream: Permission denied in /home/westger2/public_html/dictionary/gw_admin.php on line 34
[30-Jun-2014 09:46:07 America/New_York] PHP Warning:  include_once(): Failed opening 'inc/config.inc.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/westger2/public_html/dictionary/gw_admin.php on line 34
[30-Jun-2014 09:46:07 America/New_York] PHP Notice:  Undefined index: class_queries in /home/westger2/public_html/dictionary/gw_admin.php on line 38
[30-Jun-2014 09:46:07 America/New_York] PHP Fatal error:  Class name must be a valid object or a string in /home/westger2/public_html/dictionary/gw_admin.php on line 38
[30-Jun-2014 09:46:15 America/New_York] PHP Warning:  include_once(inc/config.inc.php): failed to open stream: Permission denied in /home/westger2/public_html/dictionary/gw_admin.php on line 34
[30-Jun-2014 09:46:15 America/New_York] PHP Warning:  include_once(): Failed opening 'inc/config.inc.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/westger2/public_html/dictionary/gw_admin.php on line 34
[30-Jun-2014 09:46:15 America/New_York] PHP Notice:  Undefined index: class_queries in /home/westger2/public_html/dictionary/gw_admin.php on line 38
[30-Jun-2014 09:46:15 America/New_York] PHP Fatal error:  Class name must be a valid object or a string in /home/westger2/public_html/dictionary/gw_admin.php on line 38
[30-Jun-2014 13:46:47 UTC] PHP Deprecated:  preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/westger2/public_html/dictionary/inc/func.text.inc.php on line 277
 
Last edited:

forumall

Member
Messages
39
Reaction score
2
Points
8
Hi,

Add this to your php code. Do you just get the Fatal Errors?
Code:
error_reporting(E_ERROR | E_WARNING | E_DEPRECATED| E_NOTICE);
 

westgerm

New Member
Messages
10
Reaction score
0
Points
1
I'm still seeing the following in the error log.

Code:
[30-Jun-2014 23:09:05 UTC] PHP Deprecated:  preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/westger2/public_html/dictionary/inc/func.text.inc.php on line 277
[30-Jun-2014 23:13:37 UTC] PHP Deprecated:  preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/westger2/public_html/dictionary/inc/func.text.inc.php on line 277

In addition, I'm seeing the 403 error page still when I submit forms. And, within the software, it seems when I perform a search operation, the following appears at the top of the page:

Code:
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/westger2/public_html/dictionary/inc/func.text.inc.php on line 277

Seems to be the same error.
 

forumall

Member
Messages
39
Reaction score
2
Points
8
Do what it says, use preg_replace_callback instead of what you are using on line 277
 

westgerm

New Member
Messages
10
Reaction score
0
Points
1
This was line 277:

Code:
$t = preg_replace($regexfind, $regexreplace, $t);

I've now changed it to:

Code:
$t = preg_replace_callback($regexfind, $regexreplace, $t);

Now seeing the following:

Warning: preg_replace_callback(): Requires argument 2, 'Array', to be a valid callback in /home/westger2/public_html/dictionary/inc/func.text.inc.php on line 277

Actually, I'm not seeing that message now I've tried making new entries, but still getting 403 pages upon submitting them.
 

westgerm

New Member
Messages
10
Reaction score
0
Points
1
I just put 'SecFilterEngine off' in the .htaccess file and it seems to have solved the problem!
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
preg_replace_callback isn't a drop-in replacement for preg_replace. The callback parameter is a function that returns the desired replacement for the matches, not just a string or array. That's a little more pain, but a lot more versatility. You can use a named function if it's complex, or use create_function inline to create an anonymous function (lambda) if it's simple enough to do it that way.[/c]
 
Status
Not open for further replies.
Top