Advertisement:

Author Topic: Error message: 2: is_writable() expects parameter 1 to be a valid path  (Read 503 times)

Offline Donster

  • Newbie
  • *
  • Posts: 1
Sorry if someone already posted this, I was not able to find the same error on the search engine.

I just installed SMF and the error log is throwing this error every few minutes.

Error message: 2: is_writable() expects parameter 1 to be a valid path, array given

it keeps referencing line 1216 in the security.php file

I am totally lost with this, no idea what it means or how to fix, please help. :D

Thanks!

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 70,992
    • StoryBB/StoryBB on GitHub
What version of SMF do you have?
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline mronet

  • Newbie
  • *
  • Posts: 4
Hi,

i have version SMF 2.1 RC2 and get the same error too!

@Donster - have you solved the problem?
If yes - please can you tell me how?

Thank you in advance!
Regards



Offline Suki

  • Kaizoku Jotei
  • On Hiatus
  • SMF Super Hero
  • *
  • Posts: 15,421
  • Oh, wouldn't it be great if I *was* crazy?
    • MissAllSunday on GitHub
    • SMF mods
Welcome to SMF.

Do you also have the same error reference to Sources/Security.php file?
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Look at them. They're just asking for it. Maybe the human race deserves to be wiped out.

Offline mronet

  • Newbie
  • *
  • Posts: 4
Hi Suki,

yes.

Quote
2: is_writable() expects parameter 1 to be a valid path, array given
 hxxp:www.domain.com/index.php?action=admin;area=logs;sa=settings [nonactive]
 /var/www/clients/client2/web103/web/Sources/Security.php (Zeile 1216

And i get an error if i try to edit the settings in the attachments if i disable the error log!

Quote
array(9) {
  • => array(3) { ["file"]=> string(54) "/var/www/clients/client2/web103/web/Sources/Errors.php" ["line"]=> int(290) ["function"]=> string(9) "log_error" } [1]=> array(1) { ["function"]=> string(17) "smf_error_handler" } [2]=> array(3) { ["file"]=> string(52) "/var/www/clients/client2/web103/web/Sources/Load.php" ["line"]=> int(157) ["function"]=> string(16) "htmlspecialchars" } [3]=> array(3) { ["file"]=> string(60) "/var/www/clients/client2/web103/web/Sources/ManageServer.php" ["line"]=> int(1037) ["function"]=> string(9) "{closure}" } [4]=> array(3) { ["file"]=> string(65) "/var/www/clients/client2/web103/web/Sources/ManageAttachments.php" ["line"]=> int(254) ["function"]=> string(23) "prepareDBSettingContext" } [5]=> array(3) { ["file"]=> string(52) "/var/www/clients/client2/web103/web/Sources/Subs.php" ["line"]=> int(5083) ["function"]=> string(24) "ManageAttachmentSettings" } [6]=> array(3) { ["file"]=> string(65) "/var/www/clients/client2/web103/web/Sources/ManageAttachments.php" ["line"]=> int(76) ["function"]=> string(11) "call_helper" } [7]=> array(3) { ["file"]=> string(53) "/var/www/clients/client2/web103/web/Sources/Admin.php" ["line"]=> int(497) ["function"]=> string(17) "ManageAttachments" } [8]=> array(3) { ["file"]=> string(45) "/var/www/clients/client2/web103/web/index.php" ["line"]=> int(151) ["function"]=> string(9) "AdminMain" } } Error loop.
If i have enabled the error log i can change the settings!?

Regards
mronet


Offline Suki

  • Kaizoku Jotei
  • On Hiatus
  • SMF Super Hero
  • *
  • Posts: 15,421
  • Oh, wouldn't it be great if I *was* crazy?
    • MissAllSunday on GitHub
    • SMF mods
I cannot replicate the issue with the latest release, can you tell me your current attachment settings and if you upgraded from a 2.0 install or if it was a clean 2.1 installation?
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Look at them. They're just asking for it. Maybe the human race deserves to be wiped out.

Offline mronet

  • Newbie
  • *
  • Posts: 4
Hi Suki,

i updated from an 2.0.15 version to 2.1 RC2.

Which attachments settings do you want to see?

Best Greetings

Offline Suki

  • Kaizoku Jotei
  • On Hiatus
  • SMF Super Hero
  • *
  • Posts: 15,421
  • Oh, wouldn't it be great if I *was* crazy?
    • MissAllSunday on GitHub
    • SMF mods
Ah yes, that might explain why I cannot replicate. I'm interested on your attachment dir settings, I assume you set it up to multiple directories.

I tracked it on github: https://github.com/SimpleMachines/SMF2.1/issues/5715
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Look at them. They're just asking for it. Maybe the human race deserves to be wiped out.

Offline mronet

  • Newbie
  • *
  • Posts: 4
Hi Suki,

thank's for your answer.

I made parallely a new (clean) installation and deleted all old entrys in the database, all old folders and set the correctly rights of the folders.
Then i transferred the files from the attachments folder in a new one (attachments_new) - deleted the old attachments folder and rename the new one (in the administration area) back to attachments and then i made an attachments check.

No it works :-)

Big thanks to you! :-)

Best Regards

Offline Suki

  • Kaizoku Jotei
  • On Hiatus
  • SMF Super Hero
  • *
  • Posts: 15,421
  • Oh, wouldn't it be great if I *was* crazy?
    • MissAllSunday on GitHub
    • SMF mods
Cool, glad you solved that way. It was also solved on the codebase as well.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Look at them. They're just asking for it. Maybe the human race deserves to be wiped out.