WebSVN doesn't recognize repositories - php

I am trying to install WebSVN. Everything worked fine so far but my repositories are not recognized.
Inside my user folder /home/svn (svn is the user name) I have several repositories and I want all of them to appear in WebSVN.
This is my config.php:
<?php
$config->setSVNCommandPath('/usr/bin');
$config->setDiffPath('/usr/bin');
$config->setEnscriptPath('/usr/bin');
$config->setSedPath('/bin');
$config->setTarPath('/bin');
$config->setGZipPath('/bin');
$config->parentPath('/home/svn');
$config->addTemplatePath($locwebsvnreal.'/templates/calm/');
$config->addTemplatePath($locwebsvnreal.'/templates/BlueGrey/');
$config->addTemplatePath($locwebsvnreal.'/templates/Elegant/');
$config->addInlineMimeType('text/plain');
$config->setMinDownloadLevel(2);
$config->useGeshi();
set_time_limit(0);
$config->expandTabsBy(8);
$extEnscript[".pl"] = "perl";
$extEnscript[".py"] = "python";
$extEnscript[".sql"] = "sql";
$extEnscript[".java"] = "java";
$extEnscript[".html"] = "html";
$extEnscript[".xml"] = "html";
$extEnscript[".thtml"] = "html";
$extEnscript[".tpl"] = "html";
$extEnscript[".sh"] = "bash";
If I open WebSVN in a browser, it shows an HTTP ERROR 500. If I change the line $config->parentPath('/home/svn'); to $config->parentPath('/home'); it keeps telling me:
Please set up a repository in include/config.php using
$config->parentPath or $config->addRepository. See the installation
guide for more details.
Am I missing something?

With all things set, I also kept experiencing this issue. Browsing the Apache error log file I encountered an interesting bit regarding a missing xml function (using Ubuntu 16.04 LTS, the default php installation which is 7.0 at the time being). This could be easily solved by installing php-xml with
apt-get install php-xml -y
Hope this is your case as well.

