Welcome Guest, Not a member yet? Register   Sign In
core/Router.php Warning
#1

[eluser]pigfox[/eluser]
This message just popped up, I have never seen it before:

Severity: Warning

Message: preg_match(): Compilation failed: missing ) at offset 32

Filename: core/Router.php

Line Number: 381

I am using url rewriting, like:

http://www.mydomain.com/cities/statename

Any clue anyone?
#2

[eluser]rana[/eluser]
Can you share .htaccess code and the routes.php code as well plz?
#3

[eluser]pigfox[/eluser]
.htaccess
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php/$1 [L]


#RewriteCond $1 !^(index\.php|resources|robots\.txt)
#RewriteCond $1 !^(index\.php|images|robots\.txt|css|js|files|modules|assets|managedb)
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule ^(.*)$ index.php/$1 [L,QSA]


ErrorDocument 404 /error/404

routes.php

$route['default_controller'] = "site";

//location/city
$route['city/(:any)/(:any)'] = "site/city/$1/$2";

$route['paypal/(:any)/(:any)/(:any)/(:any)'] = "site/paypal/$1/$2/$3/$4";
$route['pay/(:any)/(:any)'] = "site/pay/$1/$2";
$route['post/(:any)/(:any)/(:any)/(:any)'] = "site/post/$1/$2/$3/$4";

$route['thread/(:any)/(:any)/(:any)'] = "site/thread/$1/$2/$3/$4";//uuid/hash/thread/msg
$route['thread/(:any)/(:any)/(:any)'] = "site/thread/$1/$2/$3";//uuid/hash/thread/

$route['threads/(:any)/(:any)'] = "site/threads/$1/$2";//uuid/hash
$route['sendmessage/(:any)/(:any)'] = "site/sendmessage/$1/$2";//uuid/hash -- send initial message to owner
#$route['viewmessage/(:any)/(:any)'] = "site/viewmessage/$1/$2";//thread/msg -- KILL ME!!!!!!!!!
$route['activate/(:any)/(:any)'] = "site/activate/$1/$2";//uuid/hash
$route['images/(:any)/(:any)'] = "site/images/$1/$2";//uuid/hash
$route['edit/(:any)/(:any)'] = "site/edit/$1/$2";//uuid/hash
//$route['edit-images/(:any)/(:any)'] = "site/editimages/$1/$2";
$route['delete/(:any)/(:any)/(:any)'] = "site/delete/$1/$2/$3";
$route['delete/(:any)/(:any)'] = "site/delete/$1/$2";//uuid/hash
$route['deleteimage/(:any)/(:any)/(:any)/(:any'] = "site/deleteimage/$1/$2/$3/$4";
$route['deleteimage/(:any)/(:any)/(:any)'] = "site/deleteimage/$1/$2/$3";
$route['view/(:any)'] = "site/view/$1";//uuid/hash
//$route['view-image/(:any)/(:any)/(:any)'] = "site/viewimage/$1/$2/$3";

$route['success'] = "site/success";
$route['myurls'] = "site/myurls";
$route['communication'] = "site/communication";
$route['us-states'] = "site/usstates";
$route['country'] = "site/country";
$route['contact'] = "site/contact";
$route['browsers'] = "site/browsers";
$route['privacy'] = "site/privacy";
$route['how-to'] = "site/howto";
$route['site-map'] = "site/sitemap";
$route['terms-and-conditions'] = "site/tac";
$route['paypal-error'] = "site/paypalerror";
$route['send-to-friend'] = "site/send2friend";
$route['respond'] = "site/respond";
$route['email-sent'] = "site/emailsent";
$route['audit'] = "site/audit";
$route['mission'] = "site/mission";
$route['sitemap'] = "site/sitemap";//-- KILL ME!!!!!!!!!
$route['locations'] = "site/locations";
$route['captcha/(:any)'] = "site/captcha/$1";
$route['cities/(:any)'] = "site/cities/$1";

//page/location/city/subcategory
$route['(:any)/(:any)/(:any)/(:any)'] = "site/category/$1/$2/$3/$4";

$route['404_override'] = 'error';
#4

[eluser]TheFuzzy0ne[/eluser]
Your problem is here:
Code:
$route[‘deleteimage/(:any)/(:any)/(:any)/(:any’] = “site/deleteimage/$1/$2/$3/$4”; // Missing closing bracket.
#5

[eluser]pigfox[/eluser]
Beautiful Catch!
Thank you!!!!




Theme © iAndrew 2016 - Forum software by © MyBB