-   Linux - Server (
-   -   LAMP config glitch. dubbel slash in path /var/www//docs/... (

bmarien 01-17-2009 01:15 PM

LAMP config glitch. dubbel slash in path /var/www//docs/...
I'm setting up a debian based lamp server for testing purpose.

Its as debian 2.6.24-etchnhalf.1-686 fresh base install.
used apt-get to add following packages (in given order)

- ssh
- apache2
- mysql-server
- libapache2-mod-php5
- phpmyadmin

Next i created a new virutal site. using a2ensite <name> and a2dissite <name> to disable the default site and enable the newly created one.

PHP is confirmed to be working using phpinfo()
PHPmyAdmin seems to be working fine (/var/www/phpmyadmin)
Mysql is confirmed to be working (imported a big sql file with phpmyadmin)

Now here is where it goes wrong:
I downloaded the latest version of Wordpress and unzipped it in the doc root /var/www/

When loading index.php I get following error:

Warning: require_once(/var/www//wp-includes/classes.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/wp-load.php on line 43

Fatal error: require_once() [function.require]: Failed opening required '/var/www//wp-includes/classes.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/wp-load.php on line 43

There is double slash in /var/www//wp-includes which i believe is cause by an incorrect relative path setting somewhere, but just can't seem to find where.

Any suggestions are more then welcome. If you need any more info let me know...


j-ray 01-18-2009 06:00 AM

There are at least to approaches.

1. if mod_rewrite is enabled in apache use that to rewrite double slashes in general. For this you make an .htacces file in /var/www with this content
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [R=301,L]

2. Tae a look at the index.php in WP and see where what is included. Maybe you can find a folder with config files that you can edit to remove the leading slash from the relative path..

Hope this helps

(i didn't test the rewrite thing but I think it should work lie that)

bmarien 01-18-2009 10:08 AM

Aarg, can't believe it. i didn't cp over all the files i needed, Shame on me.

Thanks for the help guys

This one can be closed

All times are GMT -5. The time now is 10:18 PM.