homepage Welcome to WebmasterWorld Guest from 54.196.195.158
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

This 117 message thread spans 4 pages: < < 117 ( 1 2 3 [4]     
URL rewrite help needed
nevski




msg:4595721
 12:52 pm on Jul 23, 2013 (gmt 0)

Hi this is my first post on this forum.
The content of this forum is great,so keep up guys!

I have a problem with url rewriting.

This is my test page that I'm using for this purpose:
http://example.com/

I want to rewrite url:

http://example.com/index.php?page=about

to

http://example.com/about



or to be more precise to rewrite any page that contains
index.php?page=
to
http://example.com/$GET
variable name.

Content of .htaccess file is:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?page=$1


The problem is that url rewrite doesn't change in address bar it stays the same when I access to it by link on my navigation bar the link is:

<li><a href="index.php?page=about">About</a></li>


Adress bar:
http://example.com/index.php?page=about


But when I type manualy in address bar

http://example.com/about


it opens page correctly

So where is my mistake?
Any help guys?I would appreciate it!Tnx in advance!

[edited by: phranque at 2:24 pm (utc) on Jul 23, 2013]
[edit reason] Please Use Example.com [webmasterworld.com] [/edit]

 

JD_Toims




msg:4616276
 4:18 am on Oct 12, 2013 (gmt 0)

What Lucy24 said, and, for as long as I've been online people who code and actually build sites beyond WYSIWYG editors have recommended against directory-relative URLs [the-path-to/the-file.ext] in-favor-of server-relative URLs [/the-path-to/the-file.ext] due to the exact issue you're stating.

Personally, even if it took some time I'd change everything over to have a server-relative location [starts with a /], because when you do these issues don't pop-up and there are many less headaches and unexpected situations involved, especially if you get into complex rewriting and redirecting.

BTW: There are some programs that can use regular expressions to read closed files and do a find/replace [I use TextWrangler on a Mac, but DreamWeaver does the same thing -- not sure about others] so replacing every occurrence can be as easy as: Find==href="(([^/]{1})|https?://) : Replace==href="/\2 : Select the directory the site is in and "replace all".

nevski




msg:4616322
 6:12 pm on Oct 12, 2013 (gmt 0)

Thanx a lot I've changed everything as you've instructed and works great.CSS and all other is perfect,I have only a problem with images that i select using glob function for spitting it out.On localhost it works but now it doesn't,and I don't know why.

$files = glob("http://exaplesite.com/Images/*.*");
print_r($files);-it is test for me to see if he passed that part of code,but it doesn't show any print result.So something is probably wrong with my linking.

I've just extracted this simple php,I've checked even with direct link to some file,and browser opens it normally.

If it would be some mess with url/rewrite I guess it would show 404error.

But when I watch small broweser action bar,it says Waiting for server,and than it shows 404error but the page it self opens noramlly.What it could make a problem here?

JD_Toims




msg:4616331
 7:22 pm on Oct 12, 2013 (gmt 0)

glob("http://exaplesite.com/Images/*.*");

Note: This function will not work on remote files as the file to be examined must be accessible via the server's filesystem.

[php.net...]

You'll need something like:
glob($_SERVER['DOCUMENT_ROOT']."/Images/*.{jpg,jpeg,png,gif}",GLOB_BRACE);

You can shorten it if you know only images are in the directory:
glob($_SERVER['DOCUMENT_ROOT']."/Images/*");

nevski




msg:4616335
 8:21 pm on Oct 12, 2013 (gmt 0)

You can shorten it if you know only images are in the directory:
glob($_SERVER['DOCUMENT_ROOT']."/Images/*");


When i enter this still there is no change.

I echoed

$_SERVER['DOCUMENT_ROOT']
and it says

/usr/local/apache/htdocs

so it sould be read like /usr/local/apache/htdocs/Images

and select all images,and it's correct path for it.

Page is loaded but it shows still 404error on small bar of browser when it tries to execute it...

Tnx for help JD:)

