php error fopen(.htaccess)

Php error fopen(.htaccess), a forum discussion on Jojo CMS. Join us for more discussions on Php error fopen(.htaccess) on our Installation forum.

Back to Forum Index : Back to Installation   RSS
subvert subvert

13 Aug 2007
Posts: 11

Warning: fopen(.htaccess) [function.fopen]: failed to open stream: Permission denied in /home/radianth/public_html/index.php on line 61

Hey Harvey,

Finally got round to installing Jojo!

Just have this error after opening index.php for the first time.

If I copy the generated code into the .htaccess file (new file) will this be okay?

Cheers,
Josh

Server Address: http://74.53.174.34/~radianth/
Josh
Harvey

Core Developer

Harvey

14 Aug 2007
Posts: 327

Hi Josh,

Jojo tries to create the .htaccess file for you, but to do this it needs write permissions to the web folder. For the 99% of web hosts who don't have this enabled by default, you will need to copy-paste the code supplied in the box and create your own .htaccess file using a text editor.

We should probably make that screen look slightly less error-like, as it's not really an error, just a part of the process.

Cheers,

Harvey.
subvert subvert

14 Aug 2007
Posts: 11

Hey Harvey,

Sweet as, did that. Can you please take a peek at the server... did i need to manually create some directories besides mysite etc?

Thanks,
Josh
Dean

14 Aug 2007
Posts: 11

Hi Josh,

No, you don't need to manually create any directories, jojo will do this for you. Unless of course it is not able to create the /config/config.php one that goes in the web folder, but this will be explained and become pretty obvious to you as you go through the install process.

I'm not 100% sure, but I think the errors on your server at the moment are because you need to give write permissions (777) to the 'mysite' directory. Just try it and see.

Cheers, Dean
Dean
subvert subvert

14 Aug 2007
Posts: 11

Thanks Dean,

I changed the permissions of the mysite folder, but still no luck.

Would it be worth trying a fresh installation maybe?

Cheers,
Josh
Dean

14 Aug 2007
Posts: 11

Hi Josh,

Yes I think a fresh install will do the trick. I just reinstalled one of my sites and it all went pretty much to plan.

So firstly go to your database and drop all the tables leaving just the database there. Then go to your /home/radianth/ directory, it should look like this inside.

/public_html/
/jojo/
/mysite/

I would delete the mysite directory (or just rename it if you're not able to delete it) then create a new empty mysite directory and give it 777 permissions.

Then copy the index.php file from the /jojo/_www/ directory into the web root then browse to your site.

Jojo will try to create the .htaccess file and if not just do it your self with the code it gives you.

Jojo will ask for your database name and passwords and the path to your jojo files which should be: /home/radianth/jojo/.

I think the next step is when jojo tries to make the config directory, as I said earlier this is pretty simple as you can just make it yourself if jojo doesn't have permisions.

It should all just go pretty much straight forward from there.

Let us know how you get on.

Cheers, Dean
Dean
Harvey

Core Developer

Harvey

14 Aug 2007
Posts: 327

I'm off to have a beer, looks like the tech support is well under control here. Thanks Dean.

Only thing I would add is that it's probably easier to just create the folders manually than fluff around with permissions. The files / folders Jojo needs for the whole install are...

/public_html/ (or whatever your host calls the web dir)
/public_html/.htaccess
/public_html/config/config.php
/mysite/
/mysite/downloads/ (must have 755 or 777 permissions)
/mysite/cache/ (must have 755 or 777 permissions)
/mysite/plugins/
/mysite/themes/
/jojo/ (with all the jojo files from the download)

The install process will prompt you to create the .htaccess and config.php files. Everything else you can create before you start to make life easier. Only the 2 folders mentioned need to be writable, we prefer everything else is read only for better security.

I'm usually around on msn messenger for support - or if it's really giving you grief then contact us through the form on the contact page with your FTP details and one of the Jojo devs can get it working for you and tell you where the problem was.

Cheers, I'm off for that beer.

Harvey.
subvert subvert

15 Aug 2007
Posts: 11

Hey Guys,

I manually created the directories, dropped all the tables from the database and deleted and installed all initial files on the server.

I'm now receiving this error: Warning: require_once(includes/defaultconfig.php) [function.require-once]: failed to open stream: No such file or directory in /home/radianth/public_html/index.php on line 31

http://74.53.174.34/~radianth/

Sorry, Any ideas?

I checked to see if the called file is within file structure and it is.

Is _BASEDIR on line 29 of index.php defined elsewhere? sorry I just can't find this as any type of function or operator and wondering if it automatically returns the script to the base directory to find the include folder.

Josh
Dean

15 Aug 2007
Posts: 11

Hi Josh,

I can't think why you would be getting that error message. As long as your 'mysite' directory has 777 permissions the install should go ok.

I suggest that you send an email to Harvey with the ftp/login details for your server and ask him if he wouldn't mind taking a look at it for you.

Dean
Dean
Back to Forum Index : Back to Installation   RSS
You must be logged in to post a reply



You need to Register or Log In before posting on these forums.