In addition to telling WebSVN where to find your repositories with parentPath (which just lets you shorten later paths), you have to create one entry (using addRepository) per repository that you want to display on the WebSVN home page.
The addRepository() function takes two arguments. The first is the visible name, the second is the path to the SVN repository.
Reference link: Use Subversion, Apache, and WebSVN to view your repositories
(It's been a while since I setup WebSVN, but I did have to list each one individually.)

Add a repository using the below command
$ svnadmin create --fs-type fsfs /home/svn/FirstRepo
then
Add a line with your first repository like below in your config.php
$config->addRepository("FirstRepo", "file:///home/svn/FirstRepo");
and also install php-xml.
$ sudo apt install -y php-xml
Restart the apache2 server.
$ sudo apache2 restart

Related

Laravel Snappy PDF Exit Status Code 127

I am trying to print a HTML to PDF file for hardcopy and file purposes of my project in Laravel. I tried to use the barryvdh/laravel-snappy so I followed the documentations carefully and I also installed this wkhtmltopdf for ubuntu 16.04 64x bit cause I think it is required in order to use this package. But there is a big problem. When I generate a PDF sample using Snappy it gives me this error.
Is there something wrong in the installation of my wkhtmltopdf? or is it a directory issue? I tried to sudo chmod -R 777 usr/bin/wkhtmltopdf but still got the same error.
I also followed this this link to help me out. But ended up in the same error.
Looking for help.
Thanks in advance.
Btw I am using Ubuntu 17.10 64-bit
wkhtmltodf version - 0.12.3.2
I would suggest you to use the below package for integrating PDF feature.
I personally use this and its working great and easy to use.
https://github.com/barryvdh/laravel-dompdf
If you came across any issue using this plugin please ask me i will help you out for sure.
E.g
Make sure to install and configure this package as mention in the document also make sure to run the below command after installation and configuration of this package.
php artisan vendor:publish --provider="Barryvdh\DomPDF\ServiceProvider"
then try using the below code:
$date = Carbon::now()->format('j F, Y');
data = ['date'=>$date];
$pdf = PDF::loadView('admin.pages.application', $data)->setPaper('a4');
return $pdf->download('download.pdf');
on my Ubuntu 20.04 i had to install a few more dependencies for it to work
Edit this file /etc/apt/sources.list and add this line to the end of it: deb http://security.ubuntu.com/ubuntu bionic-security main
After that run: sudo apt update && apt-cache policy libssl1.0-dev
Finally: sudo apt-get install libssl1.0-dev
And finish with: sudo apt-get install libxrender1
Please give 777 permission to vendor folder and then check it

TYPO3 can't access to root folder

I am new in TYPO3, I have a running system online and wanted to copy to my localhost, I copied the folder in /var/www/my_production/
I created the database, I can access to the backend without problem but I cant open my site, I get this error :
1323059807: You are not allowed to create directories in the folder "/" (More information)
TYPO3\CMS\Core\Resource\Exception\InsufficientFolderWritePermissionsException
thrown in file
/var/www/my_production/typo3/sysext/core/Classes/Resource/ResourceStorage.php
in line 2021.
Any idea how I can fix that problem?
EDIT ::
After clearing the cache from the Install Tool, I got :
Fatal error: Call to undefined function
TYPO3\CMS\Core\Utility\xml_parser_create() in
/var/www/clevvermail_dev/typo3/sysext/core/Classes/Utility/GeneralUtility.php
on line 2252
One possible cause is that XML is missing.
Try: sudo apt-get install php7.0-xml or sudo apt-get install php5.6-xml
First steps for each new TYPO3 installation: enter Install Tool and reduce all errors possible. (You might stay with some errors, but you need to understand them.)
TYPO3 gives a lot of hints what has to be changed.
typical errors:
missing directories
missing rights in directories
wrong configuration in php.ini
missing php modules
database errors (connection, user, password)
try to solve these errors first.
Since TYPO7 you can check your extensions from the Install Tool.
For earlier versions:
disable all additional extensions (in PackagesState.php) and get the core working, then enable one extension after the other.

Why cant I run bin/behat?

I am trying to run behat on my vendor folder. I have installed composer globally, have installed the behat package, but every time I run bin/behat I keep getting this message from composer
You must set up the project dependencies, run the following commands:
curl -s http://getcomposer.org/installer | php
php composer.phar install
I am not sure how to fix this. I see the files are in the vendor folder, and when I type "composer" on the terminal, I see the manual.
If anyone can help me resolve this I would really appreciate it. Thanks!
There are several possible problems leading to this situation:
Make sure that composer is installed in your $PATH. That is, running composer at a command prompt should work, and you shouldn't need to run an explicit path like ~/Downloads/composer.phar
Execute the composer install instruction as the error message suggests. A common error is the message
Mcrypt PHP extension required
in which case you need to install the specified extension. For example, brew install php56-mcrypt on a Mac or sudo apt-get install php5-mcrypt on Ubuntu.

How to create an archive with Zippy on Laravel 4?

I use Laravel 4 framework for PHP and have successfully added this module called Zippy for creating archive files but it seems to be bouncing back an error saying
Unable to create archive
Please can you suggest a solution for a different package or how to get around with this error?
PHP Code:
use Alchemy\Zippy\Zippy;
$zip = Zippy::load();
$zip->create('testingit.zip', array(
"assets/img/logo.png"
),$recursive = true);
I recently had this problem in one server and the solution was these two things:
Make sure zip is installed
sudo apt-get install zip or yum install zip unzip
Make sure your enviroment variable PATH is set using phpinfo() or getenv('PATH')
In my case I' using php-fpm, I just had to add this line in /etc/php5/fpm/pool.d/www.conf
env[PATH] = /usr/local/bin:/usr/bin:/bin

PEAR/Digg2: PHP/Linux Installation Issue

I have a VPS running a VPS optimized Debian distro.
I am very new to utilizing a VPS and have next to zero Linux background.
A little background to help:
I went through and apt-get install pear which went through fine.
I attempted to install the dependent services for the Digg api as such:
pear install HTTP_Request2
This provided an error, I had to install it with:
pear install HTTP_Request2-alpha
Then I attempted:
pear install HTTP_OAuth
This provided the same error as above, I installed it eventually with:
pear install HTTP_OAuth-alpha
So I then successfully installed Digg2 with pear install Services_Digg2
Okay, background over. My issue is that it will not initiate the class as it says the file is not there. The PHP is as simple as this:
require_once 'Services/Digg2.php';
$api = new Services_Digg2;
I checked my include path as per the error in PHP:
Fatal error: require_once() [function.require]:
Failed opening required 'Services/Digg2.php' (include_path='/usr/share/php')
in /var/www/redacted1/data/www/redacted2/index.php on line 3
So I verified that the file was there in Terminal:
http://snapplr.com/tk9r
And I verified that the include path was proper via PHP_Info():
http://snapplr.com/dwk7 (sorry I can only post one hyperlink as I'm new)
The error remains.
Hopefully my lengthy intro isn't a hassle and actually helps.
Any incite?
Thanks
Jeff
To install a PEAR/PECL package that is in a state other than "stable", you have to specify the full spec for the package:
pear install Services_Digg2-alpha #alpha state
pecl install ssh2-0.11.2 #beta state
PEAR also takes care of dependencies (usually, but I can confirm in that specific case that it does). You don't have to manually install them.
Now that you have it installed, it should work like you did:
include_once 'Services/Digg2.php'
However, I'm a little concerned that your code shows include_once while the error message you have shows you are using require_once. This leads me to believe that the code you posted is not the actual code.

Categories