P.S.My goal is to put image gallery for every page and to choose files that have same name like page title.

I never did some page that needs image galerry,but for this project is quite important.

$files=glob($_SERVER['DOCUMENT_ROOT']."/Images/Example/".$row['title']."/photos/*");
for ($i=0; $i<count($files); $i++)
{
$num = $files[$i];
echo '<a class="example-image-link" href="'.$num.'" data-lightbox="example-set" ><img class="example-image" src="'.$num.'" alt="" width="50" height="50"/></a>';
}

JD_Toims




msg:4616345
 10:27 pm on Oct 12, 2013 (gmt 0)

On a test page:

<?php
error_reporting(E_ALL);

$row['title']='A Title You Know You Have';

$files=glob($_SERVER['DOCUMENT_ROOT']."/Images/Example/".$row['title']."/photos/*",GLOB_ERR);

$cnt=count($files); $link='';

# Only counting once and using concatenation/accumulation
# should gain you half a blip of speed ;)

for ($i=0; $i<$cnt; $i++)
{

# I don't like setting variables when I already have one I can use
# so I took $num out. To me it's easy enough to figure out what
# $files[$i] is by where it is in the HTML, so switching to $num
# seems a bit repetitively redundant -- Really mostly a style thing,
# but might save you another quarter of a blip in processing time.

$link.='<a class="example-image-link" href="'.$files[$i].'" data-lightbox="example-set" ><img class="example-image" src="'.$files[$i].'" alt="" width="50" height="50"/></a>';
}

echo $link;

?>

What's the error log say when you run that?

nevski




msg:4616350
 10:42 pm on Oct 12, 2013 (gmt 0)

Funny thing but I don't get any error,just I saw that still it showes the 404error,but not on the page.It says something like
waiting for server on small address bar in bottom of browser and that 404 something.

Really thank You so so much for help,ordinary I get some error,but in this case,page loads normally,only doens't show anything about images without any error message,besides that all works perfect.

UPDATE:I've deleted whole page started all over,and now with that code it showes blank image,no errors nothing just 100px*100px image like it writen but it's not image from that folder...

[edited by: nevski at 11:24 pm (utc) on Oct 12, 2013]

JD_Toims




msg:4616354
 11:15 pm on Oct 12, 2013 (gmt 0)

Oh, uh, well, uh, yeah it would probably do that since $files[$i] is probably not giving the correct path for a browser to get to the images. Sorry I didn't think of it before. I usually use file_get_contents() because it's a bit more flexible in where it requests files from, but I think glob() should be fine in this situation and possibly even a bit better.

Try This:

<?php
error_reporting(E_ALL);

$row['title']='A Title You Know You Have';

$files=glob($_SERVER['DOCUMENT_ROOT']."/Images/Example/".$row['title']."/photos/*",GLOB_ERR);

$cnt=count($files); $link='';

# Only counting once and using concatenation/accumulation
# should gain you half a blip of speed ;)

for ($i=0; $i<$cnt; $i++)
{

# I don't like setting variables when I already have one I can use
# so I took $num out. To me it's easy enough to figure out what
# $files[$i] is by where it is in the HTML, so switching to $num
# seems a bit repetitively redundant -- Really mostly a style thing,
# but might save you another quarter of a blip in processing time.

$link.='-a class="example-image-link" href="'.$files[$i].'" data-lightbox="example-set"--img class="example-image" src="'.$files[$i].'" alt="" width="50" height="50"/--/a-<br>';
}

echo $link;

?>

Take a look at the href="" and src="" lines to see where your browser is looking for the images and then modify the path $files[$i] is returning as necessary. You should be able to modify the href="" and src="" to use either a server-relative URL or a fully-qualified URL [http://www.example.com/the-path-to/the-file.ext] for the image locations fairly easily.

nevski




msg:4616356
 11:47 pm on Oct 12, 2013 (gmt 0)

Still there is no change except that browser doesn't process this

!-a class="example-image-link" href="" data-lightbox="example-set"--img class="example-image" src="" alt="" width="50" height="50"/--/a-

I've made like test

$files=glob($_SERVER['DOCUMENT_ROOT']."/Images/Example/".$row['title']."/photos/*",GLOB_ERR);
echo $files;
if (!$files){
echo "failed!";

}

So it does show that $files didn't get anything echoes Failed.

Sorry for bothereing,just I can not figure out why it refuses to take it.Nearly 12 hours I'm trying to descover shy is that...and everytime it doens't shows any progress.Also you make a really great effort in helping me,and it's just blank,and I'm really really puzzeled.It cannot be url rewriting because all the css is working great,just that thing doesn't work....If glob would properly select then I would edit these href and src but for some reason it fails.

JD_Toims




msg:4616359
 11:59 pm on Oct 12, 2013 (gmt 0)

Still there is no change except that browser doesn't process this.

I didn't want it to be echoed as html for the browser -- See how the href and src are empty? That's what I would want to be able to see without having to view the source every time I made a change and retested to figure out how to get it working.

Try This:

<?php
error_reporting(E_ALL);

$row['title']='A Title You Know You Have';

echo "/Images/Example/".$row['title']."/photos/*";
exit;

/*

$files=glob($_SERVER['DOCUMENT_ROOT']."/Images/Example/".$row['title']."/photos/*",GLOB_ERR);

$cnt=count($files); $link='';

# Only counting once and using concatenation/accumulation
# should gain you half a blip of speed ;)

for ($i=0; $i<$cnt; $i++)
{

# I don't like setting variables when I already have one I can use
# so I took $num out. To me it's easy enough to figure out what
# $files[$i] is by where it is in the HTML, so switching to $num
# seems a bit repetitively redundant -- Really mostly a style thing,
# but might save you another quarter of a blip in processing time.

$link.='-a class="example-image-link" href="'.$files[$i].'" data-lightbox="example-set"--img class="example-image" src="'.$files[$i].'" alt="" width="50" height="50"/--/a-<br>';
}

echo $link;
*/
?>

Look at what's echoed and see if it matches the actual path to the /photos/ directory like it should. If it does then copy/paste it into your browser and change /photos/* to /photos/an-img-name.ext and see if you can load the image.

There almost has to be something wrong with the path, like maybe you're using the $row['title'] as is [meaning with spaces and camel-casing] but your images are stored within a directory that's had the titles converted to something like lowercase and spaces replaced with hyphens.

lucy24




msg:4616361
 12:05 am on Oct 13, 2013 (gmt 0)

Now, wait a minute. Granted I only speak three words of php, but what's that _SERVER['DOCUMENT_ROOT'] even doing there?

The <img src...> tag in the final HTML isn't supposed to say

<img src = "http://www.example.com/long-complicated-physical-filepath-here/Images/Example/name-of-file"

It should only say
<img src = "/Images/Example/name-of-file"

That's your $row array, not the complete $files. The only exception would be if you're getting the images from some completely different place-- and then you wouldn't be using _SERVER['DOCUMENT_ROOT'] anyway.

Uh... Right?

nevski




msg:4616362
 12:16 am on Oct 13, 2013 (gmt 0)

This is echoed patch and it matches with desired location
/Images/Example Folder/photos/*
Nothing wrong with it.

I've tryed to load ordinary image,with direct patch to it and it worked.

But I don't know maybe this empty space Example Folder makes problem?
Still on localhost it was the same location but it fails on testing webserver.
Also I have image logo that page and it spits on correct way.
/Images/row['title']/photos/logo.jpg.

@Lucy
You have point,but I'm trying to select all images from folder and to put in image gallery.I tryed without $_SERVER['DOCUMENT_ROOT']but it doesn't select any.

I've justn noticed that the pages opens and when it tries to excecute glob it says Waiting for server and few times it blinks 404error on small boottom addres bar and that's it.Just opens page without it.It doesn't get any result and $files vairuable is empty.

JD_Toims




msg:4616401
 2:58 am on Oct 13, 2013 (gmt 0)

what's that _SERVER['DOCUMENT_ROOT'] even doing there?

glob() walks the file path. Since files move and aren't always in the same directory, when I encounter something that "likes to take a walk" I prefer to tell it where to go look starting from the beginning [I've heard from the beginning is a very good place to start ;)].

The <img src...> tag in the final HTML isn't supposed to say

<img src = "http://www.example.com/long-complicated-physical-filepath-here/Images/Example/name-of-file"

It should only say
<img src = "/Images/Example/name-of-file"

It can't if the photos directories are within directories created with names of the page titles they're associated with. It must be the full server-relative path or a fully-qualified URL to the correct photos directory, which includes the titles.



This is echoed patch and it matches with desired location
/Images/Example Folder/photos/*
Nothing wrong with it.

Good, that's progress in the right direction.

But I don't know maybe this empty space Example Folder makes problem?

I would guess it's either that or a difference in the setting of the $_SERVER['DOCUMENT_ROOT'] where locally it's not set with a trailing slash, but on the testing server it is for some reason. It shouldn't be the mod_rewrite if it's working on one server but not another and the .htaccess files on each are identical.

Personally, just because spaces in URLs can cause huge headaches I'd str_replace() them with a hyphen for the images and directories created from the page titles -- I'd probably also strtolower() everything "URL related" in the file system and links, because mis-cased type-ins and links are likely to happen more often with camel-casing, plus URL capitalization correction is so quick and easy with PHP when everything is lowercase and it's so "standard" across the web to have lowercase ULRs I'd stick with it. I have seen sites using caps in URLs though, so some of it's preference. Just remember if you use caps, you'll likely *need* to check for case errors even just to make sure you "capture" all possible links.

* Note: I don't have any more time to give this one right now, but I'll try to remember to come back to it in a day or two and see if things got solved.

lucy24




msg:4616410
 4:36 am on Oct 13, 2013 (gmt 0)

I would guess it's either that or a difference in the setting of the $_SERVER['DOCUMENT_ROOT'] where locally it's not set with a trailing slash, but on the testing server it is for some reason.

Funny you should say that, because while I was over at php dot net, I found a slew of posts recommending
. DIRECTORY_SEPARATOR .
:)
followed by a further slew of posts saying in essence Nooo, that's even worse.

nevski




msg:4616426
 9:35 am on Oct 13, 2013 (gmt 0)

Guys thanks really for helping me out!I really rally apreciate it!

I will do following thing,first of all I will make a simple page that will select images from simple folder and without any of these directory separators and whatsoever.Just direct path to folder using the code from above.I think it's wise to eliminate one by one thing.

So I will write down the results after doing it.

UPDATE:Ok I've made simple php page and I set up lowercase folder without any empty space in root called just photos.But still results are same,waiting for server then fast few times timething like 404error blink and opens page regulary.

I've echoed
echo $_SERVER['DOCUMENT_ROOT'];
result-/usr/local/apache/htdocs

so according to it the path to this folder should be
/usr/local/apache/htdocs/photos

since I've made

$files=glob($_SERVER['DOCUMENT_ROOT']."/photos/*",GLOB_ERR);


NEWEST UPDATE:(Partialy solved)

I was pissed of and I've conntacted my server hosting company and they told me that $_SERVER['DOCUMENT_ROOT'] isn't allowed and that I must use

/home/my-username a123456/public_html/


So finally I got some results

using

$files=glob("/home/a123456/public_html/photos/*");
print_r($files)

and got

Array ( [0] => /home/a123456/public_html/photos/1.jpg [1] => /home/a123456/public_html/photos/2.jpg [2]


I'm sorry JD,Lucy for bothering but I never suspected that it would be such a mess with hosting company and it's their fault not yours or mine.Still I'm working out this but it's huge step,finally some results using globe function.

I will update my progress here.Tnx a lot there is no word in which I could describe gratitude for You!

nevski




msg:4616431
 11:46 am on Oct 13, 2013 (gmt 0)

Sorry for double post,just the time for editing has passed.

Ok it counts well and prints the file names.But is doesn't echo any image,just empty image,and it echoes the right number of images 8,which represents the number of images in folder.I'm just testing it and I deleted any css or any setup just made,a simple echo img that looks like this.

$files = glob("/home/a123456/public_html/photos/*");
$cnt=count($files); $link='';

for ($i=0; $i<$cnt; $i++)
{

echo '<img src="'.$files[$i].'"/>';
}
?>


So $ files is ok since it shows the number of images,though it is like empty images but it echoes it.But it doesn't want to show any.Is there any obvious mistake that I make?

EDIT:I've tryied to load image from internet and worked fine so no problem with that.

I've did

$files = glob("/home/a123456/public_html/photos/*");
$cnt=count($files); $link='';

for ($i=0; $i<$cnt; $i++)
{
echo $files[$i];
echo '<img src="'.$files[$i].'"/>';
}


/home/a123456/public_html/photos/1.jpg
in that way.But it could not load the image,and path and everything is ok,just I'm puzzled why it doen't echo image and echoes the path to it on proper way...

[edited by: nevski at 12:31 pm (utc) on Oct 13, 2013]

lucy24




msg:4616432
 12:26 pm on Oct 13, 2013 (gmt 0)

echo '<img src="'.$files[$i].'"/>';

What does the html produced by this code actually say? I want to focus on this because the php's job is to create the html, which in turn tells the browser what to ask for. That is, the php isn't saying to the browser "Here you go, here's your page with all its images". It's saying "If you want images, here's where you should look for them".

How can the host not recognize SERVER_blahblah? It's obviously not a php-version issue. Assuming for the sake of discussion that you're not stuck with php version 3 :)

But it doesn't echo any image

What exactly do you mean by this?

nevski




msg:4616433
 12:37 pm on Oct 13, 2013 (gmt 0)

Lucy I'm really puzzled.

I've edited previous post with some new information.

It access the folder and writes the name and counts it as expected.

I've even put in src direct link

echo '<img src="/home/a123456/public_html/photos/1.jpg"/>';

I know that image exist since it could grab the name of image in previous query,but when it gets to showing it on page shows it like broken image...

I've made a photo of all code apperance in browser nad also inspect element in browser.So if you wish I could send it through e-mail or send location on which I could upload it on internet?Becuase eevrything could be seen on that photo.So if it could be easier for you just send your e-mail by private message.

here is the photo

[i305.photobucket.com...]

nevski




msg:4616449
 4:30 pm on Oct 13, 2013 (gmt 0)

I've done this

<?php
$files = glob("/home/a5734697/public_html/photos/*");
$cnt=count($files); $link='';

for ($i=0; $i<$cnt; $i++)
{
echo $files[$i];
echo '<img src="/photos/1.jpg"/>';
}

?>


I've just tested it to see can it show that image,and bingo it shows.

So the problem is that to select all images it asks a path

/home/a123456/public_html/photos/1.jpg

but it can not show the image with it

without problems it shows with

src="/photos/1.jpg"/

but not with path

src="/home/a123456/public_html/photos/1.jpg"

So I'm puzzeled with how it can extract filnames by that path,but it can not preview the image with same path.That is my main question and worry.

JD_Toims




msg:4616465
 6:38 pm on Oct 13, 2013 (gmt 0)

Your browser can't "walk the internal file-path" of your server, so you need to use two different paths. One is internal [for PHP]. One is external [for browsers] -- The glob() needs to be /home/a123456/public_html/photos/1.jpg. The src and href need to be /photos/1.jpg

Like This:

<?php
error_reporting(E_ALL);

$row['title']='A Title You Know You Have';

$files=glob("/home/a123456/public_html/photos/*",GLOB_ERR);

/* Commented below for testing

$files=glob("/home/a123456/public_html/Images/Example/".$row['title']."/photos/*",GLOB_ERR);

*/

$cnt=count($files); $link='';

for ($i=0; $i<$cnt; $i++) {
$link.='<a class="example-image-link" href="/photos/'.$files[$i].'" data-lightbox="example-set" ><img class="example-image" src="/photos/'.$files[$i].'" alt="" width="50" height="50"/></a>';
}

echo $link;

?>

nevski




msg:4616474
 7:30 pm on Oct 13, 2013 (gmt 0)

$files = glob("/home/a123456/public_html/photos/*");
$cnt=count($files); $link='';

for ($i=0; $i<$cnt; $i++)
{
echo $files[$i];
echo '<img src="photos/'.$files[$i].'"/>';
}



Glad to see you JD,I decided to make code more simple.To delite all uneccesary css and this kind of stuff.Made simple page with only one folder.Not such things as taking variables into the link.Just that what i wrote.

i think when it gets working it would be easy to implement it on page that I would like.

So I will try to write as precise as I can what are the results.



1.$files = glob("/home/a123456/public_html/photos/*");


It is the path to server which my server company gave to me.

2.echo $files[$i];

This is just for sake of check if any image was found and to see what is his path.

/home/a123456/public_html/photos/1.jpg-this is path of one file so it is equal to $files(is is echo of $files)

3.echo '<img src="'.$files[$i].'"/>'; This is for previewing of images.

So it says ok put the $files which is path to image,which we saw becuase echo $files and it was success.So use same path for getting the image and preview it.But it doesn't work.It works when it gets filenames and count it.We saw it becuase echo of $files was success.

Ok I have few questions.

First of all if that glob patch is succesful and I get the page names.Why it could not be used for previeing image?

Secondly I've put the src="photos/'.$files[$i].'"/>'; like you wrote and the path is photos/home/a123456/public_html/photos/1.jpgThis surely doesn't exist.

So if this doesn't functions the thing that crosses my mind is

to take from $files

from example /home/a123456/public_html/photos/1.jpg

just the 1.jpg or 222.jpg or myphoto.jpg from path as variable $new_file

and to put in such a form

echo '<img src="photos/'.$new_file.'"/>';

Could it work,and is there a way for doing it?

I really tryed to write this huge post because I appreciate your help really.Just I want to make easier for you to understand my worries and problem that I encountered.

Tnx you JD and Lucy for your time!

P.S.

I've made this image,just to make it easier to understand what I'm talking about

[i305.photobucket.com...]

JD_Toims




msg:4616475
 8:08 pm on Oct 13, 2013 (gmt 0)

$files = glob("/home/a123456/public_html/photos/*");
$cnt=count($files); $link='';

for ($i=0; $i<$cnt; $i++)
{
$external_url=str_replace('/home/a123456/public_html','',$files[$i]);
echo $external_url;
echo '<img src="'.$external_url.'"/>';
}

nevski




msg:4616478
 8:50 pm on Oct 13, 2013 (gmt 0)

Yeeeeeeeeeeeeeeeeeeeeeeeyyyyyyy it finally works,THANK YOU SO MUCH!))))))))))))))

Personaly I thought about str_replace,but sincerly I wasn't sure how to do that,but you are really expert,all of you guys are experts!

I will update about further progress in this project,but now you need to rest from me))))It's great when you have such helpful people around you!

Some devil doens't give me a rest so I've tryed to implement
that coding that i first wanted.

Still testing but I have funny result.

$files = glob("/home/a123456/public_html/images/".$row['title']."/photos/*");


then just in testing purpose I wrote

echo $files; to see what it gets,and the echo result is ARRAY.Why $ files in that case are threated like that when in previous example it echoed locations of files and n this it doesn't?

print_r($files) works and prints all the files,but echo function spits just ARRAY and nothing more.

nevski




msg:4616482
 10:24 pm on Oct 13, 2013 (gmt 0)

All is great I've worked it out...probably my bad concentration was a problem.I have issue with javascript for viewing image but i will leave it for tommorow!Tnx once again guys!This is best forum ever!

lucy24




msg:4616485
 10:55 pm on Oct 13, 2013 (gmt 0)

Your browser can't "walk the internal file-path" of your server, so you need to use two different paths. One is internal [for PHP]. One is external [for browsers] -- The glob() needs to be /home/a123456/public_html/photos/1.jpg. The src and href need to be /photos/1.jpg

That's what I was trying to say earlier, but was hampered by not speaking php :(

nevski




msg:4616489
 11:48 pm on Oct 13, 2013 (gmt 0)

Tnx in any case Lucy for everithing.Just the trouble was that one way is needed for getting and counting image and the other
for spitting it out.If I knew that $_SERVER['DOCUMENT_ROOT'] can't be used on my server the problem would be solved earlier.I guess that the horns started to grow ot JD's head over the process of helping me)))On mine they appeared to after 2 days for sure))

JD_Toims




msg:4616500
 1:27 am on Oct 14, 2013 (gmt 0)

That's what I was trying to say earlier, but was hampered by not speaking php :(

Well, I only speak procedural at this time, so there are some who know/speak way more than me and I'm sure somehow you'll be fairly fluent someday, but it takes a ton of time to get there, which happens to be where my advantage comes from -- I'm going to celebrate a decade since I registered my first domain in a bit over 6 months, so I've got a few years of experience on ya ;)

I guess that the horns started to grow ot JD's head over the process of helping me)))On mine they appeared to after 2 days for sure))

Oh, I've definitely been there on multiple occasions during my time online -- Sometimes I've had to trash 2 or 3 days of code (100s of lines), because I hit the point of "Oh, you mean I can't get there from here?" and had to go back and rework things -- Yours was mostly solved by simple troubleshooting, so hopefully you got some "how do I solve this" type of stuff out of the thread along with the solution to the issues.

I am glad we got this one solved though and I'll tuck it away in the "oddities" file, because this is the first time I've heard of a host not setting the document root correctly. Sometimes it varies between trailing / and no trailing /, but to have it just plain be the wrong path? That's a new one for me.

nevski




msg:4616529
 9:27 am on Oct 14, 2013 (gmt 0)

I'm sure somehow you'll be fairly fluent someday, but it takes a ton of time to get there


This is good point for me.Really PHP is powerful and really really takes time to learn it.I will not say that I know really much,but I try to learn it everyday.PHP is in combination with SQL very powerful and also with mod_rewrite.These combination is brutal.I must admit that Javascript and AJAX are my weak spot,it's some how similar to PHP but I can't get a time to imporove my skills since PHP is like my preoccupation at present time.Surely ordinary people when they see good functional website they have no idea what pain it could be to make all the things work.

I will not involve in phylosophy further.But really even problems and mistakes can do good.If I encounter problem with some server host like this in future I wll know what to do.

And JD I can imagine what pain it was 10 years ago,when internet wasn't in such expansion,in nowdays you can find tons of websites with information,but in that time I'm not so sure about it.

When I encounter a problem I try to eliminate things in code,testing each variable or function.So I really tryed to do this in this thread also.

P.S.I must admit that I feel myself really good and it's pleasent for me to be a part of this forum besides such great guys!

I'm using in present time Lightbox image gallery so can you recommend me some other which is simple(fast) and easy to implement on website,since I'm not expert for Javascript?

This 117 message thread spans 4 pages: < < 117 ( 1 2 3 [4]
Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved